Download projects/gemini-cli/packages/a2a-server/src/server.ts from LevelUp2x/adaptai: direct link, hf CLI and curl.
- Browser
- Download file 828 Bytes
-
https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/a2a-server/src/server.ts
- Command line
-
hf download hf://datasets/LevelUp2x/adaptai@2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/a2a-server/src/server.ts
-
curl -L -o server.ts https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/a2a-server/src/server.ts
828 Bytes
| /** | |
| * @license | |
| * Copyright 2025 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import * as url from 'node:url'; | |
| import * as path from 'node:path'; | |
| import { logger } from './logger.js'; | |
| import { main } from './agent.js'; | |
| // Check if the module is the main script being run. path.resolve() creates a | |
| // canonical, absolute path, which avoids cross-platform issues. | |
| const isMainModule = | |
| path.resolve(process.argv[1]) === | |
| path.resolve(url.fileURLToPath(import.meta.url)); | |
| process.on('uncaughtException', (error) => { | |
| logger.error('Unhandled exception:', error); | |
| process.exit(1); | |
| }); | |
| if ( | |
| import.meta.url.startsWith('file:') && | |
| isMainModule && | |
| process.env['NODE_ENV'] !== 'test' | |
| ) { | |
| main().catch((error) => { | |
| logger.error('[CoreAgent] Unhandled error in main:', error); | |
| process.exit(1); | |
| }); | |
| } | |