@walterra/pi-graphviz 0.0.1 → 0.0.3

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.
package/README.md CHANGED
@@ -5,16 +5,10 @@ Graphviz DOT diagram extension for [pi coding agent](https://github.com/badlogic
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- pi install @walterra/pi-graphviz
8
+ pi install npm:@walterra/pi-graphviz
9
9
  ```
10
10
 
11
- Or add to your pi config manually:
12
-
13
- ```bash
14
- npm install @walterra/pi-graphviz
15
- ```
16
-
17
- Then in your pi config, add the extension path.
11
+ This installs the package globally and adds it to your pi settings.
18
12
 
19
13
  ## Features
20
14
 
@@ -30,13 +24,13 @@ Renders a Graphviz DOT specification as a PNG image.
30
24
 
31
25
  ### Parameters
32
26
 
33
- | Parameter | Type | Required | Description |
34
- |-----------|------|----------|-------------|
35
- | `dot` | string | ✅ | Graphviz DOT specification |
36
- | `engine` | string | | Layout engine: dot (default), neato, fdp, circo, twopi |
37
- | `width` | number | | Output width in pixels |
38
- | `height` | number | | Output height in pixels |
39
- | `save_path` | string | | Optional file path (.png or .svg) |
27
+ | Parameter | Type | Required | Description |
28
+ | ----------- | ------ | -------- | ------------------------------------------------------ |
29
+ | `dot` | string | ✅ | Graphviz DOT specification |
30
+ | `engine` | string | | Layout engine: dot (default), neato, fdp, circo, twopi |
31
+ | `width` | number | | Output width in pixels |
32
+ | `height` | number | | Output height in pixels |
33
+ | `save_path` | string | | Optional file path (.png or .svg) |
40
34
 
41
35
  ### Example
42
36
 
@@ -44,11 +38,11 @@ Renders a Graphviz DOT specification as a PNG image.
44
38
  digraph G {
45
39
  rankdir=LR;
46
40
  node [shape=box style="rounded,filled" fillcolor=lightblue];
47
-
41
+
48
42
  A [label="Start"];
49
43
  B [label="Process"];
50
44
  C [label="End" fillcolor=lightgreen];
51
-
45
+
52
46
  A -> B [label="step 1"];
53
47
  B -> C [label="step 2"];
54
48
  }
@@ -65,7 +59,7 @@ digraph G {
65
59
 
66
60
  ## Reference Documentation
67
61
 
68
- See [graphviz-reference.md](./extensions/graphviz-chart/graphviz-reference.md) for comprehensive documentation on:
62
+ See [graphviz-reference.md](./extensions/graphviz-chart/graphviz-reference.md) for documentation on:
69
63
 
70
64
  - DOT language syntax
71
65
  - All node shapes and edge styles
@@ -13,18 +13,18 @@
13
13
  * - Network topologies
14
14
  */
15
15
 
16
- import type { ExtensionAPI } from '@mariozechner/pi-coding-agent';
17
- import { Type } from '@sinclair/typebox';
18
16
  import { execSync } from 'node:child_process';
19
17
  import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from 'node:fs';
20
18
  import { tmpdir } from 'node:os';
21
19
  import { dirname, join } from 'node:path';
22
20
  import { fileURLToPath } from 'node:url';
21
+ import type { ExtensionAPI } from '@mariozechner/pi-coding-agent';
22
+ import { Type } from '@sinclair/typebox';
23
23
 
24
24
  // Compute reference path using ESM import.meta.url
25
25
  const GRAPHVIZ_REFERENCE_PATH = join(
26
26
  dirname(fileURLToPath(import.meta.url)),
27
- 'graphviz-reference.md',
27
+ 'graphviz-reference.md'
28
28
  );
29
29
 
30
30
  export default function (pi: ExtensionAPI) {
@@ -81,23 +81,23 @@ Reference: https://graphviz.org/doc/info/lang.html`,
81
81
  Type.String({
82
82
  description:
83
83
  'Layout engine: dot (hierarchical, default), neato (spring), fdp (force-directed), circo (circular), twopi (radial)',
84
- }),
84
+ })
85
85
  ),
86
86
  width: Type.Optional(
87
87
  Type.Number({
88
88
  description: 'Output width in pixels (default: auto based on graph)',
89
- }),
89
+ })
90
90
  ),
91
91
  height: Type.Optional(
92
92
  Type.Number({
93
93
  description: 'Output height in pixels (default: auto based on graph)',
94
- }),
94
+ })
95
95
  ),
96
96
  save_path: Type.Optional(
97
97
  Type.String({
98
98
  description:
99
99
  'Optional file path to save the chart. Format determined by extension: .svg for SVG, .png for PNG (default)',
100
- }),
100
+ })
101
101
  ),
102
102
  }),
103
103
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@walterra/pi-graphviz",
3
- "version": "0.0.1",
3
+ "version": "0.0.3",
4
4
  "description": "Graphviz chart extension for pi coding agent - render DOT diagrams as inline images",
5
5
  "type": "module",
6
6
  "files": [
@@ -18,6 +18,7 @@
18
18
  "directory": "packages/pi-graphviz"
19
19
  },
20
20
  "keywords": [
21
+ "pi-package",
21
22
  "pi",
22
23
  "pi-coding-agent",
23
24
  "extension",