@forgecharts/sdk 1.2.1 → 1.2.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/dist/api/DrawingManager.d.ts +1 -1
- package/dist/api/DrawingManager.d.ts.map +1 -1
- package/dist/api/LayoutManager.d.ts +2 -1
- package/dist/api/LayoutManager.d.ts.map +1 -1
- package/dist/api/ReferenceAPI.d.ts +5 -0
- package/dist/api/ReferenceAPI.d.ts.map +1 -1
- package/dist/api/TChart.d.ts +40 -0
- package/dist/api/TChart.d.ts.map +1 -1
- package/dist/api/drawing tools/fib gann menu/fibChannel.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/fibChannel.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/fibCircles.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/fibCircles.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/fibRetracement.d.ts.map +1 -1
- package/dist/api/drawing tools/fib gann menu/fibSpeedResistanceArcs.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/fibSpeedResistanceArcs.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/fibSpeedResistanceFan.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/fibSpeedResistanceFan.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/fibSpiral.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/fibSpiral.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/fibTimeZone.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/fibTimeZone.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/fibWedge.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/fibWedge.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/gannBox.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/gannBox.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/gannFan.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/gannFan.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/gannSquare.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/gannSquare.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/gannSquareFixed.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/gannSquareFixed.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/pitchfan.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/pitchfan.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/trendBasedFibExtension.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/trendBasedFibExtension.d.ts.map +1 -0
- package/dist/api/drawing tools/fib gann menu/trendBasedFibTime.d.ts +4 -0
- package/dist/api/drawing tools/fib gann menu/trendBasedFibTime.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/anchoredText.d.ts +7 -0
- package/dist/api/drawing tools/shapes menu/anchoredText.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/arc.d.ts +8 -0
- package/dist/api/drawing tools/shapes menu/arc.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/arrow.d.ts +4 -0
- package/dist/api/drawing tools/shapes menu/arrow.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/arrowDown.d.ts +7 -0
- package/dist/api/drawing tools/shapes menu/arrowDown.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/arrowUp.d.ts +7 -0
- package/dist/api/drawing tools/shapes menu/arrowUp.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/callout.d.ts +7 -0
- package/dist/api/drawing tools/shapes menu/callout.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/dateRange.d.ts +4 -0
- package/dist/api/drawing tools/shapes menu/dateRange.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/ellipse.d.ts +4 -0
- package/dist/api/drawing tools/shapes menu/ellipse.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/longPosition.d.ts +4 -0
- package/dist/api/drawing tools/shapes menu/longPosition.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/priceLabel.d.ts +7 -0
- package/dist/api/drawing tools/shapes menu/priceLabel.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/priceRange.d.ts +4 -0
- package/dist/api/drawing tools/shapes menu/priceRange.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/shortPosition.d.ts +4 -0
- package/dist/api/drawing tools/shapes menu/shortPosition.d.ts.map +1 -0
- package/dist/api/drawing tools/shapes menu/triangle.d.ts +4 -0
- package/dist/api/drawing tools/shapes menu/triangle.d.ts.map +1 -0
- package/dist/core/Chart.d.ts +21 -2
- package/dist/core/Chart.d.ts.map +1 -1
- package/dist/core/CoordTransform.d.ts.map +1 -1
- package/dist/core/Crosshair.d.ts +2 -0
- package/dist/core/Crosshair.d.ts.map +1 -1
- package/dist/core/InteractionManager.d.ts +36 -2
- package/dist/core/InteractionManager.d.ts.map +1 -1
- package/dist/core/PriceScale.d.ts +2 -0
- package/dist/core/PriceScale.d.ts.map +1 -1
- package/dist/core/TimeScale.d.ts +52 -1
- package/dist/core/TimeScale.d.ts.map +1 -1
- package/dist/datafeed/DatafeedConnector.d.ts +4 -0
- package/dist/datafeed/DatafeedConnector.d.ts.map +1 -1
- package/dist/forgecharts.css +1938 -111
- package/dist/forgescript/ast.d.ts +71 -4
- package/dist/forgescript/ast.d.ts.map +1 -1
- package/dist/forgescript/builtins/collections.d.ts +56 -0
- package/dist/forgescript/builtins/collections.d.ts.map +1 -0
- package/dist/forgescript/builtins/drawing.d.ts +57 -0
- package/dist/forgescript/builtins/drawing.d.ts.map +1 -0
- package/dist/forgescript/builtins/udt.d.ts +30 -0
- package/dist/forgescript/builtins/udt.d.ts.map +1 -0
- package/dist/forgescript/conversion/index.d.ts +16 -9
- package/dist/forgescript/conversion/index.d.ts.map +1 -1
- package/dist/forgescript/conversion/types.d.ts +10 -54
- package/dist/forgescript/conversion/types.d.ts.map +1 -1
- package/dist/forgescript/conversion/validation.d.ts.map +1 -1
- package/dist/forgescript/datasets/DatasetStore.d.ts +65 -0
- package/dist/forgescript/datasets/DatasetStore.d.ts.map +1 -0
- package/dist/forgescript/datasets/parseDataset.d.ts +32 -0
- package/dist/forgescript/datasets/parseDataset.d.ts.map +1 -0
- package/dist/forgescript/parser.d.ts +19 -1
- package/dist/forgescript/parser.d.ts.map +1 -1
- package/dist/forgescript/runtime.d.ts +119 -104
- package/dist/forgescript/runtime.d.ts.map +1 -1
- package/dist/index.d.ts +3 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12034 -6683
- package/dist/index.js.map +1 -1
- package/dist/internal.d.ts +2 -0
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.js +13494 -8884
- package/dist/internal.js.map +1 -1
- package/dist/licensing/licenseTypes.d.ts +1 -0
- package/dist/licensing/licenseTypes.d.ts.map +1 -1
- package/dist/pixi/PixiBenchmark.d.ts +56 -0
- package/dist/pixi/PixiBenchmark.d.ts.map +1 -0
- package/dist/pixi/PixiCandlestickRenderer.d.ts +5 -6
- package/dist/pixi/PixiCandlestickRenderer.d.ts.map +1 -1
- package/dist/pixi/PixiChart.d.ts +100 -2
- package/dist/pixi/PixiChart.d.ts.map +1 -1
- package/dist/pixi/PixiCrosshairRenderer.d.ts +10 -0
- package/dist/pixi/PixiCrosshairRenderer.d.ts.map +1 -1
- package/dist/pixi/PixiDrawingRenderer.d.ts +17 -5
- package/dist/pixi/PixiDrawingRenderer.d.ts.map +1 -1
- package/dist/pixi/PixiGridRenderer.d.ts +16 -2
- package/dist/pixi/PixiGridRenderer.d.ts.map +1 -1
- package/dist/pixi/PixiHistogramRenderer.d.ts +17 -0
- package/dist/pixi/PixiHistogramRenderer.d.ts.map +1 -0
- package/dist/pixi/PixiIndicatorRenderer.d.ts +31 -0
- package/dist/pixi/PixiIndicatorRenderer.d.ts.map +1 -0
- package/dist/pixi/PixiLastPriceRenderer.d.ts +33 -0
- package/dist/pixi/PixiLastPriceRenderer.d.ts.map +1 -0
- package/dist/pixi/PixiLayerManager.d.ts.map +1 -1
- package/dist/pixi/PixiLineRenderer.d.ts +19 -0
- package/dist/pixi/PixiLineRenderer.d.ts.map +1 -0
- package/dist/pixi/PixiTradingRenderer.d.ts +46 -0
- package/dist/pixi/PixiTradingRenderer.d.ts.map +1 -0
- package/dist/react/agent/AgentFAB.d.ts +20 -0
- package/dist/react/agent/AgentFAB.d.ts.map +1 -0
- package/dist/react/agent/AgentProvider.d.ts +15 -0
- package/dist/react/agent/AgentProvider.d.ts.map +1 -0
- package/dist/react/agent/AgentUIBus.d.ts +111 -0
- package/dist/react/agent/AgentUIBus.d.ts.map +1 -0
- package/dist/react/agent/AssistantPanel.d.ts +12 -0
- package/dist/react/agent/AssistantPanel.d.ts.map +1 -0
- package/dist/react/agent/CommandDispatcher.d.ts +77 -0
- package/dist/react/agent/CommandDispatcher.d.ts.map +1 -0
- package/dist/react/agent/VoiceInput.d.ts +36 -0
- package/dist/react/agent/VoiceInput.d.ts.map +1 -0
- package/dist/react/agent/index.d.ts +18 -0
- package/dist/react/agent/index.d.ts.map +1 -0
- package/dist/react/agent/useAgent.d.ts +81 -0
- package/dist/react/agent/useAgent.d.ts.map +1 -0
- package/dist/react/canvas/ChartCanvas.d.ts +45 -0
- package/dist/react/canvas/ChartCanvas.d.ts.map +1 -1
- package/dist/react/canvas/ChartSettingsDialog.d.ts +80 -2
- package/dist/react/canvas/ChartSettingsDialog.d.ts.map +1 -1
- package/dist/react/canvas/ContractSwitchDialog.d.ts +22 -0
- package/dist/react/canvas/ContractSwitchDialog.d.ts.map +1 -0
- package/dist/react/canvas/DrawingPropertiesDialog.d.ts +23 -0
- package/dist/react/canvas/DrawingPropertiesDialog.d.ts.map +1 -0
- package/dist/react/canvas/IndicatorPane.d.ts.map +1 -1
- package/dist/react/canvas/PointerOverlay.d.ts +6 -3
- package/dist/react/canvas/PointerOverlay.d.ts.map +1 -1
- package/dist/react/canvas/PositionPropertiesDialog.d.ts +22 -0
- package/dist/react/canvas/PositionPropertiesDialog.d.ts.map +1 -0
- package/dist/react/canvas/toolbars/LeftToolbar.d.ts +6 -1
- package/dist/react/canvas/toolbars/LeftToolbar.d.ts.map +1 -1
- package/dist/react/hooks/useBrokerEvents.d.ts +9 -0
- package/dist/react/hooks/useBrokerEvents.d.ts.map +1 -1
- package/dist/react/hooks/usePanelDrag.d.ts +2 -0
- package/dist/react/hooks/usePanelDrag.d.ts.map +1 -0
- package/dist/react/index.d.ts +3 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +16158 -4468
- package/dist/react/index.js.map +1 -1
- package/dist/react/internal.js +23373 -10757
- package/dist/react/internal.js.map +1 -1
- package/dist/react/shell/DatasetImportPanel.d.ts +2 -0
- package/dist/react/shell/DatasetImportPanel.d.ts.map +1 -0
- package/dist/react/shell/DatasetManagerDrawer.d.ts +10 -0
- package/dist/react/shell/DatasetManagerDrawer.d.ts.map +1 -0
- package/dist/react/shell/DocsEditor.d.ts +10 -0
- package/dist/react/shell/DocsEditor.d.ts.map +1 -0
- package/dist/react/shell/ManagedAppShell.d.ts +27 -0
- package/dist/react/shell/ManagedAppShell.d.ts.map +1 -1
- package/dist/react/shell/OrderEntryPanel.d.ts +6 -1
- package/dist/react/shell/OrderEntryPanel.d.ts.map +1 -1
- package/dist/react/shell/ScriptDrawer.d.ts.map +1 -1
- package/dist/react/shell/ScriptSettings.d.ts +20 -0
- package/dist/react/shell/ScriptSettings.d.ts.map +1 -0
- package/dist/react/shell/TradeDrawer.d.ts.map +1 -1
- package/dist/react/shell/WatchlistDrawer.d.ts.map +1 -1
- package/dist/react/workspace/BottomTradingPanel.d.ts +75 -0
- package/dist/react/workspace/BottomTradingPanel.d.ts.map +1 -0
- package/dist/react/workspace/ChartWorkspace.d.ts +35 -1
- package/dist/react/workspace/ChartWorkspace.d.ts.map +1 -1
- package/dist/react/workspace/IndicatorsDialog.d.ts +5 -1
- package/dist/react/workspace/IndicatorsDialog.d.ts.map +1 -1
- package/dist/react/workspace/SymbolSearchDialog.d.ts.map +1 -1
- package/dist/react/workspace/toolbars/BottomToolbar.d.ts +3 -1
- package/dist/react/workspace/toolbars/BottomToolbar.d.ts.map +1 -1
- package/dist/react/workspace/toolbars/RightToolbar.d.ts +5 -1
- package/dist/react/workspace/toolbars/RightToolbar.d.ts.map +1 -1
- package/dist/react/workspace/toolbars/TopToolbar.d.ts +20 -1
- package/dist/react/workspace/toolbars/TopToolbar.d.ts.map +1 -1
- package/dist/renderers/CandlestickRenderer.d.ts.map +1 -1
- package/dist/theme/colors.d.ts.map +1 -1
- package/dist/trading/UnmanagedIngestion.d.ts +39 -12
- package/dist/trading/UnmanagedIngestion.d.ts.map +1 -1
- package/dist/trading/tradingTypes.d.ts +11 -2
- package/dist/trading/tradingTypes.d.ts.map +1 -1
- package/dist/types/ChartBackend.d.ts +61 -0
- package/dist/types/ChartBackend.d.ts.map +1 -0
- package/package.json +2 -2
- package/dist/forgescript/__tests__/ai-response-parser.test.d.ts +0 -2
- package/dist/forgescript/__tests__/ai-response-parser.test.d.ts.map +0 -1
- package/dist/forgescript/__tests__/orchestrator.test.d.ts +0 -2
- package/dist/forgescript/__tests__/orchestrator.test.d.ts.map +0 -1
- package/dist/forgescript/__tests__/pine-transpiler.test.d.ts +0 -2
- package/dist/forgescript/__tests__/pine-transpiler.test.d.ts.map +0 -1
- package/dist/forgescript/conversion/ai-conversion-agent.d.ts +0 -41
- package/dist/forgescript/conversion/ai-conversion-agent.d.ts.map +0 -1
- package/dist/forgescript/conversion/conversion-orchestrator.d.ts +0 -44
- package/dist/forgescript/conversion/conversion-orchestrator.d.ts.map +0 -1
- package/dist/forgescript/conversion/prompts/index.d.ts +0 -17
- package/dist/forgescript/conversion/prompts/index.d.ts.map +0 -1
- package/dist/forgescript/pine/PineCompiler.d.ts +0 -38
- package/dist/forgescript/pine/PineCompiler.d.ts.map +0 -1
- package/dist/forgescript/pine/diagnostics.d.ts +0 -20
- package/dist/forgescript/pine/diagnostics.d.ts.map +0 -1
- package/dist/forgescript/pine/index.d.ts +0 -8
- package/dist/forgescript/pine/index.d.ts.map +0 -1
- package/dist/forgescript/pine/pine-ast.d.ts +0 -190
- package/dist/forgescript/pine/pine-ast.d.ts.map +0 -1
- package/dist/forgescript/pine/pine-lexer.d.ts +0 -41
- package/dist/forgescript/pine/pine-lexer.d.ts.map +0 -1
- package/dist/forgescript/pine/pine-parser.d.ts +0 -108
- package/dist/forgescript/pine/pine-parser.d.ts.map +0 -1
- package/dist/forgescript/pine/pine-transpiler.d.ts +0 -40
- package/dist/forgescript/pine/pine-transpiler.d.ts.map +0 -1
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Grammar (simplified):
|
|
5
5
|
* program → stmt*
|
|
6
|
-
* stmt → indicator_decl | var_decl | assign | reassign | for | while | if | expr_stmt
|
|
6
|
+
* stmt → indicator_decl | var_decl | assign | reassign | for | while | if | try | type_decl | import_stmt | expr_stmt
|
|
7
7
|
* var_decl → ('var' | 'varip') IDENT '=' expr
|
|
8
8
|
* assign → IDENT '=' expr
|
|
9
9
|
* reassign → IDENT ':=' expr
|
|
10
10
|
* for → 'for' IDENT '=' expr 'to' expr ('by' expr)? NEWLINE block
|
|
11
11
|
* indicator → 'indicator' '(' STRING (',' namedArgs)* ')'
|
|
12
|
+
* try → 'try' NEWLINE block 'catch' IDENT NEWLINE block
|
|
13
|
+
* type_decl → 'type' IDENT NEWLINE INDENT (IDENT IDENT NEWLINE)+ DEDENT
|
|
14
|
+
* import_stmt → 'import' STRING ('as' IDENT)?
|
|
12
15
|
* expr → ternary
|
|
13
16
|
* ternary → or ('?' expr ':' expr)?
|
|
14
17
|
* or → and ('or' and)*
|
|
@@ -18,9 +21,10 @@
|
|
|
18
21
|
* addition → multiplication (('+' | '-') multiplication)*
|
|
19
22
|
* multiplication→ unary (('*' | '/' | '%') unary)*
|
|
20
23
|
* unary → '-' unary | primary
|
|
21
|
-
* primary → NUMBER | STRING | BOOL | COLOR | IDENT ('[' expr ']')? | ns_call | call | '(' expr ')'
|
|
24
|
+
* primary → NUMBER | STRING | BOOL | COLOR | IDENT ('[' expr ']')? | ns_call | call | '(' expr ')' | object_lit
|
|
22
25
|
* ns_call → IDENT '.' IDENT '(' args ')'
|
|
23
26
|
* call → IDENT '(' args (',' IDENT '=' expr)* ')'
|
|
27
|
+
* object_lit → IDENT '{' (IDENT ':' expr (',' IDENT ':' expr)*)? '}'
|
|
24
28
|
*/
|
|
25
29
|
export type NumberLit = {
|
|
26
30
|
kind: 'NumberLit';
|
|
@@ -90,7 +94,17 @@ export type LogicalExpr = {
|
|
|
90
94
|
left: Expr;
|
|
91
95
|
right: Expr;
|
|
92
96
|
};
|
|
93
|
-
export type
|
|
97
|
+
export type ArrayLit = {
|
|
98
|
+
kind: 'ArrayLit';
|
|
99
|
+
elements: Expr[];
|
|
100
|
+
};
|
|
101
|
+
/** Object/UDT instantiation: MyType.new(field1=val, ...) — parsed as NsCallExpr with fn='new' */
|
|
102
|
+
export type ObjectLit = {
|
|
103
|
+
kind: 'ObjectLit';
|
|
104
|
+
typeName: string;
|
|
105
|
+
fields: Map<string, Expr>;
|
|
106
|
+
};
|
|
107
|
+
export type Expr = NumberLit | StringLit | BoolLit | ColorLit | Identifier | IndexExpr | CallExpr | NsCallExpr | MemberExpr | BinaryExpr | UnaryExpr | TernaryExpr | LogicalExpr | ArrayLit | ObjectLit;
|
|
94
108
|
export type IndicatorDecl = {
|
|
95
109
|
kind: 'IndicatorDecl';
|
|
96
110
|
title: string;
|
|
@@ -145,7 +159,60 @@ export type FnDeclStmt = {
|
|
|
145
159
|
params: string[];
|
|
146
160
|
body: Stmt[];
|
|
147
161
|
};
|
|
148
|
-
|
|
162
|
+
/** for x in array — iterate over TArray elements */
|
|
163
|
+
export type ForInStmt = {
|
|
164
|
+
kind: 'ForInStmt';
|
|
165
|
+
name: string;
|
|
166
|
+
iterable: Expr;
|
|
167
|
+
body: Stmt[];
|
|
168
|
+
};
|
|
169
|
+
/** break — exit the nearest enclosing loop */
|
|
170
|
+
export type BreakStmt = {
|
|
171
|
+
kind: 'BreakStmt';
|
|
172
|
+
};
|
|
173
|
+
/** continue — skip to next iteration of the nearest enclosing loop */
|
|
174
|
+
export type ContinueStmt = {
|
|
175
|
+
kind: 'ContinueStmt';
|
|
176
|
+
};
|
|
177
|
+
/**
|
|
178
|
+
* try / catch — graceful error handling.
|
|
179
|
+
* try
|
|
180
|
+
* <body>
|
|
181
|
+
* catch <errorVar>
|
|
182
|
+
* <handler>
|
|
183
|
+
*/
|
|
184
|
+
export type TryCatchStmt = {
|
|
185
|
+
kind: 'TryCatchStmt';
|
|
186
|
+
body: Stmt[];
|
|
187
|
+
errorVar: string;
|
|
188
|
+
handler: Stmt[];
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* User-Defined Type declaration:
|
|
192
|
+
* type MyType
|
|
193
|
+
* float price = 0
|
|
194
|
+
* int count = 0
|
|
195
|
+
* bool active = false
|
|
196
|
+
*/
|
|
197
|
+
export type TypeDeclStmt = {
|
|
198
|
+
kind: 'TypeDeclStmt';
|
|
199
|
+
name: string;
|
|
200
|
+
fields: Array<{
|
|
201
|
+
name: string;
|
|
202
|
+
typeName: string;
|
|
203
|
+
defaultValue: Expr;
|
|
204
|
+
}>;
|
|
205
|
+
};
|
|
206
|
+
/**
|
|
207
|
+
* import "library-name" [as alias]
|
|
208
|
+
* Loads a named built-in library into scope.
|
|
209
|
+
*/
|
|
210
|
+
export type ImportStmt = {
|
|
211
|
+
kind: 'ImportStmt';
|
|
212
|
+
path: string;
|
|
213
|
+
alias: string | null;
|
|
214
|
+
};
|
|
215
|
+
export type Stmt = IndicatorDecl | VarDeclStmt | AssignStmt | ReassignStmt | ExprStmt | IfStmt | WhileStmt | ForStmt | FnDeclStmt | ForInStmt | BreakStmt | ContinueStmt | TryCatchStmt | TypeDeclStmt | ImportStmt;
|
|
149
216
|
export type Program = {
|
|
150
217
|
kind: 'Program';
|
|
151
218
|
stmts: Stmt[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/forgescript/ast.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ast.d.ts","sourceRoot":"","sources":["../../src/forgescript/ast.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAIH,MAAM,MAAM,SAAS,GAAI;IAAE,IAAI,EAAE,WAAW,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAC/D,MAAM,MAAM,SAAS,GAAI;IAAE,IAAI,EAAE,WAAW,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAC/D,MAAM,MAAM,OAAO,GAAM;IAAE,IAAI,EAAE,SAAS,CAAC;IAAI,KAAK,EAAE,OAAO,CAAA;CAAE,CAAC;AAChE,MAAM,MAAM,QAAQ,GAAK;IAAE,IAAI,EAAE,UAAU,CAAC;IAAG,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAC/D,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAI9D,MAAM,MAAM,SAAS,GAAG;IACtB,IAAI,EAAI,WAAW,CAAC;IACpB,MAAM,EAAE,IAAI,CAAC;IACb,KAAK,EAAG,IAAI,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAO,UAAU,CAAC;IACtB,MAAM,EAAK,MAAM,CAAC;IAClB,IAAI,EAAO,IAAI,EAAE,CAAC;IAClB,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;CAC9B,CAAC;AAEF,+EAA+E;AAC/E,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAO,YAAY,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;I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M,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CACvE,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAG,YAAY,CAAC;IACpB,IAAI,EAAG,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,IAAI,GACZ,aAAa,GACb,WAAW,GACX,UAAU,GACV,YAAY,GACZ,QAAQ,GACR,MAAM,GACN,SAAS,GACT,OAAO,GACP,UAAU,GACV,SAAS,GACT,SAAS,GACT,YAAY,GACZ,YAAY,GACZ,YAAY,GACZ,UAAU,CAAC;AAEf,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAG,SAAS,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;CACf,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ForgeScript Collections — TMap and TMatrix runtime types.
|
|
3
|
+
*
|
|
4
|
+
* TMap — associative key→value store (map.* namespace)
|
|
5
|
+
* TMatrix — 2-D numeric grid (matrix.* namespace)
|
|
6
|
+
*/
|
|
7
|
+
import type { TValue } from '../runtime';
|
|
8
|
+
export declare class TMap {
|
|
9
|
+
readonly _data: Map<TValue, TValue>;
|
|
10
|
+
constructor();
|
|
11
|
+
put(key: TValue, value: TValue): void;
|
|
12
|
+
get(key: TValue): TValue;
|
|
13
|
+
remove(key: TValue): TValue;
|
|
14
|
+
contains(key: TValue): boolean;
|
|
15
|
+
size(): number;
|
|
16
|
+
clear(): void;
|
|
17
|
+
keys(): TValue[];
|
|
18
|
+
values(): TValue[];
|
|
19
|
+
}
|
|
20
|
+
export declare class TMatrix {
|
|
21
|
+
private _rows;
|
|
22
|
+
private _cols;
|
|
23
|
+
private _data;
|
|
24
|
+
constructor(rows: number, cols: number, fillValue?: number);
|
|
25
|
+
rows(): number;
|
|
26
|
+
cols(): number;
|
|
27
|
+
get(row: number, col: number): number;
|
|
28
|
+
set(row: number, col: number, value: number): void;
|
|
29
|
+
/** Add a row at the end, optionally filled with a value. */
|
|
30
|
+
addRow(fillValue?: number): void;
|
|
31
|
+
/** Add a column at the end, optionally filled with a value. */
|
|
32
|
+
addCol(fillValue?: number): void;
|
|
33
|
+
/** Remove the last row. */
|
|
34
|
+
removeRow(): void;
|
|
35
|
+
/** Remove the last column. */
|
|
36
|
+
removeCol(): void;
|
|
37
|
+
/** Swap two rows in-place. */
|
|
38
|
+
swapRows(r1: number, r2: number): void;
|
|
39
|
+
/** Swap two columns in-place. */
|
|
40
|
+
swapCols(c1: number, c2: number): void;
|
|
41
|
+
/** Transpose (returns a new matrix). */
|
|
42
|
+
transpose(): TMatrix;
|
|
43
|
+
/** Element-wise sum of all values. */
|
|
44
|
+
sum(): number;
|
|
45
|
+
/** Average of all values. */
|
|
46
|
+
avg(): number;
|
|
47
|
+
/** Min of all values. */
|
|
48
|
+
min(): number;
|
|
49
|
+
/** Max of all values. */
|
|
50
|
+
max(): number;
|
|
51
|
+
/** Return a copy. */
|
|
52
|
+
copy(): TMatrix;
|
|
53
|
+
/** Fill all cells with a value. */
|
|
54
|
+
fill(value: number): void;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=collections.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collections.d.ts","sourceRoot":"","sources":["../../../src/forgescript/builtins/collections.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIzC,qBAAa,IAAI;IACf,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;IAMpC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAIrC,GAAG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ACrB,IAAI,IAAI,OAAO;IAMf,mCAAmC;IACnC,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAG1B"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ForgeScript Drawing Objects — line, label, box
|
|
3
|
+
*
|
|
4
|
+
* These are dynamically created chart objects that persist across bars and
|
|
5
|
+
* are rendered as canvas overlays by the chart renderer.
|
|
6
|
+
*/
|
|
7
|
+
export interface DrawingLine {
|
|
8
|
+
kind: 'line';
|
|
9
|
+
id: string;
|
|
10
|
+
x1: number;
|
|
11
|
+
y1: number;
|
|
12
|
+
x2: number;
|
|
13
|
+
y2: number;
|
|
14
|
+
xloc: string;
|
|
15
|
+
extend: string;
|
|
16
|
+
color: string;
|
|
17
|
+
style: string;
|
|
18
|
+
width: number;
|
|
19
|
+
deleted: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface DrawingLabel {
|
|
22
|
+
kind: 'label';
|
|
23
|
+
id: string;
|
|
24
|
+
x: number;
|
|
25
|
+
y: number;
|
|
26
|
+
xloc: string;
|
|
27
|
+
yloc: string;
|
|
28
|
+
text: string;
|
|
29
|
+
style: string;
|
|
30
|
+
color: string;
|
|
31
|
+
textColor: string;
|
|
32
|
+
size: string;
|
|
33
|
+
tooltip: string;
|
|
34
|
+
deleted: boolean;
|
|
35
|
+
}
|
|
36
|
+
export interface DrawingBox {
|
|
37
|
+
kind: 'box';
|
|
38
|
+
id: string;
|
|
39
|
+
left: number;
|
|
40
|
+
top: number;
|
|
41
|
+
right: number;
|
|
42
|
+
bottom: number;
|
|
43
|
+
xloc: string;
|
|
44
|
+
borderColor: string;
|
|
45
|
+
borderWidth: number;
|
|
46
|
+
borderStyle: string;
|
|
47
|
+
bgColor: string;
|
|
48
|
+
extend: string;
|
|
49
|
+
textStr: string;
|
|
50
|
+
textColor: string;
|
|
51
|
+
textSize: string;
|
|
52
|
+
textHAlign: string;
|
|
53
|
+
textVAlign: string;
|
|
54
|
+
deleted: boolean;
|
|
55
|
+
}
|
|
56
|
+
export type DrawingObject = DrawingLine | DrawingLabel | DrawingBox;
|
|
57
|
+
//# sourceMappingURL=drawing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drawing.d.ts","sourceRoot":"","sources":["../../../src/forgescript/builtins/drawing.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAO,MAAM,CAAC;IAClB,EAAE,EAAS,MAAM,CAAC;IAClB,EAAE,EAAS,MAAM,CAAC;IAClB,EAAE,EAAS,MAAM,CAAC;IAClB,EAAE,EAAS,MAAM,CAAC;IAClB,EAAE,EAAS,MAAM,CAAC;IAClB,IAAI,EAAO,MAAM,CAAC;IAClB,MAAM,EAAK,MAAM,CAAC;IAClB,KAAK,EAAM,MAAM,CAAC;IAClB,KAAK,EAAM,MAAM,CAAC;IAClB,KAAK,EAAM,MAAM,CAAC;IAClB,OAAO,EAAI,OAAO,CAAC;CACpB;AAID,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAO,OAAO,CAAC;IACnB,EAAE,EAAS,MAAM,CAAC;IAClB,CAAC,EAAU,MAAM,CAAC;IAClB,CAAC,EAAU,MAAM,CAAC;IAClB,IAAI,EAAO,MAAM,CAAC;IAClB,IAAI,EAAO,MAAM,CAAC;IAClB,IAAI,EAAO,MAAM,CAAC;IAClB,KAAK,EAAM,MAAM,CAAC;IAClB,KAAK,EAAM,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAO,MAAM,CAAC;IAClB,OAAO,EAAI,MAAM,CAAC;IAClB,OAAO,EAAI,OAAO,CAAC;CACpB;AAID,MAAM,WAAW,UAAU;IACzB,IAAI,EAAS,KAAK,CAAC;IACnB,EAAE,EAAW,MAAM,CAAC;IACpB,IAAI,EAAS,MAAM,CAAC;IACpB,GAAG,EAAU,MAAM,CAAC;IACpB,KAAK,EAAQ,MAAM,CAAC;IACpB,MAAM,EAAO,MAAM,CAAC;IACpB,IAAI,EAAS,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAM,MAAM,CAAC;IACpB,MAAM,EAAO,MAAM,CAAC;IACpB,OAAO,EAAM,MAAM,CAAC;IACpB,SAAS,EAAI,MAAM,CAAC;IACpB,QAAQ,EAAK,MAAM,CAAC;IACpB,UAAU,EAAG,MAAM,CAAC;IACpB,UAAU,EAAG,MAAM,CAAC;IACpB,OAAO,EAAM,OAAO,CAAC;CACtB;AAED,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,YAAY,GAAG,UAAU,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ForgeScript User-Defined Types (UDTs)
|
|
3
|
+
*
|
|
4
|
+
* A UDT instance is a simple record of named fields.
|
|
5
|
+
* Methods are stored as user-defined functions in the runtime scope and
|
|
6
|
+
* invoked as `MyType.method(instance, ...)`.
|
|
7
|
+
*/
|
|
8
|
+
import type { TValue } from '../runtime';
|
|
9
|
+
/** A UDT field descriptor (from the type declaration). */
|
|
10
|
+
export interface UDTFieldDef {
|
|
11
|
+
name: string;
|
|
12
|
+
typeName: string;
|
|
13
|
+
defaultValue: TValue;
|
|
14
|
+
}
|
|
15
|
+
/** A UDT type descriptor (registered when a `type` declaration is executed). */
|
|
16
|
+
export interface UDTTypeDef {
|
|
17
|
+
name: string;
|
|
18
|
+
fields: UDTFieldDef[];
|
|
19
|
+
}
|
|
20
|
+
/** A live UDT instance — holds field values. */
|
|
21
|
+
export declare class TUDTInstance {
|
|
22
|
+
readonly typeName: string;
|
|
23
|
+
readonly fields: Map<string, TValue>;
|
|
24
|
+
constructor(typeName: string, fields: Map<string, TValue>);
|
|
25
|
+
get(field: string): TValue;
|
|
26
|
+
set(field: string, value: TValue): void;
|
|
27
|
+
/** Return a shallow copy of this instance. */
|
|
28
|
+
copy(): TUDTInstance;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=udt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"udt.d.ts","sourceRoot":"","sources":["../../../src/forgescript/builtins/udt.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEzC,0DAA0D;AAC1D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAS,MAAM,CAAC;IACpB,QAAQ,EAAK,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,gFAAgF;AAChF,MAAM,WAAW,UAAU;IACzB,IAAI,EAAI,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,EAAE,CAAC;CACvB;AAED,gDAAgD;AAChD,qBAAa,YAAY;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAE3B,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;IAKzD,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IAO1B,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAOvC,8CAA8C;IAC9C,IAAI,IAAI,YAAY;CAGrB"}
|
|
@@ -1,19 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* ForgeScript Conversion Utilities — public API.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* The AI conversion pipeline (OpenAI) has been removed as part of the
|
|
5
|
+
* Claude agent migration (see AGENT_INTEGRATION_DESIGN.md §12).
|
|
6
|
+
*
|
|
7
|
+
* Retained modules:
|
|
8
|
+
* - validation — ForgeScript syntax & runtime validation
|
|
9
|
+
* - sandbox — isolated script execution for testing
|
|
10
|
+
* - save-gate — pre-save safety checks
|
|
11
|
+
* - language-detector — heuristic source language identification
|
|
12
|
+
* - telemetry — conversion event tracking
|
|
13
|
+
*
|
|
14
|
+
* Removed modules (gutted, pending physical deletion):
|
|
15
|
+
* - conversion-orchestrator — replaced by agent chat
|
|
16
|
+
* - ai-conversion-agent — replaced by Claude via /agent/chat
|
|
17
|
+
* - prompts — migrated to apps/api/src/agent/knowledge.ts
|
|
6
18
|
*/
|
|
7
|
-
export type { SourceLanguage, Confidence, LanguageDetectionResult,
|
|
19
|
+
export type { SourceLanguage, Confidence, LanguageDetectionResult, ConversionWarning, ValidationIssue, ValidationResult, SandboxResult, SaveGateCheck, ConversionTelemetryEvent, } from './types';
|
|
8
20
|
export { detectLanguage, detectLanguageWithFallback } from './language-detector';
|
|
9
21
|
export type { AILanguageClassifier } from './language-detector';
|
|
10
|
-
export { convertScript } from './conversion-orchestrator';
|
|
11
|
-
export type { ConversionOptions } from './conversion-orchestrator';
|
|
12
22
|
export { validateForgeScript } from './validation';
|
|
13
23
|
export { runSandbox } from './sandbox';
|
|
14
24
|
export { evaluateSaveGate } from './save-gate';
|
|
15
|
-
export { runAIConversion, parseAIResponse } from './ai-conversion-agent';
|
|
16
|
-
export type { LLMProvider, ChatMessage } from './ai-conversion-agent';
|
|
17
|
-
export { getSystemPrompt, buildConversionPrompt, FORGESCRIPT_REFERENCE } from './prompts';
|
|
18
25
|
export { onConversionEvent, emitConversionEvent, buildTelemetryEvent, clearTelemetryListeners, } from './telemetry';
|
|
19
26
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/forgescript/conversion/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/forgescript/conversion/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAGH,YAAY,EACV,cAAc,EACd,UAAU,EACV,uBAAuB,EACvB,iBAAiB,EACjB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,wBAAwB,GACzB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjF,YAAY,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGnD,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,aAAa,CAAC"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Shared types for the
|
|
2
|
+
* Shared types for the ForgeScript conversion utilities.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* AI-specific types (AIConversionResponse, ConversionAssumption, ReviewItem,
|
|
5
|
+
* ConversionResult, ConversionPath, ConversionOptions, LLMProvider, ChatMessage)
|
|
6
|
+
* have been removed as part of the OpenAI → Claude migration.
|
|
7
|
+
* See AGENT_INTEGRATION_DESIGN.md §12.
|
|
6
8
|
*/
|
|
7
|
-
/** Languages the
|
|
9
|
+
/** Languages the detection system can identify. */
|
|
8
10
|
export type SourceLanguage = 'pine' | 'python' | 'javascript' | 'forgescript' | 'unknown';
|
|
9
|
-
/** Confidence level for language detection
|
|
11
|
+
/** Confidence level for language detection. */
|
|
10
12
|
export type Confidence = 'HIGH' | 'MEDIUM' | 'LOW';
|
|
11
13
|
/** Result of language detection. */
|
|
12
14
|
export interface LanguageDetectionResult {
|
|
@@ -19,32 +21,12 @@ export interface LanguageDetectionResult {
|
|
|
19
21
|
/** Heuristic scores used to pick the language. */
|
|
20
22
|
readonly scores: Readonly<Record<SourceLanguage, number>>;
|
|
21
23
|
}
|
|
22
|
-
/**
|
|
23
|
-
export type ConversionPath = 'deterministic' | 'ai' | 'hybrid' | 'passthrough';
|
|
24
|
-
/** A single warning surfaced during conversion. */
|
|
24
|
+
/** A single warning surfaced during conversion or validation. */
|
|
25
25
|
export interface ConversionWarning {
|
|
26
26
|
readonly severity: 'info' | 'warning' | 'error';
|
|
27
27
|
readonly category: 'approximation' | 'unsupported' | 'semantic_risk' | 'hallucination' | 'general';
|
|
28
28
|
readonly message: string;
|
|
29
29
|
}
|
|
30
|
-
/** An assumption the converter made on behalf of the user. */
|
|
31
|
-
export interface ConversionAssumption {
|
|
32
|
-
readonly description: string;
|
|
33
|
-
}
|
|
34
|
-
/** Item the user should manually verify. */
|
|
35
|
-
export interface ReviewItem {
|
|
36
|
-
readonly description: string;
|
|
37
|
-
}
|
|
38
|
-
/** Parsed structured response from the AI conversion agent. */
|
|
39
|
-
export interface AIConversionResponse {
|
|
40
|
-
readonly forgeScript: string;
|
|
41
|
-
readonly warnings: ConversionWarning[];
|
|
42
|
-
readonly assumptions: ConversionAssumption[];
|
|
43
|
-
readonly reviewChecklist: ReviewItem[];
|
|
44
|
-
readonly unsupportedFeatures: string[];
|
|
45
|
-
readonly confidence: Confidence;
|
|
46
|
-
readonly confidenceExplanation: string;
|
|
47
|
-
}
|
|
48
30
|
/** A single validation issue. */
|
|
49
31
|
export interface ValidationIssue {
|
|
50
32
|
readonly severity: 'error' | 'warning';
|
|
@@ -76,34 +58,8 @@ export interface SaveGateCheck {
|
|
|
76
58
|
readonly blockers: string[];
|
|
77
59
|
readonly warningsToAcknowledge: string[];
|
|
78
60
|
}
|
|
79
|
-
/**
|
|
80
|
-
export
|
|
81
|
-
/** The detected or user-selected source language. */
|
|
82
|
-
readonly sourceLanguage: SourceLanguage;
|
|
83
|
-
/** Which conversion path was taken. */
|
|
84
|
-
readonly conversionPath: ConversionPath;
|
|
85
|
-
/** The converted ForgeScript source (empty string if conversion failed). */
|
|
86
|
-
readonly forgeScript: string;
|
|
87
|
-
/** Validation result against the ForgeScript grammar & runtime. */
|
|
88
|
-
readonly validation: ValidationResult;
|
|
89
|
-
/** Sandbox execution result (null if sandbox was skipped). */
|
|
90
|
-
readonly sandbox: SandboxResult | null;
|
|
91
|
-
/** Save-gate check. */
|
|
92
|
-
readonly saveGate: SaveGateCheck;
|
|
93
|
-
/** Human-readable warnings from the conversion itself. */
|
|
94
|
-
readonly warnings: ConversionWarning[];
|
|
95
|
-
/** Assumptions made during conversion. */
|
|
96
|
-
readonly assumptions: ConversionAssumption[];
|
|
97
|
-
/** Items the user should manually verify. */
|
|
98
|
-
readonly reviewChecklist: ReviewItem[];
|
|
99
|
-
/** Features that could not be converted. */
|
|
100
|
-
readonly unsupportedFeatures: string[];
|
|
101
|
-
/** Overall confidence in the conversion quality. */
|
|
102
|
-
readonly confidence: Confidence;
|
|
103
|
-
readonly confidenceExplanation: string;
|
|
104
|
-
/** Deterministic output (when applicable) for comparison. */
|
|
105
|
-
readonly deterministicOutput?: string;
|
|
106
|
-
}
|
|
61
|
+
/** Conversion path type — retained for telemetry. */
|
|
62
|
+
export type ConversionPath = 'deterministic' | 'ai' | 'hybrid' | 'passthrough';
|
|
107
63
|
/** Event emitted for observability. */
|
|
108
64
|
export interface ConversionTelemetryEvent {
|
|
109
65
|
readonly timestamp: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/forgescript/conversion/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/forgescript/conversion/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,mDAAmD;AACnD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,CAAC;AAE1F,+CAA+C;AAC/C,MAAM,MAAM,UAAU,GA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AAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,sDAAsD;IACtD,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC/D;AAID,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAC5B,QAAQ,CAAC,qBAAqB,EAAE,MAAM,EAAE,CAAC;CAC1C;AAID,qDAAqD;AACrD,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG,IAAI,GAAG,QAAQ,GAAG,aAAa,CAAC;AAE/E,uCAAuC;AACvC,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,QAAQ,CAAC,mBAAmB,EAAE,UAAU,CAAC;IACzC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;CACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/forgescript/conversion/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/forgescript/conversion/validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,SAAS,CAAC;AA4FjE;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAuNpE"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DatasetStore — central registry for user-imported external datasets.
|
|
3
|
+
*
|
|
4
|
+
* A dataset is a named, time-indexed table of numeric columns that a
|
|
5
|
+
* ForgeScript indicator can read via `request.data("name", "column")`.
|
|
6
|
+
*
|
|
7
|
+
* Datasets are keyed by a user-chosen name (case-insensitive).
|
|
8
|
+
* Each row must have a `time` field (Unix seconds) and one or more
|
|
9
|
+
* numeric columns. The store keeps rows sorted ascending by time so
|
|
10
|
+
* the runtime can binary-search for the bar-aligned value efficiently.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* DatasetStore.register("sentiment", [
|
|
15
|
+
* { time: 1700000000, score: 0.72, volume: 1200 },
|
|
16
|
+
* { time: 1700086400, score: 0.55, volume: 980 },
|
|
17
|
+
* ]);
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
/** A single row in a user dataset — must include `time` (Unix seconds). */
|
|
21
|
+
export type DatasetRow = {
|
|
22
|
+
readonly time: number;
|
|
23
|
+
readonly [column: string]: number | string;
|
|
24
|
+
};
|
|
25
|
+
/** A registered dataset — sorted ascending by time. */
|
|
26
|
+
export type UserDataset = {
|
|
27
|
+
readonly name: string;
|
|
28
|
+
readonly columns: readonly string[];
|
|
29
|
+
readonly rows: readonly DatasetRow[];
|
|
30
|
+
};
|
|
31
|
+
export declare const DatasetStore: {
|
|
32
|
+
/**
|
|
33
|
+
* Register (or replace) a named dataset.
|
|
34
|
+
* Rows are automatically sorted ascending by `time`.
|
|
35
|
+
*
|
|
36
|
+
* @param name Case-insensitive dataset identifier used in `request.data()`.
|
|
37
|
+
* @param rows Array of row objects — each must have a numeric `time` field.
|
|
38
|
+
*/
|
|
39
|
+
register(name: string, rows: DatasetRow[]): void;
|
|
40
|
+
/**
|
|
41
|
+
* Remove a dataset by name.
|
|
42
|
+
*/
|
|
43
|
+
remove(name: string): void;
|
|
44
|
+
/**
|
|
45
|
+
* Clear all registered datasets.
|
|
46
|
+
*/
|
|
47
|
+
clear(): void;
|
|
48
|
+
/**
|
|
49
|
+
* List all registered dataset names.
|
|
50
|
+
*/
|
|
51
|
+
list(): string[];
|
|
52
|
+
/**
|
|
53
|
+
* Retrieve a dataset by name.
|
|
54
|
+
*/
|
|
55
|
+
get(name: string): UserDataset | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Look up the value of `column` in dataset `name` at the bar whose
|
|
58
|
+
* open time is closest to (and not after) `barTime` (Unix seconds).
|
|
59
|
+
*
|
|
60
|
+
* Returns `NaN` if the dataset does not exist, the column is missing,
|
|
61
|
+
* or no row falls on or before `barTime`.
|
|
62
|
+
*/
|
|
63
|
+
lookup(name: string, column: string, barTime: number): number;
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=DatasetStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatasetStore.d.ts","sourceRoot":"","sources":["../../../src/forgescript/datasets/DatasetStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,2EAA2E;AAC3E,MAAM,MAAM,UAAU,GAAG;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAC5C,CAAC;AAEF,uDAAuD;AACvD,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,IAAI,EAAK,MAAM,CAAC;IACzB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IACpC,QAAQ,CAAC,IAAI,EAAK,SAAS,UAAU,EAAE,CAAC;CACzC,CAAC;AAMF,eAAO,MAAM,YAAY;IACvB;;;;;;OAMG;mBACY,MAAM,QAAQ,UAAU,EAAE,GAAG,IAAI;IAShD;;OAEG;iBACU,MAAM,GAAG,IAAI;IAI1B;;OAEG;aACM,IAAI;IAIb;;OAEG;YACK,MAAM,EAAE;IAIhB;;OAEG;cACO,MAAM,GAAG,WAAW,GAAG,SAAS;IAI1C;;;;;;OAMG;iBACU,MAAM,UAAU,MAAM,WAAW,MAAM,GAAG,MAAM;CA6B9D,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* parseDataset — parse CSV or JSON text into DatasetRow[].
|
|
3
|
+
*
|
|
4
|
+
* CSV rules:
|
|
5
|
+
* - First row must be a header row.
|
|
6
|
+
* - One column must be named `time`, `date`, or `timestamp` (case-insensitive).
|
|
7
|
+
* It may be a Unix timestamp (seconds or milliseconds) or an ISO 8601 date string.
|
|
8
|
+
* - All other columns are treated as numeric values.
|
|
9
|
+
* - Empty cells become NaN.
|
|
10
|
+
*
|
|
11
|
+
* JSON rules:
|
|
12
|
+
* - Must be an array of objects.
|
|
13
|
+
* - Same `time`/`date`/`timestamp` column requirement as CSV.
|
|
14
|
+
*
|
|
15
|
+
* @throws {Error} if the input cannot be parsed or has no time column.
|
|
16
|
+
*/
|
|
17
|
+
import type { DatasetRow } from './DatasetStore';
|
|
18
|
+
export type ParseResult = {
|
|
19
|
+
readonly rows: DatasetRow[];
|
|
20
|
+
readonly columns: string[];
|
|
21
|
+
readonly rowCount: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Parse a CSV or JSON string into DatasetRow[].
|
|
25
|
+
*
|
|
26
|
+
* Auto-detects format: if the trimmed text starts with `[` or `{` it is
|
|
27
|
+
* treated as JSON, otherwise as CSV.
|
|
28
|
+
*
|
|
29
|
+
* @throws {Error} on parse failure or missing time column.
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseDataset(text: string): ParseResult;
|
|
32
|
+
//# sourceMappingURL=parseDataset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseDataset.d.ts","sourceRoot":"","sources":["../../../src/forgescript/datasets/parseDataset.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AA+IjD,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,IAAI,EAAK,UAAU,EAAE,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAWtD"}
|
|
@@ -27,6 +27,24 @@ export declare class Parser {
|
|
|
27
27
|
private _exprStmt;
|
|
28
28
|
private _ifStmt;
|
|
29
29
|
private _whileStmt;
|
|
30
|
+
/**
|
|
31
|
+
* try
|
|
32
|
+
* <body>
|
|
33
|
+
* catch err
|
|
34
|
+
* <handler>
|
|
35
|
+
*/
|
|
36
|
+
private _tryCatchStmt;
|
|
37
|
+
/**
|
|
38
|
+
* type MyType
|
|
39
|
+
* float price = 0
|
|
40
|
+
* int count = 0
|
|
41
|
+
*/
|
|
42
|
+
private _typeDeclStmt;
|
|
43
|
+
/**
|
|
44
|
+
* import "library-name"
|
|
45
|
+
* import "library-name" as alias
|
|
46
|
+
*/
|
|
47
|
+
private _importStmt;
|
|
30
48
|
/** Lookahead: is this IDENT '(' ... ')' '=>'? Scans without consuming. */
|
|
31
49
|
private _isFnDecl;
|
|
32
50
|
/** Parse: name(p1, p2, ...) => expr OR name(p1, p2, ...) =>\n block */
|
|
@@ -42,7 +60,7 @@ export declare class Parser {
|
|
|
42
60
|
private _multiplication;
|
|
43
61
|
private _unary;
|
|
44
62
|
private _primary;
|
|
45
|
-
/** Parse IDENT.IDENT or IDENT.IDENT(args) */
|
|
63
|
+
/** Parse IDENT.IDENT or IDENT.IDENT(args) — also handles chained member access */
|
|
46
64
|
private _nsCallOrMember;
|
|
47
65
|
private _callExpr;
|
|
48
66
|
/** Parse a mixed positional + named argument list. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/forgescript/parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,OAAO,
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/forgescript/parser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,OAAO,EAOR,MAAM,OAAO,CAAC;AAIf,qBAAa,MAAM;IACjB,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,IAAI,CAAa;gBAEb,GAAG,EAAE,MAAM;IAIvB,KAAK,IAAI,OAAO;IAYhB,OAAO,CAAC,KAAK;IAwEb,OAAO,CAAC,cAAc;IAqBtB,OAAO,CAAC,YAAY;IAapB,OAAO,CAAC,SAAS;IAQjB,OAAO,CAAC,QAAQ;IA4BhB,OAAO,CAAC,OAAO;IAQf,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,OAAO;IAmBf,OAAO,CAAC,UAAU;IAQlB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAYrB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAyBrB;;;OAGG;IACH,OAAO,CAAC,WAAW;IAYnB,0EAA0E;IAC1E,OAAO,CAAC,SAAS;IAejB,0EAA0E;IAC1E,OAAO,CAAC,WAAW;IAyBnB,OAAO,CAAC,cAAc;IAetB,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,QAAQ;IAYhB,OAAO,CAAC,GAAG;IAWX,OAAO,CAAC,IAAI;IAWZ,OAAO,CAAC,IAAI;IAUZ,OAAO,CA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