Skip to main content

Module amp

Module amp 

Source
Expand description

Amp CLI compatibility layer — served on the main byokey port alongside the REST AI proxy and ConnectRPC management service.

Routes (all paths are served without an /amp prefix, matching what the amp CLI sends on the wire):

  • GET /v1/login -> 302 redirect to ampcode.com/login.
  • GET /auth/cli-login -> 302 redirect to ampcode.com/auth/cli-login.
  • ANY /v0/management/{*path} -> proxy to ampcode.com/v0/management/*.
  • POST /api/provider/* -> provider-specific handlers.
  • ANY /api/{*path} -> catch-all proxy to ampcode.com.

Submodules:

  • providerAmpCode provider-namespaced AI endpoints (/api/provider/*).
  • threads — parser + in-memory index for local Amp CLI thread files (consumed by the ConnectRPC management service).

Modules§

provider
AmpCode provider-specific API route handlers.
threads
Amp thread reading — parses local Amp CLI thread JSON files.

Functions§

cli_login_redirect
Handles GET /auth/cli-login?authToken=...&callbackPort=...
login_redirect
Redirects Amp CLI to the web login page.