@descryy/runtime-database-observation 0.4.4 → 0.4.5

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.ts CHANGED
@@ -5,4 +5,8 @@ export type { DatabaseQueryCollectorOptions } from "./query-collector.ts";
5
5
  export { createDatabaseQueryCollector, SQLITE_PRELOAD_MODULE_PATH } from "./query-collector.ts";
6
6
  export type { ObservedDatabaseQueryResolution } from "./graph-mapping.ts";
7
7
  export { resolveObservedDatabaseQuery } from "./graph-mapping.ts";
8
+ export type { PostgresLogQuery } from "./postgres-log-parser.ts";
9
+ export { parsePostgresLogLine } from "./postgres-log-parser.ts";
10
+ export type { PostgresQueryCollectorOptions } from "./postgres-query-collector.ts";
11
+ export { createPostgresQueryCollector } from "./postgres-query-collector.ts";
8
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,YAAY,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAEhG,YAAY,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,KAAK,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,YAAY,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAEhG,YAAY,EAAE,+BAA+B,EAAE,MAAM,oBAAoB,CAAC;AAC1E,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAElE,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAEhE,YAAY,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC"}
package/dist/index.js CHANGED
@@ -3,4 +3,6 @@ export { QUERY_MARKER } from "./query-line-parser.js";
3
3
  export { parseQueryLine } from "./query-line-parser.js";
4
4
  export { createDatabaseQueryCollector, SQLITE_PRELOAD_MODULE_PATH } from "./query-collector.js";
5
5
  export { resolveObservedDatabaseQuery } from "./graph-mapping.js";
6
+ export { parsePostgresLogLine } from "./postgres-log-parser.js";
7
+ export { createPostgresQueryCollector } from "./postgres-query-collector.js";
6
8
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAA2C,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAGhG,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,YAAY,EAA2C,MAAM,wBAAwB,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGxD,OAAO,EAAE,4BAA4B,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAGhG,OAAO,EAAE,4BAA4B,EAAE,MAAM,oBAAoB,CAAC;AAGlE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAGhE,OAAO,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * RG-5(b): Postgres needs no preload — its own server-side statement log is
3
+ * the capture mechanism, the way the plan calls for ("its logging path
4
+ * needs no preload"). This reads one line of that log, already stripped of
5
+ * whatever `log_line_prefix` a deployment configured (timestamp, pid,
6
+ * database name — all deployment-specific and none of them this parser's
7
+ * concern), and recognises exactly two shapes `log_statement = 'all'`
8
+ * produces:
9
+ *
10
+ * - `LOG: statement: <sql>` — the simple-query protocol.
11
+ * - `LOG: execute <name>: <sql>` — the extended/prepared-statement
12
+ * protocol (`<name>` is `<unnamed>` for an unnamed prepared statement, or
13
+ * a real name).
14
+ *
15
+ * Verified against PostgreSQL's own documented log format (`log_statement`,
16
+ * `log_line_prefix`), not guessed. **Not live-tested against a running
17
+ * Postgres server in this session** — no database credentials were reachable
18
+ * in the environment this landed in; disclosed rather than silently assumed
19
+ * working. The parser is tested against real, doc-verified log-line syntax.
20
+ *
21
+ * **Disclosed, deliberate scope, same "refuse rather than guess" rule
22
+ * `query-line-parser.ts` and `table-extraction.ts` already apply:**
23
+ * - A statement split across multiple log lines (a long query Postgres
24
+ * wraps) is read as written on its own line only — refused, not
25
+ * reassembled, same as this package's other parsers stay bounded readers.
26
+ * - `duration` is always `null` here: Postgres logs it on a **separate**
27
+ * `LOG: duration: N ms` line, joined to the statement line only via
28
+ * `log_duration`/`log_min_duration_statement` and the same backend pid —
29
+ * a real correlation this parser does not attempt, so it reports what it
30
+ * does not know rather than a fabricated duration.
31
+ * - `success` is always `true` here: a failed statement logs as `ERROR:`,
32
+ * a different prefix this parser does not recognise — refused (`null`),
33
+ * not misread as a successful query.
34
+ */
35
+ export interface PostgresLogQuery {
36
+ readonly sql: string;
37
+ readonly method: "statement" | "execute";
38
+ readonly durationMs: null;
39
+ readonly success: true;
40
+ readonly error: null;
41
+ }
42
+ /** `null` for anything not one of the two recognised `log_statement = 'all'` shapes — never a guessed reassembly. */
43
+ export declare function parsePostgresLogLine(line: string): PostgresLogQuery | null;
44
+ //# sourceMappingURL=postgres-log-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres-log-parser.d.ts","sourceRoot":"","sources":["../src/postgres-log-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,IAAI,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC;IACvB,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;CACtB;AAKD,qHAAqH;AACrH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAU1E"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * RG-5(b): Postgres needs no preload — its own server-side statement log is
3
+ * the capture mechanism, the way the plan calls for ("its logging path
4
+ * needs no preload"). This reads one line of that log, already stripped of
5
+ * whatever `log_line_prefix` a deployment configured (timestamp, pid,
6
+ * database name — all deployment-specific and none of them this parser's
7
+ * concern), and recognises exactly two shapes `log_statement = 'all'`
8
+ * produces:
9
+ *
10
+ * - `LOG: statement: <sql>` — the simple-query protocol.
11
+ * - `LOG: execute <name>: <sql>` — the extended/prepared-statement
12
+ * protocol (`<name>` is `<unnamed>` for an unnamed prepared statement, or
13
+ * a real name).
14
+ *
15
+ * Verified against PostgreSQL's own documented log format (`log_statement`,
16
+ * `log_line_prefix`), not guessed. **Not live-tested against a running
17
+ * Postgres server in this session** — no database credentials were reachable
18
+ * in the environment this landed in; disclosed rather than silently assumed
19
+ * working. The parser is tested against real, doc-verified log-line syntax.
20
+ *
21
+ * **Disclosed, deliberate scope, same "refuse rather than guess" rule
22
+ * `query-line-parser.ts` and `table-extraction.ts` already apply:**
23
+ * - A statement split across multiple log lines (a long query Postgres
24
+ * wraps) is read as written on its own line only — refused, not
25
+ * reassembled, same as this package's other parsers stay bounded readers.
26
+ * - `duration` is always `null` here: Postgres logs it on a **separate**
27
+ * `LOG: duration: N ms` line, joined to the statement line only via
28
+ * `log_duration`/`log_min_duration_statement` and the same backend pid —
29
+ * a real correlation this parser does not attempt, so it reports what it
30
+ * does not know rather than a fabricated duration.
31
+ * - `success` is always `true` here: a failed statement logs as `ERROR:`,
32
+ * a different prefix this parser does not recognise — refused (`null`),
33
+ * not misread as a successful query.
34
+ */
35
+ const STATEMENT_PATTERN = /\bLOG:\s+statement:\s+(.*)$/;
36
+ const EXECUTE_PATTERN = /\bLOG:\s+execute\s+\S+:\s+(.*)$/;
37
+ /** `null` for anything not one of the two recognised `log_statement = 'all'` shapes — never a guessed reassembly. */
38
+ export function parsePostgresLogLine(line) {
39
+ const statementMatch = STATEMENT_PATTERN.exec(line);
40
+ if (statementMatch !== null) {
41
+ return { sql: statementMatch[1].trim(), method: "statement", durationMs: null, success: true, error: null };
42
+ }
43
+ const executeMatch = EXECUTE_PATTERN.exec(line);
44
+ if (executeMatch !== null) {
45
+ return { sql: executeMatch[1].trim(), method: "execute", durationMs: null, success: true, error: null };
46
+ }
47
+ return null;
48
+ }
49
+ //# sourceMappingURL=postgres-log-parser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres-log-parser.js","sourceRoot":"","sources":["../src/postgres-log-parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAUH,MAAM,iBAAiB,GAAG,6BAA6B,CAAC;AACxD,MAAM,eAAe,GAAG,iCAAiC,CAAC;AAE1D,qHAAqH;AACrH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,MAAM,cAAc,GAAG,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpD,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QAC5B,OAAO,EAAE,GAAG,EAAE,cAAc,CAAC,CAAC,CAAE,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC/G,CAAC;IACD,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;QAC1B,OAAO,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC,CAAE,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IAC3G,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * RG-5(b): Postgres driver #2 (after `node:sqlite`), and the first one that
3
+ * needs no `--import` preload — the desktop's `LaunchConfiguration.database`
4
+ * already carries a connection string (per repository, per service), and
5
+ * Postgres's own server-side statement log is the capture mechanism. Same
6
+ * collector shape as `DatabaseQueryCollector` deliberately: a
7
+ * `ProcessOutputSource` in, `DATABASE_QUERY` `Evidence` out — the source
8
+ * here just tails Postgres's own log file rather than a spawned process's
9
+ * stdout.
10
+ *
11
+ * **Disclosed scope: queries, not state.** Like `DatabaseQueryCollector`,
12
+ * this observes query *text* — `extractTargetTable` still resolves the
13
+ * touched table — never a captured before/after row. Postgres's statement
14
+ * log is a text stream, not a row-change feed; reading one would need a
15
+ * separate mechanism (logical replication or a trigger-based audit table)
16
+ * this collector does not add. See `packages/database-observation`'s
17
+ * package description for the same disclosure on the `node:sqlite` path.
18
+ *
19
+ * **Not live-tested against a running Postgres server** — see
20
+ * `postgres-log-parser.ts`'s own header for why, and what was tested instead
21
+ * (the parser, against real documented log-line syntax).
22
+ */
23
+ import type { Collector } from "@descryy/runtime-contracts";
24
+ import { type ProcessOutputSource } from "@descryy/runtime-backend-observation";
25
+ export interface PostgresQueryCollectorOptions {
26
+ /** Tails the deployment's own Postgres statement log (`log_statement = 'all'`), not a spawned application process's output. */
27
+ readonly source: ProcessOutputSource;
28
+ /** Which owned system this collector's evidence should be attributed to (plan §16.7). Null when not applicable. */
29
+ readonly service?: string;
30
+ }
31
+ export declare function createPostgresQueryCollector(options: PostgresQueryCollectorOptions): Collector;
32
+ //# sourceMappingURL=postgres-query-collector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres-query-collector.d.ts","sourceRoot":"","sources":["../src/postgres-query-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAmF,MAAM,4BAA4B,CAAC;AAC7I,OAAO,EAAyB,KAAK,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAMvG,MAAM,WAAW,6BAA6B;IAC5C,+HAA+H;IAC/H,QAAQ,CAAC,MAAM,EAAE,mBAAmB,CAAC;IACrC,mHAAmH;IACnH,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AA2BD,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,6BAA6B,GAAG,SAAS,CA6F9F"}
@@ -0,0 +1,139 @@
1
+ /**
2
+ * RG-5(b): Postgres driver #2 (after `node:sqlite`), and the first one that
3
+ * needs no `--import` preload — the desktop's `LaunchConfiguration.database`
4
+ * already carries a connection string (per repository, per service), and
5
+ * Postgres's own server-side statement log is the capture mechanism. Same
6
+ * collector shape as `DatabaseQueryCollector` deliberately: a
7
+ * `ProcessOutputSource` in, `DATABASE_QUERY` `Evidence` out — the source
8
+ * here just tails Postgres's own log file rather than a spawned process's
9
+ * stdout.
10
+ *
11
+ * **Disclosed scope: queries, not state.** Like `DatabaseQueryCollector`,
12
+ * this observes query *text* — `extractTargetTable` still resolves the
13
+ * touched table — never a captured before/after row. Postgres's statement
14
+ * log is a text stream, not a row-change feed; reading one would need a
15
+ * separate mechanism (logical replication or a trigger-based audit table)
16
+ * this collector does not add. See `packages/database-observation`'s
17
+ * package description for the same disclosure on the `node:sqlite` path.
18
+ *
19
+ * **Not live-tested against a running Postgres server** — see
20
+ * `postgres-log-parser.ts`'s own header for why, and what was tested instead
21
+ * (the parser, against real documented log-line syntax).
22
+ */
23
+ import { extractCorrelationIds } from "@descryy/runtime-backend-observation";
24
+ import { parsePostgresLogLine } from "./postgres-log-parser.js";
25
+ import { extractTargetTable } from "./table-extraction.js";
26
+ import { COLLECTOR_VERSION } from "./collector-version.js";
27
+ const EVENT_TYPE = "DATABASE_QUERY";
28
+ function computeCapabilities() {
29
+ const reason = "PostgresQueryCollector observes DATABASE_QUERY events only, from the server's own statement log.";
30
+ const status = { availability: "unavailable", reason };
31
+ return {
32
+ domObservation: status,
33
+ consoleObservation: status,
34
+ networkObservation: status,
35
+ backendLogAccess: status,
36
+ distributedTrace: {
37
+ availability: "degraded",
38
+ reason: "extracts trace-id/request-id from the query text itself (a declared SQL comment convention), when the application logs one into the statement; does not observe application-level propagation.",
39
+ },
40
+ sourceMapping: status,
41
+ stackCapture: status,
42
+ processLifecycle: status,
43
+ databaseObservation: {
44
+ availability: "available",
45
+ reason: "queries only — the server statement log is a text stream, not a row-change feed; no before/after row state (RG-5(c) disclosure).",
46
+ },
47
+ externalServiceObservation: { availability: "unavailable", reason: "PostgresQueryCollector instruments the Postgres statement log only." },
48
+ };
49
+ }
50
+ export function createPostgresQueryCollector(options) {
51
+ const capabilities = computeCapabilities();
52
+ let consumeLoopDone;
53
+ let consumptionFailure = null;
54
+ function emitCapturedQuery(query, context) {
55
+ const { traceId, requestId } = extractCorrelationIds(query.sql);
56
+ context.emit({
57
+ timestamp: new Date().toISOString(),
58
+ source: "backend-process",
59
+ service: options.source.serviceName ?? options.service ?? null,
60
+ process: options.source.processId,
61
+ eventType: EVENT_TYPE,
62
+ payload: {
63
+ raw: query.sql,
64
+ method: query.method,
65
+ durationMs: query.durationMs,
66
+ success: query.success,
67
+ error: query.error,
68
+ table: extractTargetTable(query.sql),
69
+ },
70
+ traceId,
71
+ requestId,
72
+ correlationId: null,
73
+ graphNodeId: null,
74
+ sourceLocation: null,
75
+ stackTrace: null,
76
+ confidence: 1,
77
+ redactionStatus: "pending-redaction",
78
+ collectorVersion: COLLECTOR_VERSION,
79
+ });
80
+ }
81
+ async function consume(context) {
82
+ for await (const line of options.source.lines) {
83
+ const query = parsePostgresLogLine(line.text);
84
+ if (query !== null)
85
+ emitCapturedQuery(query, context);
86
+ }
87
+ }
88
+ return {
89
+ collectorId: `postgres-query-collector:${options.source.processId}`,
90
+ start(context) {
91
+ consumeLoopDone = consume(context).catch((error) => {
92
+ const detail = error instanceof Error ? `${error.name}: ${error.message}` : String(error);
93
+ consumptionFailure = detail;
94
+ try {
95
+ context.emit({
96
+ timestamp: new Date().toISOString(),
97
+ source: "backend-process",
98
+ service: options.source.serviceName ?? options.service ?? null,
99
+ process: options.source.processId,
100
+ eventType: "COLLECTOR_ERROR",
101
+ payload: {
102
+ raw: `postgres query collector for process "${options.source.processId}" stopped consuming after an error: ${detail}`,
103
+ collectorId: `postgres-query-collector:${options.source.processId}`,
104
+ error: detail,
105
+ },
106
+ traceId: null,
107
+ requestId: null,
108
+ correlationId: null,
109
+ graphNodeId: null,
110
+ sourceLocation: null,
111
+ stackTrace: null,
112
+ confidence: 1,
113
+ redactionStatus: "pending-redaction",
114
+ collectorVersion: COLLECTOR_VERSION,
115
+ });
116
+ }
117
+ catch (emitError) {
118
+ console.error(`[postgres-query-collector:${options.source.processId}] consumption failed (${detail}) AND the failure could not be emitted: ${String(emitError)}`);
119
+ }
120
+ });
121
+ return Promise.resolve({ available: true });
122
+ },
123
+ async stop() {
124
+ await consumeLoopDone;
125
+ },
126
+ capabilities() {
127
+ if (consumptionFailure === null)
128
+ return capabilities;
129
+ return {
130
+ ...capabilities,
131
+ distributedTrace: {
132
+ availability: "unavailable",
133
+ reason: `consumption stopped early after an error (${consumptionFailure}); output after that point was never observed.`,
134
+ },
135
+ };
136
+ },
137
+ };
138
+ }
139
+ //# sourceMappingURL=postgres-query-collector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres-query-collector.js","sourceRoot":"","sources":["../src/postgres-query-collector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAGH,OAAO,EAAE,qBAAqB,EAA4B,MAAM,sCAAsC,CAAC;AAEvG,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAS3D,MAAM,UAAU,GAAqB,gBAAgB,CAAC;AAEtD,SAAS,mBAAmB;IAC1B,MAAM,MAAM,GAAG,kGAAkG,CAAC;IAClH,MAAM,MAAM,GAAG,EAAE,YAAY,EAAE,aAAsB,EAAE,MAAM,EAAE,CAAC;IAChE,OAAO;QACL,cAAc,EAAE,MAAM;QACtB,kBAAkB,EAAE,MAAM;QAC1B,kBAAkB,EAAE,MAAM;QAC1B,gBAAgB,EAAE,MAAM;QACxB,gBAAgB,EAAE;YAChB,YAAY,EAAE,UAAU;YACxB,MAAM,EAAE,gMAAgM;SACzM;QACD,aAAa,EAAE,MAAM;QACrB,YAA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wBACb,SAAS,EAAE,IAAI;wBACf,aAAa,EAAE,IAAI;wBACnB,WAAW,EAAE,IAAI;wBACjB,cAAc,EAAE,IAAI;wBACpB,UAAU,EAAE,IAAI;wBAChB,UAAU,EAAE,CAAC;wBACb,eAAe,EAAE,mBAAmB;wBACpC,gBAAgB,EAAE,iBAAiB;qBACpC,CAAC,CAAC;gBACL,CAAC;gBAAC,OAAO,SAAkB,EAAE,CAAC;oBAC5B,OAAO,CAAC,KAAK,CACX,6BAA6B,OAAO,CAAC,MAAM,CAAC,SAAS,yBAAyB,MAAM,2CAA2C,MAAM,CAAC,SAAS,CAAC,EAAE,CACnJ,CAAC;gBACJ,CAAC;YACH,CAAC,CAAC,CAAC;YACH,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,CAAC;QAED,KAAK,CAAC,IAAI;YACR,MAAM,eAAe,CAAC;QACxB,CAAC;QAED,YAAY;YACV,IAAI,kBAAkB,KAAK,IAAI;gBAAE,OAAO,YAAY,CAAC;YACrD,OAAO;gBACL,GAAG,YAAY;gBACf,gBAAgB,EAAE;oBAChB,YAAY,EAAE,aAAa;oBAC3B,MAAM,EAAE,6CAA6C,kBAAkB,gDAAgD;iBACxH;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@descryy/runtime-database-observation",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "type": "module",
5
5
  "description": "Database query observation (plan §18, checklist §14): real DATABASE_QUERY capture via driver instrumentation, never parsed application logs. Driver #1 is node:sqlite.",
6
6
  "license": "UNLICENSED",
@@ -29,12 +29,12 @@
29
29
  "build": "tsc -b"
30
30
  },
31
31
  "dependencies": {
32
- "@descryy/runtime-contracts": "0.3.3",
33
- "@descryy/runtime-backend-observation": "0.3.3",
34
- "@descryy/runtime-graph-correlator": "0.4.4"
32
+ "@descryy/runtime-contracts": "0.3.1",
33
+ "@descryy/runtime-backend-observation": "0.3.4",
34
+ "@descryy/runtime-graph-correlator": "0.4.5"
35
35
  },
36
36
  "devDependencies": {
37
- "@descryy/runtime-controller": "*",
38
- "@descryy/runtime-orchestrator": "*"
37
+ "@descryy/runtime-controller": "0.3.4",
38
+ "@descryy/runtime-orchestrator": "0.4.5"
39
39
  }
40
40
  }