agentopology 0.1.1 → 0.2.1
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 +8 -6
- package/dist/analyzer/index.d.ts +1 -0
- package/dist/analyzer/index.d.ts.map +1 -1
- package/dist/analyzer/index.js +35 -0
- package/dist/analyzer/index.js.map +1 -1
- package/dist/bindings/__tests__/bindings.test.js +11 -11
- package/dist/bindings/__tests__/bindings.test.js.map +1 -1
- package/dist/bindings/claude-code.d.ts.map +1 -1
- package/dist/bindings/claude-code.js +339 -85
- package/dist/bindings/claude-code.js.map +1 -1
- package/dist/bindings/openclaw.d.ts.map +1 -1
- package/dist/bindings/openclaw.js +367 -5
- package/dist/bindings/openclaw.js.map +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/docs/__tests__/docs.test.js +2 -1
- package/dist/docs/__tests__/docs.test.js.map +1 -1
- package/dist/docs/content.d.ts.map +1 -1
- package/dist/docs/content.js +730 -4
- package/dist/docs/content.js.map +1 -1
- package/dist/exporters/markdown.d.ts.map +1 -1
- package/dist/exporters/markdown.js +165 -0
- package/dist/exporters/markdown.js.map +1 -1
- package/dist/exporters/mermaid.d.ts.map +1 -1
- package/dist/exporters/mermaid.js +30 -0
- package/dist/exporters/mermaid.js.map +1 -1
- package/dist/import/__tests__/import.test.js +556 -2
- package/dist/import/__tests__/import.test.js.map +1 -1
- package/dist/import/claude-code.d.ts.map +1 -1
- package/dist/import/claude-code.js +2 -0
- package/dist/import/claude-code.js.map +1 -1
- package/dist/import/index.d.ts +1 -0
- package/dist/import/index.d.ts.map +1 -1
- package/dist/import/index.js +7 -1
- package/dist/import/index.js.map +1 -1
- package/dist/import/openclaw.d.ts +70 -0
- package/dist/import/openclaw.d.ts.map +1 -0
- package/dist/import/openclaw.js +1060 -0
- package/dist/import/openclaw.js.map +1 -0
- package/dist/import/serializer.d.ts.map +1 -1
- package/dist/import/serializer.js +171 -4
- package/dist/import/serializer.js.map +1 -1
- package/dist/parser/__tests__/parser.test.js +463 -0
- package/dist/parser/__tests__/parser.test.js.map +1 -1
- package/dist/parser/ast.d.ts +122 -0
- package/dist/parser/ast.d.ts.map +1 -1
- package/dist/parser/index.d.ts +14 -2
- package/dist/parser/index.d.ts.map +1 -1
- package/dist/parser/index.js +226 -5
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/validator.d.ts +1 -1
- package/dist/parser/validator.d.ts.map +1 -1
- package/dist/parser/validator.js +214 -1
- package/dist/parser/validator.js.map +1 -1
- package/dist/visualizer/index.d.ts.map +1 -1
- package/dist/visualizer/index.js +104 -16
- package/dist/visualizer/index.js.map +1 -1
- package/examples/memory-system.at +162 -0
- package/examples/script-agent-pipeline.at +65 -0
- package/package.json +2 -1
- package/skill/SKILL.md +7 -7
- package/spec/grammar.md +345 -10
- package/spec/reserved-keywords.md +25 -1
- package/spec/validation.md +171 -2
package/dist/visualizer/index.js
CHANGED
|
@@ -132,6 +132,10 @@ function astToViewData(ast) {
|
|
|
132
132
|
base.sandbox = a.sandbox;
|
|
133
133
|
if (a.fallbackChain)
|
|
134
134
|
base.fallbackChain = a.fallbackChain;
|
|
135
|
+
if (a.memory && a.memory.length > 0)
|
|
136
|
+
base.memory = a.memory;
|
|
137
|
+
if (a.retrieval)
|
|
138
|
+
base.retrieval = a.retrieval;
|
|
135
139
|
break;
|
|
136
140
|
}
|
|
137
141
|
case "gate": {
|
|
@@ -196,6 +200,8 @@ function astToViewData(ast) {
|
|
|
196
200
|
edges,
|
|
197
201
|
depth: ast.depth,
|
|
198
202
|
memory: ast.memory,
|
|
203
|
+
stores: ast.stores,
|
|
204
|
+
retrievals: ast.retrievals,
|
|
199
205
|
batch: ast.batch,
|
|
200
206
|
environments: ast.environments,
|
|
201
207
|
triggers: ast.triggers,
|
|
@@ -445,6 +451,7 @@ body{background:var(--bg);color:var(--t);font-family:var(--font-body);line-heigh
|
|
|
445
451
|
.edge-path.conditional{stroke:var(--t3);stroke-dasharray:6 4}
|
|
446
452
|
.edge-path.failure{stroke:var(--red);stroke-dasharray:6 4;opacity:.7}
|
|
447
453
|
.edge-path.loop{stroke:var(--orange);stroke-dasharray:4 4}
|
|
454
|
+
.edge-path.memory{stroke:#14b8a6;stroke-dasharray:4 4;opacity:.6}
|
|
448
455
|
.edge-group.dimmed .edge-path{opacity:.06}
|
|
449
456
|
.edge-group.dimmed .edge-label-group{opacity:.06}
|
|
450
457
|
.edge-group.highlighted .edge-path{stroke-width:2.5;opacity:1}
|
|
@@ -656,6 +663,7 @@ function typeColor(type) {
|
|
|
656
663
|
case 'action': return { main: COLOR_GRAY, bg: 'rgba(148,163,184,.08)', br: 'rgba(148,163,184,.2)' };
|
|
657
664
|
case 'gate': return { main: COLOR_ORANGE, bg: 'rgba(251,146,60,.10)', br: 'rgba(251,146,60,.25)' };
|
|
658
665
|
case 'orchestrator': return { main: COLOR_GOLD, bg: 'rgba(251,191,36,.10)', br: 'rgba(251,191,36,.25)' };
|
|
666
|
+
case 'store': return { main: '#14b8a6', bg: 'rgba(20,184,166,.10)', br: 'rgba(20,184,166,.25)' };
|
|
659
667
|
default: return { main: COLOR_GRAY, bg: 'rgba(148,163,184,.08)', br: 'rgba(148,163,184,.2)' };
|
|
660
668
|
}
|
|
661
669
|
}
|
|
@@ -663,6 +671,7 @@ function typeIcon(type) {
|
|
|
663
671
|
switch (type) {
|
|
664
672
|
case 'agent': return '\\u2726'; case 'action': return '\\u25C7';
|
|
665
673
|
case 'gate': return '\\u2B21'; case 'orchestrator': return '\\u2B22';
|
|
674
|
+
case 'store': return '\\u26C1';
|
|
666
675
|
default: return '\\u25CB';
|
|
667
676
|
}
|
|
668
677
|
}
|
|
@@ -670,6 +679,7 @@ function nodeSize(node) {
|
|
|
670
679
|
if (node.type === 'orchestrator') return { w: ORCH_W, h: ORCH_H };
|
|
671
680
|
if (node.type === 'gate') return { w: 120, h: 70 };
|
|
672
681
|
if (node.type === 'action') return { w: ACTION_W, h: ACTION_H };
|
|
682
|
+
if (node.type === 'store') return { w: 140, h: 60 };
|
|
673
683
|
return { w: NODE_W, h: NODE_H };
|
|
674
684
|
}
|
|
675
685
|
function isManualNode(node) { return node.invocation === 'manual'; }
|
|
@@ -838,9 +848,29 @@ function renderGraph() {
|
|
|
838
848
|
const container = document.getElementById('graph-container');
|
|
839
849
|
const rect = container.getBoundingClientRect();
|
|
840
850
|
|
|
841
|
-
|
|
851
|
+
// Build combined nodes and edges including memory store pseudo-nodes
|
|
852
|
+
var allNodes = data.nodes.slice();
|
|
853
|
+
var allEdges = data.edges.slice();
|
|
854
|
+
var storeIds = new Set();
|
|
855
|
+
if (data.stores && data.stores.length > 0) {
|
|
856
|
+
data.stores.forEach(function(store) {
|
|
857
|
+
allNodes.push({ id: store.id, type: 'store', label: store.id, storeType: store.type, backend: store.backend });
|
|
858
|
+
storeIds.add(store.id);
|
|
859
|
+
});
|
|
860
|
+
// Add edges from agents to their memory stores
|
|
861
|
+
data.nodes.forEach(function(n) {
|
|
862
|
+
if (n.memory && n.memory.length > 0) {
|
|
863
|
+
n.memory.forEach(function(storeId) {
|
|
864
|
+
if (storeIds.has(storeId)) {
|
|
865
|
+
allEdges.push({ from: n.id, to: storeId, condition: null, maxIterations: null, isMemory: true });
|
|
866
|
+
}
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
});
|
|
870
|
+
}
|
|
871
|
+
nodePositions = layoutNodes(allNodes, allEdges);
|
|
842
872
|
const nodeMap = {};
|
|
843
|
-
|
|
873
|
+
allNodes.forEach(n => nodeMap[n.id] = n);
|
|
844
874
|
|
|
845
875
|
if (isHorizontal) {
|
|
846
876
|
let minNewX = Infinity;
|
|
@@ -892,7 +922,7 @@ function renderGraph() {
|
|
|
892
922
|
// --- Build parallel-edge lookup ---
|
|
893
923
|
const edgePairCount = {};
|
|
894
924
|
const edgePairIndex = {};
|
|
895
|
-
|
|
925
|
+
allEdges.forEach(edge => {
|
|
896
926
|
const pairKey = [edge.from, edge.to].sort().join('::');
|
|
897
927
|
if (!edgePairCount[pairKey]) edgePairCount[pairKey] = 0;
|
|
898
928
|
edgePairIndex[edge.from + '::' + edge.to + '::' + (edge.condition||'') + '::' + (edge.maxIterations||'')] = edgePairCount[pairKey];
|
|
@@ -901,16 +931,18 @@ function renderGraph() {
|
|
|
901
931
|
|
|
902
932
|
// --- Edges ---
|
|
903
933
|
const edgeLabelCount = {};
|
|
904
|
-
|
|
934
|
+
allEdges.forEach(edge => {
|
|
905
935
|
const fromPos = nodePositions[edge.from], toPos = nodePositions[edge.to];
|
|
906
936
|
if (!fromPos || !toPos) return;
|
|
907
937
|
|
|
938
|
+
const isMemoryEdge = edge.isMemory === true;
|
|
908
939
|
const isFailure = edge.condition && edge.condition.includes('fail');
|
|
909
940
|
const isLoop = edge.maxIterations != null;
|
|
910
941
|
const isConditional = edge.condition != null;
|
|
911
942
|
|
|
912
943
|
let edgeClass = 'unconditional', markerEnd = 'url(#arrow)';
|
|
913
|
-
if (
|
|
944
|
+
if (isMemoryEdge) { edgeClass = 'memory'; markerEnd = 'url(#arrow)'; }
|
|
945
|
+
else if (isLoop) { edgeClass = 'loop'; markerEnd = 'url(#arrow-loop)'; }
|
|
914
946
|
else if (isFailure) { edgeClass = 'failure'; markerEnd = 'url(#arrow-fail)'; }
|
|
915
947
|
else if (isConditional) { edgeClass = 'conditional'; markerEnd = 'url(#arrow-cond)'; }
|
|
916
948
|
|
|
@@ -971,8 +1003,8 @@ function renderGraph() {
|
|
|
971
1003
|
}
|
|
972
1004
|
}
|
|
973
1005
|
|
|
974
|
-
// Back-edges with maxIterations get dashed stroke
|
|
975
|
-
const backEdgeDash = isLoop ? ' stroke-dasharray="6 4"' : '';
|
|
1006
|
+
// Back-edges with maxIterations get dashed stroke, memory edges get dotted
|
|
1007
|
+
const backEdgeDash = isMemoryEdge ? ' stroke-dasharray="4 4"' : isLoop ? ' stroke-dasharray="6 4"' : '';
|
|
976
1008
|
|
|
977
1009
|
s += '<g class="edge-group" data-from="' + edge.from + '" data-to="' + edge.to + '">';
|
|
978
1010
|
s += '<path d="' + pathD + '" class="edge-path ' + edgeClass + '" marker-end="' + markerEnd + '"' + backEdgeDash + '/>';
|
|
@@ -1106,8 +1138,8 @@ function renderGraph() {
|
|
|
1106
1138
|
}
|
|
1107
1139
|
}
|
|
1108
1140
|
|
|
1109
|
-
// --- Nodes ---
|
|
1110
|
-
|
|
1141
|
+
// --- Nodes (includes store pseudo-nodes) ---
|
|
1142
|
+
allNodes.forEach(node => {
|
|
1111
1143
|
const pos = nodePositions[node.id];
|
|
1112
1144
|
if (!pos) return;
|
|
1113
1145
|
const isSelected = selectedNode === node.id;
|
|
@@ -1137,6 +1169,11 @@ function renderGraph() {
|
|
|
1137
1169
|
const hw = pos.w / 2, hh = pos.h / 2;
|
|
1138
1170
|
const d = 'M' + cx + ',' + (cy - hh) + ' Q' + (cx + hw * 0.6) + ',' + (cy - hh * 0.4) + ' ' + (cx + hw) + ',' + cy + ' Q' + (cx + hw * 0.6) + ',' + (cy + hh * 0.4) + ' ' + cx + ',' + (cy + hh) + ' Q' + (cx - hw * 0.6) + ',' + (cy + hh * 0.4) + ' ' + (cx - hw) + ',' + cy + ' Q' + (cx - hw * 0.6) + ',' + (cy - hh * 0.4) + ' ' + cx + ',' + (cy - hh) + ' Z';
|
|
1139
1171
|
s += '<path class="node-shape" d="' + d + '" fill="' + colors.bg + '" stroke="' + colors.main + '" stroke-width="' + (isSelected ? 2.5 : 1) + '" data-glow="' + glowFilter + '"/>';
|
|
1172
|
+
} else if (node.type === 'store') {
|
|
1173
|
+
// Cylinder shape for memory stores
|
|
1174
|
+
const cw = pos.w, ch = pos.h, ry = 8;
|
|
1175
|
+
s += '<path class="node-shape" d="M' + x + ',' + (y + ry) + ' A' + (cw/2) + ',' + ry + ' 0 0,1 ' + (x + cw) + ',' + (y + ry) + ' V' + (y + ch - ry) + ' A' + (cw/2) + ',' + ry + ' 0 0,1 ' + x + ',' + (y + ch - ry) + ' Z" fill="' + colors.bg + '" stroke="' + colors.main + '" stroke-width="' + (isSelected ? 2.5 : 1) + '" data-glow="' + glowFilter + '"/>';
|
|
1176
|
+
s += '<ellipse cx="' + (x + cw/2) + '" cy="' + (y + ry) + '" rx="' + (cw/2) + '" ry="' + ry + '" fill="' + colors.bg + '" stroke="' + colors.main + '" stroke-width="' + (isSelected ? 2.5 : 1) + '"/>';
|
|
1140
1177
|
} else {
|
|
1141
1178
|
s += '<rect class="node-shape" x="' + x + '" y="' + y + '" width="' + pos.w + '" height="' + pos.h + '" rx="12" fill="' + colors.bg + '" stroke="' + colors.main + '" stroke-width="' + (isSelected ? 2.5 : 1) + '" ' + strokeDash + ' ' + dimOpacity + ' data-glow="' + glowFilter + '"/>';
|
|
1142
1179
|
}
|
|
@@ -1153,6 +1190,8 @@ function renderGraph() {
|
|
|
1153
1190
|
s += '<text class="node-sublabel" x="' + pos.x + '" y="' + (labelY + 13) + '">' + esc(node.kind) + '</text>';
|
|
1154
1191
|
} else if (node.type === 'gate') {
|
|
1155
1192
|
s += '<text class="node-sublabel" x="' + pos.x + '" y="' + (labelY + 11) + '">gate</text>';
|
|
1193
|
+
} else if (node.type === 'store') {
|
|
1194
|
+
s += '<text class="node-sublabel" x="' + pos.x + '" y="' + (labelY + 13) + '">' + esc(node.storeType || 'store') + '</text>';
|
|
1156
1195
|
}
|
|
1157
1196
|
|
|
1158
1197
|
const badgeY = y - 2;
|
|
@@ -1266,6 +1305,9 @@ function renderLegend() {
|
|
|
1266
1305
|
h += '<div class="legend-row"><div class="legend-swatch" style="background:rgba(251,146,60,.10);border:1px solid rgba(251,146,60,.25);clip-path:polygon(50% 0%,100% 50%,50% 100%,0% 50%);border-radius:0"></div><span class="legend-label">Gate</span></div>';
|
|
1267
1306
|
h += '<div class="legend-row"><div class="legend-swatch" style="background:rgba(251,191,36,.10);border:1px solid rgba(251,191,36,.25);border-radius:3px"></div><span class="legend-label">Orchestrator</span></div>';
|
|
1268
1307
|
h += '<div class="legend-row"><div class="legend-swatch" style="background:rgba(34,211,238,.08);border:1px solid rgba(34,211,238,.35);border-radius:8px"></div><span class="legend-label">Trigger</span></div>';
|
|
1308
|
+
if (data.stores && data.stores.length > 0) {
|
|
1309
|
+
h += '<div class="legend-row"><div class="legend-swatch" style="background:rgba(20,184,166,.10);border:1px solid rgba(20,184,166,.25);border-radius:50%"></div><span class="legend-label">Memory Store</span></div>';
|
|
1310
|
+
}
|
|
1269
1311
|
h += '<div class="legend-section-title" style="margin-top:8px">Badges</div>';
|
|
1270
1312
|
h += '<div class="legend-row"><div class="legend-badge" style="background:rgba(34,211,238,.15);border:1px solid rgba(34,211,238,.35);color:#22d3ee;font-size:8px">\\u26A1</div><span class="legend-label">Has Hooks</span></div>';
|
|
1271
1313
|
h += '<div class="legend-row"><div class="legend-badge" style="background:rgba(251,191,36,.15);border:1px solid rgba(251,191,36,.35);color:#fbbf24;font-size:7px;font-weight:700">A</div><span class="legend-label">Advisory</span></div>';
|
|
@@ -1275,6 +1317,9 @@ function renderLegend() {
|
|
|
1275
1317
|
h += '<div class="legend-row"><div class="legend-line dashed" style="border-color:#5858a0"></div><span class="legend-label">Conditional</span></div>';
|
|
1276
1318
|
h += '<div class="legend-row"><div class="legend-line dashed" style="border-color:#f87171"></div><span class="legend-label">Failure</span></div>';
|
|
1277
1319
|
h += '<div class="legend-row"><div class="legend-line dashed" style="border-color:#fb923c"></div><span class="legend-label">Loop (max N)</span></div>';
|
|
1320
|
+
if (data.stores && data.stores.length > 0) {
|
|
1321
|
+
h += '<div class="legend-row"><div class="legend-line dashed" style="border-color:#14b8a6"></div><span class="legend-label">Memory</span></div>';
|
|
1322
|
+
}
|
|
1278
1323
|
if (dataFlowEnabled) {
|
|
1279
1324
|
h += '<div class="legend-section-title" style="margin-top:8px">Data Flow</div>';
|
|
1280
1325
|
h += '<div class="legend-row"><div class="legend-line" style="border-color:#f59e0b"></div><span class="legend-label">Active</span></div>';
|
|
@@ -1729,14 +1774,57 @@ function renderMiniGraph(nodeId) {
|
|
|
1729
1774
|
|
|
1730
1775
|
function showMemoryPanel() {
|
|
1731
1776
|
const mem = data.memory;
|
|
1732
|
-
|
|
1777
|
+
const stores = data.stores;
|
|
1778
|
+
const retrievals = data.retrievals;
|
|
1779
|
+
const hasLegacyMem = mem && Object.keys(mem).length > 0;
|
|
1780
|
+
const hasStores = stores && stores.length > 0;
|
|
1781
|
+
const hasRetrievals = retrievals && retrievals.length > 0;
|
|
1782
|
+
if (!hasLegacyMem && !hasStores && !hasRetrievals) { setTabContent(emptyMsg('No memory config')); return; }
|
|
1733
1783
|
let h = '';
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1784
|
+
if (hasLegacyMem) {
|
|
1785
|
+
Object.entries(mem).forEach(function(entry) {
|
|
1786
|
+
const key = entry[0], val = entry[1];
|
|
1787
|
+
h += '<div class="panel-section"><div class="panel-title">' + esc(key) + '</div>';
|
|
1788
|
+
h += '<div class="panel-card"><div class="panel-card-desc" style="font-family:var(--font-mono);font-size:10px;word-break:break-all">' + esc(JSON.stringify(val, null, 2)) + '</div></div>';
|
|
1789
|
+
h += '</div>';
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
if (hasStores) {
|
|
1793
|
+
h += '<div class="panel-section"><div class="panel-title">Memory Stores</div>';
|
|
1794
|
+
stores.forEach(function(store) {
|
|
1795
|
+
h += '<div class="panel-card">';
|
|
1796
|
+
h += '<div class="panel-card-title" style="color:#14b8a6">' + esc(store.id) + '</div>';
|
|
1797
|
+
h += '<div class="panel-card-desc">';
|
|
1798
|
+
h += '<span class="panel-tag">' + esc(store.type) + '</span>';
|
|
1799
|
+
h += '<span class="panel-tag">' + esc(store.backend) + '</span>';
|
|
1800
|
+
if (store.scope) h += '<span class="panel-tag">scope: ' + esc(store.scope) + '</span>';
|
|
1801
|
+
if (store.isolation) h += '<span class="panel-tag">isolation: ' + esc(store.isolation) + '</span>';
|
|
1802
|
+
h += '</div>';
|
|
1803
|
+
if (store.description) h += '<div class="panel-card-desc" style="margin-top:4px">' + esc(store.description) + '</div>';
|
|
1804
|
+
if (store.embedding) {
|
|
1805
|
+
h += '<div style="margin-top:6px;font-size:10px;color:var(--t2)">Embedding: ';
|
|
1806
|
+
if (store.embedding.provider) h += esc(store.embedding.provider);
|
|
1807
|
+
if (store.embedding.model) h += ' / ' + esc(store.embedding.model);
|
|
1808
|
+
if (store.embedding.dimensions) h += ' (' + store.embedding.dimensions + 'd)';
|
|
1809
|
+
h += '</div>';
|
|
1810
|
+
}
|
|
1811
|
+
h += '</div>';
|
|
1812
|
+
});
|
|
1738
1813
|
h += '</div>';
|
|
1739
|
-
}
|
|
1814
|
+
}
|
|
1815
|
+
if (hasRetrievals) {
|
|
1816
|
+
h += '<div class="panel-section"><div class="panel-title">Retrieval Strategies</div>';
|
|
1817
|
+
retrievals.forEach(function(ret) {
|
|
1818
|
+
h += '<div class="panel-card">';
|
|
1819
|
+
h += '<div class="panel-card-title" style="color:#14b8a6">' + esc(ret.id) + '</div>';
|
|
1820
|
+
h += '<div class="panel-card-desc">';
|
|
1821
|
+
if (ret.sources) h += 'Sources: ' + ret.sources.map(function(s) { return '<span class="panel-tag">' + esc(s) + '</span>'; }).join(' ');
|
|
1822
|
+
if (ret.budget) h += '<br/>Budget: ' + ret.budget + ' tokens';
|
|
1823
|
+
if (ret.paths) h += '<br/>Paths: ' + ret.paths.map(function(p) { return '<span class="panel-tag">' + esc(p) + '</span>'; }).join(' ');
|
|
1824
|
+
h += '</div></div>';
|
|
1825
|
+
});
|
|
1826
|
+
h += '</div>';
|
|
1827
|
+
}
|
|
1740
1828
|
setTabContent(h);
|
|
1741
1829
|
}
|
|
1742
1830
|
|
|
@@ -2006,7 +2094,7 @@ function exportSvg() {
|
|
|
2006
2094
|
const clone = svg.cloneNode(true);
|
|
2007
2095
|
// Add inline styles for standalone SVG
|
|
2008
2096
|
const styleEl = document.createElementNS('http://www.w3.org/2000/svg', 'style');
|
|
2009
|
-
styleEl.textContent = 'text{font-family:-apple-system,BlinkMacSystemFont,\\'Segoe UI\\',sans-serif}.node-label{font-weight:600;font-size:12px}.node-sublabel{font-size:8.5px}.edge-path{fill:none;stroke-width:1.5}.edge-path.unconditional{stroke:rgba(255,255,255,.15)}.edge-path.conditional{stroke:#5858a0;stroke-dasharray:6 4}.edge-path.failure{stroke:#f87171;stroke-dasharray:6 4}.edge-path.loop{stroke:#fb923c;stroke-dasharray:4 4}';
|
|
2097
|
+
styleEl.textContent = 'text{font-family:-apple-system,BlinkMacSystemFont,\\'Segoe UI\\',sans-serif}.node-label{font-weight:600;font-size:12px}.node-sublabel{font-size:8.5px}.edge-path{fill:none;stroke-width:1.5}.edge-path.unconditional{stroke:rgba(255,255,255,.15)}.edge-path.conditional{stroke:#5858a0;stroke-dasharray:6 4}.edge-path.failure{stroke:#f87171;stroke-dasharray:6 4}.edge-path.loop{stroke:#fb923c;stroke-dasharray:4 4}.edge-path.memory{stroke:#14b8a6;stroke-dasharray:4 4;opacity:.6}';
|
|
2010
2098
|
clone.insertBefore(styleEl, clone.firstChild);
|
|
2011
2099
|
clone.setAttribute('xmlns', 'http://www.w3.org/2000/svg');
|
|
2012
2100
|
const blob = new Blob([clone.outerHTML], { type: 'image/svg+xml' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/visualizer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/visualizer/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,MAAM,MAAM,aAAa,CAAC;AAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6lDV,CAAC;AAEF,8EAA8E"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
topology knowledge-assistant : [supervisor, human-gate] {
|
|
2
|
+
|
|
3
|
+
meta {
|
|
4
|
+
version: "1.0.0"
|
|
5
|
+
description: "A knowledge-powered research assistant with semantic search, entity tracking, and episodic memory"
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
orchestrator {
|
|
9
|
+
model: opus
|
|
10
|
+
plan: auto
|
|
11
|
+
handles: [research, answer]
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
agent researcher {
|
|
15
|
+
model: sonnet
|
|
16
|
+
description: "Searches knowledge bases and web for information"
|
|
17
|
+
tools: [Read, WebSearch, WebFetch]
|
|
18
|
+
memory: [knowledge-base, entities]
|
|
19
|
+
retrieval: smart-retrieval
|
|
20
|
+
permissions: autonomous
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
agent writer {
|
|
24
|
+
model: sonnet
|
|
25
|
+
description: "Synthesizes research into clear answers"
|
|
26
|
+
tools: [Read, Write]
|
|
27
|
+
memory: [knowledge-base, conversation-log]
|
|
28
|
+
retrieval: smart-retrieval
|
|
29
|
+
permissions: autonomous
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
action research {
|
|
33
|
+
kind: inline
|
|
34
|
+
description: "Research a topic using knowledge stores and web"
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
action answer {
|
|
38
|
+
kind: inline
|
|
39
|
+
description: "Write a comprehensive answer from research"
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
flow {
|
|
43
|
+
research -> researcher
|
|
44
|
+
researcher -> writer
|
|
45
|
+
writer -> answer
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
triggers {
|
|
49
|
+
command research {
|
|
50
|
+
pattern: "/research <topic>"
|
|
51
|
+
description: "Research a topic using the knowledge base and web"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
memory {
|
|
56
|
+
workspace: ".workspace/"
|
|
57
|
+
domains: ["domains/"]
|
|
58
|
+
references: ["references/"]
|
|
59
|
+
|
|
60
|
+
store knowledge-base {
|
|
61
|
+
type: semantic
|
|
62
|
+
description: "Project knowledge base with semantic search over documentation"
|
|
63
|
+
scope: org
|
|
64
|
+
isolation: soft
|
|
65
|
+
backend: lancedb
|
|
66
|
+
path: ".memory/semantic/"
|
|
67
|
+
|
|
68
|
+
embedding {
|
|
69
|
+
provider: ollama
|
|
70
|
+
model: "nomic-embed-text"
|
|
71
|
+
dimensions: 768
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
index {
|
|
75
|
+
collection: "docs"
|
|
76
|
+
metric: cosine
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
ingestion {
|
|
80
|
+
sources: ["docs/", "references/", "wiki/"]
|
|
81
|
+
chunking: recursive
|
|
82
|
+
chunk-size: 512
|
|
83
|
+
overlap: 50
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
search {
|
|
87
|
+
strategy: hybrid
|
|
88
|
+
rerank: true
|
|
89
|
+
top-k: 10
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
lifecycle {
|
|
93
|
+
retention: 365d
|
|
94
|
+
consolidation: 0.85
|
|
95
|
+
contradiction: overwrite
|
|
96
|
+
audit-log: false
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
store entities {
|
|
101
|
+
type: graph
|
|
102
|
+
description: "Entity and relationship tracking across conversations"
|
|
103
|
+
scope: org
|
|
104
|
+
isolation: soft
|
|
105
|
+
backend: kuzu
|
|
106
|
+
path: ".memory/graph/"
|
|
107
|
+
extraction: hybrid
|
|
108
|
+
|
|
109
|
+
lifecycle {
|
|
110
|
+
retention: 365d
|
|
111
|
+
contradiction: preserve
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
store conversation-log {
|
|
116
|
+
type: episodic
|
|
117
|
+
description: "Conversation history with temporal search"
|
|
118
|
+
scope: user
|
|
119
|
+
isolation: strict
|
|
120
|
+
backend: sqlite
|
|
121
|
+
path: ".memory/episodes.db"
|
|
122
|
+
|
|
123
|
+
lifecycle {
|
|
124
|
+
retention: 90d
|
|
125
|
+
decay-half-life: 30d
|
|
126
|
+
consolidation: 0.9
|
|
127
|
+
contradiction: bi-temporal
|
|
128
|
+
audit-log: true
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
store user-prefs {
|
|
133
|
+
type: user
|
|
134
|
+
description: "User preferences and settings"
|
|
135
|
+
scope: user
|
|
136
|
+
isolation: strict
|
|
137
|
+
backend: sqlite
|
|
138
|
+
path: ".memory/user.db"
|
|
139
|
+
|
|
140
|
+
lifecycle {
|
|
141
|
+
contradiction: overwrite
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
retrieval smart-retrieval {
|
|
146
|
+
sources: [knowledge-base, conversation-log, entities]
|
|
147
|
+
budget: 4096
|
|
148
|
+
|
|
149
|
+
scoring {
|
|
150
|
+
recency-weight: 0.3
|
|
151
|
+
semantic-weight: 0.5
|
|
152
|
+
importance-weight: 0.2
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
paths: [semantic, episodic, graph, hybrid]
|
|
156
|
+
rerank: true
|
|
157
|
+
diversity: true
|
|
158
|
+
cache-hit-threshold: 0.92
|
|
159
|
+
cache-hit-action: short-circuit
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Demo: DuckDB store backend
|
|
2
|
+
# Tests the duckdb backend addition in feat/script-agents-duckdb
|
|
3
|
+
|
|
4
|
+
topology script-agent-demo : [pipeline] {
|
|
5
|
+
|
|
6
|
+
meta {
|
|
7
|
+
version: "1.0.0"
|
|
8
|
+
description: "Demo: agent pipeline with DuckDB storage"
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
orchestrator {
|
|
12
|
+
model: opus
|
|
13
|
+
handles: [start]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
action start {
|
|
17
|
+
kind: decision
|
|
18
|
+
description: "Begin pipeline"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
agent data-processor {
|
|
22
|
+
model: haiku
|
|
23
|
+
tools: [Bash, Read, Write]
|
|
24
|
+
description: "Extract and transform data"
|
|
25
|
+
reads: ["workspace/raw/"]
|
|
26
|
+
writes: ["workspace/processed/"]
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
agent analyzer {
|
|
30
|
+
model: sonnet
|
|
31
|
+
tools: [Read, Write, Grep]
|
|
32
|
+
memory: [data-index]
|
|
33
|
+
description: "Analyze processed data using AI"
|
|
34
|
+
reads: ["workspace/processed/"]
|
|
35
|
+
writes: ["workspace/analysis/"]
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
memory {
|
|
39
|
+
store data-index {
|
|
40
|
+
type: entity
|
|
41
|
+
scope: run
|
|
42
|
+
backend: duckdb
|
|
43
|
+
path: "workspace/index.duckdb"
|
|
44
|
+
|
|
45
|
+
search {
|
|
46
|
+
strategy: hybrid
|
|
47
|
+
top-k: 100
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
flow {
|
|
53
|
+
start -> data-processor
|
|
54
|
+
data-processor -> analyzer
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
tools {
|
|
58
|
+
tool process-data {
|
|
59
|
+
script: "scripts/process.py"
|
|
60
|
+
args: [input-dir, output-dir]
|
|
61
|
+
lang: python
|
|
62
|
+
description: "Transform raw data into structured format"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agentopology",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "The declarative language for multi-agent systems. Write once, scaffold for any platform.",
|
|
5
5
|
"author": "Nadav Naveh",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"node": ">=18"
|
|
67
67
|
},
|
|
68
68
|
"dependencies": {
|
|
69
|
+
"agentopology": "^0.2.0",
|
|
69
70
|
"dagre": "^0.8.5"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
package/skill/SKILL.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: agentopology
|
|
2
|
+
name: agentopology-skill
|
|
3
3
|
description: "Design, validate, scaffold, and visualize multi-agent topologies using the .at language"
|
|
4
4
|
---
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ Every .at generation follows this loop — no exceptions:
|
|
|
24
24
|
|
|
25
25
|
1. **QUERY:** `agentopology docs <relevant-topics>` # Learn correct syntax
|
|
26
26
|
2. **COMPOSE:** Write .at file — CLI-provided structure + your prose
|
|
27
|
-
3. **VALIDATE:** `agentopology validate <file>` # Must pass all
|
|
27
|
+
3. **VALIDATE:** `agentopology validate <file>` # Must pass all 82 rules
|
|
28
28
|
4. **FIX:** If errors → query `agentopology docs validation` → fix → re-validate
|
|
29
29
|
5. **ANALYZE:** `agentopology info <file>` # Verify structure
|
|
30
30
|
6. **SCAFFOLD:** `agentopology scaffold <file> --target <binding>`
|
|
@@ -79,7 +79,7 @@ Every .at generation follows this loop — no exceptions:
|
|
|
79
79
|
| Agent descriptions | Field names and types |
|
|
80
80
|
| Prompt {} block content | Block nesting rules |
|
|
81
81
|
| Topology/agent names | Legal enum values |
|
|
82
|
-
| Pattern selection | Validation rules (
|
|
82
|
+
| Pattern selection | Validation rules (82 rules) |
|
|
83
83
|
| Role descriptions | Default values |
|
|
84
84
|
| Flow topology decisions | Required vs optional fields |
|
|
85
85
|
| Tool choices | Syntax grammar |
|
|
@@ -232,7 +232,7 @@ npx agentopology validate <file.at>
|
|
|
232
232
|
After generating and validating, offer the next actions:
|
|
233
233
|
|
|
234
234
|
```
|
|
235
|
-
<name>.at created and validated (
|
|
235
|
+
<name>.at created and validated (82/82 rules passed).
|
|
236
236
|
|
|
237
237
|
scaffold Generate agent configs for your platform
|
|
238
238
|
visualize See the topology graph
|
|
@@ -267,7 +267,7 @@ Report what was generated. Done.
|
|
|
267
267
|
agentopology validate <file.at>
|
|
268
268
|
```
|
|
269
269
|
|
|
270
|
-
There are
|
|
270
|
+
There are 82 validation rules. If all pass, tell the user. If errors, explain each one clearly and offer to fix. Query `agentopology docs validation` for rule explanations if needed.
|
|
271
271
|
|
|
272
272
|
If no file specified, look for `.at` files in the current directory and `.claude/topologies/`.
|
|
273
273
|
|
|
@@ -366,14 +366,14 @@ When generating `.at` files:
|
|
|
366
366
|
All commands available to this skill:
|
|
367
367
|
|
|
368
368
|
```bash
|
|
369
|
-
# Language reference (
|
|
369
|
+
# Language reference (42 topics, parser-verified)
|
|
370
370
|
agentopology docs # List all topics
|
|
371
371
|
agentopology docs <topic> # Show specific topic
|
|
372
372
|
agentopology docs --all # Dump everything (~3000 lines)
|
|
373
373
|
agentopology docs --search <term> # Search across all topics
|
|
374
374
|
|
|
375
375
|
# Core workflow
|
|
376
|
-
agentopology validate <file.at> # Parse + run
|
|
376
|
+
agentopology validate <file.at> # Parse + run 82 validation rules
|
|
377
377
|
agentopology scaffold <file.at> --target <binding> [--dry-run] [--force] [--prune]
|
|
378
378
|
agentopology sync <file.at> --target <binding> --dir <path>
|
|
379
379
|
agentopology visualize <file.at>
|