@abhinav2203/codeflow-canvas 0.1.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.
Files changed (134) hide show
  1. package/abhinav2203-codeflow-canvas-0.1.0.tgz +0 -0
  2. package/dist/bin/cli.d.ts +3 -0
  3. package/dist/bin/cli.d.ts.map +1 -0
  4. package/dist/bin/cli.js +84 -0
  5. package/dist/bin/cli.js.map +1 -0
  6. package/dist/components/blueprint-workbench.d.ts +2 -0
  7. package/dist/components/blueprint-workbench.d.ts.map +1 -0
  8. package/dist/components/blueprint-workbench.js +144 -0
  9. package/dist/components/blueprint-workbench.js.map +1 -0
  10. package/dist/components/code-diff-editor.d.ts +12 -0
  11. package/dist/components/code-diff-editor.d.ts.map +1 -0
  12. package/dist/components/code-diff-editor.js +39 -0
  13. package/dist/components/code-diff-editor.js.map +1 -0
  14. package/dist/components/code-editor.d.ts +25 -0
  15. package/dist/components/code-editor.d.ts.map +1 -0
  16. package/dist/components/code-editor.js +264 -0
  17. package/dist/components/code-editor.js.map +1 -0
  18. package/dist/components/file-tabs.d.ts +5 -0
  19. package/dist/components/file-tabs.d.ts.map +1 -0
  20. package/dist/components/file-tabs.js +164 -0
  21. package/dist/components/file-tabs.js.map +1 -0
  22. package/dist/components/file-tree.d.ts +7 -0
  23. package/dist/components/file-tree.d.ts.map +1 -0
  24. package/dist/components/file-tree.js +176 -0
  25. package/dist/components/file-tree.js.map +1 -0
  26. package/dist/components/graph-canvas.d.ts +25 -0
  27. package/dist/components/graph-canvas.d.ts.map +1 -0
  28. package/dist/components/graph-canvas.js +224 -0
  29. package/dist/components/graph-canvas.js.map +1 -0
  30. package/dist/components/ide-layout.d.ts +10 -0
  31. package/dist/components/ide-layout.d.ts.map +1 -0
  32. package/dist/components/ide-layout.js +40 -0
  33. package/dist/components/ide-layout.js.map +1 -0
  34. package/dist/components/ide-workbench.d.ts +4 -0
  35. package/dist/components/ide-workbench.d.ts.map +1 -0
  36. package/dist/components/ide-workbench.js +6 -0
  37. package/dist/components/ide-workbench.js.map +1 -0
  38. package/dist/components/index.d.ts +13 -0
  39. package/dist/components/index.d.ts.map +1 -0
  40. package/dist/components/index.js +13 -0
  41. package/dist/components/index.js.map +1 -0
  42. package/dist/components/monaco-setup.d.ts +4 -0
  43. package/dist/components/monaco-setup.d.ts.map +1 -0
  44. package/dist/components/monaco-setup.js +34 -0
  45. package/dist/components/monaco-setup.js.map +1 -0
  46. package/dist/components/opencode-settings.d.ts +8 -0
  47. package/dist/components/opencode-settings.d.ts.map +1 -0
  48. package/dist/components/opencode-settings.js +33 -0
  49. package/dist/components/opencode-settings.js.map +1 -0
  50. package/dist/components/policy-workbench.d.ts +2 -0
  51. package/dist/components/policy-workbench.d.ts.map +1 -0
  52. package/dist/components/policy-workbench.js +102 -0
  53. package/dist/components/policy-workbench.js.map +1 -0
  54. package/dist/components/ts-language-service.d.ts +14 -0
  55. package/dist/components/ts-language-service.d.ts.map +1 -0
  56. package/dist/components/ts-language-service.js +123 -0
  57. package/dist/components/ts-language-service.js.map +1 -0
  58. package/dist/index.d.ts +23 -0
  59. package/dist/index.d.ts.map +1 -0
  60. package/dist/index.js +22 -0
  61. package/dist/index.js.map +1 -0
  62. package/dist/lib/browser/storage.d.ts +16 -0
  63. package/dist/lib/browser/storage.d.ts.map +1 -0
  64. package/dist/lib/browser/storage.js +18 -0
  65. package/dist/lib/browser/storage.js.map +1 -0
  66. package/dist/lib/edit.d.ts +14 -0
  67. package/dist/lib/edit.d.ts.map +1 -0
  68. package/dist/lib/edit.js +57 -0
  69. package/dist/lib/edit.js.map +1 -0
  70. package/dist/lib/flow-view.d.ts +80 -0
  71. package/dist/lib/flow-view.d.ts.map +1 -0
  72. package/dist/lib/flow-view.js +850 -0
  73. package/dist/lib/flow-view.js.map +1 -0
  74. package/dist/lib/heatmap.d.ts +28 -0
  75. package/dist/lib/heatmap.d.ts.map +1 -0
  76. package/dist/lib/heatmap.js +61 -0
  77. package/dist/lib/heatmap.js.map +1 -0
  78. package/dist/lib/index.d.ts +9 -0
  79. package/dist/lib/index.d.ts.map +1 -0
  80. package/dist/lib/index.js +6 -0
  81. package/dist/lib/index.js.map +1 -0
  82. package/dist/lib/node-navigation.d.ts +36 -0
  83. package/dist/lib/node-navigation.d.ts.map +1 -0
  84. package/dist/lib/node-navigation.js +52 -0
  85. package/dist/lib/node-navigation.js.map +1 -0
  86. package/dist/lib/traces.d.ts +3 -0
  87. package/dist/lib/traces.d.ts.map +1 -0
  88. package/dist/lib/traces.js +64 -0
  89. package/dist/lib/traces.js.map +1 -0
  90. package/dist/lib/types.d.ts +57 -0
  91. package/dist/lib/types.d.ts.map +1 -0
  92. package/dist/lib/types.js +7 -0
  93. package/dist/lib/types.js.map +1 -0
  94. package/dist/store/blueprint-store.d.ts +35 -0
  95. package/dist/store/blueprint-store.d.ts.map +1 -0
  96. package/dist/store/blueprint-store.js +79 -0
  97. package/dist/store/blueprint-store.js.map +1 -0
  98. package/dist/store/index.d.ts +3 -0
  99. package/dist/store/index.d.ts.map +1 -0
  100. package/dist/store/index.js +2 -0
  101. package/dist/store/index.js.map +1 -0
  102. package/package.json +52 -0
  103. package/scripts/wrap-cli.mjs +15 -0
  104. package/src/bin/cli.ts +128 -0
  105. package/src/components/blueprint-workbench.tsx +305 -0
  106. package/src/components/code-diff-editor.tsx +80 -0
  107. package/src/components/code-editor.tsx +389 -0
  108. package/src/components/file-tabs.tsx +288 -0
  109. package/src/components/file-tree.tsx +301 -0
  110. package/src/components/graph-canvas.tsx +404 -0
  111. package/src/components/ide-layout.tsx +104 -0
  112. package/src/components/ide-workbench.tsx +5 -0
  113. package/src/components/index.ts +12 -0
  114. package/src/components/monaco-setup.ts +67 -0
  115. package/src/components/opencode-settings.tsx +82 -0
  116. package/src/components/policy-workbench.tsx +233 -0
  117. package/src/components/ts-language-service.ts +170 -0
  118. package/src/index.ts +54 -0
  119. package/src/lib/browser/storage.ts +19 -0
  120. package/src/lib/edit.ts +74 -0
  121. package/src/lib/flow-view.ts +1176 -0
  122. package/src/lib/heatmap.ts +103 -0
  123. package/src/lib/index.ts +41 -0
  124. package/src/lib/node-navigation.ts +76 -0
  125. package/src/lib/traces.ts +79 -0
  126. package/src/lib/types.ts +79 -0
  127. package/src/store/blueprint-store.ts +136 -0
  128. package/src/store/index.ts +2 -0
  129. package/test-fixtures/minimal-blueprint.json +34 -0
  130. package/test-fixtures/sample-blueprint.json +184 -0
  131. package/tsconfig.build.json +9 -0
  132. package/tsconfig.json +22 -0
  133. package/tsconfig.tsbuildinfo +1 -0
  134. package/vitest.config.ts +9 -0
@@ -0,0 +1,14 @@
1
+ import type * as Monaco from "monaco-editor";
2
+ export declare class TypeScriptLanguageService {
3
+ private monaco;
4
+ private defaultsConfigured;
5
+ private workspaceLibs;
6
+ private globalLibDisposables;
7
+ constructor(monaco: typeof Monaco);
8
+ configureDefaults(): void;
9
+ private addGlobalTypes;
10
+ upsertWorkspaceFile(filePath: string, content: string): void;
11
+ dispose(): void;
12
+ }
13
+ export declare function getTypeScriptLanguageService(monaco: typeof Monaco): TypeScriptLanguageService;
14
+ //# sourceMappingURL=ts-language-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-language-service.d.ts","sourceRoot":"","sources":["../../src/components/ts-language-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,MAAM,eAAe,CAAC;AAmC7C,qBAAa,yBAAyB;IACpC,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,kBAAkB,CAAS;IACnC,OAAO,CAAC,aAAa,CAAyC;IAC9D,OAAO,CAAC,oBAAoB,CAA4B;gBAE5C,MAAM,EAAE,OAAO,MAAM;IAIjC,iBAAiB,IAAI,IAAI;IA+CzB,OAAO,CAAC,cAAc;IAiDtB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAY5D,OAAO,IAAI,IAAI;CAOhB;AAID,wBAAgB,4BAA4B,CAAC,MAAM,EAAE,OAAO,MAAM,GAAG,yBAAyB,CAK7F"}
@@ -0,0 +1,123 @@
1
+ function getTypeScriptApi(monaco) {
2
+ return monaco.languages.typescript ?? null;
3
+ }
4
+ function toExtraLibPath(filePath) {
5
+ const normalized = filePath.replace(/\\/g, "/").replace(/^\/+/, "");
6
+ return `file:///${normalized}`;
7
+ }
8
+ export class TypeScriptLanguageService {
9
+ monaco;
10
+ defaultsConfigured = false;
11
+ workspaceLibs = new Map();
12
+ globalLibDisposables = [];
13
+ constructor(monaco) {
14
+ this.monaco = monaco;
15
+ }
16
+ configureDefaults() {
17
+ if (this.defaultsConfigured) {
18
+ return;
19
+ }
20
+ const api = getTypeScriptApi(this.monaco);
21
+ if (!api) {
22
+ return;
23
+ }
24
+ const jsxMode = api.JsxEmit.ReactJSX ?? api.JsxEmit.React ?? 2;
25
+ const compilerOptions = {
26
+ allowJs: true,
27
+ allowNonTsExtensions: true,
28
+ baseUrl: ".",
29
+ checkJs: true,
30
+ esModuleInterop: true,
31
+ jsx: jsxMode,
32
+ module: api.ModuleKind.ESNext,
33
+ moduleResolution: api.ModuleResolutionKind.NodeJs,
34
+ noEmit: true,
35
+ paths: {
36
+ "@/*": ["./src/*"],
37
+ "@/components/*": ["./src/components/*"],
38
+ "@/lib/*": ["./src/lib/*"],
39
+ "@/store/*": ["./src/store/*"]
40
+ },
41
+ strict: true,
42
+ target: api.ScriptTarget.ESNext
43
+ };
44
+ api.typescriptDefaults.setCompilerOptions(compilerOptions);
45
+ api.javascriptDefaults.setCompilerOptions(compilerOptions);
46
+ api.typescriptDefaults.setDiagnosticsOptions({
47
+ noSemanticValidation: false,
48
+ noSyntaxValidation: false
49
+ });
50
+ api.javascriptDefaults.setDiagnosticsOptions({
51
+ noSemanticValidation: false,
52
+ noSyntaxValidation: false
53
+ });
54
+ this.addGlobalTypes(api);
55
+ this.defaultsConfigured = true;
56
+ }
57
+ addGlobalTypes(api) {
58
+ const reactTypes = `
59
+ declare namespace React {
60
+ type ReactNode = import('react').ReactNode;
61
+ type FC<P = {}> = import('react').FunctionComponent<P>;
62
+ type CSSProperties = import('react').CSSProperties;
63
+ }
64
+ declare module 'react' {
65
+ function useState<T>(initial: T | (() => T)): [T, (value: T) => void];
66
+ function useState<T>(): [T | undefined, (value: T) => void];
67
+ function useEffect(effect: () => void | (() => void)): void;
68
+ function useEffect(effect: () => void, deps: any[]): void;
69
+ function useCallback<T extends (...args: any[]) => any>(callback: T, deps: any[]): T;
70
+ function useMemo<T>(factory: () => T, deps: any[]): T;
71
+ function useRef<T>(initial: T): { current: T };
72
+ function useRef<T>(initial?: T): { current: T | undefined };
73
+ }
74
+ `;
75
+ const nextTypes = `
76
+ declare namespace Next {
77
+ function dynamic<T>(importFn: () => Promise<T>): T;
78
+ function dynamic<T>(importFn: () => Promise<T>, options: { ssr?: boolean }): T;
79
+ }
80
+ declare module 'next' {
81
+ export function GetServerSideProps(context: any): any;
82
+ export function GetStaticProps(context: any): any;
83
+ export function GetServerSideProps(context: any): any;
84
+ }
85
+ `;
86
+ const nodeTypes = `
87
+ declare module 'node:fs' {
88
+ export function readFile(path: string, encoding: string): Promise<string>;
89
+ export function writeFile(path: string, data: string): Promise<void>;
90
+ }
91
+ declare module 'node:path' {
92
+ export function resolve(...paths: string[]): string;
93
+ export function join(...paths: string[]): string;
94
+ }
95
+ `;
96
+ this.globalLibDisposables.push(api.typescriptDefaults.addExtraLib(reactTypes, "file:///node_modules/@types/react-global.d.ts"), api.typescriptDefaults.addExtraLib(nextTypes, "file:///node_modules/@types/next-global.d.ts"), api.typescriptDefaults.addExtraLib(nodeTypes, "file:///node_modules/@types/node-global.d.ts"));
97
+ }
98
+ upsertWorkspaceFile(filePath, content) {
99
+ this.configureDefaults();
100
+ const api = getTypeScriptApi(this.monaco);
101
+ if (!api) {
102
+ return;
103
+ }
104
+ const extraLibPath = toExtraLibPath(filePath);
105
+ this.workspaceLibs.get(extraLibPath)?.dispose();
106
+ this.workspaceLibs.set(extraLibPath, api.typescriptDefaults.addExtraLib(content, extraLibPath));
107
+ }
108
+ dispose() {
109
+ this.globalLibDisposables.forEach((disposable) => disposable.dispose());
110
+ this.globalLibDisposables = [];
111
+ this.workspaceLibs.forEach((disposable) => disposable.dispose());
112
+ this.workspaceLibs.clear();
113
+ this.defaultsConfigured = false;
114
+ }
115
+ }
116
+ let languageService = null;
117
+ export function getTypeScriptLanguageService(monaco) {
118
+ if (!languageService) {
119
+ languageService = new TypeScriptLanguageService(monaco);
120
+ }
121
+ return languageService;
122
+ }
123
+ //# sourceMappingURL=ts-language-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-language-service.js","sourceRoot":"","sources":["../../src/components/ts-language-service.ts"],"names":[],"mappings":"AA0BA,SAAS,gBAAgB,CAAC,MAAqB;IAC7C,OAAQ,MAAM,CAAC,SAA6D,CAAC,UAAU,IAAI,IAAI,CAAC;AAClG,CAAC;AAED,SAAS,cAAc,CAAC,QAAgB;IACtC,MAAM,UAAU,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IACpE,OAAO,WAAW,UAAU,EAAE,CAAC;AACjC,CAAC;AAED,MAAM,OAAO,yBAAyB;IAC5B,MAAM,CAAgB;IACtB,kBAAkB,GAAG,KAAK,CAAC;IAC3B,aAAa,GAAG,IAAI,GAAG,EAA8B,CAAC;IACtD,oBAAoB,GAAyB,EAAE,CAAC;IAExD,YAAY,MAAqB;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,iBAAiB;QACf,IAAI,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC5B,OAAO;QACT,CAAC;QAED,MAAM,GAAG,GAAG,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,OAAO;QACT,CAAC;QAED,MAAM,OAAO,GAAG,GAA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,IAAI,CAAC;AAE7D,MAAM,UAAU,4BAA4B,CAAC,MAAqB;IAChE,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,eAAe,GAAG,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC"}
@@ -0,0 +1,23 @@
1
+ export { useBlueprintStore } from "./store/blueprint-store.js";
2
+ export type { BlueprintStore, FloatingGraphPanel, WorkbenchMode } from "./store/blueprint-store.js";
3
+ export { IdeLayout } from "./components/ide-layout.js";
4
+ export { FileTree } from "./components/file-tree.js";
5
+ export { FileTabs } from "./components/file-tabs.js";
6
+ export { GraphCanvas } from "./components/graph-canvas.js";
7
+ export { CodeEditor } from "./components/code-editor.js";
8
+ export { CodeDiffEditor } from "./components/code-diff-editor.js";
9
+ export { BlueprintWorkbench } from "./components/blueprint-workbench.js";
10
+ export { PolicyWorkbench } from "./components/policy-workbench.js";
11
+ export { IdeWorkbench } from "./components/ide-workbench.js";
12
+ export { OpencodeSettings } from "./components/opencode-settings.js";
13
+ export { prepareMonaco, toMonacoPath } from "./components/monaco-setup.js";
14
+ export { TypeScriptLanguageService, getTypeScriptLanguageService } from "./components/ts-language-service.js";
15
+ export { computeHeatmap, heatColor, heatGlow } from "./lib/heatmap.js";
16
+ export type { HeatmapData, HeatmapNodeMetric } from "./lib/heatmap.js";
17
+ export { applyTraceOverlay } from "./lib/traces.js";
18
+ export { getNavigationTarget, getNodesWithNavigation, formatNavigationTarget, hasNavigationMetadata, isValidNavigationTarget } from "./lib/node-navigation.js";
19
+ export type { NavigationTarget } from "./lib/node-navigation.js";
20
+ export { addNodeToGraph, addEdgeToGraph, deleteNodeFromGraph } from "./lib/edit.js";
21
+ export { buildFlowNodes, buildFlowEdges, buildGhostFlowNodes, buildDetailFlow, indexRuntimeExecutionResult, buildExecutionProjection } from "./lib/flow-view.js";
22
+ export type { NodeHealthState, FlowExecutionStatus, FlowExecutionState, FlowExecutionIndex, FlowExecutionProjection, FlowNodeData, InspectorSection, DetailFlowItem, DetailFlowGraph } from "./lib/flow-view.js";
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGpG,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAG9G,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAClC,YAAY,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpF,OAAO,EACL,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EACV,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,eAAe,EAChB,MAAM,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,22 @@
1
+ // Store exports
2
+ export { useBlueprintStore } from "./store/blueprint-store.js";
3
+ // Component exports
4
+ export { IdeLayout } from "./components/ide-layout.js";
5
+ export { FileTree } from "./components/file-tree.js";
6
+ export { FileTabs } from "./components/file-tabs.js";
7
+ export { GraphCanvas } from "./components/graph-canvas.js";
8
+ export { CodeEditor } from "./components/code-editor.js";
9
+ export { CodeDiffEditor } from "./components/code-diff-editor.js";
10
+ export { BlueprintWorkbench } from "./components/blueprint-workbench.js";
11
+ export { PolicyWorkbench } from "./components/policy-workbench.js";
12
+ export { IdeWorkbench } from "./components/ide-workbench.js";
13
+ export { OpencodeSettings } from "./components/opencode-settings.js";
14
+ export { prepareMonaco, toMonacoPath } from "./components/monaco-setup.js";
15
+ export { TypeScriptLanguageService, getTypeScriptLanguageService } from "./components/ts-language-service.js";
16
+ // Library exports
17
+ export { computeHeatmap, heatColor, heatGlow } from "./lib/heatmap.js";
18
+ export { applyTraceOverlay } from "./lib/traces.js";
19
+ export { getNavigationTarget, getNodesWithNavigation, formatNavigationTarget, hasNavigationMetadata, isValidNavigationTarget } from "./lib/node-navigation.js";
20
+ export { addNodeToGraph, addEdgeToGraph, deleteNodeFromGraph } from "./lib/edit.js";
21
+ export { buildFlowNodes, buildFlowEdges, buildGhostFlowNodes, buildDetailFlow, indexRuntimeExecutionResult, buildExecutionProjection } from "./lib/flow-view.js";
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAG/D,oBAAoB;AACpB,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAE9G,kBAAkB;AAClB,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEpD,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpF,OAAO,EACL,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,2BAA2B,EAC3B,wBAAwB,EACzB,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Type stubs for storage utilities.
3
+ * These are browser-specific and should be provided by the consumer.
4
+ */
5
+ export declare const AUTO_IMPLEMENT_STORAGE_KEY = "codeflow:auto-implement";
6
+ export declare const LIVE_COMPLETIONS_STORAGE_KEY = "codeflow:live-completions";
7
+ export declare const THEME_STORAGE_KEY = "codeflow:theme";
8
+ export declare const loadSessionApiKey: () => string;
9
+ export declare const storeSessionApiKey: (_key: string) => void;
10
+ export declare const readLocalBooleanPreference: (_key: string, _defaultValue: boolean) => boolean;
11
+ export declare const readLocalPreference: (_key: string, _defaultValue: string) => string;
12
+ export declare const writeLocalBooleanPreference: (_key: string, _value: boolean) => void;
13
+ export declare const writeLocalPreference: (_key: string, _value: string) => void;
14
+ export declare const readRepoPath: () => string;
15
+ export declare const writeRepoPath: (_path: string) => void;
16
+ //# sourceMappingURL=storage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/lib/browser/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,eAAO,MAAM,0BAA0B,4BAA4B,CAAC;AACpE,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AACxE,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAGlD,eAAO,MAAM,iBAAiB,QAAO,MAAY,CAAC;AAClD,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,IAAU,CAAC;AAC7D,eAAO,MAAM,0BAA0B,GAAI,MAAM,MAAM,EAAE,eAAe,OAAO,KAAG,OAAwB,CAAC;AAC3G,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,EAAE,eAAe,MAAM,KAAG,MAAuB,CAAC;AAClG,eAAO,MAAM,2BAA2B,GAAI,MAAM,MAAM,EAAE,QAAQ,OAAO,KAAG,IAAU,CAAC;AACvF,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,EAAE,QAAQ,MAAM,KAAG,IAAU,CAAC;AAC/E,eAAO,MAAM,YAAY,QAAO,MAAY,CAAC;AAC7C,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,IAAU,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Type stubs for storage utilities.
3
+ * These are browser-specific and should be provided by the consumer.
4
+ */
5
+ // Storage key constants
6
+ export const AUTO_IMPLEMENT_STORAGE_KEY = "codeflow:auto-implement";
7
+ export const LIVE_COMPLETIONS_STORAGE_KEY = "codeflow:live-completions";
8
+ export const THEME_STORAGE_KEY = "codeflow:theme";
9
+ // Placeholder implementations - consumer should override
10
+ export const loadSessionApiKey = () => "";
11
+ export const storeSessionApiKey = (_key) => { };
12
+ export const readLocalBooleanPreference = (_key, _defaultValue) => _defaultValue;
13
+ export const readLocalPreference = (_key, _defaultValue) => _defaultValue;
14
+ export const writeLocalBooleanPreference = (_key, _value) => { };
15
+ export const writeLocalPreference = (_key, _value) => { };
16
+ export const readRepoPath = () => "";
17
+ export const writeRepoPath = (_path) => { };
18
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../../src/lib/browser/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAwB;AACxB,MAAM,CAAC,MAAM,0BAA0B,GAAG,yBAAyB,CAAC;AACpE,MAAM,CAAC,MAAM,4BAA4B,GAAG,2BAA2B,CAAC;AACxE,MAAM,CAAC,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAElD,yDAAyD;AACzD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAW,EAAE,CAAC,EAAE,CAAC;AAClD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAQ,EAAE,GAAE,CAAC,CAAC;AAC7D,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,IAAY,EAAE,aAAsB,EAAW,EAAE,CAAC,aAAa,CAAC;AAC3G,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAE,aAAqB,EAAU,EAAE,CAAC,aAAa,CAAC;AAClG,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,IAAY,EAAE,MAAe,EAAQ,EAAE,GAAE,CAAC,CAAC;AACvF,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAE,MAAc,EAAQ,EAAE,GAAE,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,YAAY,GAAG,GAAW,EAAE,CAAC,EAAE,CAAC;AAC7C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAa,EAAQ,EAAE,GAAE,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { BlueprintEdge, BlueprintGraph, BlueprintNodeKind } from "@abhinav2203/codeflow-core/schema";
2
+ export declare const addNodeToGraph: (graph: BlueprintGraph, input: {
3
+ kind: BlueprintNodeKind;
4
+ name: string;
5
+ summary?: string;
6
+ }) => BlueprintGraph;
7
+ export declare const addEdgeToGraph: (graph: BlueprintGraph, input: {
8
+ from: string;
9
+ to: string;
10
+ kind: BlueprintEdge["kind"];
11
+ label?: string;
12
+ }) => BlueprintGraph;
13
+ export declare const deleteNodeFromGraph: (graph: BlueprintGraph, nodeId: string) => BlueprintGraph;
14
+ //# sourceMappingURL=edit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../src/lib/edit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EAEd,iBAAiB,EAClB,MAAM,mCAAmC,CAAC;AAsB3C,eAAO,MAAM,cAAc,GACzB,OAAO,cAAc,EACrB,OAAO;IAAE,IAAI,EAAE,iBAAiB,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,KACjE,cAmBF,CAAC;AAEF,eAAO,MAAM,cAAc,GACzB,OAAO,cAAc,EACrB,OAAO;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,KAC/E,cAaD,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,OAAO,cAAc,EAAE,QAAQ,MAAM,KAAG,cAI1E,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { emptyContract } from "@abhinav2203/codeflow-core/schema";
2
+ // Utility functions inlined from @abhinav2203/codeflow-core
3
+ const createNodeId = (kind, name) => {
4
+ const slug = name.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "");
5
+ return `${kind}:${slug}`;
6
+ };
7
+ const dedupeEdges = (edges) => {
8
+ const seen = new Set();
9
+ return edges.filter((edge) => {
10
+ const key = `${edge.from}:${edge.to}:${edge.kind}`;
11
+ if (seen.has(key))
12
+ return false;
13
+ seen.add(key);
14
+ return true;
15
+ });
16
+ };
17
+ // Draft management - inlined from phases
18
+ const withSpecDrafts = (graph) => graph;
19
+ export const addNodeToGraph = (graph, input) => {
20
+ const node = {
21
+ id: createNodeId(input.kind, input.name),
22
+ kind: input.kind,
23
+ name: input.name,
24
+ summary: input.summary ?? `${input.kind} ${input.name}`,
25
+ contract: {
26
+ ...emptyContract(),
27
+ summary: input.summary ?? `${input.kind} ${input.name}`
28
+ },
29
+ sourceRefs: [{ kind: "generated", detail: "Added in workbench" }],
30
+ generatedRefs: [],
31
+ traceRefs: []
32
+ };
33
+ return withSpecDrafts({
34
+ ...graph,
35
+ nodes: [...graph.nodes.filter((existing) => existing.id !== node.id), node]
36
+ });
37
+ };
38
+ export const addEdgeToGraph = (graph, input) => ({
39
+ ...graph,
40
+ edges: dedupeEdges([
41
+ ...graph.edges,
42
+ {
43
+ from: input.from,
44
+ to: input.to,
45
+ kind: input.kind,
46
+ label: input.label,
47
+ required: true,
48
+ confidence: 1
49
+ }
50
+ ])
51
+ });
52
+ export const deleteNodeFromGraph = (graph, nodeId) => ({
53
+ ...graph,
54
+ nodes: graph.nodes.filter((node) => node.id !== nodeId),
55
+ edges: graph.edges.filter((edge) => edge.from !== nodeId && edge.to !== nodeId)
56
+ });
57
+ //# sourceMappingURL=edit.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edit.js","sourceRoot":"","sources":["../../src/lib/edit.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,4DAA4D;AAC5D,MAAM,YAAY,GAAG,CAAC,IAAuB,EAAE,IAAY,EAAU,EAAE;IACrE,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAChF,OAAO,GAAG,IAAI,IAAI,IAAI,EAAE,CAAC;AAC3B,CAAC,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,KAAsB,EAAmB,EAAE;IAC9D,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3B,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;QACnD,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC;QAChC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACd,OAAO,IAAI,CAAC;IACd,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,yCAAyC;AACzC,MAAM,cAAc,GAAG,CAAC,KAAqB,EAAkB,EAAE,CAAC,KAAK,CAAC;AAExE,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C;SACd;KACF,CAAC;CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,KAAqB,EAAE,MAAc,EAAkB,EAAE,CAAC,CAAC;IAC7F,GAAG,KAAK;IACR,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,MAAM,CAAC;IACvD,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,IAAI,CAAC,EAAE,KAAK,MAAM,CAAC;CAChF,CAAC,CAAC"}
@@ -0,0 +1,80 @@
1
+ import type { Edge, Node } from "@xyflow/react";
2
+ import type { HeatmapData } from "./heatmap.js";
3
+ import type { BlueprintGraph, ContractCheck, ExecutionArtifact, ExecutionStep, ExecutionStepKind, ExecutionStepStatus, GhostNode, RuntimeExecutionResult, RuntimeTestCase, RuntimeTestResult, ExecutionSummary, TraceStatus } from "@abhinav2203/codeflow-core/schema";
4
+ export type NodeHealthState = "neutral" | "aligned" | "drift" | "heal" | "ghost";
5
+ export type FlowExecutionStatus = ExecutionStepStatus | "idle";
6
+ export type FlowExecutionState = {
7
+ status: FlowExecutionStatus;
8
+ source: "direct" | "aggregated" | "inferred" | "fallback";
9
+ kind?: ExecutionStepKind;
10
+ stepId?: string;
11
+ runId?: string;
12
+ message?: string;
13
+ durationMs?: number;
14
+ blockedByStepId?: string;
15
+ inputPreview?: string;
16
+ outputPreview?: string;
17
+ stdout?: string;
18
+ stderr?: string;
19
+ artifactIds?: string[];
20
+ contractChecks?: ContractCheck[];
21
+ childStepIds?: string[];
22
+ stepCount?: number;
23
+ };
24
+ export type FlowExecutionIndex = {
25
+ runId?: string;
26
+ entryNodeId?: string;
27
+ summary?: ExecutionSummary;
28
+ stepsById: Record<string, ExecutionStep>;
29
+ stepsByNodeId: Record<string, ExecutionStep[]>;
30
+ stepsByEdgeId: Record<string, ExecutionStep[]>;
31
+ testCasesByNodeId: Record<string, RuntimeTestCase[]>;
32
+ testResultsByNodeId: Record<string, RuntimeTestResult[]>;
33
+ artifactsById: Record<string, ExecutionArtifact>;
34
+ };
35
+ export type FlowExecutionProjection = {
36
+ index: FlowExecutionIndex;
37
+ nodeStates: Record<string, FlowExecutionState>;
38
+ edgeStates: Record<string, FlowExecutionState>;
39
+ };
40
+ export type FlowNodeData = {
41
+ label: string;
42
+ summary: string;
43
+ kind: string;
44
+ traceStatus: TraceStatus;
45
+ healthState: NodeHealthState;
46
+ selected: boolean;
47
+ isActiveBatch: boolean;
48
+ isGhost: boolean;
49
+ drilldownNodeId?: string;
50
+ ghost?: boolean;
51
+ ghostReason?: string;
52
+ execution?: FlowExecutionState;
53
+ };
54
+ export type InspectorSection = {
55
+ title: string;
56
+ items: string[];
57
+ };
58
+ export type DetailFlowItem = {
59
+ id: string;
60
+ label: string;
61
+ summary: string;
62
+ kind: string;
63
+ signature?: string;
64
+ path?: string;
65
+ drilldownNodeId?: string;
66
+ execution?: FlowExecutionState;
67
+ sections: InspectorSection[];
68
+ };
69
+ export type DetailFlowGraph = {
70
+ items: DetailFlowItem[];
71
+ nodes: Array<Node<FlowNodeData>>;
72
+ edges: Edge[];
73
+ };
74
+ export declare const indexRuntimeExecutionResult: (result?: RuntimeExecutionResult | null) => FlowExecutionIndex | null;
75
+ export declare const buildExecutionProjection: (graph: BlueprintGraph, executionResult?: RuntimeExecutionResult | null) => FlowExecutionProjection | null;
76
+ export declare const buildFlowNodes: (graph: BlueprintGraph, selectedNodeId?: string, heatmapData?: HeatmapData, activeNodeIds?: string[], driftedNodeIds?: string[], executionResult?: RuntimeExecutionResult | null) => Array<Node<FlowNodeData>>;
77
+ export declare const buildFlowEdges: (graph: BlueprintGraph, activeNodeIds?: string[], executionResult?: RuntimeExecutionResult | null) => Edge[];
78
+ export declare const buildGhostFlowNodes: (ghostNodes: GhostNode[], existingNodes: Array<Node<FlowNodeData>>) => Array<Node<FlowNodeData>>;
79
+ export declare const buildDetailFlow: (graph: BlueprintGraph, rootNodeId: string, selectedItemId?: string, executionResult?: RuntimeExecutionResult | null) => DetailFlowGraph | null;
80
+ //# sourceMappingURL=flow-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flow-view.d.ts","sourceRoot":"","sources":["../../src/lib/flow-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EACV,cAAc,EAEd,aAAa,EAEb,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,SAAS,EAET,sBAAsB,EACtB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACZ,MAAM,mCAAmC,CAAC;AAG3C,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AAEjF,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG,MAAM,CAAC;AAE/D,MAAM,MAAM,kBAAkB,GAAG;IAC/B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,QAAQ,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC;IAC1D,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CA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