@neat.is/core 0.7.8 → 0.7.10

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/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MultiDirectedGraph } from 'graphology';
2
- import { GraphNode, GraphEdge, EdgeTypeValue, StaleEvent, ErrorEvent, BlastRadiusResult, RootCauseResult, RegistryEntry, RegistryStatus, RegistryFile } from '@neat.is/types';
2
+ import { GraphNode, GraphEdge, SpanAttributes, EdgeTypeValue, StaleEvent, ErrorEvent, BlastRadiusResult, RootCauseResult, RegistryEntry, RegistryStatus, RegistryFile } from '@neat.is/types';
3
3
  export { StaleEvent } from '@neat.is/types';
4
4
  import { FastifyInstance } from 'fastify';
5
5
 
@@ -134,6 +134,7 @@ interface ConnectorContext {
134
134
  projectDir: string;
135
135
  credentials: Record<string, unknown>;
136
136
  since?: string;
137
+ errorsPath?: string;
137
138
  }
138
139
  /**
139
140
  * `file:line` the provider's own signal carries, when it does (rare — see
@@ -146,6 +147,27 @@ interface ConnectorCallSite {
146
147
  file: string;
147
148
  line: number;
148
149
  }
150
+ /**
151
+ * A failure the provider already recorded, carried on a signal so the shared
152
+ * pipeline can mint it as an OBSERVED incident on the repo node the failure
153
+ * implicates — the incident-emitting connector shape (connectors.md §10,
154
+ * ADR-185). EAS is the first user: an `ERRORED` build becomes one of these.
155
+ *
156
+ * It is a *pre-built* incident minus its `affectedNode`: the connector's
157
+ * mapping layer fills every field here, and the shared pipeline sets the
158
+ * `affectedNode` from `resolveTarget` and derives the `traceId`/`spanId` the
159
+ * `ErrorEvent` shape requires from the stable `id`. So the terminal write is
160
+ * an `ErrorEvent` on the incident ledger (the same store OTLP-derived
161
+ * incidents use), not an `upsertObservedEdge`.
162
+ */
163
+ interface ConnectorIncident {
164
+ id: string;
165
+ timestamp: string;
166
+ service: string;
167
+ errorType: string;
168
+ errorMessage: string;
169
+ attributes?: SpanAttributes;
170
+ }
149
171
  /**
150
172
  * One provider-agnostic observation. `targetKind`/`targetName` are the
151
173
  * provider's own vocabulary (`'supabase-table'`/`'orders'`,
@@ -163,6 +185,7 @@ interface ObservedSignal {
163
185
  lastObservedIso: string;
164
186
  callSite?: ConnectorCallSite;
165
187
  columns?: string[];
188
+ incident?: ConnectorIncident;
166
189
  }
167
190
 
168
191
  /**
@@ -302,6 +325,10 @@ interface BuildOtelReceiverOptions {
302
325
  onProjectSpan?: ProjectSpanHandler;
303
326
  onProjectErrorSpanSync?: (project: string, span: ParsedSpan) => Promise<void>;
304
327
  isProjectRegistered?: (project: string) => boolean;
328
+ classifyBareRoutability?: (spans: ParsedSpan[]) => {
329
+ rejected: number;
330
+ message?: string;
331
+ };
305
332
  bodyLimit?: number;
306
333
  authToken?: string;
307
334
  trustProxy?: boolean;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { MultiDirectedGraph } from 'graphology';
2
- import { GraphNode, GraphEdge, EdgeTypeValue, StaleEvent, ErrorEvent, BlastRadiusResult, RootCauseResult, RegistryEntry, RegistryStatus, RegistryFile } from '@neat.is/types';
2
+ import { GraphNode, GraphEdge, SpanAttributes, EdgeTypeValue, StaleEvent, ErrorEvent, BlastRadiusResult, RootCauseResult, RegistryEntry, RegistryStatus, RegistryFile } from '@neat.is/types';
3
3
  export { StaleEvent } from '@neat.is/types';
4
4
  import { FastifyInstance } from 'fastify';
5
5
 
@@ -134,6 +134,7 @@ interface ConnectorContext {
134
134
  projectDir: string;
135
135
  credentials: Record<string, unknown>;
136
136
  since?: string;
137
+ errorsPath?: string;
137
138
  }
138
139
  /**
139
140
  * `file:line` the provider's own signal carries, when it does (rare — see
@@ -146,6 +147,27 @@ interface ConnectorCallSite {
146
147
  file: string;
147
148
  line: number;
148
149
  }
150
+ /**
151
+ * A failure the provider already recorded, carried on a signal so the shared
152
+ * pipeline can mint it as an OBSERVED incident on the repo node the failure
153
+ * implicates — the incident-emitting connector shape (connectors.md §10,
154
+ * ADR-185). EAS is the first user: an `ERRORED` build becomes one of these.
155
+ *
156
+ * It is a *pre-built* incident minus its `affectedNode`: the connector's
157
+ * mapping layer fills every field here, and the shared pipeline sets the
158
+ * `affectedNode` from `resolveTarget` and derives the `traceId`/`spanId` the
159
+ * `ErrorEvent` shape requires from the stable `id`. So the terminal write is
160
+ * an `ErrorEvent` on the incident ledger (the same store OTLP-derived
161
+ * incidents use), not an `upsertObservedEdge`.
162
+ */
163
+ interface ConnectorIncident {
164
+ id: string;
165
+ timestamp: string;
166
+ service: string;
167
+ errorType: string;
168
+ errorMessage: string;
169
+ attributes?: SpanAttributes;
170
+ }
149
171
  /**
150
172
  * One provider-agnostic observation. `targetKind`/`targetName` are the
151
173
  * provider's own vocabulary (`'supabase-table'`/`'orders'`,
@@ -163,6 +185,7 @@ interface ObservedSignal {
163
185
  lastObservedIso: string;
164
186
  callSite?: ConnectorCallSite;
165
187
  columns?: string[];
188
+ incident?: ConnectorIncident;
166
189
  }
167
190
 
168
191
  /**
@@ -302,6 +325,10 @@ interface BuildOtelReceiverOptions {
302
325
  onProjectSpan?: ProjectSpanHandler;
303
326
  onProjectErrorSpanSync?: (project: string, span: ParsedSpan) => Promise<void>;
304
327
  isProjectRegistered?: (project: string) => boolean;
328
+ classifyBareRoutability?: (spans: ParsedSpan[]) => {
329
+ rejected: number;
330
+ message?: string;
331
+ };
305
332
  bodyLimit?: number;
306
333
  authToken?: string;
307
334
  trustProxy?: boolean;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  routeSpanToProject,
3
3
  startDaemon
4
- } from "./chunk-OVRVDSUO.js";
4
+ } from "./chunk-D4OX6MUX.js";
5
5
  import {
6
6
  ProjectNameCollisionError,
7
7
  addProject,
@@ -37,15 +37,15 @@ import {
37
37
  thresholdForEdgeType,
38
38
  touchLastSeen,
39
39
  writeAtomically
40
- } from "./chunk-LN75Z624.js";
40
+ } from "./chunk-6T7ZHODF.js";
41
41
  import {
42
42
  startOtelGrpcReceiver
43
- } from "./chunk-4GCV46AP.js";
43
+ } from "./chunk-FCO5Z3RW.js";
44
44
  import {
45
45
  buildOtelReceiver,
46
46
  logSpanHandler,
47
47
  parseOtlpRequest
48
- } from "./chunk-Y43UCVZS.js";
48
+ } from "./chunk-UUYCTH2E.js";
49
49
  export {
50
50
  ProjectNameCollisionError,
51
51
  addProject,