@autter/runtime-next 1.3.3 → 1.4.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/README.md CHANGED
@@ -92,3 +92,14 @@ calls with `experimental_telemetry: { isEnabled: true }` (and anything
92
92
  wrapped in `withLlmCall` or an `instrumentLlmClient` client) are recorded at
93
93
  100% — every call, with model, tokens, latency, and cost. See the
94
94
  [`@autter/runtime-node` README](../runtime-node) for the API.
95
+ ## Operation logging (1.4.0+)
96
+
97
+ Import `withRuntimeOperation`, `runtimeLogger`, `createRuntimeLogger`,
98
+ `flushRuntimeLogs`, and `runtimeLogStats` from `@autter/runtime-next/server`.
99
+ Initialize through the existing `registerAutter` call in `instrumentation.ts`.
100
+ These APIs require the Node runtime, a 1.4.0+ ingester, and matching platform
101
+ evidence support. Client components keep `@autter/runtime-next/client`.
102
+ See the [operation logging guide](../../docs/OPERATION-LOGGING.md) for measured
103
+ steps, explicit business outcomes, privacy and flushing. Ordinary error logs
104
+ are diagnostics; captured exceptions and declared failed outcomes use tracing
105
+ for issue grouping.
@@ -4,6 +4,11 @@ import {
4
4
  initAutterServer
5
5
  } from "@autter/runtime-node";
6
6
  import {
7
+ createRuntimeLogger,
8
+ runtimeLogger,
9
+ withRuntimeOperation,
10
+ flushRuntimeLogs,
11
+ runtimeLogStats,
7
12
  captureException,
8
13
  captureMessage,
9
14
  reportOutcome,
@@ -26,6 +31,11 @@ function createAutterRelayRoute(options) {
26
31
  export {
27
32
  registerAutter,
28
33
  createAutterRelayRoute,
34
+ createRuntimeLogger,
35
+ runtimeLogger,
36
+ withRuntimeOperation,
37
+ flushRuntimeLogs,
38
+ runtimeLogStats,
29
39
  captureException,
30
40
  captureMessage,
31
41
  reportOutcome,
package/dist/index.cjs CHANGED
@@ -23,16 +23,21 @@ __export(src_exports, {
23
23
  captureServerException: () => import_runtime_node2.captureException,
24
24
  captureServerMessage: () => import_runtime_node2.captureMessage,
25
25
  createAutterRelayRoute: () => createAutterRelayRoute,
26
+ createRuntimeLogger: () => import_runtime_node2.createRuntimeLogger,
26
27
  emitLlmSelftestTrace: () => import_runtime_node2.emitLlmSelftestTrace,
28
+ flushRuntimeLogs: () => import_runtime_node2.flushRuntimeLogs,
27
29
  installAutterAutoFlush: () => import_runtime_node2.installAutterAutoFlush,
28
30
  instrumentLlmClient: () => import_runtime_node2.instrumentLlmClient,
29
31
  makeSafeCapture: () => import_runtime_node2.makeSafeCapture,
30
32
  redactAttributes: () => import_runtime_node2.redactAttributes,
31
33
  registerAutter: () => registerAutter,
32
34
  reportServerOutcome: () => import_runtime_node2.reportOutcome,
35
+ runtimeLogStats: () => import_runtime_node2.runtimeLogStats,
36
+ runtimeLogger: () => import_runtime_node2.runtimeLogger,
33
37
  trackLlmCall: () => import_runtime_node2.trackLlmCall,
34
38
  withLlmCall: () => import_runtime_node2.withLlmCall,
35
- withProcessSpan: () => import_runtime_node2.withProcessSpan
39
+ withProcessSpan: () => import_runtime_node2.withProcessSpan,
40
+ withRuntimeOperation: () => import_runtime_node2.withRuntimeOperation
36
41
  });
37
42
  module.exports = __toCommonJS(src_exports);
38
43
 
@@ -50,14 +55,19 @@ function createAutterRelayRoute(options) {
50
55
  captureServerException,
51
56
  captureServerMessage,
52
57
  createAutterRelayRoute,
58
+ createRuntimeLogger,
53
59
  emitLlmSelftestTrace,
60
+ flushRuntimeLogs,
54
61
  installAutterAutoFlush,
55
62
  instrumentLlmClient,
56
63
  makeSafeCapture,
57
64
  redactAttributes,
58
65
  registerAutter,
59
66
  reportServerOutcome,
67
+ runtimeLogStats,
68
+ runtimeLogger,
60
69
  trackLlmCall,
61
70
  withLlmCall,
62
- withProcessSpan
71
+ withProcessSpan,
72
+ withRuntimeOperation
63
73
  });
package/dist/index.d.cts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { createAutterRelayRoute, registerAutter } from './server.cjs';
2
- export { AutoFlushHandle, AutoFlushOptions, AutterServer, AutterServerOptions, FlushTarget, InstrumentLlmOptions, LlmCallHandle, LlmCallInfo, LlmUsage, RedactOptions, RelayOptions, SafeCapture, TrackedLlmCall, captureException as captureServerException, captureMessage as captureServerMessage, emitLlmSelftestTrace, installAutterAutoFlush, instrumentLlmClient, makeSafeCapture, redactAttributes, reportOutcome as reportServerOutcome, trackLlmCall, withLlmCall, withProcessSpan } from '@autter/runtime-node';
2
+ export { AutoFlushHandle, AutoFlushOptions, AutterServer, AutterServerOptions, FlushTarget, InstrumentLlmOptions, LlmCallHandle, LlmCallInfo, LlmUsage, RedactOptions, RelayOptions, RuntimeLogContext, RuntimeLogContextValue, RuntimeLogLevel, RuntimeLoggingOptions, RuntimeOperation, RuntimeOutcome, SafeCapture, TrackedLlmCall, captureException as captureServerException, captureMessage as captureServerMessage, createRuntimeLogger, emitLlmSelftestTrace, flushRuntimeLogs, installAutterAutoFlush, instrumentLlmClient, makeSafeCapture, redactAttributes, reportOutcome as reportServerOutcome, runtimeLogStats, runtimeLogger, trackLlmCall, withLlmCall, withProcessSpan, withRuntimeOperation } from '@autter/runtime-node';
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export { createAutterRelayRoute, registerAutter } from './server.js';
2
- export { AutoFlushHandle, AutoFlushOptions, AutterServer, AutterServerOptions, FlushTarget, InstrumentLlmOptions, LlmCallHandle, LlmCallInfo, LlmUsage, RedactOptions, RelayOptions, SafeCapture, TrackedLlmCall, captureException as captureServerException, captureMessage as captureServerMessage, emitLlmSelftestTrace, installAutterAutoFlush, instrumentLlmClient, makeSafeCapture, redactAttributes, reportOutcome as reportServerOutcome, trackLlmCall, withLlmCall, withProcessSpan } from '@autter/runtime-node';
2
+ export { AutoFlushHandle, AutoFlushOptions, AutterServer, AutterServerOptions, FlushTarget, InstrumentLlmOptions, LlmCallHandle, LlmCallInfo, LlmUsage, RedactOptions, RelayOptions, RuntimeLogContext, RuntimeLogContextValue, RuntimeLogLevel, RuntimeLoggingOptions, RuntimeOperation, RuntimeOutcome, SafeCapture, TrackedLlmCall, captureException as captureServerException, captureMessage as captureServerMessage, createRuntimeLogger, emitLlmSelftestTrace, flushRuntimeLogs, installAutterAutoFlush, instrumentLlmClient, makeSafeCapture, redactAttributes, reportOutcome as reportServerOutcome, runtimeLogStats, runtimeLogger, trackLlmCall, withLlmCall, withProcessSpan, withRuntimeOperation } from '@autter/runtime-node';
package/dist/index.js CHANGED
@@ -2,29 +2,39 @@ import {
2
2
  captureException,
3
3
  captureMessage,
4
4
  createAutterRelayRoute,
5
+ createRuntimeLogger,
5
6
  emitLlmSelftestTrace,
7
+ flushRuntimeLogs,
6
8
  installAutterAutoFlush,
7
9
  instrumentLlmClient,
8
10
  makeSafeCapture,
9
11
  redactAttributes,
10
12
  registerAutter,
11
13
  reportOutcome,
14
+ runtimeLogStats,
15
+ runtimeLogger,
12
16
  trackLlmCall,
13
17
  withLlmCall,
14
- withProcessSpan
15
- } from "./chunk-4RSUUUZJ.js";
18
+ withProcessSpan,
19
+ withRuntimeOperation
20
+ } from "./chunk-NZPBSB6B.js";
16
21
  export {
17
22
  captureException as captureServerException,
18
23
  captureMessage as captureServerMessage,
19
24
  createAutterRelayRoute,
25
+ createRuntimeLogger,
20
26
  emitLlmSelftestTrace,
27
+ flushRuntimeLogs,
21
28
  installAutterAutoFlush,
22
29
  instrumentLlmClient,
23
30
  makeSafeCapture,
24
31
  redactAttributes,
25
32
  registerAutter,
26
33
  reportOutcome as reportServerOutcome,
34
+ runtimeLogStats,
35
+ runtimeLogger,
27
36
  trackLlmCall,
28
37
  withLlmCall,
29
- withProcessSpan
38
+ withProcessSpan,
39
+ withRuntimeOperation
30
40
  };
package/dist/server.cjs CHANGED
@@ -23,16 +23,21 @@ __export(server_exports, {
23
23
  captureServerException: () => import_runtime_node2.captureException,
24
24
  captureServerMessage: () => import_runtime_node2.captureMessage,
25
25
  createAutterRelayRoute: () => createAutterRelayRoute,
26
+ createRuntimeLogger: () => import_runtime_node2.createRuntimeLogger,
26
27
  emitLlmSelftestTrace: () => import_runtime_node2.emitLlmSelftestTrace,
28
+ flushRuntimeLogs: () => import_runtime_node2.flushRuntimeLogs,
27
29
  installAutterAutoFlush: () => import_runtime_node2.installAutterAutoFlush,
28
30
  instrumentLlmClient: () => import_runtime_node2.instrumentLlmClient,
29
31
  makeSafeCapture: () => import_runtime_node2.makeSafeCapture,
30
32
  redactAttributes: () => import_runtime_node2.redactAttributes,
31
33
  registerAutter: () => registerAutter,
32
34
  reportServerOutcome: () => import_runtime_node2.reportOutcome,
35
+ runtimeLogStats: () => import_runtime_node2.runtimeLogStats,
36
+ runtimeLogger: () => import_runtime_node2.runtimeLogger,
33
37
  trackLlmCall: () => import_runtime_node2.trackLlmCall,
34
38
  withLlmCall: () => import_runtime_node2.withLlmCall,
35
- withProcessSpan: () => import_runtime_node2.withProcessSpan
39
+ withProcessSpan: () => import_runtime_node2.withProcessSpan,
40
+ withRuntimeOperation: () => import_runtime_node2.withRuntimeOperation
36
41
  });
37
42
  module.exports = __toCommonJS(server_exports);
38
43
  var import_runtime_node = require("@autter/runtime-node");
@@ -48,14 +53,19 @@ function createAutterRelayRoute(options) {
48
53
  captureServerException,
49
54
  captureServerMessage,
50
55
  createAutterRelayRoute,
56
+ createRuntimeLogger,
51
57
  emitLlmSelftestTrace,
58
+ flushRuntimeLogs,
52
59
  installAutterAutoFlush,
53
60
  instrumentLlmClient,
54
61
  makeSafeCapture,
55
62
  redactAttributes,
56
63
  registerAutter,
57
64
  reportServerOutcome,
65
+ runtimeLogStats,
66
+ runtimeLogger,
58
67
  trackLlmCall,
59
68
  withLlmCall,
60
- withProcessSpan
69
+ withProcessSpan,
70
+ withRuntimeOperation
61
71
  });
package/dist/server.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RelayOptions, AutterServerOptions, AutterServer } from '@autter/runtime-node';
2
- export { AutoFlushHandle, AutoFlushOptions, AutterServer, AutterServerOptions, FlushTarget, InstrumentLlmOptions, LlmCallHandle, LlmCallInfo, LlmUsage, RedactOptions, RelayOptions, SafeCapture, TrackedLlmCall, captureException as captureServerException, captureMessage as captureServerMessage, emitLlmSelftestTrace, installAutterAutoFlush, instrumentLlmClient, makeSafeCapture, redactAttributes, reportOutcome as reportServerOutcome, trackLlmCall, withLlmCall, withProcessSpan } from '@autter/runtime-node';
2
+ export { AutoFlushHandle, AutoFlushOptions, AutterServer, AutterServerOptions, FlushTarget, InstrumentLlmOptions, LlmCallHandle, LlmCallInfo, LlmUsage, RedactOptions, RelayOptions, RuntimeLogContext, RuntimeLogContextValue, RuntimeLogLevel, RuntimeLoggingOptions, RuntimeOperation, RuntimeOutcome, SafeCapture, TrackedLlmCall, captureException as captureServerException, captureMessage as captureServerMessage, createRuntimeLogger, emitLlmSelftestTrace, flushRuntimeLogs, installAutterAutoFlush, instrumentLlmClient, makeSafeCapture, redactAttributes, reportOutcome as reportServerOutcome, runtimeLogStats, runtimeLogger, trackLlmCall, withLlmCall, withProcessSpan, withRuntimeOperation } from '@autter/runtime-node';
3
3
 
4
4
  /**
5
5
  * Server half of @autter/runtime-next. Safe to import anywhere Node runs:
package/dist/server.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RelayOptions, AutterServerOptions, AutterServer } from '@autter/runtime-node';
2
- export { AutoFlushHandle, AutoFlushOptions, AutterServer, AutterServerOptions, FlushTarget, InstrumentLlmOptions, LlmCallHandle, LlmCallInfo, LlmUsage, RedactOptions, RelayOptions, SafeCapture, TrackedLlmCall, captureException as captureServerException, captureMessage as captureServerMessage, emitLlmSelftestTrace, installAutterAutoFlush, instrumentLlmClient, makeSafeCapture, redactAttributes, reportOutcome as reportServerOutcome, trackLlmCall, withLlmCall, withProcessSpan } from '@autter/runtime-node';
2
+ export { AutoFlushHandle, AutoFlushOptions, AutterServer, AutterServerOptions, FlushTarget, InstrumentLlmOptions, LlmCallHandle, LlmCallInfo, LlmUsage, RedactOptions, RelayOptions, RuntimeLogContext, RuntimeLogContextValue, RuntimeLogLevel, RuntimeLoggingOptions, RuntimeOperation, RuntimeOutcome, SafeCapture, TrackedLlmCall, captureException as captureServerException, captureMessage as captureServerMessage, createRuntimeLogger, emitLlmSelftestTrace, flushRuntimeLogs, installAutterAutoFlush, instrumentLlmClient, makeSafeCapture, redactAttributes, reportOutcome as reportServerOutcome, runtimeLogStats, runtimeLogger, trackLlmCall, withLlmCall, withProcessSpan, withRuntimeOperation } from '@autter/runtime-node';
3
3
 
4
4
  /**
5
5
  * Server half of @autter/runtime-next. Safe to import anywhere Node runs:
package/dist/server.js CHANGED
@@ -2,29 +2,39 @@ import {
2
2
  captureException,
3
3
  captureMessage,
4
4
  createAutterRelayRoute,
5
+ createRuntimeLogger,
5
6
  emitLlmSelftestTrace,
7
+ flushRuntimeLogs,
6
8
  installAutterAutoFlush,
7
9
  instrumentLlmClient,
8
10
  makeSafeCapture,
9
11
  redactAttributes,
10
12
  registerAutter,
11
13
  reportOutcome,
14
+ runtimeLogStats,
15
+ runtimeLogger,
12
16
  trackLlmCall,
13
17
  withLlmCall,
14
- withProcessSpan
15
- } from "./chunk-4RSUUUZJ.js";
18
+ withProcessSpan,
19
+ withRuntimeOperation
20
+ } from "./chunk-NZPBSB6B.js";
16
21
  export {
17
22
  captureException as captureServerException,
18
23
  captureMessage as captureServerMessage,
19
24
  createAutterRelayRoute,
25
+ createRuntimeLogger,
20
26
  emitLlmSelftestTrace,
27
+ flushRuntimeLogs,
21
28
  installAutterAutoFlush,
22
29
  instrumentLlmClient,
23
30
  makeSafeCapture,
24
31
  redactAttributes,
25
32
  registerAutter,
26
33
  reportOutcome as reportServerOutcome,
34
+ runtimeLogStats,
35
+ runtimeLogger,
27
36
  trackLlmCall,
28
37
  withLlmCall,
29
- withProcessSpan
38
+ withProcessSpan,
39
+ withRuntimeOperation
30
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autter/runtime-next",
3
- "version": "1.3.3",
3
+ "version": "1.4.0",
4
4
  "description": "One-command Autter Runtime for Next.js: server OTel, browser tracker, relay route, and React error boundary",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -36,8 +36,8 @@
36
36
  "build": "tsup"
37
37
  },
38
38
  "dependencies": {
39
- "@autter/runtime-browser": "^1.3.2",
40
- "@autter/runtime-node": "^1.3.3"
39
+ "@autter/runtime-browser": "^1.3.3",
40
+ "@autter/runtime-node": "^1.4.0"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": ">=18"