@principal-ai/principal-view-core 0.13.5 → 0.14.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 (67) hide show
  1. package/dist/index.d.ts +5 -5
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +5 -5
  4. package/dist/index.js.map +1 -1
  5. package/dist/node.d.ts +2 -2
  6. package/dist/node.d.ts.map +1 -1
  7. package/dist/node.js +2 -2
  8. package/dist/node.js.map +1 -1
  9. package/dist/{narrative → workflow}/example.d.ts +3 -3
  10. package/dist/workflow/example.d.ts.map +1 -0
  11. package/dist/{narrative → workflow}/example.js +10 -10
  12. package/dist/workflow/example.js.map +1 -0
  13. package/dist/workflow/index.d.ts +14 -0
  14. package/dist/workflow/index.d.ts.map +1 -0
  15. package/dist/{narrative → workflow}/index.js +5 -5
  16. package/dist/workflow/index.js.map +1 -0
  17. package/dist/{narrative → workflow}/scenario-matcher.d.ts +5 -5
  18. package/dist/workflow/scenario-matcher.d.ts.map +1 -0
  19. package/dist/{narrative → workflow}/scenario-matcher.js +3 -3
  20. package/dist/workflow/scenario-matcher.js.map +1 -0
  21. package/dist/workflow/template-parser.d.ts.map +1 -0
  22. package/dist/workflow/template-parser.js.map +1 -0
  23. package/dist/workflow/template-renderer.d.ts +18 -0
  24. package/dist/workflow/template-renderer.d.ts.map +1 -0
  25. package/dist/{narrative → workflow}/template-renderer.js +8 -8
  26. package/dist/workflow/template-renderer.js.map +1 -0
  27. package/dist/{narrative → workflow}/types.d.ts +31 -31
  28. package/dist/workflow/types.d.ts.map +1 -0
  29. package/dist/{narrative → workflow}/types.js +2 -2
  30. package/dist/workflow/types.js.map +1 -0
  31. package/dist/{narrative → workflow}/validator.d.ts +20 -20
  32. package/dist/workflow/validator.d.ts.map +1 -0
  33. package/dist/{narrative → workflow}/validator.js +142 -142
  34. package/dist/workflow/validator.js.map +1 -0
  35. package/package.json +1 -1
  36. package/src/index.ts +11 -11
  37. package/src/node.ts +14 -14
  38. package/src/{narrative → workflow}/README.md +29 -29
  39. package/src/{narrative → workflow}/__tests__/scenario-matcher.test.ts +3 -3
  40. package/src/{narrative → workflow}/__tests__/template-parser.test.ts +2 -2
  41. package/src/{narrative → workflow}/__tests__/template-renderer.test.ts +21 -21
  42. package/src/{narrative → workflow}/__tests__/validator.test.ts +60 -60
  43. package/src/{narrative → workflow}/example.ts +14 -14
  44. package/src/{narrative → workflow}/index.ts +13 -13
  45. package/src/{narrative → workflow}/scenario-matcher.ts +7 -7
  46. package/src/{narrative → workflow}/template-renderer.ts +18 -18
  47. package/src/{narrative → workflow}/types.ts +31 -31
  48. package/src/{narrative → workflow}/validator.ts +184 -184
  49. package/dist/narrative/example.d.ts.map +0 -1
  50. package/dist/narrative/example.js.map +0 -1
  51. package/dist/narrative/index.d.ts +0 -14
  52. package/dist/narrative/index.d.ts.map +0 -1
  53. package/dist/narrative/index.js.map +0 -1
  54. package/dist/narrative/scenario-matcher.d.ts.map +0 -1
  55. package/dist/narrative/scenario-matcher.js.map +0 -1
  56. package/dist/narrative/template-parser.d.ts.map +0 -1
  57. package/dist/narrative/template-parser.js.map +0 -1
  58. package/dist/narrative/template-renderer.d.ts +0 -18
  59. package/dist/narrative/template-renderer.d.ts.map +0 -1
  60. package/dist/narrative/template-renderer.js.map +0 -1
  61. package/dist/narrative/types.d.ts.map +0 -1
  62. package/dist/narrative/types.js.map +0 -1
  63. package/dist/narrative/validator.d.ts.map +0 -1
  64. package/dist/narrative/validator.js.map +0 -1
  65. /package/dist/{narrative → workflow}/template-parser.d.ts +0 -0
  66. /package/dist/{narrative → workflow}/template-parser.js +0 -0
  67. /package/src/{narrative → workflow}/template-parser.ts +0 -0
@@ -1,14 +1,14 @@
1
1
  /**
2
- * Narrative Template System Types
2
+ * Workflow Template System Types
3
3
  *
4
4
  * Types for transforming OpenTelemetry event streams into human-readable
5
- * execution narratives based on OTEL canvas definitions.
5
+ * execution workflows based on OTEL canvas definitions.
6
6
  *
7
7
  * @see docs/NARRATIVE_TEMPLATES_DESIGN.md
8
8
  */
9
9
  import type { OtelLog, OtelSpan, OtelAttributes } from '../types/otel';
10
10
  /**
11
- * Combined OTEL signal type for narrative processing
11
+ * Combined OTEL signal type for workflow processing
12
12
  */
13
13
  export type OtelSignal = OtelSpan | OtelLog | OtelEvent;
14
14
  /**
@@ -36,44 +36,44 @@ export interface OtelEvent {
36
36
  duration?: number;
37
37
  }
38
38
  /**
39
- * Narrative template definition
39
+ * Workflow template definition
40
40
  *
41
41
  * References an .otel.canvas file and defines how to render
42
- * execution events into human-readable narratives.
42
+ * execution events into human-readable workflows.
43
43
  */
44
- export interface NarrativeTemplate {
44
+ export interface WorkflowTemplate {
45
45
  /** Schema version (e.g., "1.0.0") */
46
46
  version: string;
47
47
  /** Reference to .otel.canvas file */
48
48
  canvas: string;
49
49
  /** Human-readable template name */
50
50
  name: string;
51
- /** Purpose of this narrative view */
51
+ /** Purpose of this workflow view */
52
52
  description: string;
53
- /** How to structure the narrative */
54
- mode: NarrativeMode;
53
+ /** How to structure the workflow */
54
+ mode: WorkflowMode;
55
55
  /** Scenario selection strategy */
56
56
  scenarioSelection: 'first-match' | 'manual';
57
57
  /** Show logs associated with each span (span-tree mode) */
58
58
  showLogsPerSpan?: boolean;
59
59
  /** Mix spans/logs by timestamp (timeline mode) */
60
60
  interleaveSignals?: boolean;
61
- /** Mutually exclusive narrative scenarios */
62
- scenarios: NarrativeScenario[];
61
+ /** Mutually exclusive workflow scenarios */
62
+ scenarios: WorkflowScenario[];
63
63
  /** Display formatting preferences */
64
64
  formatting?: FormattingOptions;
65
65
  }
66
66
  /**
67
- * Narrative rendering mode
67
+ * Workflow rendering mode
68
68
  */
69
- export type NarrativeMode = 'span-tree' | 'timeline';
69
+ export type WorkflowMode = 'span-tree' | 'timeline';
70
70
  /**
71
- * Narrative scenario definition
71
+ * Workflow scenario definition
72
72
  *
73
- * Scenarios are mutually exclusive narrative templates selected
73
+ * Scenarios are mutually exclusive workflow templates selected
74
74
  * based on which events occurred during execution.
75
75
  */
76
- export interface NarrativeScenario {
76
+ export interface WorkflowScenario {
77
77
  /** Unique scenario identifier (kebab-case) */
78
78
  id: string;
79
79
  /** Selection priority (lower = higher priority, 1 = highest) */
@@ -82,7 +82,7 @@ export interface NarrativeScenario {
82
82
  description: string;
83
83
  /** Conditions that must be met for this scenario to match */
84
84
  condition: ScenarioCondition;
85
- /** Narrative template content */
85
+ /** Workflow template content */
86
86
  template: ScenarioTemplate;
87
87
  }
88
88
  /**
@@ -133,7 +133,7 @@ export interface ScenarioTemplate {
133
133
  events?: Record<string, string>;
134
134
  /** Optional: separate log templates by severity */
135
135
  logs?: LogTemplates;
136
- /** Narrative flow steps */
136
+ /** Workflow flow steps */
137
137
  flow?: Array<string | FlowDirective>;
138
138
  /** Closing text */
139
139
  summary?: string;
@@ -162,7 +162,7 @@ export interface LogTemplates {
162
162
  default?: string;
163
163
  }
164
164
  /**
165
- * Flow directive for narrative generation
165
+ * Flow directive for workflow generation
166
166
  */
167
167
  export interface FlowDirective {
168
168
  /** Iterate over collection (e.g., "violations", "logs.filter(l => l.severityNumber >= 17)") */
@@ -177,7 +177,7 @@ export interface FlowDirective {
177
177
  else?: string;
178
178
  }
179
179
  /**
180
- * Formatting options for narrative rendering
180
+ * Formatting options for workflow rendering
181
181
  */
182
182
  export interface FormattingOptions {
183
183
  /** Indentation per hierarchy level (default: " ") */
@@ -194,15 +194,15 @@ export interface FormattingOptions {
194
194
  showAttributes?: 'none' | 'matched' | 'all';
195
195
  }
196
196
  /**
197
- * Narrative rendering context
197
+ * Workflow rendering context
198
198
  *
199
- * Contains all data needed to render a narrative from events.
199
+ * Contains all data needed to render a workflow from events.
200
200
  */
201
- export interface NarrativeContext {
202
- /** The narrative template being used */
203
- template: NarrativeTemplate;
201
+ export interface WorkflowContext {
202
+ /** The workflow template being used */
203
+ template: WorkflowTemplate;
204
204
  /** Selected scenario */
205
- scenario: NarrativeScenario;
205
+ scenario: WorkflowScenario;
206
206
  /** All collected events */
207
207
  events: OtelEvent[];
208
208
  /** Span tree (for span-tree mode) */
@@ -226,10 +226,10 @@ export interface SpanTreeNode {
226
226
  depth: number;
227
227
  }
228
228
  /**
229
- * Narrative rendering result
229
+ * Workflow rendering result
230
230
  */
231
- export interface NarrativeResult {
232
- /** Rendered narrative text */
231
+ export interface WorkflowResult {
232
+ /** Rendered workflow text */
233
233
  text: string;
234
234
  /** Scenario that was selected */
235
235
  scenarioId: string;
@@ -257,11 +257,11 @@ export interface NarrativeResult {
257
257
  */
258
258
  export interface ScenarioMatchResult {
259
259
  /** The matched scenario */
260
- scenario: NarrativeScenario;
260
+ scenario: WorkflowScenario;
261
261
  /** Whether this was the default/fallback scenario */
262
262
  isDefault: boolean;
263
263
  /** All applicable scenarios (for manual selection UI) */
264
- applicableScenarios: NarrativeScenario[];
264
+ applicableScenarios: WorkflowScenario[];
265
265
  /** Reasons why other scenarios didn't match */
266
266
  matchReasons?: Record<string, string>;
267
267
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/workflow/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;AAExD;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IAEb,sBAAsB;IACtB,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAE3B,qCAAqC;IACrC,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,QAAQ,CAAC;IAEjC,uBAAuB;IACvB,UAAU,CAAC,EAAE,cAAc,CAAC;IAE5B,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC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M,WAAW,mBAAmB;IAClC,2BAA2B;IAC3B,QAAQ,EAAE,gBAAgB,CAAC;IAE3B,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAC;IAEnB,yDAAyD;IACzD,mBAAmB,EAAE,gBAAgB,EAAE,CAAC;IAExC,+CAA+C;IAC/C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC"}
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Narrative Template System Types
2
+ * Workflow Template System Types
3
3
  *
4
4
  * Types for transforming OpenTelemetry event streams into human-readable
5
- * execution narratives based on OTEL canvas definitions.
5
+ * execution workflows based on OTEL canvas definitions.
6
6
  *
7
7
  * @see docs/NARRATIVE_TEMPLATES_DESIGN.md
8
8
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/workflow/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
@@ -1,21 +1,21 @@
1
1
  /**
2
- * Narrative Template Validator
3
- * Validates .narrative.json files against their corresponding .otel.canvas files
2
+ * Workflow Template Validator
3
+ * Validates .workflow.json files against their corresponding .otel.canvas files
4
4
  */
5
- import type { NarrativeTemplate } from './types';
5
+ import type { WorkflowTemplate } from './types';
6
6
  import type { ExtendedCanvas } from '../types/canvas';
7
- export interface NarrativeValidationContext {
8
- /** The narrative template being validated */
9
- narrative: NarrativeTemplate;
10
- /** Path to the narrative file */
11
- narrativePath: string;
7
+ export interface WorkflowValidationContext {
8
+ /** The workflow template being validated */
9
+ workflow: WorkflowTemplate;
10
+ /** Path to the workflow file */
11
+ workflowPath: string;
12
12
  /** The canvas file (if found) */
13
13
  canvas?: ExtendedCanvas;
14
14
  /** Path to the canvas file */
15
15
  canvasPath?: string;
16
16
  /** Base path for resolving relative paths */
17
17
  basePath: string;
18
- /** Raw narrative content for line number lookup */
18
+ /** Raw workflow content for line number lookup */
19
19
  rawContent?: string;
20
20
  /** Execution data for validating attribute references (optional) */
21
21
  executionData?: {
@@ -25,15 +25,15 @@ export interface NarrativeValidationContext {
25
25
  eventAttributes: Map<string, Record<string, unknown>>;
26
26
  };
27
27
  /**
28
- * Optional: Events used across all narratives that reference this canvas.
28
+ * Optional: Events used across all workflows that reference this canvas.
29
29
  * When provided, coverage warnings are only emitted for canvas events
30
- * that are NOT in this set (i.e., truly unused across all narratives).
31
- * This enables multi-narrative canvas patterns where different narratives
30
+ * that are NOT in this set (i.e., truly unused across all workflows).
31
+ * This enables multi-workflow canvas patterns where different workflows
32
32
  * cover different subsets of canvas events.
33
33
  */
34
- allNarrativeEvents?: Set<string>;
34
+ allWorkflowEvents?: Set<string>;
35
35
  }
36
- export interface NarrativeViolation {
36
+ export interface WorkflowViolation {
37
37
  /** Rule ID that detected this violation */
38
38
  ruleId: string;
39
39
  /** Severity level */
@@ -53,9 +53,9 @@ export interface NarrativeViolation {
53
53
  /** Whether this can be auto-fixed */
54
54
  fixable: boolean;
55
55
  }
56
- export interface NarrativeValidationResult {
56
+ export interface WorkflowValidationResult {
57
57
  /** All violations found */
58
- violations: NarrativeViolation[];
58
+ violations: WorkflowViolation[];
59
59
  /** Count of errors */
60
60
  errorCount: number;
61
61
  /** Count of warnings */
@@ -63,11 +63,11 @@ export interface NarrativeValidationResult {
63
63
  /** Count of fixable violations */
64
64
  fixableCount: number;
65
65
  }
66
- export declare class NarrativeValidator {
66
+ export declare class WorkflowValidator {
67
67
  /**
68
- * Validate a narrative template
68
+ * Validate a workflow template
69
69
  */
70
- validate(context: NarrativeValidationContext): Promise<NarrativeValidationResult>;
70
+ validate(context: WorkflowValidationContext): Promise<WorkflowValidationResult>;
71
71
  /**
72
72
  * Check schema validity (required fields, valid values)
73
73
  */
@@ -209,5 +209,5 @@ export declare class NarrativeValidator {
209
209
  /**
210
210
  * Create a validator instance
211
211
  */
212
- export declare function createNarrativeValidator(): NarrativeValidator;
212
+ export declare function createWorkflowValidator(): WorkflowValidator;
213
213
  //# sourceMappingURL=validator.d.ts.map
@@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