loom-spec 0.4.0 → 0.5.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 (44) hide show
  1. package/dist/cli/exportHtml.d.ts +1 -4
  2. package/dist/cli/exportHtml.js +2 -21
  3. package/dist/cli/exportHtml.js.map +1 -1
  4. package/dist/cli/index.js +10 -46
  5. package/dist/cli/index.js.map +1 -1
  6. package/dist/mcp/server.js +3 -207
  7. package/dist/mcp/server.js.map +1 -1
  8. package/dist/server/app.js +2 -50
  9. package/dist/server/app.js.map +1 -1
  10. package/dist/server/exportConfig.d.ts +0 -2
  11. package/dist/server/exportConfig.js +0 -10
  12. package/dist/server/exportConfig.js.map +1 -1
  13. package/dist/server/exportFilter.d.ts +0 -7
  14. package/dist/server/exportFilter.js +2 -36
  15. package/dist/server/exportFilter.js.map +1 -1
  16. package/dist/server/fileOps.d.ts +0 -12
  17. package/dist/server/fileOps.js +0 -51
  18. package/dist/server/fileOps.js.map +1 -1
  19. package/dist/server/watch.d.ts +1 -1
  20. package/dist/server/watch.js +0 -5
  21. package/dist/server/watch.js.map +1 -1
  22. package/dist/validate.d.ts +1 -3
  23. package/dist/validate.js +0 -15
  24. package/dist/validate.js.map +1 -1
  25. package/dist/view/assets/{index-CvyHnPjR.css → index-D8qr-jiw.css} +1 -1
  26. package/dist/view/assets/index-DI0VS0HQ.js +205 -0
  27. package/dist/view/index.html +2 -2
  28. package/dist/view-export/assets/bundle.css +1 -1
  29. package/dist/view-export/assets/bundle.js +46 -66
  30. package/package.json +1 -1
  31. package/templates/.claude/skills/loom-spec/SKILL.md +3 -99
  32. package/templates/.loom/README.md +1 -1
  33. package/dist/cli/importTrace.d.ts +0 -15
  34. package/dist/cli/importTrace.js +0 -188
  35. package/dist/cli/importTrace.js.map +0 -1
  36. package/dist/server/otel.d.ts +0 -32
  37. package/dist/server/otel.js +0 -98
  38. package/dist/server/otel.js.map +0 -1
  39. package/dist/types/timeline.d.ts +0 -97
  40. package/dist/types/timeline.js +0 -7
  41. package/dist/types/timeline.js.map +0 -1
  42. package/dist/view/assets/TimelineView-CsYV15RD.js +0 -16
  43. package/dist/view/assets/index-CqF2JC9l.js +0 -210
  44. package/schema/timeline.schema.json +0 -135
@@ -1,135 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://loom-spec.dev/schema/timeline-v1.json",
4
- "title": "Loom Timeline",
5
- "description": "A time-axis overlay describing when events happen on the nodes of a diagram. Same node universe, different render.",
6
- "type": "object",
7
- "required": ["version", "id", "title", "diagram", "events"],
8
- "additionalProperties": false,
9
- "properties": {
10
- "$schema": { "type": "string" },
11
- "version": { "const": "1" },
12
- "id": {
13
- "type": "string",
14
- "pattern": "^[a-z0-9-]+$",
15
- "description": "Timeline identifier. Should match the filename without extension."
16
- },
17
- "title": { "type": "string", "minLength": 1 },
18
- "description": { "type": "string" },
19
- "diagram": {
20
- "type": "string",
21
- "pattern": "^[a-z0-9-]+$",
22
- "description": "Id of the diagram whose nodes this timeline overlays."
23
- },
24
- "events": {
25
- "type": "array",
26
- "items": { "$ref": "#/$defs/TimelineEvent" }
27
- },
28
- "tracks": {
29
- "type": "array",
30
- "items": { "$ref": "#/$defs/TimelineTrack" },
31
- "description": "Optional explicit track definitions (label, color). If omitted, tracks are inferred from events[].track values."
32
- }
33
- },
34
-
35
- "$defs": {
36
- "TimelineEvent": {
37
- "type": "object",
38
- "required": ["id", "node", "start_ms", "duration_ms"],
39
- "additionalProperties": false,
40
- "properties": {
41
- "id": {
42
- "type": "string",
43
- "pattern": "^[a-z0-9-]+$",
44
- "description": "Unique within this timeline."
45
- },
46
- "node": {
47
- "type": "string",
48
- "pattern": "^[a-z0-9-]+$",
49
- "description": "Node id from the referenced diagram."
50
- },
51
- "track": {
52
- "type": "string",
53
- "description": "Track label. Events on the same track are interpreted as sequential; events on different tracks at overlapping times are concurrent. If omitted, the renderer auto-assigns one track per node."
54
- },
55
- "start_ms": {
56
- "type": "number",
57
- "minimum": 0,
58
- "description": "Start time in milliseconds from t=0."
59
- },
60
- "duration_ms": {
61
- "type": "number",
62
- "minimum": 0,
63
- "description": "Duration in milliseconds. May be 0 for instantaneous events."
64
- },
65
- "label": {
66
- "type": "string",
67
- "maxLength": 60,
68
- "description": "Short text rendered inside the clip."
69
- },
70
- "description": { "type": "string" },
71
- "kind": {
72
- "type": "string",
73
- "enum": ["compute", "io", "wait", "error"],
74
- "description": "Optional category for clip styling. Distinct from edge.kind in the diagram — this describes what the node is doing during this clip, not what flows between nodes."
75
- },
76
- "code_refs": {
77
- "type": "array",
78
- "items": { "$ref": "#/$defs/CodeRef" },
79
- "description": "Optional anchors to the specific function(s) running during this clip. Like node-level code_refs but scoped to a moment in time. Drift detection checks these too. Use for function-level granularity inside a node (e.g. 'validate' vs. 'issue jwt' both happen on the auth-service node)."
80
- },
81
- "triggered_by": {
82
- "type": "string",
83
- "pattern": "^[a-z0-9-]+$",
84
- "description": "Optional id of another event that caused this one. Used for explicit causation chains and to preserve OTel span.parent_id when importing traces. The renderer can draw a connecting arrow between the two clips."
85
- },
86
- "tags": {
87
- "type": "array",
88
- "items": { "type": "string" },
89
- "description": "Free-form labels for filtering or grouping clips. Examples: 'critical-path', 'billable-time', 'background'."
90
- }
91
- }
92
- },
93
-
94
- "CodeRef": {
95
- "type": "object",
96
- "required": ["path"],
97
- "additionalProperties": false,
98
- "description": "Same shape as the CodeRef in diagram.schema.json. Inlined here to keep the schema self-contained — no cross-file $ref required to validate.",
99
- "properties": {
100
- "path": {
101
- "type": "string",
102
- "description": "Repo-relative file path."
103
- },
104
- "symbol": {
105
- "type": "string",
106
- "description": "Function, class, or component name. Preferred over lines because it survives refactors."
107
- },
108
- "lines": {
109
- "type": "string",
110
- "pattern": "^[0-9]+(-[0-9]+)?(,[0-9]+(-[0-9]+)?)*$",
111
- "description": "Line range(s) like '1-80' or '12,45-50'. Use only when no symbol applies."
112
- }
113
- }
114
- },
115
-
116
- "TimelineTrack": {
117
- "type": "object",
118
- "required": ["id", "label"],
119
- "additionalProperties": false,
120
- "properties": {
121
- "id": {
122
- "type": "string",
123
- "pattern": "^[a-z0-9-]+$",
124
- "description": "Track id, matches event.track values."
125
- },
126
- "label": { "type": "string", "minLength": 1 },
127
- "color": {
128
- "type": "string",
129
- "pattern": "^#[0-9a-fA-F]{6}$",
130
- "description": "Optional background tint for the track lane."
131
- }
132
- }
133
- }
134
- }
135
- }