You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- extended `src/main/tradingview/pine-workflows.js` so Pine Version History provenance requests can stay verification-first while preserving or auto-appending bounded `get_text` readback
1502
1502
- extended `src/main/tradingview/pine-workflows.js` so Pine Editor visible status/output requests can stay verification-first while preserving or auto-appending bounded `get_text` readback
1503
1503
- added Pine Editor line-budget awareness so `500-line limit` / line-count checks prefer verified Pine Editor readback and prompt guidance now explicitly treats Pine scripts as capped at 500 lines when reading/writing
1504
+
- refined Pine Editor readback into explicit `compile-result` and `diagnostics` evidence modes so visible compiler status, warnings, and errors can be summarized as bounded text evidence rather than generic status text
1504
1505
- added dedicated Pine data-workflow regressions in `scripts/test-tradingview-pine-data-workflows.js`
1505
1506
- extended `scripts/test-windows-observation-flow.js` with verified Pine Logs, Pine Profiler, Pine Version History, and Pine Editor status/output readback coverage that gathers text without re-entering a screenshot loop
1506
1507
- updated `src/main/ai-service/system-prompt.js` so TradingView Pine output/error/provenance requests prefer verified Pine surfaces plus `get_text`, including Pine Editor visible status/output, over screenshot-only inference
- refine Pine Editor status/output readback into more structured visible compile-result / diagnostics summaries without implying chart-state insight
1568
1569
1570
+
**Concrete next Pine slice — structured diagnostics and provenance summaries**
1571
+
1572
+
This is the next Pine-facing implementation slice after the current Logs / Profiler / Version History / Pine Editor readback foundation.
1573
+
1574
+
**Grounded status of recent Pine follow-ups**
1575
+
- broader visible Pine status/output surfaces beyond Logs / Profiler / Version History are now implemented via verified `pine-editor` readback with bounded `get_text`
1576
+
- script-audit / provenance refinement is only partially complete:
1577
+
- verified Pine Version History opening plus raw visible text readback is implemented
1578
+
- structural extraction of the top visible revision metadata (for example revision label, relative time, author/source hints when visible, and compact summary formatting) is not implemented yet
1579
+
1580
+
**Immediate next objective**
1581
+
- turn generic Pine Editor text readback into explicit visible diagnostics summaries
1582
+
- turn generic Pine Version History text readback into explicit visible revision/provenance summaries
1583
+
1584
+
**Priority order**
1585
+
1.**Slice D-next-1 — Pine Editor compile-result / diagnostics summaries**
1586
+
2.**Slice D-next-2 — Pine Version History top visible revision metadata summaries**
1587
+
1588
+
#### Slice D-next-1 — Pine Editor compile-result / diagnostics summaries
1589
+
1590
+
**Status:** First slice completed in working tree
1591
+
1592
+
**Delivered so far**
1593
+
- extended `src/main/tradingview/pine-workflows.js` so Pine Editor readback requests can classify bounded evidence modes:
1594
+
-`compile-result`
1595
+
-`diagnostics`
1596
+
-`line-budget`
1597
+
-`generic-status`
1598
+
- refined Pine Editor `get_text` readback reasons and mode metadata so compile-result and diagnostics requests carry explicit bounded-summary intent instead of generic status wording
1599
+
- updated `src/main/ai-service/system-prompt.js` with Pine diagnostics guidance that:
1600
+
- prefers visible compiler/diagnostic text over screenshot interpretation
1601
+
- treats `no errors` / compile success as compiler evidence only
1602
+
- mentions Pine execution-model caveats before inferring runtime or strategy behavior
1603
+
- updated `src/main/ai-service/message-builder.js` to inject `## Pine Evidence Bounds` for Pine diagnostics-oriented requests
1604
+
- added focused prompt coverage in `scripts/test-pine-diagnostics-bounds.js`
1605
+
- extended workflow, seam, and execution regressions in:
assert(messageBuilderContent.includes('uia-rich'),'Capability context should recognize UIA-rich apps');
196
196
assert(messageBuilderContent.includes('namedInteractiveElementCount'),'Capability context should include UIA inventory counts');
197
197
assert(messageBuilderContent.includes('answer-shape:'),'Capability context should shape control-surface answers');
198
+
assert(messageBuilderContent.includes('## Pine Evidence Bounds'),'Message builder should inject a bounded Pine diagnostics evidence block when relevant');
199
+
assert(messageBuilderContent.includes('inferPineEvidenceRequestKind'),'Message builder should classify Pine evidence request kinds');
200
+
assert(messageBuilderContent.includes('runtime correctness, strategy validity, profitability, or market insight'),'Pine evidence bounds should prevent compile success from being overclaimed');
198
201
});
199
202
200
203
test('ai-service verifies focus continuity after action execution',()=>{
assert(pineWorkflowContent.includes('function inferPineEditorEvidenceMode'),'Pine workflows should classify Pine Editor evidence modes');
247
+
assert(pineWorkflowContent.includes("return 'compile-result'"),'Pine workflows should support compile-result evidence mode');
248
+
assert(pineWorkflowContent.includes("return 'diagnostics'"),'Pine workflows should support diagnostics evidence mode');
249
+
assert(pineWorkflowContent.includes('pineEvidenceMode'),'Pine get_text steps should preserve evidence mode metadata');
250
+
assert(pineWorkflowContent.includes('compile-result text for a bounded diagnostics summary'),'Pine workflows should use compile-result-specific readback wording');
251
+
assert(pineWorkflowContent.includes('diagnostics and warnings text'),'Pine workflows should use diagnostics-specific readback wording');
252
+
});
253
+
254
+
test('system prompt includes Pine diagnostics guidance',()=>{
assert(evidenceMessage.content.includes('Rule: Prefer visible Pine Editor compiler/diagnostic text over screenshot interpretation for Pine compile and diagnostics requests.'));
55
+
assert(evidenceMessage.content.includes('compiler/editor evidence only, not proof of runtime correctness, strategy validity, profitability, or market insight'));
56
+
});
57
+
58
+
awaittest('pine diagnostics prompt bounds warning and runtime inferences',async()=>{
59
+
constevidenceMessage=awaitbuildPineEvidenceMessage('open pine editor in tradingview and check diagnostics');
60
+
61
+
assert(evidenceMessage,'pine evidence block should be injected');
assert(evidenceMessage.content.includes('Rule: Surface visible compiler errors and warnings as bounded diagnostics evidence; do not infer hidden causes or chart-state effects unless the visible text states them.'));
64
+
assert(evidenceMessage.content.includes('mention Pine execution-model caveats such as realtime rollback, confirmed vs unconfirmed bars, and indicator vs strategy recalculation differences'));
0 commit comments