MCPcopy Create free account
hub / github.com/SethGammon/Citadel / buildPreview

Function buildPreview

scripts/route-preview.js:402–416  ·  view source on GitHub ↗
(input, options = {})

Source from the content-addressed store, hash-verified

400 }
401 return {
402 canRunNow: true,
403 boundary: route.startsWith('/') ? 'agent-route' : 'local-command',
404 risk: route === 'direct-edit' ? 'low' : 'medium',
405 approval: null,
406 };
407}
408
409function skillNameForRoute(route) {
410 const match = String(route || '').trim().match(/^\/([a-z][a-z0-9-]*)/i);
411 return match ? match[1].toLowerCase() : null;
412}
413
414function activationBoundary(projectRoot, selected, options = {}) {
415 const skill = skillNameForRoute(selected);
416 if (!skill) return { skill: null, context: null, decision: null };
417 const context = options.activationContext || config.loadActivationContext(projectRoot, {
418 runtime: options.runtime,
419 runtimeId: options.runtimeId,

Callers 3

mainFunction · 0.85
checkRouteFunction · 0.85

Calls 3

selectRouteFunction · 0.85
gitDirtyFunction · 0.85
boundaryForFunction · 0.85

Tested by

no test coverage detected