windhover 0.7.0__py3-none-any.whl

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,18 @@
1
+ {
2
+ "name": "Windhover \u2014 LangGraph Visualizer",
3
+ "short_name": "Windhover",
4
+ "description": "Self-hosted observability for LangGraph \u2014 traces, cost, sessions, scores, and a living graph view.",
5
+ "start_url": "/",
6
+ "display": "standalone",
7
+ "background_color": "#0b0d12",
8
+ "theme_color": "#0b0d12",
9
+ "orientation": "any",
10
+ "icons": [
11
+ {
12
+ "src": "/static/icon.svg",
13
+ "sizes": "any",
14
+ "type": "image/svg+xml",
15
+ "purpose": "any"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,397 @@
1
+ (function webpackUniversalModuleDefinition(root, factory) {
2
+ if(typeof exports === 'object' && typeof module === 'object')
3
+ module.exports = factory(require("dagre"));
4
+ else if(typeof define === 'function' && define.amd)
5
+ define(["dagre"], factory);
6
+ else if(typeof exports === 'object')
7
+ exports["cytoscapeDagre"] = factory(require("dagre"));
8
+ else
9
+ root["cytoscapeDagre"] = factory(root["dagre"]);
10
+ })(this, function(__WEBPACK_EXTERNAL_MODULE__4__) {
11
+ return /******/ (function(modules) { // webpackBootstrap
12
+ /******/ // The module cache
13
+ /******/ var installedModules = {};
14
+ /******/
15
+ /******/ // The require function
16
+ /******/ function __webpack_require__(moduleId) {
17
+ /******/
18
+ /******/ // Check if module is in cache
19
+ /******/ if(installedModules[moduleId]) {
20
+ /******/ return installedModules[moduleId].exports;
21
+ /******/ }
22
+ /******/ // Create a new module (and put it into the cache)
23
+ /******/ var module = installedModules[moduleId] = {
24
+ /******/ i: moduleId,
25
+ /******/ l: false,
26
+ /******/ exports: {}
27
+ /******/ };
28
+ /******/
29
+ /******/ // Execute the module function
30
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
31
+ /******/
32
+ /******/ // Flag the module as loaded
33
+ /******/ module.l = true;
34
+ /******/
35
+ /******/ // Return the exports of the module
36
+ /******/ return module.exports;
37
+ /******/ }
38
+ /******/
39
+ /******/
40
+ /******/ // expose the modules object (__webpack_modules__)
41
+ /******/ __webpack_require__.m = modules;
42
+ /******/
43
+ /******/ // expose the module cache
44
+ /******/ __webpack_require__.c = installedModules;
45
+ /******/
46
+ /******/ // define getter function for harmony exports
47
+ /******/ __webpack_require__.d = function(exports, name, getter) {
48
+ /******/ if(!__webpack_require__.o(exports, name)) {
49
+ /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
50
+ /******/ }
51
+ /******/ };
52
+ /******/
53
+ /******/ // define __esModule on exports
54
+ /******/ __webpack_require__.r = function(exports) {
55
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
56
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
57
+ /******/ }
58
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
59
+ /******/ };
60
+ /******/
61
+ /******/ // create a fake namespace object
62
+ /******/ // mode & 1: value is a module id, require it
63
+ /******/ // mode & 2: merge all properties of value into the ns
64
+ /******/ // mode & 4: return value when already ns object
65
+ /******/ // mode & 8|1: behave like require
66
+ /******/ __webpack_require__.t = function(value, mode) {
67
+ /******/ if(mode & 1) value = __webpack_require__(value);
68
+ /******/ if(mode & 8) return value;
69
+ /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
70
+ /******/ var ns = Object.create(null);
71
+ /******/ __webpack_require__.r(ns);
72
+ /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
73
+ /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
74
+ /******/ return ns;
75
+ /******/ };
76
+ /******/
77
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
78
+ /******/ __webpack_require__.n = function(module) {
79
+ /******/ var getter = module && module.__esModule ?
80
+ /******/ function getDefault() { return module['default']; } :
81
+ /******/ function getModuleExports() { return module; };
82
+ /******/ __webpack_require__.d(getter, 'a', getter);
83
+ /******/ return getter;
84
+ /******/ };
85
+ /******/
86
+ /******/ // Object.prototype.hasOwnProperty.call
87
+ /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
88
+ /******/
89
+ /******/ // __webpack_public_path__
90
+ /******/ __webpack_require__.p = "";
91
+ /******/
92
+ /******/
93
+ /******/ // Load entry module and return exports
94
+ /******/ return __webpack_require__(__webpack_require__.s = 0);
95
+ /******/ })
96
+ /************************************************************************/
97
+ /******/ ([
98
+ /* 0 */
99
+ /***/ (function(module, exports, __webpack_require__) {
100
+
101
+ var impl = __webpack_require__(1); // registers the extension on a cytoscape lib ref
102
+
103
+
104
+ var register = function register(cytoscape) {
105
+ if (!cytoscape) {
106
+ return;
107
+ } // can't register if cytoscape unspecified
108
+
109
+
110
+ cytoscape('layout', 'dagre', impl); // register with cytoscape.js
111
+ };
112
+
113
+ if (typeof cytoscape !== 'undefined') {
114
+ // expose to global cytoscape (i.e. window.cytoscape)
115
+ register(cytoscape);
116
+ }
117
+
118
+ module.exports = register;
119
+
120
+ /***/ }),
121
+ /* 1 */
122
+ /***/ (function(module, exports, __webpack_require__) {
123
+
124
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
125
+
126
+ var isFunction = function isFunction(o) {
127
+ return typeof o === 'function';
128
+ };
129
+
130
+ var defaults = __webpack_require__(2);
131
+
132
+ var assign = __webpack_require__(3);
133
+
134
+ var dagre = __webpack_require__(4); // constructor
135
+ // options : object containing layout options
136
+
137
+
138
+ function DagreLayout(options) {
139
+ this.options = assign({}, defaults, options);
140
+ } // runs the layout
141
+
142
+
143
+ DagreLayout.prototype.run = function () {
144
+ var options = this.options;
145
+ var layout = this;
146
+ var cy = options.cy; // cy is automatically populated for us in the constructor
147
+
148
+ var eles = options.eles;
149
+
150
+ var getVal = function getVal(ele, val) {
151
+ return isFunction(val) ? val.apply(ele, [ele]) : val;
152
+ };
153
+
154
+ var bb = options.boundingBox || {
155
+ x1: 0,
156
+ y1: 0,
157
+ w: cy.width(),
158
+ h: cy.height()
159
+ };
160
+
161
+ if (bb.x2 === undefined) {
162
+ bb.x2 = bb.x1 + bb.w;
163
+ }
164
+
165
+ if (bb.w === undefined) {
166
+ bb.w = bb.x2 - bb.x1;
167
+ }
168
+
169
+ if (bb.y2 === undefined) {
170
+ bb.y2 = bb.y1 + bb.h;
171
+ }
172
+
173
+ if (bb.h === undefined) {
174
+ bb.h = bb.y2 - bb.y1;
175
+ }
176
+
177
+ var g = new dagre.graphlib.Graph({
178
+ multigraph: true,
179
+ compound: true
180
+ });
181
+ var gObj = {};
182
+
183
+ var setGObj = function setGObj(name, val) {
184
+ if (val != null) {
185
+ gObj[name] = val;
186
+ }
187
+ };
188
+
189
+ setGObj('nodesep', options.nodeSep);
190
+ setGObj('edgesep', options.edgeSep);
191
+ setGObj('ranksep', options.rankSep);
192
+ setGObj('rankdir', options.rankDir);
193
+ setGObj('align', options.align);
194
+ setGObj('ranker', options.ranker);
195
+ setGObj('acyclicer', options.acyclicer);
196
+ g.setGraph(gObj);
197
+ g.setDefaultEdgeLabel(function () {
198
+ return {};
199
+ });
200
+ g.setDefaultNodeLabel(function () {
201
+ return {};
202
+ }); // add nodes to dagre
203
+
204
+ var nodes = eles.nodes();
205
+
206
+ if (isFunction(options.sort)) {
207
+ nodes = nodes.sort(options.sort);
208
+ }
209
+
210
+ for (var i = 0; i < nodes.length; i++) {
211
+ var node = nodes[i];
212
+ var nbb = node.layoutDimensions(options);
213
+ g.setNode(node.id(), {
214
+ width: nbb.w,
215
+ height: nbb.h,
216
+ name: node.id()
217
+ }); // console.log( g.node(node.id()) );
218
+ } // set compound parents
219
+
220
+
221
+ for (var _i = 0; _i < nodes.length; _i++) {
222
+ var _node = nodes[_i];
223
+
224
+ if (_node.isChild()) {
225
+ g.setParent(_node.id(), _node.parent().id());
226
+ }
227
+ } // add edges to dagre
228
+
229
+
230
+ var edges = eles.edges().stdFilter(function (edge) {
231
+ return !edge.source().isParent() && !edge.target().isParent(); // dagre can't handle edges on compound nodes
232
+ });
233
+
234
+ if (isFunction(options.sort)) {
235
+ edges = edges.sort(options.sort);
236
+ }
237
+
238
+ for (var _i2 = 0; _i2 < edges.length; _i2++) {
239
+ var edge = edges[_i2];
240
+ g.setEdge(edge.source().id(), edge.target().id(), {
241
+ minlen: getVal(edge, options.minLen),
242
+ weight: getVal(edge, options.edgeWeight),
243
+ name: edge.id()
244
+ }, edge.id()); // console.log( g.edge(edge.source().id(), edge.target().id(), edge.id()) );
245
+ }
246
+
247
+ dagre.layout(g);
248
+ var gNodeIds = g.nodes();
249
+
250
+ for (var _i3 = 0; _i3 < gNodeIds.length; _i3++) {
251
+ var id = gNodeIds[_i3];
252
+ var n = g.node(id);
253
+ cy.getElementById(id).scratch().dagre = n;
254
+ }
255
+
256
+ var dagreBB;
257
+
258
+ if (options.boundingBox) {
259
+ dagreBB = {
260
+ x1: Infinity,
261
+ x2: -Infinity,
262
+ y1: Infinity,
263
+ y2: -Infinity
264
+ };
265
+ nodes.forEach(function (node) {
266
+ var dModel = node.scratch().dagre;
267
+ dagreBB.x1 = Math.min(dagreBB.x1, dModel.x);
268
+ dagreBB.x2 = Math.max(dagreBB.x2, dModel.x);
269
+ dagreBB.y1 = Math.min(dagreBB.y1, dModel.y);
270
+ dagreBB.y2 = Math.max(dagreBB.y2, dModel.y);
271
+ });
272
+ dagreBB.w = dagreBB.x2 - dagreBB.x1;
273
+ dagreBB.h = dagreBB.y2 - dagreBB.y1;
274
+ } else {
275
+ dagreBB = bb;
276
+ }
277
+
278
+ var constrainPos = function constrainPos(p) {
279
+ if (options.boundingBox) {
280
+ var xPct = dagreBB.w === 0 ? 0 : (p.x - dagreBB.x1) / dagreBB.w;
281
+ var yPct = dagreBB.h === 0 ? 0 : (p.y - dagreBB.y1) / dagreBB.h;
282
+ return {
283
+ x: bb.x1 + xPct * bb.w,
284
+ y: bb.y1 + yPct * bb.h
285
+ };
286
+ } else {
287
+ return p;
288
+ }
289
+ };
290
+
291
+ nodes.layoutPositions(layout, options, function (ele) {
292
+ ele = _typeof(ele) === "object" ? ele : this;
293
+ var dModel = ele.scratch().dagre;
294
+ return constrainPos({
295
+ x: dModel.x,
296
+ y: dModel.y
297
+ });
298
+ });
299
+ return this; // chaining
300
+ };
301
+
302
+ module.exports = DagreLayout;
303
+
304
+ /***/ }),
305
+ /* 2 */
306
+ /***/ (function(module, exports) {
307
+
308
+ var defaults = {
309
+ // dagre algo options, uses default value on undefined
310
+ nodeSep: undefined,
311
+ // the separation between adjacent nodes in the same rank
312
+ edgeSep: undefined,
313
+ // the separation between adjacent edges in the same rank
314
+ rankSep: undefined,
315
+ // the separation between adjacent nodes in the same rank
316
+ rankDir: undefined,
317
+ // 'TB' for top to bottom flow, 'LR' for left to right,
318
+ align: undefined,
319
+ // alignment for rank nodes. Can be 'UL', 'UR', 'DL', or 'DR', where U = up, D = down, L = left, and R = right
320
+ acyclicer: undefined,
321
+ // If set to 'greedy', uses a greedy heuristic for finding a feedback arc set for a graph.
322
+ // A feedback arc set is a set of edges that can be removed to make a graph acyclic.
323
+ ranker: undefined,
324
+ // Type of algorithm to assigns a rank to each node in the input graph.
325
+ // Possible values: network-simplex, tight-tree or longest-path
326
+ minLen: function minLen(edge) {
327
+ return 1;
328
+ },
329
+ // number of ranks to keep between the source and target of the edge
330
+ edgeWeight: function edgeWeight(edge) {
331
+ return 1;
332
+ },
333
+ // higher weight edges are generally made shorter and straighter than lower weight edges
334
+ // general layout options
335
+ fit: true,
336
+ // whether to fit to viewport
337
+ padding: 30,
338
+ // fit padding
339
+ spacingFactor: undefined,
340
+ // Applies a multiplicative factor (>0) to expand or compress the overall area that the nodes take up
341
+ nodeDimensionsIncludeLabels: false,
342
+ // whether labels should be included in determining the space used by a node
343
+ animate: false,
344
+ // whether to transition the node positions
345
+ animateFilter: function animateFilter(node, i) {
346
+ return true;
347
+ },
348
+ // whether to animate specific nodes when animation is on; non-animated nodes immediately go to their final positions
349
+ animationDuration: 500,
350
+ // duration of animation in ms if enabled
351
+ animationEasing: undefined,
352
+ // easing of animation if enabled
353
+ boundingBox: undefined,
354
+ // constrain layout bounds; { x1, y1, x2, y2 } or { x1, y1, w, h }
355
+ transform: function transform(node, pos) {
356
+ return pos;
357
+ },
358
+ // a function that applies a transform to the final node position
359
+ ready: function ready() {},
360
+ // on layoutready
361
+ sort: undefined,
362
+ // a sorting function to order the nodes and edges; e.g. function(a, b){ return a.data('weight') - b.data('weight') }
363
+ // because cytoscape dagre creates a directed graph, and directed graphs use the node order as a tie breaker when
364
+ // defining the topology of a graph, this sort function can help ensure the correct order of the nodes/edges.
365
+ // this feature is most useful when adding and removing the same nodes and edges multiple times in a graph.
366
+ stop: function stop() {} // on layoutstop
367
+
368
+ };
369
+ module.exports = defaults;
370
+
371
+ /***/ }),
372
+ /* 3 */
373
+ /***/ (function(module, exports) {
374
+
375
+ // Simple, internal Object.assign() polyfill for options objects etc.
376
+ module.exports = Object.assign != null ? Object.assign.bind(Object) : function (tgt) {
377
+ for (var _len = arguments.length, srcs = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
378
+ srcs[_key - 1] = arguments[_key];
379
+ }
380
+
381
+ srcs.forEach(function (src) {
382
+ Object.keys(src).forEach(function (k) {
383
+ return tgt[k] = src[k];
384
+ });
385
+ });
386
+ return tgt;
387
+ };
388
+
389
+ /***/ }),
390
+ /* 4 */
391
+ /***/ (function(module, exports) {
392
+
393
+ module.exports = __WEBPACK_EXTERNAL_MODULE__4__;
394
+
395
+ /***/ })
396
+ /******/ ]);
397
+ });