@principal-ai/principal-view-core 0.12.0 → 0.12.1

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
@@ -15,6 +15,7 @@
15
15
  * import { ... } from '@principal-ai/principal-view-core/browser'
16
16
  */
17
17
  export type { GraphConfiguration, NodeState, EdgeState, NodeTypeDefinition, EdgeTypeDefinition, Violation, GraphEvent, NodeEvent, EdgeEvent, StateEvent, ComponentLibrary, LogLevel, GraphMetrics, Warning, ValidationResult, EventStream, ConnectionRule, LibraryNodeComponent, LibraryEdgeComponent, ComponentActivityEvent, ComponentActionEvent, EdgeAnimationEvent, PathBasedEvent, JsonValue, JsonObject, } from './types';
18
+ export type { PathBasedGraphConfiguration } from './types/path-based-config';
18
19
  export type { ConfigurationFile, ConfigurationLoadResult } from './ConfigurationLoader';
19
20
  export * from './types/canvas';
20
21
  export { CanvasConverter } from './utils/CanvasConverter';
@@ -30,4 +31,10 @@ export { CanvasDiscovery } from './discovery/CanvasDiscovery';
30
31
  export type { DiscoveredCanvas, DiscoveredExecution, CanvasDiscoveryResult, DiscoveryOptions, CanvasType, ExecutionType, DiscoveredCanvasWithContent, DiscoveredExecutionWithContent, CanvasDiscoveryResultWithContent, } from './discovery/types';
31
32
  export { ExecutionValidator, createExecutionValidator } from './execution/ExecutionValidator';
32
33
  export type { ExecutionData, ValidationError, ExecutionValidationResult, } from './execution/ExecutionValidator';
34
+ export { PathBasedEventProcessor } from './PathBasedEventProcessor';
35
+ export type { LogEntry } from './PathBasedEventProcessor';
36
+ export { SessionManager } from './SessionManager';
37
+ export type { SessionStatus, SessionResult, SessionMetadata, EventSession, CreateSessionOptions, EndSessionOptions, SessionChangeCallback, SessionManagerConfig, } from './SessionManager';
38
+ export { EventRecorderService } from './EventRecorderService';
39
+ export type { ProtocolMessageType, ProtocolMessage, SessionStartMessage, SessionEndMessage, LogMessage, LogBatchMessage, PingMessage, PongMessage, ErrorMessage, AckMessage, IncomingMessage, OutgoingMessage, RecordingMode, EventCallback, EventBatchCallback, ConnectionState, EventRecorderServiceConfig, } from './EventRecorderService';
33
40
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,YAAY,EACV,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,UAAU,GACX,MAAM,SAAS,CAAC;AAGjB,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGxF,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG5E,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACtF,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAI1D,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,cAAc,GACf,MAAM,8BAA8B,CAAC;AACtC,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,YAAY,GACb,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,EACZ,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,2BAA2B,EAC3B,8BAA8B,EAC9B,gCAAgC,GACjC,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC9F,YAAY,EACV,aAAa,EACb,eAAe,EACf,yBAAyB,GAC1B,MAAM,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,YAAY,EACV,kBAAkB,EAClB,SAAS,EACT,SAAS,EACT,kBAAkB,EAClB,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,SAAS,EACT,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,SAAS,EACT,UAAU,GACX,MAAM,SAAS,CAAC;AAGjB,YAAY,EAAE,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAG7E,YAAY,EAAE,iBAAiB,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAGxF,cAA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CAAC;AAGxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAG1D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EACV,aAAa,EACb,aAAa,EACb,eAAe,EACf,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EACV,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,WAAW,EACX,WAAW,EACX,YAAY,EACZ,UAAU,EACV,eAAe,EACf,eAAe,EACf,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,eAAe,EACf,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC"}
package/dist/index.js CHANGED
@@ -28,22 +28,28 @@ export { selectScenario, matchesCondition, hasEventMatching, computeAggregates,
28
28
  export { CanvasDiscovery } from './discovery/CanvasDiscovery';
29
29
  // Export execution validation (browser-safe - no Node.js dependencies)
30
30
  export { ExecutionValidator, createExecutionValidator } from './execution/ExecutionValidator';
31
+ // Export path-based processing (browser-safe - Milestone 1 & 2)
32
+ export { PathBasedEventProcessor } from './PathBasedEventProcessor';
33
+ // Export session management (browser-safe - Event Recording System)
34
+ export { SessionManager } from './SessionManager';
35
+ // Export event recorder service (browser-safe)
36
+ export { EventRecorderService } from './EventRecorderService';
31
37
  // NOTE: The following require Node.js dependencies and are NOT exported in the main bundle.
32
38
  // Use '@principal-ai/principal-view-core/node' for Node.js-specific functionality:
33
39
  //
34
40
  // - EventProcessor, ValidationEngine, ConfigurationValidator (Node.js processing)
35
- // - GraphInstrumentationHelper, PathBasedEventProcessor (Node.js utilities)
41
+ // - GraphInstrumentationHelper (Node.js utilities)
36
42
  // - PathMatcher, GraphConverter (Node.js utilities)
37
43
  // - EventValidator, createValidatedEmitter (Node.js telemetry)
38
44
  // - analyzeCoverage (file system - uses fs/promises, path, glob)
39
45
  // - generateTypes, TypeScriptGenerator, generatorRegistry (code generation - file system)
40
46
  // - traceToCanvas, traceToCanvasJson (trace utilities)
41
- // - SessionManager, EventRecorderService (session management)
42
47
  // - ConfigurationLoader, LibraryLoader (file system loaders)
43
48
  // - LibraryConverter (library utilities)
44
49
  // - Rules engine (OpenTelemetry dependencies)
45
50
  // - NarrativeValidator, createNarrativeValidator (Node.js validator)
46
51
  // - ExecutionLoader, createExecutionLoader (file system loader)
52
+ // - FileSystemAdapter (interface for Node.js file system adapters)
47
53
  //
48
54
  // Example:
49
55
  // import { ConfigurationLoader, analyzeCoverage } from '@principal-ai/principal-view-core/node';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAkCH,oCAAoC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG1D,2CAA2C;AAC3C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAGtF,kDAAkD;AAClD,mEAAmE;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,cAAc,EACd,cAAc,GACf,MAAM,8BAA8B,CAAC;AAiCtC,uDAAuD;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAa9D,uEAAuE;AACvE,OAAO,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAO9F,4FAA4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,oDAAoD;AACpD,+DAA+D;AAC/D,iEAAiE;AACjE,0FAA0F;AAC1F,uDAAuD;AACvD,6DAA6D;AAC7D,yCAAyC;AACzC,8CAA8C;AAC9C,qEAAqE;AACrE,gEAAgE;AAChE,mEAAmE;AACnE,EAAE;AACF,WAAW;AACX,iGAAiG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principal-ai/principal-view-core",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "description": "Core logic and types for graph-based principal view framework",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
package/src/index.ts CHANGED
@@ -44,6 +44,9 @@ export type {
44
44
  JsonObject,
45
45
  } from './types';
46
46
 
47
+ // Export path-based configuration types (browser-safe)
48
+ export type { PathBasedGraphConfiguration } from './types/path-based-config';
49
+
47
50
  // Export types from ConfigurationLoader (interfaces only, no implementation)
48
51
  export type { ConfigurationFile, ConfigurationLoadResult } from './ConfigurationLoader';
49
52
 
@@ -123,22 +126,61 @@ export type {
123
126
  ExecutionValidationResult,
124
127
  } from './execution/ExecutionValidator';
125
128
 
129
+ // Export path-based processing (browser-safe - Milestone 1 & 2)
130
+ export { PathBasedEventProcessor } from './PathBasedEventProcessor';
131
+ export type { LogEntry } from './PathBasedEventProcessor';
132
+
133
+ // Export session management (browser-safe - Event Recording System)
134
+ export { SessionManager } from './SessionManager';
135
+ export type {
136
+ SessionStatus,
137
+ SessionResult,
138
+ SessionMetadata,
139
+ EventSession,
140
+ CreateSessionOptions,
141
+ EndSessionOptions,
142
+ SessionChangeCallback,
143
+ SessionManagerConfig,
144
+ } from './SessionManager';
145
+
146
+ // Export event recorder service (browser-safe)
147
+ export { EventRecorderService } from './EventRecorderService';
148
+ export type {
149
+ ProtocolMessageType,
150
+ ProtocolMessage,
151
+ SessionStartMessage,
152
+ SessionEndMessage,
153
+ LogMessage,
154
+ LogBatchMessage,
155
+ PingMessage,
156
+ PongMessage,
157
+ ErrorMessage,
158
+ AckMessage,
159
+ IncomingMessage,
160
+ OutgoingMessage,
161
+ RecordingMode,
162
+ EventCallback,
163
+ EventBatchCallback,
164
+ ConnectionState,
165
+ EventRecorderServiceConfig,
166
+ } from './EventRecorderService';
167
+
126
168
  // NOTE: The following require Node.js dependencies and are NOT exported in the main bundle.
127
169
  // Use '@principal-ai/principal-view-core/node' for Node.js-specific functionality:
128
170
  //
129
171
  // - EventProcessor, ValidationEngine, ConfigurationValidator (Node.js processing)
130
- // - GraphInstrumentationHelper, PathBasedEventProcessor (Node.js utilities)
172
+ // - GraphInstrumentationHelper (Node.js utilities)
131
173
  // - PathMatcher, GraphConverter (Node.js utilities)
132
174
  // - EventValidator, createValidatedEmitter (Node.js telemetry)
133
175
  // - analyzeCoverage (file system - uses fs/promises, path, glob)
134
176
  // - generateTypes, TypeScriptGenerator, generatorRegistry (code generation - file system)
135
177
  // - traceToCanvas, traceToCanvasJson (trace utilities)
136
- // - SessionManager, EventRecorderService (session management)
137
178
  // - ConfigurationLoader, LibraryLoader (file system loaders)
138
179
  // - LibraryConverter (library utilities)
139
180
  // - Rules engine (OpenTelemetry dependencies)
140
181
  // - NarrativeValidator, createNarrativeValidator (Node.js validator)
141
182
  // - ExecutionLoader, createExecutionLoader (file system loader)
183
+ // - FileSystemAdapter (interface for Node.js file system adapters)
142
184
  //
143
185
  // Example:
144
186
  // import { ConfigurationLoader, analyzeCoverage } from '@principal-ai/principal-view-core/node';