@motion-proto/live-tokens 0.72.0 → 0.73.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.
@@ -0,0 +1,65 @@
1
+ export type NodeKind =
2
+ | 'trigger' | 'step' | 'decide' | 'cli' | 'hand'
3
+ | 'gate' | 'ok' | 'ref' | 'ask' | 'chipset' | 'done';
4
+
5
+ /** Inclusive 1-based line range into the skill's SKILL.md. */
6
+ export type LineRange = [number, number];
7
+
8
+ /**
9
+ * Opening text of the range's first and last lines, written and verified by
10
+ * `scripts/sync-skill-atlas.mjs`. The line numbers are derived from these, so
11
+ * editing a skill costs a sync rather than a hand audit of every range.
12
+ */
13
+ export interface Anchored {
14
+ anchor?: string;
15
+ anchorEnd?: string;
16
+ }
17
+
18
+ export interface Chip extends Anchored {
19
+ label: string;
20
+ lines: LineRange;
21
+ }
22
+
23
+ export interface TreeNode extends Anchored {
24
+ id: string;
25
+ row: number;
26
+ kind: NodeKind;
27
+ title: string;
28
+ /** Overrides the kind's default eyebrow. */
29
+ tag?: string;
30
+ /** The skill's own step number, where the skill numbers its workflow. */
31
+ n?: string;
32
+ desc?: string;
33
+ /** A `references/*.md` the node stands for, opened as a tab in the source pane. */
34
+ reference?: string;
35
+ lines?: LineRange;
36
+ chips?: Chip[];
37
+ command?: string;
38
+ }
39
+
40
+ export interface Edge {
41
+ from: string;
42
+ to: string;
43
+ /** The answer that selects this branch, drawn on the wire. */
44
+ label?: string;
45
+ /** A re-run loop, routed up the gutter lane. */
46
+ back?: boolean;
47
+ }
48
+
49
+ export interface SkillTree {
50
+ id: string;
51
+ /** Hash of the SKILL.md this tree was written against, so a rewrite that the
52
+ * anchors survive still fails `check:skill-atlas`. */
53
+ digest: string;
54
+ title: string;
55
+ tagline: string;
56
+ nodes: TreeNode[];
57
+ edges: Edge[];
58
+ }
59
+
60
+ /** A selectable target: a node, or one chip inside a chipset node. */
61
+ export interface Selection {
62
+ key: string;
63
+ label: string;
64
+ lines: LineRange;
65
+ }