@fluojs/runtime 2.0.1 → 3.0.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.
Files changed (127) hide show
  1. package/README.ko.md +278 -20
  2. package/README.md +278 -20
  3. package/dist/adapters/internal-request-response-factory.d.ts +1 -1
  4. package/dist/adapters/internal-request-response-factory.d.ts.map +1 -1
  5. package/dist/adapters/internal-request-response-factory.js +1 -1
  6. package/dist/adapters/request-response-factory.d.ts +20 -1
  7. package/dist/adapters/request-response-factory.d.ts.map +1 -1
  8. package/dist/adapters/request-response-factory.js +75 -22
  9. package/dist/bootstrap.d.ts +3 -9
  10. package/dist/bootstrap.d.ts.map +1 -1
  11. package/dist/bootstrap.js +179 -75
  12. package/dist/devtools/contracts.d.ts +3 -135
  13. package/dist/devtools/contracts.d.ts.map +1 -1
  14. package/dist/devtools/index.d.ts +2 -3
  15. package/dist/devtools/index.d.ts.map +1 -1
  16. package/dist/devtools/index.js +1 -2
  17. package/dist/devtools/snapshot.d.ts +1 -1
  18. package/dist/devtools/snapshot.d.ts.map +1 -1
  19. package/dist/devtools/snapshot.js +18 -17
  20. package/dist/devtools/studio-request-observer.d.ts +14 -0
  21. package/dist/devtools/studio-request-observer.d.ts.map +1 -0
  22. package/dist/devtools/studio-request-observer.js +112 -0
  23. package/dist/devtools/studio-runtime-config.d.ts +25 -0
  24. package/dist/devtools/studio-runtime-config.d.ts.map +1 -0
  25. package/dist/devtools/studio-runtime-config.js +59 -0
  26. package/dist/devtools/studio-runtime.d.ts +12 -18
  27. package/dist/devtools/studio-runtime.d.ts.map +1 -1
  28. package/dist/devtools/studio-runtime.js +25 -169
  29. package/dist/errors.d.ts +26 -0
  30. package/dist/errors.d.ts.map +1 -1
  31. package/dist/errors.js +38 -0
  32. package/dist/health/health.d.ts +6 -2
  33. package/dist/health/health.d.ts.map +1 -1
  34. package/dist/health/health.js +3 -2
  35. package/dist/http-adapter-shared.d.ts +1 -1
  36. package/dist/http-adapter-shared.d.ts.map +1 -1
  37. package/dist/http-adapter-shared.js +1 -1
  38. package/dist/index.d.ts +6 -3
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +4 -1
  41. package/dist/internal/route-inspection-metadata.d.ts +30 -0
  42. package/dist/internal/route-inspection-metadata.d.ts.map +1 -0
  43. package/dist/internal/route-inspection-metadata.js +68 -0
  44. package/dist/internal.d.ts +6 -1
  45. package/dist/internal.d.ts.map +1 -1
  46. package/dist/internal.js +4 -1
  47. package/dist/module-definition.d.ts +10 -0
  48. package/dist/module-definition.d.ts.map +1 -0
  49. package/dist/module-definition.js +12 -0
  50. package/dist/module-graph.d.ts +41 -0
  51. package/dist/module-graph.d.ts.map +1 -1
  52. package/dist/module-graph.js +108 -13
  53. package/dist/multipart.d.ts +67 -3
  54. package/dist/multipart.d.ts.map +1 -1
  55. package/dist/multipart.js +665 -103
  56. package/dist/platform-component-registry.d.ts +9 -0
  57. package/dist/platform-component-registry.d.ts.map +1 -0
  58. package/dist/platform-component-registry.js +70 -0
  59. package/dist/platform-diagnostic-retention.d.ts +13 -0
  60. package/dist/platform-diagnostic-retention.d.ts.map +1 -0
  61. package/dist/platform-diagnostic-retention.js +43 -0
  62. package/dist/platform-shell-probe-reports.d.ts +8 -0
  63. package/dist/platform-shell-probe-reports.d.ts.map +1 -0
  64. package/dist/platform-shell-probe-reports.js +95 -0
  65. package/dist/platform-shell-probes.d.ts +16 -0
  66. package/dist/platform-shell-probes.d.ts.map +1 -0
  67. package/dist/platform-shell-probes.js +141 -0
  68. package/dist/platform-shell.d.ts +7 -13
  69. package/dist/platform-shell.d.ts.map +1 -1
  70. package/dist/platform-shell.js +58 -310
  71. package/dist/retryable-shutdown.d.ts +7 -0
  72. package/dist/retryable-shutdown.d.ts.map +1 -0
  73. package/dist/retryable-shutdown.js +20 -0
  74. package/dist/route-inspection.d.ts +56 -0
  75. package/dist/route-inspection.d.ts.map +1 -0
  76. package/dist/route-inspection.js +80 -0
  77. package/dist/tokens.d.ts +6 -4
  78. package/dist/tokens.d.ts.map +1 -1
  79. package/dist/tokens.js +5 -0
  80. package/dist/types.d.ts +53 -8
  81. package/dist/types.d.ts.map +1 -1
  82. package/dist/web.d.ts +22 -3
  83. package/dist/web.d.ts.map +1 -1
  84. package/dist/web.js +80 -34
  85. package/package.json +13 -26
  86. package/dist/internal-node.d.ts +0 -2
  87. package/dist/internal-node.d.ts.map +0 -1
  88. package/dist/internal-node.js +0 -1
  89. package/dist/logging/json-logger.d.ts +0 -8
  90. package/dist/logging/json-logger.d.ts.map +0 -1
  91. package/dist/logging/json-logger.js +0 -45
  92. package/dist/logging/logger.d.ts +0 -37
  93. package/dist/logging/logger.d.ts.map +0 -1
  94. package/dist/logging/logger.js +0 -103
  95. package/dist/node/internal-node-compression.d.ts +0 -22
  96. package/dist/node/internal-node-compression.d.ts.map +0 -1
  97. package/dist/node/internal-node-compression.js +0 -84
  98. package/dist/node/internal-node-request.d.ts +0 -162
  99. package/dist/node/internal-node-request.d.ts.map +0 -1
  100. package/dist/node/internal-node-request.js +0 -478
  101. package/dist/node/internal-node-response.d.ts +0 -28
  102. package/dist/node/internal-node-response.d.ts.map +0 -1
  103. package/dist/node/internal-node-response.js +0 -205
  104. package/dist/node/internal-node-shutdown.d.ts +0 -34
  105. package/dist/node/internal-node-shutdown.d.ts.map +0 -1
  106. package/dist/node/internal-node-shutdown.js +0 -83
  107. package/dist/node/internal-node.d.ts +0 -111
  108. package/dist/node/internal-node.d.ts.map +0 -1
  109. package/dist/node/internal-node.js +0 -283
  110. package/dist/node/node-compression.d.ts +0 -2
  111. package/dist/node/node-compression.d.ts.map +0 -1
  112. package/dist/node/node-compression.js +0 -1
  113. package/dist/node/node-request.d.ts +0 -2
  114. package/dist/node/node-request.d.ts.map +0 -1
  115. package/dist/node/node-request.js +0 -1
  116. package/dist/node/node-response.d.ts +0 -2
  117. package/dist/node/node-response.d.ts.map +0 -1
  118. package/dist/node/node-response.js +0 -1
  119. package/dist/node/node-shutdown.d.ts +0 -2
  120. package/dist/node/node-shutdown.d.ts.map +0 -1
  121. package/dist/node/node-shutdown.js +0 -1
  122. package/dist/node/node.d.ts +0 -2
  123. package/dist/node/node.d.ts.map +0 -1
  124. package/dist/node/node.js +0 -1
  125. package/dist/node.d.ts +0 -5
  126. package/dist/node.d.ts.map +0 -1
  127. package/dist/node.js +0 -3
@@ -1,138 +1,6 @@
1
- import type { BootstrapTimingDiagnostics } from '../health/diagnostics.js';
2
1
  /**
3
- * Defines Studio Graph Node Kind values used by the Studio devtool.
2
+ * Studio owns the live wire schema. Runtime produces these values through the
3
+ * public `@fluojs/studio/contracts` seam rather than maintaining a duplicate DTO.
4
4
  */
5
- export type StudioGraphNodeKind = 'module' | 'provider' | 'controller' | 'route' | 'platform' | 'external';
6
- /**
7
- * Defines Studio Graph Edge Kind values used by the Studio devtool.
8
- */
9
- export type StudioGraphEdgeKind = 'imports' | 'owns_provider' | 'owns_controller' | 'exposes_route' | 'depends_on' | 'exports';
10
- /**
11
- * Describes Studio Graph Node data used by the Studio devtool.
12
- */
13
- export interface StudioGraphNode {
14
- id: string;
15
- kind: StudioGraphNodeKind;
16
- label: string;
17
- metadata?: Record<string, unknown>;
18
- status?: 'active' | 'idle' | 'warning' | 'error';
19
- }
20
- /**
21
- * Describes Studio Graph Edge data used by the Studio devtool.
22
- */
23
- export interface StudioGraphEdge {
24
- from: string;
25
- id: string;
26
- kind: StudioGraphEdgeKind;
27
- label?: string;
28
- metadata?: Record<string, unknown>;
29
- to: string;
30
- }
31
- /**
32
- * Describes Studio Route Descriptor data used by the Studio devtool.
33
- */
34
- export interface StudioRouteDescriptor {
35
- controller: string;
36
- handler: string;
37
- id: string;
38
- method: string;
39
- module?: string;
40
- path: string;
41
- version?: string;
42
- }
43
- /**
44
- * Defines Studio Request Status values used by the Studio devtool.
45
- */
46
- export type StudioRequestStatus = 'started' | 'matched' | 'succeeded' | 'failed' | 'finished';
47
- /**
48
- * Describes Studio Request Trace data used by the Studio devtool.
49
- */
50
- export interface StudioRequestTrace {
51
- controller?: string;
52
- durationMs?: number;
53
- error?: {
54
- message: string;
55
- name?: string;
56
- };
57
- finishedAt?: string;
58
- handler?: string;
59
- method: string;
60
- path: string;
61
- requestId: string;
62
- routeId?: string;
63
- startedAt: string;
64
- status: StudioRequestStatus;
65
- statusCode?: number;
66
- url: string;
67
- }
68
- /**
69
- * Describes Studio Live Diagnostic data used by the Studio devtool.
70
- */
71
- export interface StudioLiveDiagnostic {
72
- code: string;
73
- fixHint?: string;
74
- message: string;
75
- scope?: string;
76
- severity: 'error' | 'warning' | 'info';
77
- targetId?: string;
78
- }
79
- /**
80
- * Describes Studio Live Snapshot data used by the Studio devtool.
81
- */
82
- export interface StudioLiveSnapshot {
83
- appId: string;
84
- diagnostics: StudioLiveDiagnostic[];
85
- generatedAt: string;
86
- graph: {
87
- edges: StudioGraphEdge[];
88
- nodes: StudioGraphNode[];
89
- };
90
- requests: StudioRequestTrace[];
91
- routes: StudioRouteDescriptor[];
92
- timing?: BootstrapTimingDiagnostics;
93
- version: 1;
94
- }
95
- /**
96
- * Describes Studio Live Event Source data used by the Studio devtool.
97
- */
98
- export interface StudioLiveEventSource {
99
- appId: string;
100
- runtime: 'node' | 'bun' | 'deno' | 'worker' | 'unknown';
101
- }
102
- /**
103
- * Describes Studio Live Event Base data used by the Studio devtool.
104
- */
105
- export interface StudioLiveEventBase<TType extends string, TPayload> {
106
- emittedAt: string;
107
- epoch: string;
108
- eventId: string;
109
- payload: TPayload;
110
- sequence: number;
111
- source: StudioLiveEventSource;
112
- type: TType;
113
- version: 1;
114
- }
115
- /**
116
- * Defines Studio Heartbeat Payload values used by the Studio devtool.
117
- */
118
- export type StudioHeartbeatPayload = {
119
- uptimeMs?: number;
120
- };
121
- /**
122
- * Describes Studio Restart Payload data used by the Studio devtool.
123
- */
124
- export interface StudioRestartPayload {
125
- phase: 'scheduled' | 'starting' | 'started' | 'stopping' | 'stopped';
126
- reason?: string;
127
- }
128
- /**
129
- * Describes Studio Disconnect Payload data used by the Studio devtool.
130
- */
131
- export interface StudioDisconnectPayload {
132
- reason?: string;
133
- }
134
- /**
135
- * Defines Studio Live Event values used by the Studio devtool.
136
- */
137
- export type StudioLiveEvent = StudioLiveEventBase<'disconnect', StudioDisconnectPayload> | StudioLiveEventBase<'diagnostic', StudioLiveDiagnostic> | StudioLiveEventBase<'heartbeat', StudioHeartbeatPayload> | StudioLiveEventBase<'request', StudioRequestTrace> | StudioLiveEventBase<'restart', StudioRestartPayload> | StudioLiveEventBase<'snapshot', StudioLiveSnapshot> | StudioLiveEventBase<'timing', BootstrapTimingDiagnostics>;
5
+ export type { StudioDisconnectPayload, StudioGraphEdge, StudioGraphEdgeKind, StudioGraphNode, StudioGraphNodeKind, StudioHeartbeatPayload, StudioLiveDiagnostic, StudioLiveEventBase, StudioLiveEventSource, StudioProducerLiveEvent as StudioLiveEvent, StudioProducerLiveSnapshot as StudioLiveSnapshot, StudioProducerRouteDescriptor as StudioRouteDescriptor, StudioRequestStatus, StudioRequestTrace, StudioRestartPayload, StudioRouteKind, } from '@fluojs/studio/contracts';
138
6
  //# sourceMappingURL=contracts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/devtools/contracts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAE3E;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,UAAU,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,CAAC;AAC3G;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,eAAe,GAAG,iBAAiB,GAAG,eAAe,GAAG,YAAY,GAAG,SAAS,CAAC;AAE/H;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,mBAAmB,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IAC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ACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GACvB,mBAAmB,CAAC,YAAY,EAAE,uBAAuB,CAAC,GAC1D,mBAAmB,CAAC,YAAY,EAAE,oBAAoB,CAAC,GACvD,mBAAmB,CAAC,WAAW,EAAE,sBAAsB,CAAC,GACxD,mBAAmB,CAAC,SAAS,EAAE,kBAAkB,CAAC,GAClD,mBAAmB,CAAC,SAAS,EAAE,oBAAoB,CAAC,GACpD,mBAAmB,CAAC,UAAU,EAAE,kBAAkB,CAAC,GACnD,mBAAmB,CAAC,QAAQ,EAAE,0BAA0B,CAAC,CAAC"}
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/devtools/contracts.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,YAAY,EACV,uBAAuB,EACvB,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,IAAI,eAAe,EAC1C,0BAA0B,IAAI,kBAAkB,EAChD,6BAA6B,IAAI,qBAAqB,EACtD,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,EACpB,eAAe,GAChB,MAAM,0BAA0B,CAAC"}
@@ -1,4 +1,3 @@
1
- export type { StudioGraphEdge, StudioGraphEdgeKind, StudioGraphNode, StudioGraphNodeKind, StudioHeartbeatPayload, StudioLiveDiagnostic, StudioLiveEvent, StudioLiveEventBase, StudioLiveEventSource, StudioLiveSnapshot, StudioRequestStatus, StudioRequestTrace, StudioRouteDescriptor, } from './contracts.js';
2
- export { createStudioLiveSnapshot, createStudioRouteId, handlerToStudioRouteDescriptor, type StudioLiveSnapshotInput, } from './snapshot.js';
3
- export { StudioDevtoolsRuntime, applyStudioDevtoolsApplicationOptions, applyStudioDevtoolsContextOptions, createStudioDevtoolsRuntimeFromConfig, createStudioDevtoolsRuntimeFromEnv, publishStudioBootstrapSnapshot, type StudioBootstrapSnapshotInput, type StudioDevtoolsConfig, type StudioDevtoolsRuntimeOptions, type StudioDevtoolsRuntimeTransport, } from './studio-runtime.js';
1
+ export type { StudioLiveEvent, StudioLiveSnapshot, StudioRouteDescriptor, } from './contracts.js';
2
+ export { StudioDevtoolsRuntime, type StudioDevtoolsRuntimeOptions, type StudioDevtoolsRuntimeTransport, } from './studio-runtime.js';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/devtools/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,wBAAwB,EACxB,mBAAmB,EACnB,8BAA8B,EAC9B,KAAK,uBAAuB,GAC7B,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,qBAAqB,EACrB,qCAAqC,EACrC,iCAAiC,EACjC,qCAAqC,EACrC,kCAAkC,EAClC,8BAA8B,EAC9B,KAAK,4BAA4B,EACjC,KAAK,oBAAoB,EACzB,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,GACpC,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/devtools/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,eAAe,EACf,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,qBAAqB,EACrB,KAAK,4BAA4B,EACjC,KAAK,8BAA8B,GACpC,MAAM,qBAAqB,CAAC"}
@@ -1,2 +1 @@
1
- export { createStudioLiveSnapshot, createStudioRouteId, handlerToStudioRouteDescriptor } from './snapshot.js';
2
- export { StudioDevtoolsRuntime, applyStudioDevtoolsApplicationOptions, applyStudioDevtoolsContextOptions, createStudioDevtoolsRuntimeFromConfig, createStudioDevtoolsRuntimeFromEnv, publishStudioBootstrapSnapshot } from './studio-runtime.js';
1
+ export { StudioDevtoolsRuntime } from './studio-runtime.js';
@@ -1,4 +1,4 @@
1
- import type { HandlerDescriptor } from '@fluojs/http';
1
+ import type { HandlerDescriptor } from '@fluojs/http/portable';
2
2
  import { type BootstrapTimingDiagnostics } from '../health/diagnostics.js';
3
3
  import type { CompiledModule, ModuleType } from '../types.js';
4
4
  import type { StudioLiveDiagnostic, StudioLiveSnapshot, StudioRouteDescriptor } from './contracts.js';
@@ -1 +1 @@
1
- {"version":3,"file":"snapshot.d.ts","sourceRoot":"","sources":["../../src/devtools/snapshot.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEtD,OAAO,EAAiC,KAAK,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAG1G,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,KAAK,EAIV,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AAExB;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,SAAS,cAA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AE,0BAA0B,CAAC;CACrC;AA0KD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,iBAAiB,GAAG,MAAM,CAEzE;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,iBAAiB,GAAG,qBAAqB,CAwBnG;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,uBAAuB,GAAG,kBAAkB,CA4L3F"}
@@ -1,6 +1,7 @@
1
1
  import { createRuntimeDiagnosticsGraph } from '../health/diagnostics.js';
2
2
  import { getRuntimeClassDiMetadata } from '../internal/core-metadata.js';
3
3
  import { providerToken } from '../module-graph.js';
4
+ import { createRuntimeRouteInspection, createRuntimeRouteInspectionId } from '../route-inspection.js';
4
5
 
5
6
  /**
6
7
  * Describes Studio Live Snapshot Input data used by the Studio devtool.
@@ -96,8 +97,8 @@ function controllerNodeId(moduleName, controllerName) {
96
97
  function externalNodeId(tokenLabel) {
97
98
  return `external:${slug(tokenLabel)}`;
98
99
  }
99
- function routeNodeId(route) {
100
- return `route:${slug(route.id)}`;
100
+ function routeNodeId(routeId) {
101
+ return `route:${slug(routeId)}`;
101
102
  }
102
103
  function edgeId(kind, from, to) {
103
104
  return `${kind}:${from}->${to}`;
@@ -125,9 +126,6 @@ function createDependencyEdgeTarget(tokenLabel, moduleName, providerByModuleAndT
125
126
  });
126
127
  return externalId;
127
128
  }
128
- function routePath(descriptor) {
129
- return descriptor.metadata.effectivePath || descriptor.route.path;
130
- }
131
129
 
132
130
  /**
133
131
  * Creates a stable route id shared by runtime request traces and Studio graph snapshots.
@@ -136,7 +134,7 @@ function routePath(descriptor) {
136
134
  * @returns Stable Studio route id for the handler.
137
135
  */
138
136
  export function createStudioRouteId(descriptor) {
139
- return [descriptor.route.method, routePath(descriptor), descriptor.controllerToken.name || '<anonymous-controller>', descriptor.methodName].join(' ');
137
+ return createRuntimeRouteInspectionId(descriptor);
140
138
  }
141
139
 
142
140
  /**
@@ -146,18 +144,22 @@ export function createStudioRouteId(descriptor) {
146
144
  * @returns Route descriptor consumed by the Studio UI and request traces.
147
145
  */
148
146
  export function handlerToStudioRouteDescriptor(descriptor) {
147
+ const inspection = createRuntimeRouteInspection(descriptor);
149
148
  const route = {
150
- controller: descriptor.controllerToken.name || '<anonymous-controller>',
151
- handler: descriptor.methodName,
152
- id: createStudioRouteId(descriptor),
153
- method: descriptor.route.method,
154
- path: routePath(descriptor)
149
+ controller: inspection.controller,
150
+ graphNodeId: routeNodeId(inspection.id),
151
+ handler: inspection.handler,
152
+ id: inspection.id,
153
+ kind: inspection.kind,
154
+ method: inspection.method,
155
+ params: [...inspection.params],
156
+ path: inspection.path
155
157
  };
156
- const moduleName = descriptor.metadata.moduleType?.name;
158
+ const moduleName = inspection.module;
157
159
  if (moduleName) {
158
160
  route.module = moduleName;
159
161
  }
160
- const version = descriptor.metadata.effectiveVersion ?? descriptor.route.version;
162
+ const version = inspection.version;
161
163
  if (version) {
162
164
  route.version = version;
163
165
  }
@@ -302,9 +304,8 @@ export function createStudioLiveSnapshot(input) {
302
304
  }
303
305
  const routes = (input.routes ?? []).map(descriptor => handlerToStudioRouteDescriptor(descriptor));
304
306
  for (const route of routes) {
305
- const id = routeNodeId(route);
306
307
  addNode(nodes, {
307
- id,
308
+ id: route.graphNodeId,
308
309
  kind: 'route',
309
310
  label: `${route.method} ${route.path}`,
310
311
  metadata: {
@@ -319,9 +320,9 @@ export function createStudioLiveSnapshot(input) {
319
320
  if (controllerId) {
320
321
  addEdge(edges, {
321
322
  from: controllerId,
322
- id: edgeId('exposes_route', controllerId, id),
323
+ id: edgeId('exposes_route', controllerId, route.graphNodeId),
323
324
  kind: 'exposes_route',
324
- to: id
325
+ to: route.graphNodeId
325
326
  });
326
327
  }
327
328
  }
@@ -0,0 +1,14 @@
1
+ import type { RequestObservationContext, RequestObserver } from '@fluojs/http/portable';
2
+ import type { StudioDevtoolsRuntime } from './studio-runtime.js';
3
+ export declare class StudioRequestObserver implements RequestObserver {
4
+ private readonly runtime;
5
+ private readonly traces;
6
+ constructor(runtime: StudioDevtoolsRuntime);
7
+ onRequestStart(context: RequestObservationContext): void;
8
+ onHandlerMatched(context: RequestObservationContext): void;
9
+ onRequestSuccess(context: RequestObservationContext): void;
10
+ onRequestError(context: RequestObservationContext, error: unknown): void;
11
+ onRequestFinish(context: RequestObservationContext): void;
12
+ private ensureTrace;
13
+ }
14
+ //# sourceMappingURL=studio-request-observer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio-request-observer.d.ts","sourceRoot":"","sources":["../../src/devtools/studio-request-observer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIxF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAoEjE,qBAAa,qBAAsB,YAAW,eAAe;IAG/C,OAAO,CAAC,QAAQ,CAAC,OAAO;IAFpC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuC;gBAEjC,OAAO,EAAE,qBAAqB;IAE3D,cAAc,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI;IAmBxD,gBAAgB,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI;IAO1D,gBAAgB,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI;IAM1D,cAAc,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI;IAQxE,eAAe,CAAC,OAAO,EAAE,yBAAyB,GAAG,IAAI;IAUzD,OAAO,CAAC,WAAW;CAoBpB"}
@@ -0,0 +1,112 @@
1
+ import { handlerToStudioRouteDescriptor } from './snapshot.js';
2
+ const runtimePerformance = globalThis.performance ?? {
3
+ now: () => Date.now()
4
+ };
5
+ function createRequestId() {
6
+ return `req-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`;
7
+ }
8
+ function toErrorPayload(_error) {
9
+ return {
10
+ message: 'Request failed'
11
+ };
12
+ }
13
+ function sanitizeRequestUrl(value) {
14
+ try {
15
+ const parsed = new URL(value, 'http://fluo.local');
16
+ return parsed.pathname || '/';
17
+ } catch {
18
+ return value.split('#', 1)[0]?.split('?', 1)[0] || value;
19
+ }
20
+ }
21
+ function traceToPayload(trace, statusCode) {
22
+ const payload = {
23
+ method: trace.method,
24
+ path: trace.path,
25
+ requestId: trace.requestId,
26
+ startedAt: trace.startedAt,
27
+ status: trace.status,
28
+ url: trace.url
29
+ };
30
+ if (trace.handler) {
31
+ const route = handlerToStudioRouteDescriptor(trace.handler);
32
+ payload.controller = route.controller;
33
+ payload.handler = route.handler;
34
+ payload.routeId = route.id;
35
+ }
36
+ if (trace.error) {
37
+ payload.error = trace.error;
38
+ }
39
+ if (statusCode !== undefined) {
40
+ payload.statusCode = statusCode;
41
+ }
42
+ if (trace.status === 'succeeded' || trace.status === 'failed' || trace.status === 'finished') {
43
+ payload.finishedAt = new Date().toISOString();
44
+ payload.durationMs = Number((runtimePerformance.now() - trace.startMs).toFixed(3));
45
+ }
46
+ return payload;
47
+ }
48
+ export class StudioRequestObserver {
49
+ traces = new WeakMap();
50
+ constructor(runtime) {
51
+ this.runtime = runtime;
52
+ }
53
+ onRequestStart(context) {
54
+ const request = context.requestContext.request;
55
+ const requestId = request.requestId ?? (typeof request.headers['x-request-id'] === 'string' ? request.headers['x-request-id'] : undefined) ?? createRequestId();
56
+ const trace = {
57
+ method: request.method,
58
+ path: request.path,
59
+ requestId,
60
+ startedAt: new Date().toISOString(),
61
+ startMs: runtimePerformance.now(),
62
+ status: 'started',
63
+ url: sanitizeRequestUrl(request.url)
64
+ };
65
+ this.traces.set(context.requestContext, trace);
66
+ this.runtime.publish('request', traceToPayload(trace));
67
+ }
68
+ onHandlerMatched(context) {
69
+ const trace = this.ensureTrace(context);
70
+ trace.handler = context.handler;
71
+ trace.status = 'matched';
72
+ this.runtime.publish('request', traceToPayload(trace));
73
+ }
74
+ onRequestSuccess(context) {
75
+ const trace = this.ensureTrace(context);
76
+ trace.handler = context.handler ?? trace.handler;
77
+ trace.status = 'succeeded';
78
+ }
79
+ onRequestError(context, error) {
80
+ const trace = this.ensureTrace(context);
81
+ trace.handler = context.handler ?? trace.handler;
82
+ trace.error = toErrorPayload(error);
83
+ trace.status = 'failed';
84
+ this.runtime.publish('request', traceToPayload(trace, context.requestContext.response.statusCode));
85
+ }
86
+ onRequestFinish(context) {
87
+ const trace = this.ensureTrace(context);
88
+ trace.handler = context.handler ?? trace.handler;
89
+ if (trace.status !== 'failed' && trace.status !== 'succeeded') {
90
+ trace.status = 'finished';
91
+ }
92
+ this.runtime.publish('request', traceToPayload(trace, context.requestContext.response.statusCode));
93
+ }
94
+ ensureTrace(context) {
95
+ const existing = this.traces.get(context.requestContext);
96
+ if (existing) {
97
+ return existing;
98
+ }
99
+ const request = context.requestContext.request;
100
+ const trace = {
101
+ method: request.method,
102
+ path: request.path,
103
+ requestId: request.requestId ?? createRequestId(),
104
+ startedAt: new Date().toISOString(),
105
+ startMs: runtimePerformance.now(),
106
+ status: 'started',
107
+ url: sanitizeRequestUrl(request.url)
108
+ };
109
+ this.traces.set(context.requestContext, trace);
110
+ return trace;
111
+ }
112
+ }
@@ -0,0 +1,25 @@
1
+ import type { StudioLiveEventSource } from './contracts.js';
2
+ /**
3
+ * Describes Studio Devtools Config data used by the Studio devtool.
4
+ */
5
+ export interface StudioDevtoolsConfig {
6
+ FLUO_STUDIO?: string;
7
+ FLUO_STUDIO_APP_ID?: string;
8
+ FLUO_STUDIO_ENDPOINT?: string;
9
+ FLUO_STUDIO_EPOCH?: string;
10
+ FLUO_STUDIO_RUNTIME?: string;
11
+ FLUO_STUDIO_TOKEN?: string;
12
+ FLUO_STUDIO_URL?: string;
13
+ }
14
+ export interface StudioDevtoolsConfigSnapshot {
15
+ readonly appId: string | undefined;
16
+ readonly endpoint: string;
17
+ readonly epoch: string | undefined;
18
+ readonly runtime: StudioLiveEventSource['runtime'];
19
+ readonly token: string;
20
+ }
21
+ declare global {
22
+ var __FLUO_STUDIO_DEVTOOLS_CONFIG__: StudioDevtoolsConfig | undefined;
23
+ }
24
+ export declare function captureStudioDevtoolsConfig(config: StudioDevtoolsConfig | undefined): StudioDevtoolsConfigSnapshot | undefined;
25
+ //# sourceMappingURL=studio-runtime-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"studio-runtime-config.d.ts","sourceRoot":"","sources":["../../src/devtools/studio-runtime-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IACnD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,+BAA+B,EAAE,oBAAoB,GAAG,SAAS,CAAC;CACvE;AAmCD,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,oBAAoB,GAAG,SAAS,GAAG,4BAA4B,GAAG,SAAS,CAuC9H"}
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Describes Studio Devtools Config data used by the Studio devtool.
3
+ */
4
+
5
+ function isEnabled(value) {
6
+ return value === '1' || value === 'true' || value === 'yes';
7
+ }
8
+ function isOptionalString(value) {
9
+ return value === undefined || typeof value === 'string';
10
+ }
11
+ function isRecord(value) {
12
+ return typeof value === 'object' && value !== null;
13
+ }
14
+ function normalizeRuntime(value) {
15
+ if (value === 'node' || value === 'bun' || value === 'deno' || value === 'worker') {
16
+ return value;
17
+ }
18
+ return 'node';
19
+ }
20
+ function resolveEndpoint(endpoint, studioUrl) {
21
+ try {
22
+ const resolved = endpoint ? new URL(endpoint) : studioUrl ? new URL('/api/runtime/events', studioUrl) : undefined;
23
+ if (!resolved || resolved.protocol !== 'http:' && resolved.protocol !== 'https:') {
24
+ return undefined;
25
+ }
26
+ return resolved.toString();
27
+ } catch {
28
+ return undefined;
29
+ }
30
+ }
31
+ export function captureStudioDevtoolsConfig(config) {
32
+ const value = config ?? globalThis.__FLUO_STUDIO_DEVTOOLS_CONFIG__;
33
+ if (!isRecord(value)) {
34
+ return undefined;
35
+ }
36
+ const {
37
+ FLUO_STUDIO,
38
+ FLUO_STUDIO_APP_ID,
39
+ FLUO_STUDIO_ENDPOINT,
40
+ FLUO_STUDIO_EPOCH,
41
+ FLUO_STUDIO_RUNTIME,
42
+ FLUO_STUDIO_TOKEN,
43
+ FLUO_STUDIO_URL
44
+ } = value;
45
+ if (!isOptionalString(FLUO_STUDIO) || !isOptionalString(FLUO_STUDIO_APP_ID) || !isOptionalString(FLUO_STUDIO_ENDPOINT) || !isOptionalString(FLUO_STUDIO_EPOCH) || !isOptionalString(FLUO_STUDIO_RUNTIME) || !isOptionalString(FLUO_STUDIO_TOKEN) || !isOptionalString(FLUO_STUDIO_URL)) {
46
+ return undefined;
47
+ }
48
+ const endpoint = resolveEndpoint(FLUO_STUDIO_ENDPOINT, FLUO_STUDIO_URL);
49
+ if (!isEnabled(FLUO_STUDIO) || !endpoint || !FLUO_STUDIO_TOKEN) {
50
+ return undefined;
51
+ }
52
+ return Object.freeze({
53
+ appId: FLUO_STUDIO_APP_ID,
54
+ endpoint,
55
+ epoch: FLUO_STUDIO_EPOCH,
56
+ runtime: normalizeRuntime(FLUO_STUDIO_RUNTIME),
57
+ token: FLUO_STUDIO_TOKEN
58
+ });
59
+ }
@@ -1,15 +1,19 @@
1
- import type { HandlerDescriptor, RequestObserver } from '@fluojs/http';
1
+ import type { HandlerDescriptor, RequestObserver } from '@fluojs/http/portable';
2
2
  import type { BootstrapTimingDiagnostics } from '../health/diagnostics.js';
3
3
  import type { BootstrapApplicationOptions, CompiledModule, CreateApplicationContextOptions, ModuleType } from '../types.js';
4
4
  import type { StudioLiveEvent, StudioLiveEventSource, StudioLiveSnapshot } from './contracts.js';
5
+ import { type StudioDevtoolsConfig } from './studio-runtime-config.js';
6
+ export type { StudioDevtoolsConfig } from './studio-runtime-config.js';
5
7
  /**
6
- * Describes Studio Devtools Runtime Transport data used by the Studio devtool.
8
+ * Host-owned transport that receives live Studio events.
9
+ *
10
+ * Transport failures are ignored so Studio instrumentation remains observational.
7
11
  */
8
12
  export interface StudioDevtoolsRuntimeTransport {
9
13
  publish(event: StudioLiveEvent): Promise<void> | void;
10
14
  }
11
15
  /**
12
- * Describes Studio Devtools Runtime Options data used by the Studio devtool.
16
+ * Options for a host-owned Studio bridge.
13
17
  */
14
18
  export interface StudioDevtoolsRuntimeOptions {
15
19
  appId: string;
@@ -28,18 +32,11 @@ export interface StudioBootstrapSnapshotInput {
28
32
  timing?: BootstrapTimingDiagnostics;
29
33
  }
30
34
  /**
31
- * Describes Studio Devtools Config data used by the Studio devtool.
35
+ * Host-owned bridge for publishing live Studio bootstrap and request events.
36
+ *
37
+ * Pass an instance as `studioDevtools` to application or context bootstrap.
38
+ * Event delivery is observational: transport throws and rejections never alter runtime behavior.
32
39
  */
33
- export interface StudioDevtoolsConfig {
34
- FLUO_STUDIO?: string;
35
- FLUO_STUDIO_APP_ID?: string;
36
- FLUO_STUDIO_ENDPOINT?: string;
37
- FLUO_STUDIO_EPOCH?: string;
38
- FLUO_STUDIO_RUNTIME?: string;
39
- FLUO_STUDIO_TOKEN?: string;
40
- FLUO_STUDIO_URL?: string;
41
- }
42
- /** Process-local runtime bridge used only when Studio env injection is present. */
43
40
  export declare class StudioDevtoolsRuntime {
44
41
  private readonly options;
45
42
  private readonly epoch;
@@ -52,9 +49,6 @@ export declare class StudioDevtoolsRuntime {
52
49
  publishBootstrapSnapshot(input: StudioBootstrapSnapshotInput): void;
53
50
  close(): void;
54
51
  }
55
- declare global {
56
- var __FLUO_STUDIO_DEVTOOLS_CONFIG__: StudioDevtoolsConfig | undefined;
57
- }
58
52
  /**
59
53
  * Creates the Studio runtime bridge from explicit CLI-injected config.
60
54
  * Returns `undefined` unless Studio is explicitly enabled and a token-protected endpoint is present.
@@ -62,7 +56,7 @@ declare global {
62
56
  * @param config Explicit Studio config injected by the application boundary.
63
57
  * @returns Studio runtime bridge, or `undefined` when Studio is disabled or incomplete.
64
58
  */
65
- export declare function createStudioDevtoolsRuntimeFromConfig(config?: StudioDevtoolsConfig | undefined): StudioDevtoolsRuntime | undefined;
59
+ export declare function createStudioDevtoolsRuntimeFromConfig(config?: StudioDevtoolsConfig): StudioDevtoolsRuntime | undefined;
66
60
  /**
67
61
  * Compatibility helper for callers that already resolved env values at their application boundary.
68
62
  *
@@ -1 +1 @@
1
- {"version":3,"file":"studio-runtime.d.ts","sourceRoot":"","sources":["../../src/devtools/studio-runtime.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAA6B,eAAe,EAAE,MAAM,cAAc,CAAC;AAElG,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,KAAK,EAAE,2BAA2B,EAAE,cAAc,EAAE,+BAA+B,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC5H,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,kBAAkB,EAAsB,MAAM,gBAAgB,CAAC;AAMrH;;GAEG;AACH,MAAM,WAAW,8BAA8B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