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
assert(messageBuilderContent.includes('classifyActiveAppCapability'),'Message builder should classify active app capability');
210
-
assert(messageBuilderContent.includes('## Active App Capability'),'Message builder should inject active app capability context');
212
+
assert(messageBuilderContent.includes('buildCapabilityPolicySystemMessage'),'Message builder should inject active app capability context');
211
213
assert(messageBuilderContent.includes('visual-first-low-uia'),'Capability context should recognize low-UIA visual-first apps');
212
-
assert(messageBuilderContent.includes('uia-rich'),'Capability context should recognize UIA-rich apps');
213
-
assert(messageBuilderContent.includes('namedInteractiveElementCount'),'Capability context should include UIA inventory counts');
214
-
assert(messageBuilderContent.includes('answer-shape:'),'Capability context should shape control-surface answers');
214
+
assert(capabilityPolicyContent.includes('uia-rich'),'Capability context should recognize UIA-rich apps');
215
+
assert(messageBuilderContent.includes('watcherSnapshot'),'Capability context should include watcher/UIA inventory input');
216
+
assert(capabilityPolicyContent.includes('answer-shape:'),'Capability context should shape control-surface answers');
215
217
assert(messageBuilderContent.includes('## Pine Evidence Bounds'),'Message builder should inject a bounded Pine diagnostics evidence block when relevant');
216
218
assert(messageBuilderContent.includes('inferPineEvidenceRequestKind'),'Message builder should classify Pine evidence request kinds');
217
219
assert(messageBuilderContent.includes('runtime correctness, strategy validity, profitability, or market insight'),'Pine evidence bounds should prevent compile success from being overclaimed');
assert(shortcutProfileContent.includes("'create-alert'"),'TradingView shortcut profile should define stable alert guidance');
281
283
assert(shortcutProfileContent.includes("'drawing-tool-binding'"),'TradingView shortcut profile should mark drawing bindings as customizable');
282
284
assert(shortcutProfileContent.includes("'open-dom-panel'"),'TradingView shortcut profile should classify DOM shortcuts explicitly');
283
-
assert(shortcutProfileContent.includes('No stable native default should be assumed for opening Pine Editor'),'TradingView shortcut profile should stop treating Pine Editor as a stable native shortcut');
285
+
assert(shortcutProfileContent.includes('No dedicated official Pine Editor opener is exposed in the PDF'),'TradingView shortcut profile should stop treating Pine Editor as a stable native shortcut');
284
286
assert(shortcutProfileContent.includes('buildTradingViewShortcutRoute'),'TradingView shortcut profile should expose TradingView-specific route helpers for non-native shortcuts');
285
287
assert(shortcutProfileContent.includes("'take-snapshot'"),'TradingView shortcut profile should include grounded reference-only snapshot guidance');
286
288
assert(shortcutProfileContent.includes("'add-symbol-to-watchlist'"),'TradingView shortcut profile should include grounded watchlist shortcut guidance');
@@ -600,7 +602,7 @@ test('TradingView shortcut profile and drawing bounds are wired through promptin
600
602
assert(alertWorkflowContent.includes("require('./shortcut-profile')"),'Alert workflow should consume TradingView shortcut profile');
601
603
assert(pineWorkflowContent.includes("require('./shortcut-profile')"),'Pine workflow should consume TradingView shortcut profile');
602
604
assert(indicatorWorkflowContent.includes("buildSearchSurfaceSelectionContract"),'Indicator workflow should consume the shared search-surface selection contract');
603
-
assert(shortcutProfileContent.includes("buildSearchSurfaceSelectionContract"),'Shortcut profile should reuse the shared search-surface selection contract for Pine quick-search routes');
605
+
assert(shortcutProfileContent.includes("buildTradingViewShortcutSequenceRoute"),'Shortcut profile should expose reusable shortcut sequencing for official TradingView routes');
604
606
assert(searchSurfaceContractsContent.includes("type: 'click_element'"),'Shared search-surface contracts should perform semantic result selection');
605
607
assert(claimBoundsContent.includes('buildProofCarryingAnswerPrompt'),'Claim-bounds helper should build proof-carrying answer prompts');
606
608
assert(messageBuilderContent.includes('buildClaimBoundConstraint'),'Message builder should inject the answer claim contract on degraded or low-trust paths');
assert(Array.isArray(inspectStep.continueActions)&&inspectStep.continueActions.length>0,'safe authoring inspect step should carry continuation actions');
258
-
assert(inspectStep.continueActions.some((action)=>action?.type==='run_command'&&/set-clipboard/i.test(String(action?.command||''))),'continuation should preserve clipboard preparation');
259
-
assert(inspectStep.continueActions.some((action)=>action?.type==='key'&&String(action?.key||'').toLowerCase()==='ctrl+v'),'continuation should paste the prepared script');
260
-
assert(inspectStep.continueActions.some((action)=>action?.type==='key'&&String(action?.key||'').toLowerCase()==='ctrl+enter'),'continuation should add the script to the chart');
261
-
assert(inspectStep.continueActions.some((action)=>action?.type==='get_text'&&action?.pineEvidenceMode==='compile-result'),'continuation should gather compile-result feedback after add-to-chart');
258
+
assert(inspectStep.continueActions.some((action)=>action?.type==='key'&&String(action?.key||'').toLowerCase()==='ctrl+i'),'continuation should create a fresh Pine indicator through the official shortcut chord');
assert(freshInspect,'continuation should verify a fresh Pine script surface after creating a new indicator');
261
+
assert(freshInspect.continueActions.some((action)=>action?.type==='run_command'&&/set-clipboard/i.test(String(action?.command||''))),'fresh-script continuation should preserve clipboard preparation');
262
+
assert(freshInspect.continueActions.some((action)=>action?.type==='key'&&String(action?.key||'').toLowerCase()==='ctrl+v'),'fresh-script continuation should paste the prepared script');
assert(saveInspect.continueActions.some((action)=>action?.type==='key'&&String(action?.key||'').toLowerCase()==='ctrl+enter'),'save-verified continuation should add the script to the chart');
267
+
assert(saveInspect.continueActions.some((action)=>action?.type==='get_text'&&action?.pineEvidenceMode==='compile-result'),'save-verified continuation should gather compile-result feedback after add-to-chart');
262
268
});
263
269
264
270
test('full ai-service rewrite handles the transcript Pine prompt without browser or timeframe derailment',()=>{
0 commit comments