@theoremjs/studio 0.3.4-next.482.g7e608f2 → 0.3.4-next.508.geda6db0

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 (79) hide show
  1. package/README.md +3 -3
  2. package/compile.d.ts +1 -1
  3. package/draft.d.ts +1 -1
  4. package/example.js +5 -2
  5. package/map-line.d.ts +12 -0
  6. package/map-line.js +98 -0
  7. package/map.d.ts +1 -1
  8. package/map.js +0 -1
  9. package/package.json +4 -4
  10. package/page/assets/{Banner-CrUhb26_.js → Banner-BcHZFaJb.js} +2 -2
  11. package/page/assets/{ConsoleFrame-6cEEvO4i.js → ConsoleFrame-Byq_hSpu.js} +3 -3
  12. package/page/assets/{ContextMenu-WnsgC14_.js → ContextMenu-C6S-GYrc.js} +2 -2
  13. package/page/assets/{ToolResultCharts-BEhuo0Z4.js → ToolResultCharts-CkEf5ub5.js} +1 -1
  14. package/page/assets/{TraceInspector-k1w1q0XO.js → TraceInspector-BsYHHhGv.js} +1 -1
  15. package/page/assets/{TraceOverview-Crxd-sTS.js → TraceOverview-CMFfbfGM.js} +2 -2
  16. package/page/assets/{_virtual_studio-type-sources-DAabvYbE.js → _virtual_studio-type-sources-CTIGQ210.js} +56 -48
  17. package/page/assets/browser-engine-DjYv346h.js +11 -0
  18. package/page/assets/browser-transport-Bm3uY9Fj.js +47 -0
  19. package/page/assets/{crypto-iT_LZ8Et.js → crypto-DAIn4qnM.js} +1 -1
  20. package/page/assets/{egress-automata-B5ZGE1mT.js → egress-automata-SiHQTP1i.js} +1 -1
  21. package/page/assets/{encode-files-8AFMw7Er.js → encode-files-oYzzs_iG.js} +1 -1
  22. package/page/assets/{export-agent-BedkRp13.js → export-agent-BeUTYowB.js} +3 -3
  23. package/page/assets/{guardrail-tester-XwnZWNsg.js → guardrail-tester-DLT99rnO.js} +2 -2
  24. package/page/assets/index-C9rhrCGT.css +1 -0
  25. package/page/assets/{index-BVHT-9mR.js → index-DNA-Y8Mp.js} +69 -69
  26. package/page/assets/{labels-provider-BSiD6Lrb.js → labels-provider-Gus3heEH.js} +1 -1
  27. package/page/assets/{live-messages-B65rUlNM.js → live-messages-BnBioidx.js} +1 -1
  28. package/page/assets/reader-BFYIhA73.js +7 -0
  29. package/page/assets/shaped-data-1Qn2111E.js +16 -0
  30. package/page/assets/{stub-DG5wxM-A.js → stub-B3GersQP.js} +2 -2
  31. package/page/assets/{studio-code-pane-p4fjtQhL.js → studio-code-pane-CCi7-lyE.js} +3 -3
  32. package/page/assets/{studio-console-BtZY4aUM.js → studio-console-CJT5FkWm.js} +1 -1
  33. package/page/assets/{studio-decision-BovTBIwV.js → studio-decision-DhHdHb7Z.js} +1 -1
  34. package/page/assets/{studio-embedding-BY6UQk0k.js → studio-embedding-B8vBhuZU.js} +1 -1
  35. package/page/assets/studio-host-console-CE_5_tEn.js +2 -0
  36. package/page/assets/{studio-labels-C3yQoEd0.js → studio-labels-C2SI_T2p.js} +1 -1
  37. package/page/assets/{studio-live-B_cVDiqs.js → studio-live-CKSSyYZj.js} +3 -3
  38. package/page/assets/studio-map-CKm_FCd9.js +1 -0
  39. package/page/assets/studio-trace-replay-BRMD6pex.js +2 -0
  40. package/page/assets/{studio-type-checker-Bljo3amv.js → studio-type-checker-DoaPHYNy.js} +1 -1
  41. package/page/assets/tool-schema-DXYwL5aE.js +18 -0
  42. package/page/assets/{trace-record-D4xAUHLZ.js → trace-record-DWxIfO7D.js} +1 -1
  43. package/page/assets/tree-Chi6mqzx.js +3 -0
  44. package/page/assets/{turn-client-CBWNoFgo.js → turn-client-DF0ije7A.js} +2 -2
  45. package/page/assets/types-2I4NfLiS.js +1 -0
  46. package/page/assets/{use-one-call-rh-5EjBB.js → use-one-call-Bhnpve1Y.js} +1 -1
  47. package/page/assets/{workspace-kAEf4Zn4.js → workspace-U3w2ELtN.js} +1 -1
  48. package/page/index.html +17 -17
  49. package/run-payload.d.ts +1 -1
  50. package/runtime.d.ts +1 -1
  51. package/runtime.js +1 -1
  52. package/server/draft-decide.d.ts +1 -4
  53. package/server/draft-decide.js +1 -1
  54. package/server/draft-replies.js +2 -2
  55. package/source.js +1 -1
  56. package/ui/brand-icons.d.ts +2 -2
  57. package/ui/brand-icons.js +6 -4
  58. package/ui/lib/tree-map-layout.d.ts +120 -18
  59. package/ui/lib/tree-map-layout.js +1292 -190
  60. package/ui/map-token.css +25 -0
  61. package/ui/node-icon.js +1 -4
  62. package/ui/profile-editor.js +1 -1
  63. package/ui/read-map.css +1 -24
  64. package/ui/read-map.js +52 -4
  65. package/ui/studio-map.js +1 -3
  66. package/ui/tree-map.css +9 -0
  67. package/ui/tree-map.d.ts +27 -6
  68. package/ui/tree-map.js +215 -75
  69. package/page/assets/browser-engine-C78edv3x.js +0 -11
  70. package/page/assets/browser-transport-mGxdvtBL.js +0 -47
  71. package/page/assets/index-Cbs7B46A.css +0 -1
  72. package/page/assets/reader-XebgyCzF.js +0 -7
  73. package/page/assets/shaped-data-Bc6u4pow.js +0 -16
  74. package/page/assets/studio-host-console-D9NFWXxV.js +0 -2
  75. package/page/assets/studio-map-iN6-MOzK.js +0 -1
  76. package/page/assets/studio-trace-replay-B3k21TSg.js +0 -2
  77. package/page/assets/tool-schema-BmScISma.js +0 -18
  78. package/page/assets/tree-BiZScKs7.js +0 -3
  79. package/page/assets/types-zRlFhC9U.js +0 -1
@@ -12,8 +12,21 @@ export declare const INDENT = 28;
12
12
  /** A token's half height. */
13
13
  export declare const HALF = 11;
14
14
  export declare const PAD = 16;
15
- export declare const RUNNER = "runner";
16
- export declare const TOOL_RUNNER = "tool-runner";
15
+ /** Grown, the room over the columns their headings take: a title, the line under it, and a gap. */
16
+ export declare const HEADING = 56;
17
+ /** Grown, each column's heading, in order: the tree, the registries, the runner. */
18
+ export declare const HEADINGS: readonly {
19
+ label: string;
20
+ note: string;
21
+ }[];
22
+ /** What the still shows and growing takes away is gone by this far grown. */
23
+ export declare const LEAVE_TO = 0.2;
24
+ export declare const TOOL_RUNTIME = "tool-runtime";
25
+ export declare const GUARDRAIL_RUNTIME = "guardrail-runtime";
26
+ export declare const TRACE_DESTINATIONS = "trace-destinations";
27
+ export declare const PROVIDER_STREAM = "provider-stream";
28
+ export declare const KEY_VAULT = "key-vault";
29
+ export declare const TURN_LOOP = "turn-loop";
17
30
  export interface Place {
18
31
  x: number;
19
32
  y: number;
@@ -24,38 +37,43 @@ export interface Row extends Place {
24
37
  /** The row above it in the tree, by its token id. */
25
38
  parent?: string;
26
39
  }
27
- export type FeedKind = 'runner' | 'step' | 'provider' | 'protocol' | 'tool' | 'branch' | 'subagent' | 'tool-runner' | 'check';
28
- /** What feeds the tree: a runner, a provider, a tool, or one of their own nested under them. */
40
+ export type FeedKind = 'step' | 'provider' | 'protocol' | 'tool' | 'branch' | 'subagent' | 'tool-runtime' | 'guardrail-runtime' | 'check' | 'destinations' | 'vault' | 'stream' | 'model';
41
+ /** What feeds the tree: a tool, the runner, a provider, the tool runner, or one of their own nested under them. */
29
42
  export interface Feed {
30
43
  id: string;
31
44
  label: string;
32
45
  kind: FeedKind;
33
46
  /** A tool's type, a subagent's profile type, or a step's or a check's id: what its icon is. */
34
47
  of?: string;
35
- /** The tree rows it has a line into. */
36
- into: string[];
48
+ /** What it has a line from: tree rows, and feeds in a column left of it. */
49
+ from: string[];
50
+ /** Tree rows it has a line from that draw in with the first feed under it. */
51
+ late?: string[];
37
52
  /** The feed it is one of, a level in under it. */
38
53
  under?: string;
39
- /** Another feed it has a line to: a subagent to the runner that runs it, the tool loop to the tool runner. */
40
- joins?: string;
41
- /** The column it stands in beside the tree, first or second. */
54
+ /** The column it stands in beside the tree: the registries, or the runner. */
42
55
  column: 1 | 2;
43
56
  /** Feeds that stand together, with a gap before the next group. */
44
57
  group: string;
45
58
  }
46
59
  /**
47
60
  * What the runner does in a turn, in order: the steps of the kernel contract's turn lifecycle
48
- * (docs/contracts/kernel.md, "Turn lifecycle") that do work.
61
+ * (docs/contracts/kernel.md, "Turn lifecycle") that do work, and the profile sections each reads.
49
62
  * why: The canary bind runs only while a canary detector is on, and pre_turn, before_end and
50
- * post_turn are hooks for the host's stages, so the map leaves those four out.
63
+ * post_turn are hooks for the host's stages, so the map leaves those four out; the structured
64
+ * reply's validation is the outputs' own, not a story of the runner's, so it is left out too.
65
+ * Sanitize and egress are named for what they guard, the input and the reply, and drawn from them.
51
66
  */
52
67
  export declare const TURN_STEPS: readonly {
53
68
  id: string;
54
69
  label: string;
70
+ reads: readonly string[];
55
71
  }[];
56
72
  /**
57
- * What the tool runner checks of every call, in order (`executeRegisteredTool`): its permission,
58
- * its sign-in, the network a remote call reaches, and the guard on its result.
73
+ * What the tool runner does with every call (`executeRegisteredTool`): its permission, the MCP
74
+ * session an MCP call runs in, and its sign-in.
75
+ * why: The sessions stand before the sign-in, level with the third tool, so an MCP tool there has a
76
+ * straight line to them.
59
77
  */
60
78
  export declare const TOOL_CHECKS: readonly {
61
79
  id: string;
@@ -63,6 +81,14 @@ export declare const TOOL_CHECKS: readonly {
63
81
  }[];
64
82
  /** A row's token id: the tree's ids repeat from one agent to the next. */
65
83
  export declare function rowId(row: Row): string;
84
+ /** Slow out, slow in: how far a move or a draw has gone at `at` of its time, both from 0 to 1. */
85
+ /** A gentle ease in and out, for what moves far: it never rushes through the middle. */
86
+ export declare const soft: (at: number) => number;
87
+ /** An ease that comes in quickly and settles slowly, for what drifts the last of its way. */
88
+ export declare const settling: (at: number) => number;
89
+ /** How far the map's frame has settled this far grown, 0 to 1: its size and place, and what holds it. */
90
+ export declare const settledAt: (grow: number) => number;
91
+ export declare const ease: (at: number) => number;
66
92
  /** Where a node under a feed sits from it: across, and rows down. */
67
93
  export interface Slot {
68
94
  holder: string;
@@ -84,16 +110,92 @@ export interface TreeMapLayout {
84
110
  grown: Map<string, Place>;
85
111
  /** A row's height grown. */
86
112
  row: number;
113
+ /** Grown, each column's heading: its top left corner. */
114
+ headings: ({
115
+ label: string;
116
+ note: string;
117
+ } & Place)[];
87
118
  slots: Map<string, Slot>;
88
- /** When each node growing adds starts to draw. */
89
- starts: Map<string, number>;
119
+ /** How far grown the drawing reaches each node, by its id. */
120
+ reach: Map<string, number>;
121
+ /** What the drawing reaches each node from, by its id. */
122
+ reachedFrom: Map<string, string>;
123
+ /** How far grown each node's lines leave it, by its id: once it stands shown and still. */
124
+ leaves: Map<string, number>;
125
+ /** How far grown each node of the still starts its glide into place, by its id. */
126
+ gathers: Map<string, number>;
127
+ /** How far grown each node of the still that makes room lands, by its id: as its line reaches it. */
128
+ lands: Map<string, number>;
129
+ /** How much of the growing the drawing takes over one pixel of line. */
130
+ pace: number;
131
+ /** The lines the still draws closed, by their keys. */
132
+ drawnClosed: Set<string>;
133
+ /** What each node growing adds grows from, by its id: it draws in after it, and keeps to it. */
134
+ anchors: Map<string, string>;
135
+ /** Grown, where the lines into each feed run down to it. */
136
+ lanes: Map<string, Lane>;
137
+ /** Grown, where a line steps aside to pass between rows, by its key. */
138
+ jogs: Map<string, Jog[]>;
139
+ /** What the still shows that growing takes away: its rows, its feeds, and its lines. */
140
+ leaving: {
141
+ rows: Row[];
142
+ feeds: Feed[];
143
+ lines: {
144
+ source: string;
145
+ feed: string;
146
+ }[];
147
+ };
148
+ /** A row of the still that growing turns into a feed, by its id: the feed's id. */
149
+ becomes: Map<string, string>;
150
+ /** Closed, where the lines from each row run down to what it shows, by the row's id. */
151
+ trunks: Map<string, number>;
152
+ }
153
+ /** How far what the still shows and growing takes away has gone, 0 to 1. */
154
+ export declare function goneAt(grow: number): number;
155
+ /** The key under which the line into a feed under another draws, for a feed that was a row. */
156
+ export declare const underKey: (feed: string) => string;
157
+ /** A feed's lane: `by` left of the column it stands in, which starts at the feed `of`. */
158
+ export interface Lane {
159
+ of: string;
160
+ by: number;
90
161
  }
91
- /** Where a node stands this far grown: a node under a feed keeps its slot under it on the way. */
162
+ /**
163
+ * Where a node stands this far grown. A node of the still glides to where it stands grown in one
164
+ * eased move, landing as the drawing reaches it. A node growing adds stands where it stands from
165
+ * the node it grows from, and moves with it, drifting in along its line as it shows.
166
+ */
92
167
  export declare function placeAt(layout: TreeMapLayout, id: string, grow: number): Place;
93
- /** How far a node growing adds has drawn, 0 to 1; undefined for one the map shows closed. */
168
+ /**
169
+ * Whether a node stands still this far grown: closed, what the still shows; then each node once it
170
+ * is out and in its zone, and what it comes out from too. What growing takes away is on its way.
171
+ */
172
+ export declare function atRest(layout: TreeMapLayout, id: string, grow: number): boolean;
173
+ /**
174
+ * How far a node growing adds has shown, 0 to 1, once the drawing has reached it; undefined for
175
+ * what the map shows closed.
176
+ */
94
177
  export declare function drawnAt(layout: TreeMapLayout, id: string, grow: number): number | undefined;
178
+ /**
179
+ * How far the line from `source` to `target` has drawn, 0 to 1: it runs out from its source at the
180
+ * drawing's pace once its source stands shown and still, easing out of it and into its end. What the still draws closed is drawn.
181
+ */
182
+ export declare function lineAt(layout: TreeMapLayout, source: string, target: string, grow: number): number;
183
+ /** A line's step aside: in the gap at `lane`, to half a row above (-1) or below (1) `near`. */
184
+ export interface Jog {
185
+ lane: Lane;
186
+ near: string;
187
+ side: 1 | -1;
188
+ }
189
+ /** Whether `source` stands in `feed`'s own column: its line runs out to the right of the column and back. */
190
+ export declare function beside(layout: TreeMapLayout, source: string, feed: Feed): boolean;
191
+ /** The key of the line from `source` into `feed`. */
192
+ export declare const lineKey: (source: string, feed: string) => string;
95
193
  /**
96
194
  * The tree and what feeds it, closed and grown, for tokens this wide: grown, it fills `box` when
97
195
  * one is given.
98
196
  */
99
- export declare function treeMapLayout(workspace: StudioWorkspace, agents: readonly string[] | undefined, width: (id: string) => number, box?: Box): TreeMapLayout;
197
+ export declare function treeMapLayout(workspace: StudioWorkspace, agents: readonly string[] | undefined, width: (id: string) => number, box?: Box,
198
+ /** The agents the map shows closed, when not the tree's. */
199
+ still?: readonly string[],
200
+ /** Where the tokens the map shows closed stand, by id, when not where the still puts them. */
201
+ given?: ReadonlyMap<string, Place>): TreeMapLayout;