MCPcopy Create free account
hub / github.com/Kilo-Org/cloud / main

Function main

dev/local/cli.ts:723–757  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

721 sessionEnv.NEXTAUTH_URL = sessionNextAuthUrl;
722 }
723 // The enriched tRPC timing line carries the client dimensions and the
724 // per-call `x-kilo-request-id` that joins it with the app's client_latency
725 // sample, and mobile traffic logs at 100% while other clients stay sampled.
726 // Emit it in local development without an operator remembering the switch;
727 // production keeps its own deployment setting.
728 if (serviceNames.includes('nextjs')) {
729 sessionEnv.TRPC_TIMING_LOGGING = '1';
730 }
731 if (process.env.DEBUG_SHOW_DEV_UI !== undefined && process.env.DEBUG_SHOW_DEV_UI !== '') {
732 sessionEnv.DEBUG_SHOW_DEV_UI = process.env.DEBUG_SHOW_DEV_UI;
733 }
734 if (process.env.SKIP_STRIPE_API !== undefined && process.env.SKIP_STRIPE_API !== '') {
735 sessionEnv.SKIP_STRIPE_API = process.env.SKIP_STRIPE_API;
736 }
737 if (
738 process.env.NEXT_PUBLIC_POSTHOG_KEY !== undefined &&
739 process.env.NEXT_PUBLIC_POSTHOG_KEY !== ''
740 ) {
741 sessionEnv.NEXT_PUBLIC_POSTHOG_KEY = process.env.NEXT_PUBLIC_POSTHOG_KEY;
742 }
743 const deletionMockEnv = resolveDeletionMockSessionEnv({
744 serviceNames,
745 mockPort: getService('deletion-mock').port,
746 });
747 if (deletionMockEnv) Object.assign(sessionEnv, deletionMockEnv);
748 const fakeLlmEnv = resolveFakeLlmSessionEnv({ serviceNames });
749 if (fakeLlmEnv) Object.assign(sessionEnv, fakeLlmEnv);
750 const e2eInternalSecretEnv = resolveE2eInternalSecretSessionEnv({ serviceNames });
751 if (e2eInternalSecretEnv) Object.assign(sessionEnv, e2eInternalSecretEnv);
752 createSession(sessionName, sessionEnv);
753
754 const SIDEBAR_WIDTH = 40;
755
756 // The fake-LLM Worker is a capture service too: the public-tunnel service
757 // probes it before publishing and exits if it is not answering, so it must be
758 // started and ready before the tunnel capture runs.
759 const captureServiceSet = new Set([
760 'kiloclaw-tunnel',

Callers 1

cli.tsFile · 0.70

Calls 8

findRepoRootFunction · 0.90
cmdUpFunction · 0.85
cmdStopFunction · 0.85
cmdStatusFunction · 0.85
cmdRestartFunction · 0.85
cmdEnvFunction · 0.85
printUsageFunction · 0.70
errorMethod · 0.65

Tested by

no test coverage detected