Full Code of encoredev/encore for AI

main 7825905c360d cached
2021 files
11.3 MB
3.1M tokens
19069 symbols
1 requests
Copy disabled (too large) Download .txt
Showing preview only (12,250K chars total). Download the full file to get everything.
Repository: encoredev/encore
Branch: main
Commit: 7825905c360d
Files: 2021
Total size: 11.3 MB

Directory structure:
gitextract_3htyukto/

├── .devcontainer/
│   ├── Dockerfile
│   ├── devcontainer.json
│   └── scripts/
│       ├── godeps.sh
│       ├── install.sh
│       └── prepare.sh
├── .github/
│   ├── DISCUSSION_TEMPLATE/
│   │   ├── help.yml
│   │   └── suggestions.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── Bug_report.yml
│   │   └── config.yml
│   ├── dockerimg/
│   │   ├── Dockerfile
│   │   ├── encore-entrypoint.bash
│   │   └── rename-binary-if-needed.bash
│   ├── minimum-reproduction.md
│   └── workflows/
│       ├── ci.yml
│       ├── makefile
│       ├── release-2.yml
│       ├── release.yml
│       ├── semgrep-to-rdjson.jq
│       └── staticcheck-to-rdjsonl.jq
├── .gitignore
├── .prettierrc.toml
├── .reviewdog.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cargo.toml
├── Cross.toml
├── LICENSE
├── README.md
├── check.bash
├── cli/
│   ├── cmd/
│   │   ├── encore/
│   │   │   ├── app/
│   │   │   │   ├── app.go
│   │   │   │   ├── clone.go
│   │   │   │   ├── create.go
│   │   │   │   ├── create_form.go
│   │   │   │   ├── create_test.go
│   │   │   │   ├── initialize.go
│   │   │   │   └── link.go
│   │   │   ├── auth/
│   │   │   │   └── auth.go
│   │   │   ├── bits/
│   │   │   │   ├── add.go
│   │   │   │   ├── api.go
│   │   │   │   ├── bits.go
│   │   │   │   └── list.go
│   │   │   ├── build.go
│   │   │   ├── check.go
│   │   │   ├── cmdutil/
│   │   │   │   ├── autocompletes.go
│   │   │   │   ├── cmdutil.go
│   │   │   │   ├── daemon.go
│   │   │   │   ├── forms.go
│   │   │   │   ├── language.go
│   │   │   │   ├── output.go
│   │   │   │   └── stream.go
│   │   │   ├── config/
│   │   │   │   └── config.go
│   │   │   ├── daemon/
│   │   │   │   ├── daemon.go
│   │   │   │   └── migrations/
│   │   │   │       ├── 1_initial_schema.up.sql
│   │   │   │       ├── 2_infra_namespaces.up.sql
│   │   │   │       ├── 3_test_tracing.up.sql
│   │   │   │       ├── 4_add_parent_span_id.up.sql
│   │   │   │       └── 5_add_caller_event_id.up.sql
│   │   │   ├── daemon.go
│   │   │   ├── db.go
│   │   │   ├── debug.go
│   │   │   ├── deploy.go
│   │   │   ├── exec.go
│   │   │   ├── gen.go
│   │   │   ├── init_windows.go
│   │   │   ├── k8s/
│   │   │   │   ├── auth.go
│   │   │   │   ├── config.go
│   │   │   │   ├── kubernetes.go
│   │   │   │   └── types/
│   │   │   │       ├── KUBERNETES_LICENSE.txt
│   │   │   │       ├── README.md
│   │   │   │       ├── clientauthentication_types.go
│   │   │   │       ├── homedir.go
│   │   │   │       ├── meta_types.go
│   │   │   │       └── runtime_types.go
│   │   │   ├── llm_rules/
│   │   │   │   ├── init.go
│   │   │   │   ├── llm_rules.go
│   │   │   │   └── tool.go
│   │   │   ├── logs.go
│   │   │   ├── main.go
│   │   │   ├── mcp.go
│   │   │   ├── namespace/
│   │   │   │   └── namespace.go
│   │   │   ├── rand.go
│   │   │   ├── root/
│   │   │   │   └── rootcmd.go
│   │   │   ├── run.go
│   │   │   ├── secrets/
│   │   │   │   ├── archive.go
│   │   │   │   ├── delete.go
│   │   │   │   ├── list.go
│   │   │   │   ├── secrets.go
│   │   │   │   └── set.go
│   │   │   ├── sqlc.go
│   │   │   ├── telemetry.go
│   │   │   ├── test.go
│   │   │   └── version.go
│   │   ├── git-remote-encore/
│   │   │   └── main.go
│   │   └── tsbundler-encore/
│   │       └── main.go
│   ├── daemon/
│   │   ├── apps/
│   │   │   └── apps.go
│   │   ├── check.go
│   │   ├── common.go
│   │   ├── create.go
│   │   ├── daemon.go
│   │   ├── dash/
│   │   │   ├── ai/
│   │   │   │   ├── assembler.go
│   │   │   │   ├── client.go
│   │   │   │   ├── codegen.go
│   │   │   │   ├── conv.go
│   │   │   │   ├── manager.go
│   │   │   │   ├── overlay.go
│   │   │   │   ├── parser.go
│   │   │   │   ├── sql.go
│   │   │   │   ├── types.go
│   │   │   │   └── types_test.go
│   │   │   ├── apiproxy/
│   │   │   │   └── apiproxy.go
│   │   │   ├── dash.go
│   │   │   ├── dash_test.go
│   │   │   ├── dashproxy/
│   │   │   │   └── dashproxy.go
│   │   │   ├── dbbrowser.go
│   │   │   └── server.go
│   │   ├── db.go
│   │   ├── debug.go
│   │   ├── engine/
│   │   │   ├── runtime.go
│   │   │   ├── trace/
│   │   │   │   ├── parse_test.go
│   │   │   │   └── trace.go
│   │   │   └── trace2/
│   │   │       ├── recorder.go
│   │   │       ├── sqlite/
│   │   │       │   ├── read.go
│   │   │       │   └── write.go
│   │   │       └── store.go
│   │   ├── exec_script.go
│   │   ├── export/
│   │   │   ├── download.go
│   │   │   ├── export.go
│   │   │   └── infra_config.go
│   │   ├── export.go
│   │   ├── internal/
│   │   │   ├── runlog/
│   │   │   │   └── runlog.go
│   │   │   └── sym/
│   │   │       ├── sym.go
│   │   │       ├── sym_darwin.go
│   │   │       ├── sym_elf.go
│   │   │       └── sym_windows.go
│   │   ├── mcp/
│   │   │   ├── api_tools.go
│   │   │   ├── bucket_tools.go
│   │   │   ├── cache_tools.go
│   │   │   ├── cron_tools.go
│   │   │   ├── db_tools.go
│   │   │   ├── docs_tools.go
│   │   │   ├── mcp.go
│   │   │   ├── metrics_tools.go
│   │   │   ├── pubsub_tools.go
│   │   │   ├── schema_json.go
│   │   │   ├── secret_tools.go
│   │   │   ├── src_tools.go
│   │   │   ├── trace_tools.go
│   │   │   └── util.go
│   │   ├── namespace/
│   │   │   └── namespace.go
│   │   ├── namespace.go
│   │   ├── objects/
│   │   │   ├── manager.go
│   │   │   ├── objects.go
│   │   │   └── public.go
│   │   ├── pubsub/
│   │   │   ├── nsq.go
│   │   │   └── utils.go
│   │   ├── redis/
│   │   │   └── redis.go
│   │   ├── run/
│   │   │   ├── call.go
│   │   │   ├── check.go
│   │   │   ├── errors.go
│   │   │   ├── exec_command.go
│   │   │   ├── exec_script.go
│   │   │   ├── http.go
│   │   │   ├── infra/
│   │   │   │   ├── encorecloudtesting.go
│   │   │   │   └── infra.go
│   │   │   ├── manager.go
│   │   │   ├── nsq_names.go
│   │   │   ├── proc_groups.go
│   │   │   ├── run.go
│   │   │   ├── runtime_config2.go
│   │   │   ├── tests.go
│   │   │   └── watch.go
│   │   ├── run.go
│   │   ├── schema.go
│   │   ├── secret/
│   │   │   └── secret.go
│   │   ├── sqldb/
│   │   │   ├── cluster.go
│   │   │   ├── db.go
│   │   │   ├── db_test.go
│   │   │   ├── docker/
│   │   │   │   └── docker.go
│   │   │   ├── driver.go
│   │   │   ├── external/
│   │   │   │   └── external.go
│   │   │   ├── manager.go
│   │   │   ├── migrate.go
│   │   │   ├── proxy.go
│   │   │   ├── remote.go
│   │   │   └── utils.go
│   │   ├── telemetry.go
│   │   ├── test.go
│   │   ├── tracing.go
│   │   ├── userfacing.go
│   │   └── watch.go
│   └── internal/
│       ├── browser/
│       │   └── browser.go
│       ├── bubbles/
│       │   ├── checklist/
│       │   │   └── checklist.go
│       │   └── selector/
│       │       └── selector.go
│       ├── dedent/
│       │   ├── dedent.go
│       │   └── dedent_test.go
│       ├── gosym/
│       │   ├── pclntab.go
│       │   ├── symtab.go
│       │   ├── symtab_test.go
│       │   └── testdata/
│       │       ├── main.go
│       │       ├── pclinetest.h
│       │       └── pclinetest.s
│       ├── jsonrpc2/
│       │   ├── conn.go
│       │   ├── handler.go
│       │   ├── jsonrpc2.go
│       │   ├── jsonrpc2_test.go
│       │   ├── messages.go
│       │   ├── serve.go
│       │   ├── serve_test.go
│       │   ├── servertest/
│       │   │   ├── servertest.go
│       │   │   └── servertest_test.go
│       │   ├── stream.go
│       │   ├── wire.go
│       │   └── wire_test.go
│       ├── login/
│       │   ├── deviceauth.go
│       │   ├── interactive.go
│       │   └── login.go
│       ├── manifest/
│       │   └── manifest.go
│       ├── onboarding/
│       │   └── onboarding.go
│       ├── platform/
│       │   ├── api.go
│       │   ├── client.go
│       │   ├── gql/
│       │   │   ├── app.go
│       │   │   ├── env.go
│       │   │   └── secrets.go
│       │   ├── jsoniter_ext.go
│       │   ├── jsoniter_ext_test.go
│       │   ├── login.go
│       │   └── secrets.go
│       ├── telemetry/
│       │   └── telemetry.go
│       └── update/
│           └── update.go
├── clippy.toml
├── context7.json
├── docs/
│   ├── go/
│   │   ├── ai-integration.md
│   │   ├── cli/
│   │   │   ├── cli-reference.md
│   │   │   ├── client-generation.md
│   │   │   ├── config-reference.md
│   │   │   ├── infra-namespaces.md
│   │   │   ├── mcp.md
│   │   │   └── telemetry.md
│   │   ├── community/
│   │   │   ├── contribute.md
│   │   │   ├── get-involved.md
│   │   │   ├── open-source.md
│   │   │   ├── principles.md
│   │   │   └── submit-template.md
│   │   ├── concepts/
│   │   │   ├── application-model.md
│   │   │   └── benefits.md
│   │   ├── develop/
│   │   │   ├── api-docs.md
│   │   │   ├── auth.md
│   │   │   ├── config.md
│   │   │   ├── cors.md
│   │   │   ├── env-vars.md
│   │   │   ├── metadata.md
│   │   │   ├── middleware.md
│   │   │   ├── mocking.md
│   │   │   ├── testing.md
│   │   │   └── validation.md
│   │   ├── faq.md
│   │   ├── how-to/
│   │   │   ├── atlas-gorm.md
│   │   │   ├── auth0-auth.md
│   │   │   ├── break-up-monolith.md
│   │   │   ├── cgo.md
│   │   │   ├── clerk-auth.md
│   │   │   ├── debug.md
│   │   │   ├── dependency-injection.md
│   │   │   ├── entgo-orm.md
│   │   │   ├── firebase-auth.md
│   │   │   ├── grpc-connect.md
│   │   │   ├── http-requests.md
│   │   │   ├── integrate-frontend.mdx
│   │   │   ├── logto-auth.md
│   │   │   ├── pubsub-outbox.md
│   │   │   └── temporal.md
│   │   ├── install.md
│   │   ├── migration/
│   │   │   ├── ai-migration.mdx
│   │   │   └── migrate-away.md
│   │   ├── observability/
│   │   │   ├── dev-dash.md
│   │   │   ├── encore-flow.md
│   │   │   ├── logging.md
│   │   │   ├── metrics.md
│   │   │   ├── service-catalog.md
│   │   │   └── tracing.md
│   │   ├── overview.md
│   │   ├── primitives/
│   │   │   ├── api-calls.md
│   │   │   ├── api-errors.md
│   │   │   ├── api-schemas.md
│   │   │   ├── app-structure.md
│   │   │   ├── caching.md
│   │   │   ├── change-db-schema.md
│   │   │   ├── code-snippets.md
│   │   │   ├── connect-existing-db.md
│   │   │   ├── cron-jobs.md
│   │   │   ├── database-extensions.md
│   │   │   ├── database-troubleshooting.md
│   │   │   ├── databases.md
│   │   │   ├── defining-apis.md
│   │   │   ├── insert-test-data-db.md
│   │   │   ├── object-storage.md
│   │   │   ├── pubsub.md
│   │   │   ├── raw-endpoints.md
│   │   │   ├── secrets.md
│   │   │   ├── service-structs.md
│   │   │   ├── services.md
│   │   │   └── share-db-between-services.md
│   │   ├── quick-start.mdx
│   │   ├── self-host/
│   │   │   ├── ci-cd.md
│   │   │   ├── configure-infra.md
│   │   │   ├── deploy-to-digital-ocean-wip.md
│   │   │   └── self-host.md
│   │   └── tutorials/
│   │       ├── booking-system.mdx
│   │       ├── graphql.mdx
│   │       ├── incident-management-tool.md
│   │       ├── meeting-notes.mdx
│   │       ├── rest-api.mdx
│   │       ├── slack-bot.md
│   │       └── uptime.md
│   ├── menu.cue
│   ├── platform/
│   │   ├── ai-integration.md
│   │   ├── deploy/
│   │   │   ├── deploying.md
│   │   │   ├── environments.md
│   │   │   ├── own-cloud.md
│   │   │   ├── preview-environments.md
│   │   │   └── security.md
│   │   ├── infrastructure/
│   │   │   ├── aws.md
│   │   │   ├── cloudflare.md
│   │   │   ├── configuration.md
│   │   │   ├── configure-kubectl.md
│   │   │   ├── configure-network.md
│   │   │   ├── gcp.md
│   │   │   ├── import-cloud-sql.md
│   │   │   ├── import-kubernetes-cluster.md
│   │   │   ├── import-project.md
│   │   │   ├── import-rds.md
│   │   │   ├── infra.md
│   │   │   ├── kubernetes.md
│   │   │   ├── manage-db-users.md
│   │   │   └── neon.md
│   │   ├── integrations/
│   │   │   ├── api-reference.md
│   │   │   ├── auth-keys.md
│   │   │   ├── custom-domains.md
│   │   │   ├── github.md
│   │   │   ├── oauth-clients.md
│   │   │   ├── terraform.md
│   │   │   └── webhooks.md
│   │   ├── introduction.md
│   │   ├── management/
│   │   │   ├── billing.md
│   │   │   ├── compliance.md
│   │   │   ├── permissions.md
│   │   │   ├── telemetry.md
│   │   │   └── usage.md
│   │   ├── migration/
│   │   │   ├── migrate-away.md
│   │   │   ├── migrate-to-encore.md
│   │   │   └── try-encore.md
│   │   ├── observability/
│   │   │   ├── encore-flow.md
│   │   │   ├── metrics.md
│   │   │   ├── service-catalog.md
│   │   │   └── tracing.md
│   │   ├── other/
│   │   │   ├── vs-heroku.md
│   │   │   ├── vs-supabase.md
│   │   │   └── vs-terraform.md
│   │   └── overview.md
│   └── ts/
│       ├── ai-integration.md
│       ├── cli/
│       │   ├── cli-reference.md
│       │   ├── client-generation.md
│       │   ├── config-reference.md
│       │   ├── infra-namespaces.md
│       │   ├── mcp.md
│       │   └── telemetry.md
│       ├── community/
│       │   ├── contribute.md
│       │   ├── get-involved.md
│       │   ├── open-source.md
│       │   ├── principles.md
│       │   └── submit-template.md
│       ├── concepts/
│       │   ├── application-model.md
│       │   ├── benefits.md
│       │   └── hello-world.md
│       ├── develop/
│       │   ├── auth.md
│       │   ├── debug.md
│       │   ├── env-vars.md
│       │   ├── integrations/
│       │   │   ├── better-auth.md
│       │   │   ├── polar.md
│       │   │   └── resend.md
│       │   ├── metadata.md
│       │   ├── middleware.md
│       │   ├── monorepo/
│       │   │   ├── nx.md
│       │   │   └── turborepo.md
│       │   ├── multithreading.md
│       │   ├── orms/
│       │   │   ├── drizzle.md
│       │   │   ├── knex.md
│       │   │   ├── overview.md
│       │   │   ├── prisma.md
│       │   │   └── sequelize.md
│       │   ├── running-scripts.md
│       │   └── testing.md
│       ├── faq.md
│       ├── frontend/
│       │   ├── cors.md
│       │   ├── hosting.mdx
│       │   ├── mono-vs-multi-repo.mdx
│       │   ├── request-client.mdx
│       │   └── template-engine.md
│       ├── how-to/
│       │   ├── file-uploads.md
│       │   └── nestjs.md
│       ├── install.md
│       ├── migration/
│       │   ├── ai-migration.mdx
│       │   ├── express-migration.md
│       │   └── migrate-away.md
│       ├── observability/
│       │   ├── dev-dash.md
│       │   ├── flow.md
│       │   ├── logging.md
│       │   ├── metrics.md
│       │   ├── service-catalog.md
│       │   └── tracing.md
│       ├── overview.md
│       ├── primitives/
│       │   ├── api-calls.mdx
│       │   ├── app-structure.md
│       │   ├── caching.md
│       │   ├── cookies.mdx
│       │   ├── cron-jobs.md
│       │   ├── database-extensions.md
│       │   ├── databases.md
│       │   ├── defining-apis.mdx
│       │   ├── errors.md
│       │   ├── graphql.mdx
│       │   ├── object-storage.md
│       │   ├── pubsub.md
│       │   ├── raw-endpoints.mdx
│       │   ├── secrets.md
│       │   ├── services.mdx
│       │   ├── static-assets.mdx
│       │   ├── streaming-apis.mdx
│       │   ├── types.mdx
│       │   └── validation.mdx
│       ├── quick-start.mdx
│       ├── self-host/
│       │   ├── build.md
│       │   ├── ci-cd.md
│       │   ├── configure-infra.md
│       │   ├── deploy-to-digital-ocean.md
│       │   └── deploy-to-railway.md
│       └── tutorials/
│           ├── graphql.mdx
│           ├── rest-api.mdx
│           ├── slack-bot.md
│           └── uptime.md
├── e2e-tests/
│   ├── README.md
│   ├── app_test.go
│   ├── echo_app_test.go
│   ├── testdata/
│   │   ├── echo/
│   │   │   ├── .gitignore
│   │   │   ├── cache/
│   │   │   │   └── cache.go
│   │   │   ├── di/
│   │   │   │   └── di.go
│   │   │   ├── echo/
│   │   │   │   ├── config.cue
│   │   │   │   ├── config.go
│   │   │   │   ├── config_test.go
│   │   │   │   ├── echo.go
│   │   │   │   └── echo_test.go
│   │   │   ├── empty_cfg/
│   │   │   │   └── service.go
│   │   │   ├── encore.app
│   │   │   ├── endtoend/
│   │   │   │   └── endtoend.go
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── middleware/
│   │   │   │   ├── middleware.go
│   │   │   │   └── middleware_test.go
│   │   │   ├── test/
│   │   │   │   └── endpoints.go
│   │   │   └── validation/
│   │   │       └── validation.go
│   │   ├── echo_client/
│   │   │   ├── .eslintrc.cjs
│   │   │   ├── .gitignore
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── golang/
│   │   │   │   └── client/
│   │   │   │       └── goclient.go
│   │   │   ├── js/
│   │   │   │   ├── client.js
│   │   │   │   └── main.js
│   │   │   ├── main.go
│   │   │   ├── package.json
│   │   │   ├── ts/
│   │   │   │   ├── client.ts
│   │   │   │   └── main.ts
│   │   │   └── tsconfig.json
│   │   ├── testscript/
│   │   │   ├── encore_currentrequest.txt
│   │   │   ├── et_mocking.txt
│   │   │   ├── et_override_user.txt
│   │   │   ├── et_override_user_authdata.txt
│   │   │   ├── experiment_local_secrets_override.txtar
│   │   │   ├── fallback_routes.txt
│   │   │   ├── graceful_shutdown.txt
│   │   │   ├── pubsub_method_handler.txt
│   │   │   ├── pubsub_ref.txt
│   │   │   ├── ts_hello.txt
│   │   │   └── ts_worker_pooling.txt
│   │   └── tsapp/
│   │       ├── .gitignore
│   │       ├── encore.app
│   │       ├── package.json
│   │       ├── service1/
│   │       │   ├── api.test.ts
│   │       │   ├── api.ts
│   │       │   └── encore.service.ts
│   │       ├── service2/
│   │       │   ├── api.test.ts
│   │       │   ├── api.ts
│   │       │   └── encore.service.ts
│   │       ├── tsconfig.json
│   │       └── vite.config.ts
│   ├── testscript_test.go
│   └── ts_app_test.go
├── go.mod
├── go.sum
├── go_llm_instructions.txt
├── internal/
│   ├── conf/
│   │   └── conf.go
│   ├── env/
│   │   └── env.go
│   ├── etrace/
│   │   ├── etrace.go
│   │   ├── gid.go
│   │   └── protocol.go
│   ├── gocodegen/
│   │   ├── helpers.go
│   │   ├── marshalling.go
│   │   └── package.go
│   ├── goldfish/
│   │   └── goldfish.go
│   ├── httpcache/
│   │   ├── LICENSE.txt
│   │   ├── README.md
│   │   ├── diskcache/
│   │   │   ├── diskcache.go
│   │   │   └── diskcache_test.go
│   │   ├── httpcache.go
│   │   ├── httpcache_test.go
│   │   └── test/
│   │       ├── test.go
│   │       └── test_test.go
│   ├── lookpath/
│   │   └── lookpath.go
│   ├── optracker/
│   │   ├── async.go
│   │   └── optracker.go
│   ├── userconfig/
│   │   ├── config.go
│   │   ├── def.go
│   │   ├── docs.go
│   │   ├── files.go
│   │   ├── gendocs/
│   │   │   └── gendocs.go
│   │   ├── reflect.go
│   │   ├── value.go
│   │   └── write.go
│   └── version/
│       └── version.go
├── miniredis/
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── MINIREDIS_LICENSE.txt
│   ├── src/
│   │   ├── bin/
│   │   │   └── miniredis-rs-server.rs
│   │   ├── cmd/
│   │   │   ├── client.rs
│   │   │   ├── cluster.rs
│   │   │   ├── connection.rs
│   │   │   ├── generic.rs
│   │   │   ├── geo.rs
│   │   │   ├── hash.rs
│   │   │   ├── hll.rs
│   │   │   ├── list.rs
│   │   │   ├── mod.rs
│   │   │   ├── object.rs
│   │   │   ├── pubsub.rs
│   │   │   ├── scripting.rs
│   │   │   ├── server.rs
│   │   │   ├── set.rs
│   │   │   ├── sorted_set.rs
│   │   │   ├── stream.rs
│   │   │   ├── string.rs
│   │   │   └── transactions.rs
│   │   ├── connection.rs
│   │   ├── db.rs
│   │   ├── dispatch.rs
│   │   ├── error.rs
│   │   ├── frame.rs
│   │   ├── geo.rs
│   │   ├── hll.rs
│   │   ├── keys.rs
│   │   ├── lib.rs
│   │   ├── pubsub.rs
│   │   ├── server.rs
│   │   └── types.rs
│   └── tests/
│       ├── cmd_auth.rs
│       ├── cmd_bit.rs
│       ├── cmd_client.rs
│       ├── cmd_cluster.rs
│       ├── cmd_connection.rs
│       ├── cmd_generic.rs
│       ├── cmd_geo.rs
│       ├── cmd_hash.rs
│       ├── cmd_hll.rs
│       ├── cmd_list.rs
│       ├── cmd_misc.rs
│       ├── cmd_pubsub.rs
│       ├── cmd_resp3.rs
│       ├── cmd_scripting.rs
│       ├── cmd_server.rs
│       ├── cmd_set.rs
│       ├── cmd_sorted_set.rs
│       ├── cmd_stream.rs
│       ├── cmd_string.rs
│       ├── cmd_tls.rs
│       ├── cmd_transactions.rs
│       ├── direct_api.rs
│       ├── helpers/
│       │   └── mod.rs
│       ├── integration-go/
│       │   ├── Makefile
│       │   ├── README.md
│       │   ├── cluster_test.go
│       │   ├── command_test.go
│       │   ├── connection_test.go
│       │   ├── ephemeral.go
│       │   ├── generic_test.go
│       │   ├── geo_test.go
│       │   ├── go.mod
│       │   ├── go.sum
│       │   ├── hash_test.go
│       │   ├── hll_test.go
│       │   ├── list_test.go
│       │   ├── pubsub_test.go
│       │   ├── script_test.go
│       │   ├── server_test.go
│       │   ├── set_test.go
│       │   ├── sorted_set_test.go
│       │   ├── stream_test.go
│       │   ├── string_test.go
│       │   ├── test.go
│       │   ├── tls.go
│       │   └── tx_test.go
│       └── smoke.rs
├── parser/
│   └── encoding/
│       └── rpc.go
├── pkg/
│   ├── ansi/
│   │   └── ansi.go
│   ├── appfile/
│   │   └── appfile.go
│   ├── bits/
│   │   ├── bits.go
│   │   └── download.go
│   ├── builder/
│   │   ├── builder.go
│   │   └── builderimpl/
│   │       └── builders.go
│   ├── clientgen/
│   │   ├── client.go
│   │   ├── client_test.go
│   │   ├── clientgentypes/
│   │   │   └── clientgentypes.go
│   │   ├── errors.go
│   │   ├── golang.go
│   │   ├── javascript.go
│   │   ├── openapi/
│   │   │   ├── openapi.go
│   │   │   └── schema.go
│   │   ├── testdata/
│   │   │   ├── README.md
│   │   │   ├── goapp/
│   │   │   │   ├── expected_baseauth_golang.go
│   │   │   │   ├── expected_baseauth_javascript.js
│   │   │   │   ├── expected_baseauth_openapi.json
│   │   │   │   ├── expected_baseauth_typescript.ts
│   │   │   │   ├── expected_golang.go
│   │   │   │   ├── expected_httpstatus_golang.go
│   │   │   │   ├── expected_httpstatus_typescript.ts
│   │   │   │   ├── expected_javascript.js
│   │   │   │   ├── expected_noauth_golang.go
│   │   │   │   ├── expected_noauth_javascript.js
│   │   │   │   ├── expected_noauth_openapi.json
│   │   │   │   ├── expected_noauth_typescript.ts
│   │   │   │   ├── expected_openapi.json
│   │   │   │   ├── expected_typescript.ts
│   │   │   │   ├── input.go
│   │   │   │   ├── input_baseauth.go
│   │   │   │   ├── input_httpstatus.go
│   │   │   │   ├── input_noauth.go
│   │   │   │   └── tsconfig.json
│   │   │   └── tsapp/
│   │   │       ├── expected_decimal_golang.go
│   │   │       ├── expected_decimal_javascript.js
│   │   │       ├── expected_decimal_openapi.json
│   │   │       ├── expected_decimal_typescript.ts
│   │   │       ├── expected_golang.go
│   │   │       ├── expected_httpstatus_golang.go
│   │   │       ├── expected_httpstatus_typescript.ts
│   │   │       ├── expected_javascript.js
│   │   │       ├── expected_list_of_union_javascript.js
│   │   │       ├── expected_list_of_union_openapi.json
│   │   │       ├── expected_list_of_union_shared.ts
│   │   │       ├── expected_list_of_union_typescript.ts
│   │   │       ├── expected_openapi.json
│   │   │       ├── expected_shared.ts
│   │   │       ├── expected_stream_javascript.js
│   │   │       ├── expected_stream_shared.ts
│   │   │       ├── expected_stream_typescript.ts
│   │   │       ├── expected_typescript.ts
│   │   │       ├── input.ts
│   │   │       ├── input_decimal.ts
│   │   │       ├── input_httpstatus.ts
│   │   │       ├── input_list_of_union.ts
│   │   │       ├── input_stream.ts
│   │   │       └── tsconfig.json
│   │   ├── types.go
│   │   ├── typescript.go
│   │   └── utils.go
│   ├── cueutil/
│   │   ├── build.go
│   │   └── types.go
│   ├── dockerbuild/
│   │   ├── dockerbuild.go
│   │   ├── dockerbuild_test.go
│   │   ├── features.go
│   │   ├── manifest.go
│   │   ├── spec.go
│   │   ├── spec_test.go
│   │   └── tarcopy.go
│   ├── editors/
│   │   ├── LICENSE
│   │   ├── doc.go
│   │   ├── encore_names.go
│   │   ├── encore_urls.go
│   │   ├── launch.go
│   │   ├── lookup.go
│   │   ├── lookup_darwin.go
│   │   ├── lookup_linux.go
│   │   ├── lookup_test.go
│   │   ├── lookup_unsupported.go
│   │   ├── lookup_windows.go
│   │   └── utils.go
│   ├── eerror/
│   │   ├── error.go
│   │   ├── stack.go
│   │   └── zerolog.go
│   ├── emulators/
│   │   └── storage/
│   │       ├── LICENSE
│   │       ├── gcsemu/
│   │       │   ├── batch.go
│   │       │   ├── client.go
│   │       │   ├── errors.go
│   │       │   ├── filestore.go
│   │       │   ├── filestore_test.go
│   │       │   ├── gcsemu.go
│   │       │   ├── gcsemu_test.go
│   │       │   ├── http_wrappers.go
│   │       │   ├── memstore.go
│   │       │   ├── memstore_test.go
│   │       │   ├── meta.go
│   │       │   ├── multipart.go
│   │       │   ├── parse.go
│   │       │   ├── range.go
│   │       │   ├── range_test.go
│   │       │   ├── raw_http_test.go
│   │       │   ├── remote_test.go
│   │       │   ├── server.go
│   │       │   ├── store.go
│   │       │   ├── util.go
│   │       │   └── walk.go
│   │       └── gcsutil/
│   │           ├── counted_lock.go
│   │           ├── doc.go
│   │           ├── gcspagetoken.go
│   │           ├── gcspagetoken.pb.go
│   │           ├── gcspagetoken.proto
│   │           ├── gcspagetoken_test.go
│   │           ├── transient_lock_map.go
│   │           └── transient_lock_map_test.go
│   ├── encorebuild/
│   │   ├── buildconf/
│   │   │   └── config.go
│   │   ├── buildutil/
│   │   │   └── buildutil.go
│   │   ├── cmd/
│   │   │   ├── build-local-binary/
│   │   │   │   └── build-local-binary.go
│   │   │   └── make-release/
│   │   │       └── make-release.go
│   │   ├── compile/
│   │   │   └── compile.go
│   │   ├── dist_builder.go
│   │   ├── gentypedefs/
│   │   │   ├── gentypedefs.go
│   │   │   └── napi.cjs.tmpl
│   │   ├── githubrelease/
│   │   │   └── githubrelease.go
│   │   ├── jsruntimebuild.go
│   │   ├── supervisorbuild.go
│   │   └── windows/
│   │       ├── .gitignore
│   │       ├── build.bat
│   │       ├── manifest.xml
│   │       └── resources.rc
│   ├── environ/
│   │   └── environ.go
│   ├── errinsrc/
│   │   ├── characters.go
│   │   ├── errinsrc.go
│   │   ├── internal/
│   │   │   ├── cuelocation.go
│   │   │   ├── golocation.go
│   │   │   ├── helper.go
│   │   │   └── location.go
│   │   ├── list.go
│   │   ├── setup_test.go
│   │   ├── srcerrors/
│   │   │   ├── errors.go
│   │   │   ├── helpers.go
│   │   │   └── helptext.go
│   │   ├── srcrender.go
│   │   ├── srcrender_test.go
│   │   ├── stack.go
│   │   ├── stack_dev.go
│   │   ├── stack_release.go
│   │   ├── testdata/
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__on_following_lines_ascii.golden
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__on_following_lines_unicode.golden
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__on_same_line_ascii.golden
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__on_same_line_unicode.golden
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__spaced_apart_ascii.golden
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__spaced_apart_unicode.golden
│   │   │   ├── Test_renderSrc_MutlilineError_ascii.golden
│   │   │   ├── Test_renderSrc_MutlilineError_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__error_no_text_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__error_no_text_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__multiline_message_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__multiline_message_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__simple_error_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__simple_error_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__simple_help_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__simple_help_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__simple_warning_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__simple_warning_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__single_character_error_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__single_character_error_unicode.golden
│   │   │   ├── test.cue
│   │   │   └── test.go
│   │   └── utils.go
│   ├── errlist/
│   │   └── errlist.go
│   ├── errors/
│   │   ├── locations.go
│   │   ├── range.go
│   │   ├── template.go
│   │   └── utils.go
│   ├── fns/
│   │   └── fns.go
│   ├── github/
│   │   └── github.go
│   ├── golden/
│   │   └── golden.go
│   ├── idents/
│   │   ├── identifiers.go
│   │   └── identifiers_test.go
│   ├── jsonext/
│   │   ├── listencoder.go
│   │   ├── listencoder_test.go
│   │   └── protojson.go
│   ├── logging/
│   │   └── zerolog_adapter.go
│   ├── make-release/
│   │   ├── compilers.go
│   │   ├── dist_builder.go
│   │   ├── js_packager.go
│   │   ├── make-release.go
│   │   ├── utils.go
│   │   └── windows/
│   │       ├── .gitignore
│   │       ├── build.bat
│   │       ├── manifest.xml
│   │       └── resources.rc
│   ├── metascrub/
│   │   ├── metascrub.go
│   │   └── metascrub_test.go
│   ├── namealloc/
│   │   ├── namealloc.go
│   │   └── namealloc_test.go
│   ├── noopgateway/
│   │   ├── noopgateway.go
│   │   └── retry_dialer.go
│   ├── noopgwdesc/
│   │   └── gateway.go
│   ├── option/
│   │   ├── option.go
│   │   └── pkgfn.go
│   ├── paths/
│   │   └── paths.go
│   ├── pgproxy/
│   │   ├── README.md
│   │   ├── pgproxy.go
│   │   └── scram.go
│   ├── promise/
│   │   └── prom.go
│   ├── rtconfgen/
│   │   ├── base_builder.go
│   │   ├── convert.go
│   │   ├── infra_builder.go
│   │   └── resource_map.go
│   ├── supervisor/
│   │   ├── cmd/
│   │   │   └── supervisor-encore/
│   │   │       └── main.go
│   │   └── supervisor.go
│   ├── svcproxy/
│   │   ├── dialer.go
│   │   ├── doc.go
│   │   └── svcproxy.go
│   ├── tarstream/
│   │   ├── LICENSE
│   │   ├── datavec.go
│   │   ├── datavec_test.go
│   │   ├── tarstream.go
│   │   └── tarstream_test.go
│   ├── traceparser/
│   │   ├── binreader.go
│   │   ├── parser.go
│   │   └── parser_test.go
│   ├── vcs/
│   │   ├── app.go
│   │   └── vcs.go
│   ├── vfs/
│   │   ├── directory.go
│   │   ├── doc.go
│   │   ├── file.go
│   │   ├── node.go
│   │   ├── testdata/
│   │   │   └── filteredglob/
│   │   │       ├── blahsvc/
│   │   │       │   ├── another.json
│   │   │       │   └── test.json
│   │   │       ├── foosystem/
│   │   │       │   ├── README.md
│   │   │       │   ├── anotherservice/
│   │   │       │   │   └── test.txt
│   │   │       │   └── barservice/
│   │   │       │       ├── blah.json
│   │   │       │       └── test.txt
│   │   │       └── nope/
│   │   │           └── ignored.txt
│   │   ├── utils.go
│   │   ├── vfs.go
│   │   └── vfs_test.go
│   ├── watcher/
│   │   ├── event.go
│   │   ├── rlimit_nix.go
│   │   ├── rlimit_noop.go
│   │   ├── util.go
│   │   └── watcher.go
│   ├── words/
│   │   ├── funcs.go
│   │   ├── shortwords.txt
│   │   ├── words.go
│   │   └── words_test.go
│   └── xos/
│       ├── xos_unix.go
│       └── xos_windows.go
├── proto/
│   ├── encore/
│   │   ├── daemon/
│   │   │   ├── daemon.pb.go
│   │   │   ├── daemon.proto
│   │   │   └── daemon_grpc.pb.go
│   │   ├── engine/
│   │   │   ├── trace/
│   │   │   │   ├── trace.pb.go
│   │   │   │   ├── trace.proto
│   │   │   │   └── trace_util.go
│   │   │   └── trace2/
│   │   │       ├── trace2.pb.go
│   │   │       ├── trace2.proto
│   │   │       └── trace_util.go
│   │   ├── parser/
│   │   │   ├── meta/
│   │   │   │   └── v1/
│   │   │   │       ├── meta.pb.go
│   │   │   │       ├── meta.pb.ts
│   │   │   │       └── meta.proto
│   │   │   └── schema/
│   │   │       └── v1/
│   │   │           ├── schema.pb.go
│   │   │           ├── schema.pb.ts
│   │   │           ├── schema.proto
│   │   │           ├── walk.go
│   │   │           └── walk_test.go
│   │   └── runtime/
│   │       └── v1/
│   │           ├── infra.pb.go
│   │           ├── infra.proto
│   │           ├── runtime.pb.go
│   │           ├── runtime.proto
│   │           ├── secretdata.pb.go
│   │           └── secretdata.proto
│   ├── gen.go
│   ├── gen.sh
│   └── prompb/
│       ├── remote.proto
│       └── types.proto
├── runtimes/
│   ├── core/
│   │   ├── Cargo.toml
│   │   ├── build.rs
│   │   ├── resources/
│   │   │   └── test/
│   │   │       ├── infra.config.json
│   │   │       └── runtime.pb
│   │   └── src/
│   │       ├── api/
│   │       │   ├── auth/
│   │       │   │   ├── local.rs
│   │       │   │   ├── mod.rs
│   │       │   │   └── remote.rs
│   │       │   ├── call.rs
│   │       │   ├── cors/
│   │       │   │   ├── cors_headers_config/
│   │       │   │   │   ├── LICENSE
│   │       │   │   │   ├── allow_credentials.rs
│   │       │   │   │   ├── allow_headers.rs
│   │       │   │   │   ├── allow_methods.rs
│   │       │   │   │   ├── allow_origin.rs
│   │       │   │   │   ├── allow_private_network.rs
│   │       │   │   │   ├── expose_headers.rs
│   │       │   │   │   ├── max_age.rs
│   │       │   │   │   ├── mod.rs
│   │       │   │   │   └── vary.rs
│   │       │   │   ├── mod.rs
│   │       │   │   └── tests.rs
│   │       │   ├── encore_routes/
│   │       │   │   ├── healthz.rs
│   │       │   │   └── mod.rs
│   │       │   ├── endpoint.rs
│   │       │   ├── error.rs
│   │       │   ├── gateway/
│   │       │   │   ├── mod.rs
│   │       │   │   ├── router.rs
│   │       │   │   └── websocket.rs
│   │       │   ├── http.rs
│   │       │   ├── http_server.rs
│   │       │   ├── httputil.rs
│   │       │   ├── jsonschema/
│   │       │   │   ├── de.rs
│   │       │   │   ├── meta.rs
│   │       │   │   ├── mod.rs
│   │       │   │   ├── parse.rs
│   │       │   │   ├── ser.rs
│   │       │   │   └── validation.rs
│   │       │   ├── manager.rs
│   │       │   ├── mod.rs
│   │       │   ├── paths.rs
│   │       │   ├── pvalue.rs
│   │       │   ├── reqauth/
│   │       │   │   ├── caller.rs
│   │       │   │   ├── encoreauth/
│   │       │   │   │   ├── mod.rs
│   │       │   │   │   ├── ophash.rs
│   │       │   │   │   └── sign.rs
│   │       │   │   ├── meta.rs
│   │       │   │   ├── mod.rs
│   │       │   │   ├── platform.rs
│   │       │   │   └── svcauth.rs
│   │       │   ├── schema/
│   │       │   │   ├── body.rs
│   │       │   │   ├── cookie.rs
│   │       │   │   ├── encoding.rs
│   │       │   │   ├── header.rs
│   │       │   │   ├── httpstatus.rs
│   │       │   │   ├── method.rs
│   │       │   │   ├── mod.rs
│   │       │   │   ├── path.rs
│   │       │   │   └── query.rs
│   │       │   ├── server.rs
│   │       │   ├── snapshots/
│   │       │   │   ├── encore_runtime_core__api__paths__tests__basic.snap
│   │       │   │   ├── encore_runtime_core__api__paths__tests__fallback.snap
│   │       │   │   ├── encore_runtime_core__api__paths__tests__paths_to_register.snap
│   │       │   │   ├── encore_runtime_core__api__paths__tests__tsr_conflict.snap
│   │       │   │   └── encore_runtime_core__api__paths__tests__wildcard.snap
│   │       │   ├── static_assets.rs
│   │       │   ├── websocket.rs
│   │       │   └── websocket_client.rs
│   │       ├── base32.rs
│   │       ├── cache/
│   │       │   ├── client.rs
│   │       │   ├── client_tests.rs
│   │       │   ├── error.rs
│   │       │   ├── manager.rs
│   │       │   ├── miniredis.rs
│   │       │   ├── mod.rs
│   │       │   ├── noop.rs
│   │       │   └── tracer.rs
│   │       ├── error/
│   │       │   ├── conversions.rs
│   │       │   └── mod.rs
│   │       ├── infracfg.rs
│   │       ├── lib.rs
│   │       ├── log/
│   │       │   ├── consolewriter.rs
│   │       │   ├── fields.rs
│   │       │   ├── logger.rs
│   │       │   ├── mod.rs
│   │       │   └── writers.rs
│   │       ├── meta/
│   │       │   └── mod.rs
│   │       ├── metadata/
│   │       │   ├── aws.rs
│   │       │   ├── gce.rs
│   │       │   └── mod.rs
│   │       ├── metrics/
│   │       │   ├── atomic.rs
│   │       │   ├── counter.rs
│   │       │   ├── exporter/
│   │       │   │   ├── aws.rs
│   │       │   │   ├── datadog.rs
│   │       │   │   ├── gcp.rs
│   │       │   │   ├── mod.rs
│   │       │   │   └── prometheus.rs
│   │       │   ├── gauge.rs
│   │       │   ├── manager.rs
│   │       │   ├── mod.rs
│   │       │   ├── registry.rs
│   │       │   ├── system.rs
│   │       │   └── test.rs
│   │       ├── model/
│   │       │   └── mod.rs
│   │       ├── names.rs
│   │       ├── objects/
│   │       │   ├── gcs/
│   │       │   │   ├── bucket.rs
│   │       │   │   └── mod.rs
│   │       │   ├── manager.rs
│   │       │   ├── mod.rs
│   │       │   ├── noop/
│   │       │   │   └── mod.rs
│   │       │   └── s3/
│   │       │       ├── bucket.rs
│   │       │       └── mod.rs
│   │       ├── proccfg.rs
│   │       ├── pubsub/
│   │       │   ├── gcp/
│   │       │   │   ├── jwk.rs
│   │       │   │   ├── mod.rs
│   │       │   │   ├── push_sub.rs
│   │       │   │   ├── sub.rs
│   │       │   │   └── topic.rs
│   │       │   ├── manager.rs
│   │       │   ├── mod.rs
│   │       │   ├── noop/
│   │       │   │   └── mod.rs
│   │       │   ├── nsq/
│   │       │   │   ├── mod.rs
│   │       │   │   ├── sub.rs
│   │       │   │   └── topic.rs
│   │       │   ├── push_registry.rs
│   │       │   └── sqs_sns/
│   │       │       ├── fetcher.rs
│   │       │       ├── mod.rs
│   │       │       ├── sub.rs
│   │       │       └── topic.rs
│   │       ├── runtime_config/
│   │       │   └── mod.rs
│   │       ├── secrets/
│   │       │   └── mod.rs
│   │       ├── sqldb/
│   │       │   ├── client.rs
│   │       │   ├── manager.rs
│   │       │   ├── mod.rs
│   │       │   ├── numeric.rs
│   │       │   ├── transaction.rs
│   │       │   └── val.rs
│   │       └── trace/
│   │           ├── eventbuf.rs
│   │           ├── log.rs
│   │           ├── mod.rs
│   │           ├── protocol.rs
│   │           └── time_anchor.rs
│   ├── go/
│   │   ├── README.md
│   │   ├── appruntime/
│   │   │   ├── apisdk/
│   │   │   │   ├── api/
│   │   │   │   │   ├── auth.go
│   │   │   │   │   ├── auth_remote.go
│   │   │   │   │   ├── call_context.go
│   │   │   │   │   ├── call_meta.go
│   │   │   │   │   ├── call_meta_test.go
│   │   │   │   │   ├── callers.go
│   │   │   │   │   ├── capture.go
│   │   │   │   │   ├── encore_routes.go
│   │   │   │   │   ├── errmarshalling/
│   │   │   │   │   │   ├── fallback.go
│   │   │   │   │   │   ├── jsonextension.go
│   │   │   │   │   │   ├── marshal.go
│   │   │   │   │   │   └── marshal_test.go
│   │   │   │   │   ├── gateway.go
│   │   │   │   │   ├── handler.go
│   │   │   │   │   ├── handler_test.go
│   │   │   │   │   ├── middleware.go
│   │   │   │   │   ├── pubsub_push_proxy.go
│   │   │   │   │   ├── reflection.go
│   │   │   │   │   ├── reflection_test.go
│   │   │   │   │   ├── registry.go
│   │   │   │   │   ├── reqtrack.go
│   │   │   │   │   ├── server.go
│   │   │   │   │   ├── server_test.go
│   │   │   │   │   ├── services.go
│   │   │   │   │   ├── singleton.go
│   │   │   │   │   ├── svcauth/
│   │   │   │   │   │   ├── doc.go
│   │   │   │   │   │   ├── encoreauth.go
│   │   │   │   │   │   ├── noop.go
│   │   │   │   │   │   ├── pkgfn.go
│   │   │   │   │   │   └── svcauth.go
│   │   │   │   │   ├── transport/
│   │   │   │   │   │   ├── doc.go
│   │   │   │   │   │   ├── eh2c.go
│   │   │   │   │   │   ├── http.go
│   │   │   │   │   │   ├── meta.go
│   │   │   │   │   │   └── transport.go
│   │   │   │   │   └── util.go
│   │   │   │   ├── app/
│   │   │   │   │   ├── app.go
│   │   │   │   │   ├── appinit/
│   │   │   │   │   │   └── appinit.go
│   │   │   │   │   └── setup.go
│   │   │   │   ├── cors/
│   │   │   │   │   ├── cors.go
│   │   │   │   │   └── cors_test.go
│   │   │   │   └── service/
│   │   │   │       ├── service.go
│   │   │   │       └── singleton.go
│   │   │   ├── doc.go
│   │   │   ├── exported/
│   │   │   │   ├── config/
│   │   │   │   │   ├── config.go
│   │   │   │   │   ├── infra/
│   │   │   │   │   │   ├── config.go
│   │   │   │   │   │   ├── config_test.go
│   │   │   │   │   │   ├── testdata/
│   │   │   │   │   │   │   ├── infra.config.json
│   │   │   │   │   │   │   └── runtime.json
│   │   │   │   │   │   └── validation.go
│   │   │   │   │   ├── parse.go
│   │   │   │   │   └── parse_test.go
│   │   │   │   ├── experiments/
│   │   │   │   │   ├── cli.go
│   │   │   │   │   ├── errors.go
│   │   │   │   │   ├── names.go
│   │   │   │   │   └── set.go
│   │   │   │   ├── model/
│   │   │   │   │   ├── request.go
│   │   │   │   │   └── trace.go
│   │   │   │   ├── scrub/
│   │   │   │   │   ├── benchmark_test.go
│   │   │   │   │   ├── scanner.go
│   │   │   │   │   ├── scanner_test.go
│   │   │   │   │   ├── scrub.go
│   │   │   │   │   ├── scrub_test.go
│   │   │   │   │   └── token_string.go
│   │   │   │   ├── stack/
│   │   │   │   │   ├── stack.go
│   │   │   │   │   ├── stack_app.go
│   │   │   │   │   ├── stack_noapp.go
│   │   │   │   │   └── stack_test.go
│   │   │   │   ├── trace/
│   │   │   │   │   ├── events.go
│   │   │   │   │   ├── http.go
│   │   │   │   │   ├── log.go
│   │   │   │   │   ├── logger.go
│   │   │   │   │   ├── mock_trace/
│   │   │   │   │   │   └── mock_trace.go
│   │   │   │   │   ├── mutex_app.go
│   │   │   │   │   ├── mutex_noapp.go
│   │   │   │   │   └── version.go
│   │   │   │   └── trace2/
│   │   │   │       ├── events.go
│   │   │   │       ├── http.go
│   │   │   │       ├── log.go
│   │   │   │       ├── logger.go
│   │   │   │       ├── mutex_app.go
│   │   │   │       ├── mutex_noapp.go
│   │   │   │       ├── timeanchor.go
│   │   │   │       └── version.go
│   │   │   ├── infrasdk/
│   │   │   │   ├── metadata/
│   │   │   │   │   ├── aws_collector.go
│   │   │   │   │   ├── cloud_run_collector.go
│   │   │   │   │   └── metadata.go
│   │   │   │   ├── metrics/
│   │   │   │   │   ├── README.md
│   │   │   │   │   ├── aws/
│   │   │   │   │   │   ├── cloudwatch.go
│   │   │   │   │   │   └── cloudwatch_test.go
│   │   │   │   │   ├── aws_cloudwatch_exporter.go
│   │   │   │   │   ├── datadog/
│   │   │   │   │   │   └── datadog.go
│   │   │   │   │   ├── datadog_exporter.go
│   │   │   │   │   ├── encore_cloud_exporter.go
│   │   │   │   │   ├── gcp/
│   │   │   │   │   │   ├── cloud_monitoring.go
│   │   │   │   │   │   └── cloud_monitoring_test.go
│   │   │   │   │   ├── gcp_cloud_monitoring_exporter.go
│   │   │   │   │   ├── logs_based_exporter.go
│   │   │   │   │   ├── logs_based_exporter_test.go
│   │   │   │   │   ├── metrics.go
│   │   │   │   │   ├── metrics_test.go
│   │   │   │   │   ├── metricstest/
│   │   │   │   │   │   └── test_exporter.go
│   │   │   │   │   ├── null_exporter.go
│   │   │   │   │   ├── prometheus/
│   │   │   │   │   │   ├── prometheus.go
│   │   │   │   │   │   ├── prometheus_test.go
│   │   │   │   │   │   └── prompb/
│   │   │   │   │   │       ├── remote.pb.go
│   │   │   │   │   │       └── types.pb.go
│   │   │   │   │   ├── prometheus_exporter.go
│   │   │   │   │   ├── system/
│   │   │   │   │   │   └── system.go
│   │   │   │   │   └── zzz_singleton_internal.go
│   │   │   │   └── secrets/
│   │   │   │       ├── manager_internal.go
│   │   │   │       └── secrets.go
│   │   │   └── shared/
│   │   │       ├── appconf/
│   │   │       │   └── appconf.go
│   │   │       ├── cfgutil/
│   │   │       │   └── svc.go
│   │   │       ├── cloud/
│   │   │       │   └── clouds.go
│   │   │       ├── cloudtrace/
│   │   │       │   ├── extractors.go
│   │   │       │   ├── gcp.go
│   │   │       │   └── logfields.go
│   │   │       ├── encoreenv/
│   │   │       │   ├── app.go
│   │   │       │   ├── encoreenv.go
│   │   │       │   └── noapp.go
│   │   │       ├── etype/
│   │   │       │   ├── marshal.go
│   │   │       │   └── unmarshal.go
│   │   │       ├── health/
│   │   │       │   ├── check.go
│   │   │       │   ├── health.go
│   │   │       │   └── singleton.go
│   │   │       ├── jsonapi/
│   │   │       │   ├── jsonapi.go
│   │   │       │   └── jsonapi_nonapp.go
│   │   │       ├── logging/
│   │   │       │   └── logging.go
│   │   │       ├── nativehist/
│   │   │       │   ├── PROMETHEUS_LICENSE.txt
│   │   │       │   └── nativehist.go
│   │   │       ├── platform/
│   │   │       │   ├── platform.go
│   │   │       │   ├── singleton.go
│   │   │       │   └── streaming_trace.go
│   │   │       ├── reqtrack/
│   │   │       │   ├── impl.go
│   │   │       │   ├── impl_app.go
│   │   │       │   ├── impl_noapp.go
│   │   │       │   ├── reqtrack.go
│   │   │       │   ├── singleton.go
│   │   │       │   └── trace_stream.go
│   │   │       ├── serde/
│   │   │       │   └── utils.go
│   │   │       ├── shutdown/
│   │   │       │   ├── shutdown.go
│   │   │       │   └── singleton.go
│   │   │       ├── syncutil/
│   │   │       │   ├── once.go
│   │   │       │   ├── once_test.go
│   │   │       │   └── syncutil.go
│   │   │       ├── testsupport/
│   │   │       │   ├── runtimehooks_app.go
│   │   │       │   ├── testconfig.go
│   │   │       │   └── testsupport.go
│   │   │       └── traceprovider/
│   │   │           ├── mock_trace/
│   │   │           │   ├── factory.go
│   │   │           │   └── mock_trace.go
│   │   │           └── traceprovider.go
│   │   ├── beta/
│   │   │   ├── auth/
│   │   │   │   ├── auth.go
│   │   │   │   └── pkgfn.go
│   │   │   ├── errs/
│   │   │   │   ├── builder.go
│   │   │   │   ├── codes.go
│   │   │   │   ├── details.go
│   │   │   │   ├── error.go
│   │   │   │   └── errs_internal.go
│   │   │   └── package.go
│   │   ├── config/
│   │   │   ├── helpers_internal.go
│   │   │   ├── manager_internal.go
│   │   │   ├── pkgfn.go
│   │   │   ├── test_internal.go
│   │   │   └── types.go
│   │   ├── cron/
│   │   │   └── cron.go
│   │   ├── et/
│   │   │   ├── auth.go
│   │   │   ├── config.go
│   │   │   ├── manager_internal.go
│   │   │   ├── mocking.go
│   │   │   ├── package.go
│   │   │   ├── pkgfn.go
│   │   │   ├── pubsub.go
│   │   │   ├── singleton_internal.go
│   │   │   └── sqldb.go
│   │   ├── example_test.go
│   │   ├── go.mod
│   │   ├── go.sum
│   │   ├── internal/
│   │   │   ├── limiter/
│   │   │   │   ├── limiter.go
│   │   │   │   └── noop.go
│   │   │   └── platformauth/
│   │   │       └── platformauth.go
│   │   ├── meta.go
│   │   ├── metrics/
│   │   │   ├── bits_internal.go
│   │   │   ├── histogram_internal.go
│   │   │   ├── metrics.go
│   │   │   ├── metrics_test.go
│   │   │   ├── pkgfn.go
│   │   │   ├── registry_internal.go
│   │   │   ├── singleton_internal.go
│   │   │   └── units.go
│   │   ├── middleware/
│   │   │   ├── middleware.go
│   │   │   └── middleware_internal.go
│   │   ├── package.go
│   │   ├── pkgfn.go
│   │   ├── pubsub/
│   │   │   ├── internal/
│   │   │   │   ├── aws/
│   │   │   │   │   ├── manager.go
│   │   │   │   │   ├── topic.go
│   │   │   │   │   └── topic_test.go
│   │   │   │   ├── azure/
│   │   │   │   │   ├── clients.go
│   │   │   │   │   └── topic.go
│   │   │   │   ├── encorecloud/
│   │   │   │   │   ├── manager.go
│   │   │   │   │   └── topic.go
│   │   │   │   ├── gcp/
│   │   │   │   │   ├── clients.go
│   │   │   │   │   ├── push_handler.go
│   │   │   │   │   └── topic.go
│   │   │   │   ├── noop/
│   │   │   │   │   └── topic.go
│   │   │   │   ├── nsq/
│   │   │   │   │   ├── log_adapter.go
│   │   │   │   │   └── topic.go
│   │   │   │   ├── test/
│   │   │   │   │   └── topic.go
│   │   │   │   ├── types/
│   │   │   │   │   ├── private.go
│   │   │   │   │   ├── public.go
│   │   │   │   │   └── push_registry.go
│   │   │   │   └── utils/
│   │   │   │       ├── contexts.go
│   │   │   │       ├── utils.go
│   │   │   │       ├── utils_test.go
│   │   │   │       ├── workers.go
│   │   │   │       └── workers_test.go
│   │   │   ├── manager_internal.go
│   │   │   ├── package.go
│   │   │   ├── pkgfn.go
│   │   │   ├── provider_aws.go
│   │   │   ├── provider_azure.go
│   │   │   ├── provider_encorecloud.go
│   │   │   ├── provider_gcp.go
│   │   │   ├── provider_nsq.go
│   │   │   ├── refs.go
│   │   │   ├── subscription.go
│   │   │   ├── test_internal.go
│   │   │   ├── topic.go
│   │   │   ├── types.go
│   │   │   └── zzz_singleton_internal.go
│   │   ├── request.go
│   │   ├── rlog/
│   │   │   ├── pkgfn.go
│   │   │   ├── rlog.go
│   │   │   └── rlog_test.go
│   │   ├── shutdown/
│   │   │   └── shutdown.go
│   │   ├── storage/
│   │   │   ├── cache/
│   │   │   │   ├── basic.go
│   │   │   │   ├── basic_test.go
│   │   │   │   ├── cache.go
│   │   │   │   ├── cache_test.go
│   │   │   │   ├── error_internal.go
│   │   │   │   ├── list.go
│   │   │   │   ├── list_test.go
│   │   │   │   ├── manager_internal.go
│   │   │   │   ├── noop_internal.go
│   │   │   │   ├── pkgfn.go
│   │   │   │   ├── set.go
│   │   │   │   ├── set_test.go
│   │   │   │   ├── struct.go
│   │   │   │   └── zzz_singleton_internal.go
│   │   │   ├── objects/
│   │   │   │   ├── bucket.go
│   │   │   │   ├── internal/
│   │   │   │   │   ├── providers/
│   │   │   │   │   │   ├── gcs/
│   │   │   │   │   │   │   └── bucket.go
│   │   │   │   │   │   ├── noop/
│   │   │   │   │   │   │   └── noop.go
│   │   │   │   │   │   └── s3/
│   │   │   │   │   │       ├── bucket.go
│   │   │   │   │   │       ├── mock_client_test.go
│   │   │   │   │   │       ├── uploader.go
│   │   │   │   │   │       └── uploader_test.go
│   │   │   │   │   └── types/
│   │   │   │   │       └── types.go
│   │   │   │   ├── manager_internal.go
│   │   │   │   ├── objects.go
│   │   │   │   ├── options.go
│   │   │   │   ├── package.go
│   │   │   │   ├── path_escape.go
│   │   │   │   ├── provider_gcs.go
│   │   │   │   ├── provider_s3.go
│   │   │   │   ├── refs.go
│   │   │   │   ├── registry_internal.go
│   │   │   │   └── zzz_singleton_internal.go
│   │   │   └── sqldb/
│   │   │       ├── db.go
│   │   │       ├── db_hooks_test.go
│   │   │       ├── errors.go
│   │   │       ├── errors_internal.go
│   │   │       ├── errors_test.go
│   │   │       ├── internal/
│   │   │       │   └── stdlibdriver/
│   │   │       │       ├── LICENSE
│   │   │       │       └── stdlibdriver.go
│   │   │       ├── manager_internal.go
│   │   │       ├── pgx_tracer_internal.go
│   │   │       ├── pkgfn.go
│   │   │       ├── sqldb.go
│   │   │       ├── sqldb_test.go
│   │   │       ├── sqlerr/
│   │   │       │   └── sqlerr.go
│   │   │       ├── stdlib.go
│   │   │       ├── stdlib_noop_internal.go
│   │   │       ├── stdlib_wrapper_internal.go
│   │   │       ├── test_db.go
│   │   │       └── zzz_singleton_internal.go
│   │   └── types/
│   │       ├── option/
│   │       │   └── option.go
│   │       └── uuid/
│   │           ├── codec.go
│   │           ├── codec_test.go
│   │           ├── fuzz.go
│   │           ├── generator.go
│   │           ├── generator_test.go
│   │           ├── sql.go
│   │           ├── sql_test.go
│   │           ├── uuid.go
│   │           └── uuid_test.go
│   └── js/
│       ├── .gitignore
│       ├── Cargo.toml
│       ├── build.rs
│       ├── encore.dev/
│       │   ├── LICENSE
│       │   ├── README.md
│       │   ├── api/
│       │   │   ├── error.ts
│       │   │   ├── gateway.ts
│       │   │   ├── httpstatus.ts
│       │   │   ├── mod.ts
│       │   │   └── stream.ts
│       │   ├── app_meta.ts
│       │   ├── auth/
│       │   │   └── mod.ts
│       │   ├── config/
│       │   │   ├── mod.ts
│       │   │   └── secrets.ts
│       │   ├── cron/
│       │   │   └── mod.ts
│       │   ├── internal/
│       │   │   ├── api/
│       │   │   │   ├── mod.ts
│       │   │   │   └── node_http.ts
│       │   │   ├── appinit/
│       │   │   │   └── mod.ts
│       │   │   ├── auth/
│       │   │   │   └── mod.ts
│       │   │   ├── codegen/
│       │   │   │   ├── api.ts
│       │   │   │   ├── appinit.ts
│       │   │   │   └── auth.ts
│       │   │   ├── metrics/
│       │   │   │   ├── mod.ts
│       │   │   │   └── registry.ts
│       │   │   ├── reqtrack/
│       │   │   │   └── mod.ts
│       │   │   ├── runtime/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .npmignore
│       │   │   │   └── mod.ts
│       │   │   ├── types/
│       │   │   │   └── mod.ts
│       │   │   └── utils/
│       │   │       └── constraints.ts
│       │   ├── log/
│       │   │   └── mod.ts
│       │   ├── metrics/
│       │   │   └── mod.ts
│       │   ├── mod.ts
│       │   ├── package.json
│       │   ├── pubsub/
│       │   │   ├── mod.ts
│       │   │   ├── refs.ts
│       │   │   ├── subscription.ts
│       │   │   └── topic.ts
│       │   ├── req_meta.ts
│       │   ├── service/
│       │   │   └── mod.ts
│       │   ├── storage/
│       │   │   ├── cache/
│       │   │   │   ├── basic.ts
│       │   │   │   ├── cluster.ts
│       │   │   │   ├── errors.ts
│       │   │   │   ├── expiry.ts
│       │   │   │   ├── keyspace.ts
│       │   │   │   ├── list.ts
│       │   │   │   ├── mod.ts
│       │   │   │   └── set.ts
│       │   │   ├── objects/
│       │   │   │   ├── bucket.ts
│       │   │   │   ├── error.ts
│       │   │   │   ├── mod.ts
│       │   │   │   └── refs.ts
│       │   │   └── sqldb/
│       │   │       ├── database.ts
│       │   │       └── mod.ts
│       │   ├── tsconfig.json
│       │   ├── types/
│       │   │   └── mod.ts
│       │   └── validate/
│       │       └── mod.ts
│       └── src/
│           ├── api.rs
│           ├── cache.rs
│           ├── cookies.rs
│           ├── error.rs
│           ├── gateway.rs
│           ├── headers.rs
│           ├── lib.rs
│           ├── log.rs
│           ├── meta.rs
│           ├── metrics.rs
│           ├── napi_util.rs
│           ├── objects.rs
│           ├── pubsub.rs
│           ├── pvalue.rs
│           ├── raw_api.rs
│           ├── request_meta.rs
│           ├── runtime.rs
│           ├── runtime_config.rs
│           ├── secret.rs
│           ├── sqldb.rs
│           ├── stream/
│           │   ├── mod.rs
│           │   ├── read.rs
│           │   └── write.rs
│           ├── threadsafe_function.rs
│           └── websocket_api.rs
├── rustfmt.toml
├── supervisor/
│   ├── Cargo.toml
│   ├── build.rs
│   └── src/
│       ├── bin/
│       │   └── supervisor-encore.rs
│       ├── config.rs
│       ├── lib.rs
│       ├── proxy.rs
│       └── supervisor.rs
├── tools/
│   ├── publicapigen/
│   │   └── main.go
│   └── semgrep-rules/
│       ├── README.md
│       └── semgrep-go/
│           ├── LICENSE
│           ├── README.md
│           ├── badexponentiation.yml
│           ├── badnilguard.yml
│           ├── close-sql-query-rows.yml
│           ├── contextCancelable.yml
│           ├── contextTODO.yml
│           ├── ctx-time.yml
│           ├── errclosed.yml
│           ├── errnilcheck.yml
│           ├── errtodo.yml
│           ├── gofuzz.yml
│           ├── hashsum.yml
│           ├── hmac-bytes.yml
│           ├── hmac-hash.yml
│           ├── hostport.yml
│           ├── http-ctx-goroutine.yml
│           ├── ioutil-discard.yml
│           ├── ioutil-nop-closer.yml
│           ├── ioutil-readall.yml
│           ├── ioutil-readdir.yml
│           ├── ioutil-readfile.yml
│           ├── ioutil-tmpdir.yml
│           ├── ioutil-tmpfile.yml
│           ├── ioutil-writefile.yml
│           ├── joinpath.yml
│           ├── json-writer.yml
│           ├── mail-address.yml
│           ├── marshaljson.yml
│           ├── marshalyaml.yml
│           ├── mathbits.yml
│           ├── nilerr.yml
│           ├── nrtxn.yml
│           ├── oddbitwise.yml
│           ├── oddcompare-subtract-eq-zero.yml
│           ├── oddcompare-subtract-gt-zero.yml
│           ├── oddcompare-subtract-gte-zero.yml
│           ├── oddcompare-subtract-lt-zero.yml
│           ├── oddcompare-subtract-lte-zero.yml
│           ├── oddcompare-subtract-neq-zero.yml
│           ├── oddcompare-xor-eq-zero.yml
│           ├── oddcompare-xor-neq-zero.yml
│           ├── oddcompound.yml
│           ├── oddifsequence.yml
│           ├── oddmathbits.yml
│           ├── os-error-is-exist.yml
│           ├── os-error-is-not-exist.yml
│           ├── os-error-is-permission.yml
│           ├── os-error-is-timeout.yml
│           ├── parseint-downcast.yml
│           ├── readeof.yml
│           ├── readfull.yml
│           ├── returnnil.yml
│           ├── ruleguard.rules.go
│           ├── sortslice.yml
│           ├── sprinterr.yml
│           ├── timeafter.yml
│           ├── unixnano-after.yml
│           ├── unixnano-before.yml
│           ├── unmarshaljson.yml
│           ├── unmarshalyaml.yml
│           ├── use-fprintf-not-write-fsprint.yml
│           ├── use-write-not-fprint.yml
│           ├── use-writer-not-writestring.yml
│           ├── wrongerrcall.yml
│           └── wronglock.yml
├── ts_llm_instructions.txt
├── tsparser/
│   ├── Cargo.toml
│   ├── build.rs
│   ├── examples/
│   │   └── testparse.rs
│   ├── litparser/
│   │   ├── .gitignore
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── litparser-derive/
│   │   ├── .gitignore
│   │   ├── Cargo.toml
│   │   ├── src/
│   │   │   └── lib.rs
│   │   └── tests/
│   │       └── integration_tests.rs
│   ├── src/
│   │   ├── app/
│   │   │   └── mod.rs
│   │   ├── bin/
│   │   │   └── tsparser-encore.rs
│   │   ├── builder/
│   │   │   ├── codegen.rs
│   │   │   ├── compile.rs
│   │   │   ├── mod.rs
│   │   │   ├── package_mgmt.rs
│   │   │   ├── parse.rs
│   │   │   ├── prepare.rs
│   │   │   ├── templates/
│   │   │   │   ├── catalog/
│   │   │   │   │   ├── auth/
│   │   │   │   │   │   ├── auth_ts.handlebars
│   │   │   │   │   │   └── index_ts.handlebars
│   │   │   │   │   └── clients/
│   │   │   │   │       ├── endpoints_d_ts.handlebars
│   │   │   │   │       ├── endpoints_js.handlebars
│   │   │   │   │       ├── endpoints_testing_js.handlebars
│   │   │   │   │       ├── index_d_ts.handlebars
│   │   │   │   │       └── index_js.handlebars
│   │   │   │   └── entrypoints/
│   │   │   │       ├── combined/
│   │   │   │       │   └── main.handlebars
│   │   │   │       ├── gateways/
│   │   │   │       │   └── main.handlebars
│   │   │   │       └── services/
│   │   │   │           └── main.handlebars
│   │   │   ├── test.rs
│   │   │   └── transpiler.rs
│   │   ├── exports.rs
│   │   ├── legacymeta/
│   │   │   ├── api_schema.rs
│   │   │   ├── mod.rs
│   │   │   └── schema.rs
│   │   ├── lib.rs
│   │   ├── parser/
│   │   │   ├── doc_comments.rs
│   │   │   ├── fileset.rs
│   │   │   ├── memory_resolver.rs
│   │   │   ├── mod.rs
│   │   │   ├── module_loader.rs
│   │   │   ├── parser.rs
│   │   │   ├── resourceparser/
│   │   │   │   ├── bind.rs
│   │   │   │   ├── mod.rs
│   │   │   │   ├── paths.rs
│   │   │   │   └── resource_parser.rs
│   │   │   ├── resources/
│   │   │   │   ├── apis/
│   │   │   │   │   ├── api.rs
│   │   │   │   │   ├── authhandler.rs
│   │   │   │   │   ├── encoding.rs
│   │   │   │   │   ├── gateway.rs
│   │   │   │   │   ├── mod.rs
│   │   │   │   │   ├── service.rs
│   │   │   │   │   └── service_client.rs
│   │   │   │   ├── infra/
│   │   │   │   │   ├── cache.rs
│   │   │   │   │   ├── cron.rs
│   │   │   │   │   ├── metrics.rs
│   │   │   │   │   ├── mod.rs
│   │   │   │   │   ├── objects.rs
│   │   │   │   │   ├── pubsub_subscription.rs
│   │   │   │   │   ├── pubsub_topic.rs
│   │   │   │   │   ├── secret.rs
│   │   │   │   │   └── sqldb.rs
│   │   │   │   ├── mod.rs
│   │   │   │   └── parseutil.rs
│   │   │   ├── respath.rs
│   │   │   ├── service_discovery.rs
│   │   │   ├── types/
│   │   │   │   ├── ast_id.rs
│   │   │   │   ├── binding.rs
│   │   │   │   ├── mod.rs
│   │   │   │   ├── object.rs
│   │   │   │   ├── resolved.rs
│   │   │   │   ├── snapshots/
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@basic.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@call_expressions.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@call_signatures.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@export_default.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@export_wildcard.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@extends.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@generic.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@generics.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@infer.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@keyofenum.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@mapped_as.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@method_signatures.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@namespace_import.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@qualified_name.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@reexport_local.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@reexport_single.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@reexport_wildcard.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@typeof.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@validation.ts.snap
│   │   │   │   │   └── encore_tsparser__parser__types__tests__resolve_types@wirespec.ts.snap
│   │   │   │   ├── testdata/
│   │   │   │   │   ├── basic.ts
│   │   │   │   │   ├── call_expressions.ts
│   │   │   │   │   ├── call_signatures.ts
│   │   │   │   │   ├── export_default.ts
│   │   │   │   │   ├── extends.ts
│   │   │   │   │   ├── generic.ts
│   │   │   │   │   ├── generics.ts
│   │   │   │   │   ├── infer.txt
│   │   │   │   │   ├── keyofenum.ts
│   │   │   │   │   ├── mapped_as.ts
│   │   │   │   │   ├── method_signatures.ts
│   │   │   │   │   ├── namespace_import.txt
│   │   │   │   │   ├── qualified_name.ts
│   │   │   │   │   ├── reexport_local.txt
│   │   │   │   │   ├── reexport_single.txt
│   │   │   │   │   ├── reexport_wildcard.txt
│   │   │   │   │   ├── typeof.ts
│   │   │   │   │   ├── validation.ts
│   │   │   │   │   └── wirespec.ts
│   │   │   │   ├── tests.rs
│   │   │   │   ├── typ.rs
│   │   │   │   ├── type_resolve.rs
│   │   │   │   ├── type_string.rs
│   │   │   │   ├── utils.rs
│   │   │   │   ├── validation.rs
│   │   │   │   └── visitor.rs
│   │   │   ├── universe.ts
│   │   │   └── usageparser/
│   │   │       └── mod.rs
│   │   ├── resolve_utils.rs
│   │   ├── runtimeresolve/
│   │   │   ├── mod.rs
│   │   │   ├── node.rs
│   │   │   └── tsconfig.rs
│   │   ├── span_err.rs
│   │   ├── testutil/
│   │   │   ├── mod.rs
│   │   │   ├── testparse.rs
│   │   │   ├── testresolve.rs
│   │   │   └── typeparse.rs
│   │   └── tsconfig.rs
│   ├── tests/
│   │   ├── common/
│   │   │   └── mod.rs
│   │   ├── parse_tests.rs
│   │   └── testdata/
│   │       ├── builtins.txt
│   │       ├── cache.txt
│   │       ├── cache_named.txt
│   │       ├── mapped_as_clause.txt
│   │       ├── mapped_types.txt
│   │       ├── metrics.txt
│   │       ├── query_header.txt
│   │       └── tsconfig.txt
│   ├── txtar/
│   │   ├── .gitignore
│   │   ├── Cargo.toml
│   │   ├── LICENSE-APACHE
│   │   ├── LICENSE-MIT
│   │   ├── README.md
│   │   └── src/
│   │       ├── error.rs
│   │       └── lib.rs
│   └── wasm/
│       ├── Cargo.toml
│       ├── README.md
│       ├── build.rs
│       └── src/
│           └── lib.rs
└── v2/
    ├── app/
    │   ├── api_framework.go
    │   ├── apiframework/
    │   │   └── apiframework.go
    │   ├── app.go
    │   ├── errors.go
    │   ├── gateway.go
    │   ├── legacymeta/
    │   │   ├── legacymeta.go
    │   │   ├── schema.go
    │   │   ├── selector_lookup.go
    │   │   └── trace_nodes.go
    │   ├── resource_usage.go
    │   ├── service.go
    │   ├── service_discovery.go
    │   ├── service_discovery_test.go
    │   ├── setup_test.go
    │   ├── testdata/
    │   │   ├── auth_handler_call.txt
    │   │   ├── auth_handler_data.txt
    │   │   ├── auth_handler_invalid_builtin.txt
    │   │   ├── auth_handler_invalid_field_source.txt
    │   │   ├── auth_handler_invalid_named_type.txt
    │   │   ├── auth_handler_multiple.txt
    │   │   ├── auth_handler_reference.txt
    │   │   ├── auth_handler_simple.txt
    │   │   ├── auth_handler_struct.txt
    │   │   ├── auth_handler_svc_struct.txt
    │   │   ├── cache_cluster_outside_svc.txt
    │   │   ├── cache_definition.txt
    │   │   ├── cache_err_duplicate_cluster.txt
    │   │   ├── cache_err_duplicate_paths.txt
    │   │   ├── cache_err_generic_type_nonbasic.txt
    │   │   ├── cache_err_keyspace_invalid.txt
    │   │   ├── cache_err_keyspace_outside_svc.txt
    │   │   ├── cache_generic_type.txt
    │   │   ├── config.txt
    │   │   ├── config_err_unexported_field.txt
    │   │   ├── config_err_use_from_other_service.txt
    │   │   ├── config_err_wrapper_used_in_wrapper.txt
    │   │   ├── cron_job_definition.txt
    │   │   ├── cron_job_definition_init.txt
    │   │   ├── cron_job_definition_repeat.txt
    │   │   ├── cron_job_definition_rpc.txt
    │   │   ├── cron_job_err_not_api.txt
    │   │   ├── et.txt
    │   │   ├── metrics_counter.txt
    │   │   ├── metrics_gauge.txt
    │   │   ├── middleware.txt
    │   │   ├── middleware_err_no_matches.txt
    │   │   ├── middleware_err_not_in_service.txt
    │   │   ├── missing_generic_param.txt
    │   │   ├── pubsub.txt
    │   │   ├── pubsub_err_attributes_not_start_encore.txt
    │   │   ├── pubsub_err_duplicate_subscription_names.txt
    │   │   ├── pubsub_err_import_aliased_and_used_in_func.txt
    │   │   ├── pubsub_err_missing_delivery_guarantee.txt
    │   │   ├── pubsub_err_new_topic_func_aliased.txt
    │   │   ├── pubsub_err_ordering_attribute_missing.txt
    │   │   ├── pubsub_err_subscriber_different_service.txt
    │   │   ├── pubsub_err_subscriber_missing_handler.txt
    │   │   ├── pubsub_err_subscriber_nil_handler.txt
    │   │   ├── pubsub_err_subscriber_not_function.txt
    │   │   ├── pubsub_err_subscription_func_not_in_service.txt
    │   │   ├── pubsub_err_subscription_name_invalid.txt
    │   │   ├── pubsub_err_topic_declared_in_func.txt
    │   │   ├── pubsub_err_topic_invalid_usage.txt
    │   │   ├── pubsub_err_topic_must_be_unique.txt
    │   │   ├── pubsub_err_topic_name_invalid.txt
    │   │   ├── pubsub_publish_in_middleware.txt
    │   │   ├── pubsub_subscriber_creates_service.txt
    │   │   ├── pubsub_subscriber_in_same_service.txt
    │   │   ├── recursive_types.txt
    │   │   ├── rlog_call_outside_svc.txt
    │   │   ├── rpc_auth.txt
    │   │   ├── rpc_auth_no_authhandler.txt
    │   │   ├── rpc_call_selector.txt
    │   │   ├── rpc_err_any.txt
    │   │   ├── rpc_invalid_header_type.txt
    │   │   ├── rpc_invalid_path_param_name.txt
    │   │   ├── rpc_invalid_path_param_type.txt
    │   │   ├── rpc_invalid_path_too_few_params.txt
    │   │   ├── rpc_invalid_query_type.txt
    │   │   ├── rpc_legacy_syntax.txt
    │   │   ├── rpc_method.txt
    │   │   ├── rpc_non_raw_path.txt
    │   │   ├── rpc_option_types.txt
    │   │   ├── rpc_outside_service.txt
    │   │   ├── rpc_path_params.txt
    │   │   ├── rpc_raw_call.txt
    │   │   ├── rpc_raw_custom_path.txt
    │   │   ├── rpc_raw_duplicate_path.txt
    │   │   ├── rpc_raw_internal.txt
    │   │   ├── rpc_raw_public.txt
    │   │   ├── rpc_receiver_invalid.txt
    │   │   ├── rpc_receiver_typo.txt
    │   │   ├── rpc_without_calling.txt
    │   │   ├── secrets.txt
    │   │   ├── secrets_non_string.txt
    │   │   ├── servicestruct_creates_service.txt
    │   │   ├── servicestruct_duplicate.txt
    │   │   ├── servicestruct_ref.txt
    │   │   ├── sqldb_cross_service.txt
    │   │   ├── sqldb_err_unknown_db.txt
    │   │   ├── sqldb_err_unknown_db_stdlib.txt
    │   │   ├── sqldb_helper.txt
    │   │   ├── sqldb_outside_ref.txt
    │   │   ├── sqldb_outside_svc.txt
    │   │   ├── sqldb_outside_svc_test.txt
    │   │   ├── sqldb_success.txt
    │   │   ├── sqldb_without_call.txt
    │   │   ├── struct_duplicate_json_ignore.txt
    │   │   ├── svc_migration_db.txt
    │   │   └── type_ref_non_svc.txt
    │   ├── validate.go
    │   ├── validate_apis.go
    │   ├── validate_authhandlers.go
    │   ├── validate_caches.go
    │   ├── validate_config.go
    │   ├── validate_crons.go
    │   ├── validate_databases.go
    │   ├── validate_middleware.go
    │   ├── validate_objects.go
    │   ├── validate_pubsub.go
    │   ├── validate_servicestructs.go
    │   ├── validate_test.go
    │   └── validate_types.go
    ├── codegen/
    │   ├── apigen/
    │   │   ├── apigen.go
    │   │   ├── apigenutil/
    │   │   │   └── apigenutil.go
    │   │   ├── authhandlergen/
    │   │   │   ├── authhandlergen.go
    │   │   │   ├── authhandlergen_test.go
    │   │   │   └── testdata/
    │   │   │       ├── authdata.txt
    │   │   │       ├── basic.txt
    │   │   │       ├── servicestruct.txt
    │   │   │       └── struct.txt
    │   │   ├── endpointgen/
    │   │   │   ├── api_calls.go
    │   │   │   ├── endpointgen.go
    │   │   │   ├── endpointgen_test.go
    │   │   │   ├── handlers.go
    │   │   │   ├── request.go
    │   │   │   ├── response.go
    │   │   │   └── testdata/
    │   │   │       ├── api_call.txt
    │   │   │       ├── api_call_servicestruct.txt
    │   │   │       ├── basic.txt
    │   │   │       ├── complex_omitempty.txt
    │   │   │       ├── endpoint_tags.txt
    │   │   │       ├── fallback_path.txt
    │   │   │       ├── path_params.txt
    │   │   │       ├── raw_endpoint.txt
    │   │   │       ├── recursive.txt
    │   │   │       ├── request_headers.txt
    │   │   │       ├── request_params.txt
    │   │   │       ├── request_query.txt
    │   │   │       ├── response_headers.txt
    │   │   │       ├── response_params.txt
    │   │   │       ├── response_status.txt
    │   │   │       ├── service_struct.txt
    │   │   │       └── unexported.txt
    │   │   ├── maingen/
    │   │   │   ├── load_app.go
    │   │   │   ├── maingen.go
    │   │   │   ├── maingen_test.go
    │   │   │   ├── testdata/
    │   │   │   │   ├── auth_handler.txt
    │   │   │   │   ├── basic.txt
    │   │   │   │   ├── multiple_services.txt
    │   │   │   │   ├── service_struct.txt
    │   │   │   │   └── subscription.txt
    │   │   │   └── testgen.go
    │   │   ├── middlewaregen/
    │   │   │   ├── middlewaregen.go
    │   │   │   ├── middlewaregen_test.go
    │   │   │   └── testdata/
    │   │   │       ├── basic.txt
    │   │   │       ├── global.txt
    │   │   │       └── service_struct.txt
    │   │   ├── servicestructgen/
    │   │   │   ├── servicestructgen.go
    │   │   │   ├── servicestructgen_test.go
    │   │   │   └── testdata/
    │   │   │       ├── basic.txt
    │   │   │       └── init_svc.txt
    │   │   ├── typescrub/
    │   │   │   ├── jen.go
    │   │   │   ├── typescrub.go
    │   │   │   └── typescrub_test.go
    │   │   └── userfacinggen/
    │   │       ├── testdata/
    │   │       │   └── service_struct.txt
    │   │       ├── userfacinggen.go
    │   │       └── userfacinggen_test.go
    │   ├── config.go
    │   ├── cuegen/
    │   │   ├── definition_generator.go
    │   │   ├── errors.go
    │   │   ├── generator.go
    │   │   ├── generator_test.go
    │   │   ├── service.go
    │   │   ├── testdata/
    │   │   │   ├── basic_config.txt
    │   │   │   ├── basic_config_svc.cue
    │   │   │   ├── basic_inline_struct.txt
    │   │   │   ├── basic_inline_struct_svc.cue
    │   │   │   ├── basic_lists.txt
    │   │   │   ├── basic_lists_svc.cue
    │   │   │   ├── basic_maps.txt
    │   │   │   ├── basic_maps_svc.cue
    │   │   │   ├── basic_named_struct_multiple_uses.txt
    │   │   │   ├── basic_named_struct_multiple_uses_svc.cue
    │   │   │   ├── basic_named_struct_single_use.txt
    │   │   │   ├── basic_named_struct_single_use_svc.cue
    │   │   │   ├── basic_no_config.txt
    │   │   │   ├── basic_no_config_svc.cue
    │   │   │   ├── basic_with_cue_imports.txt
    │   │   │   ├── basic_with_cue_imports_svc.cue
    │   │   │   ├── basic_wrappers.txt
    │   │   │   ├── basic_wrappers_svc.cue
    │   │   │   ├── cue_optional_tag.txt
    │   │   │   ├── cue_optional_tag_svc.cue
    │   │   │   ├── cue_tags.txt
    │   │   │   ├── cue_tags_svc.cue
    │   │   │   ├── generic_named_types.txt
    │   │   │   ├── generic_named_types_svc.cue
    │   │   │   ├── generic_top_level_type.txt
    │   │   │   ├── generic_top_level_type_svc.cue
    │   │   │   ├── json_tags.txt
    │   │   │   ├── json_tags_svc.cue
    │   │   │   ├── merge_identical_comments.txt
    │   │   │   ├── merge_identical_comments_svc.cue
    │   │   │   ├── multiple_configs_in_service.txt
    │   │   │   ├── multiple_configs_in_service_svc.cue
    │   │   │   ├── types_from_multiple_packages.txt
    │   │   │   └── types_from_multiple_packages_svc.cue
    │   │   └── utils.go
    │   ├── decls.go
    │   ├── errors.go
    │   ├── gen.go
    │   ├── infragen/
    │   │   ├── cachegen/
    │   │   │   └── cachegen.go
    │   │   ├── configgen/
    │   │   │   ├── configgen.go
    │   │   │   ├── configgen_test.go
    │   │   │   └── testdata/
    │   │   │       ├── basic_config.txt
    │   │   │       ├── basic_inline_struct.txt
    │   │   │       ├── basic_lists.txt
    │   │   │       ├── basic_maps.txt
    │   │   │       ├── basic_named_struct_multiple_uses.txt
    │   │   │       ├── basic_named_struct_single_use.txt
    │   │   │       ├── basic_no_config.txt
    │   │   │       ├── basic_with_cue_imports.txt
    │   │   │       ├── basic_wrappers.txt
    │   │   │       ├── cue_optional_tag.txt
    │   │   │       ├── cue_tags.txt
    │   │   │       ├── generics.txt
    │   │   │       ├── json_tags.txt
    │   │   │       ├── merge_identical_comments.txt
    │   │   │       ├── multi_package.txt
    │   │   │       ├── multiple_configs_in_service.txt
    │   │   │       └── name_conflicts.txt
    │   │   ├── infragen.go
    │   │   ├── metricsgen/
    │   │   │   └── metricsgen.go
    │   │   ├── pubsubgen/
    │   │   │   ├── pubsubgen.go
    │   │   │   ├── pubsubgen_test.go
    │   │   │   └── testdata/
    │   │   │       ├── basic.txt
    │   │   │       └── method_handler.txt
    │   │   └── secretsgen/
    │   │       └── secretsgen.go
    │   ├── internal/
    │   │   ├── codegentest/
    │   │   │   └── codegentest.go
    │   │   └── genutil/
    │   │       ├── etype.go
    │   │       └── types.go
    │   └── rewrite/
    │       ├── rewrite.go
    │       └── rewrite_test.go
    ├── compiler/
    │   └── build/
    │       ├── build.go
    │       ├── build_test.go
    │       ├── errors.go
    │       ├── testdata/
    │       │   ├── basic.txt
    │       │   ├── overlay.txt
    │       │   └── rewrite.txt
    │       └── tests.go
    ├── internals/
    │   ├── overlay/
    │   │   └── overlay.go
    │   ├── parsectx/
    │   │   └── pctx.go
    │   ├── perr/
    │   │   ├── aserror.go
    │   │   └── perr.go
    │   ├── pkginfo/
    │   │   ├── errors.go
    │   │   ├── loader.go
    │   │   ├── loader_test.go
    │   │   ├── modresolve.go
    │   │   ├── modresolve_test.go
    │   │   ├── names.go
    │   │   ├── names_test.go
    │   │   ├── pkgparse.go
    │   │   └── types.go
    │   ├── posmap/
    │   │   └── posmap.go
    │   ├── resourcepaths/
    │   │   ├── errors.go
    │   │   ├── paths.go
    │   │   └── paths_test.go
    │   ├── scan/
    │   │   ├── collect.go
    │   │   ├── collect_test.go
    │   │   ├── errors.go
    │   │   ├── scan.go
    │   │   └── scan_test.go
    │   ├── schema/
    │   │   ├── decls.go
    │   │   ├── errors.go
    │   │   ├── schema_parser.go
    │   │   ├── schema_parser_test.go
    │   │   ├── schematest/
    │   │   │   └── schematest.go
    │   │   ├── schemautil/
    │   │   │   ├── astutil.go
    │   │   │   ├── astutil_test.go
    │   │   │   ├── errors.go
    │   │   │   └── schemautil.go
    │   │   ├── types.go
    │   │   └── types_string.go
    │   └── testutil/
    │       ├── testutil.go
    │       ├── update_archive_file.go
    │       └── utils.go
    ├── parser/
    │   ├── apis/
    │   │   ├── api/
    │   │   │   ├── api.go
    │   │   │   ├── api_test.go
    │   │   │   ├── apienc/
    │   │   │   │   ├── encoding.go
    │   │   │   │   └── errors.go
    │   │   │   ├── errors.go
    │   │   │   └── usage.go
    │   │   ├── authhandler/
    │   │   │   ├── authhandler.go
    │   │   │   ├── authhandler_test.go
    │   │   │   ├── errors.go
    │   │   │   └── usage.go
    │   │   ├── directive/
    │   │   │   ├── directive.go
    │   │   │   ├── directive_test.go
    │   │   │   ├── errors.go
    │   │   │   └── fields.go
    │   │   ├── errors.go
    │   │   ├── middleware/
    │   │   │   ├── errors.go
    │   │   │   ├── middleware.go
    │   │   │   └── middleware_test.go
    │   │   ├── parser.go
    │   │   ├── selector/
    │   │   │   ├── errors.go
    │   │   │   ├── selector.go
    │   │   │   └── selector_test.go
    │   │   └── servicestruct/
    │   │       ├── errors.go
    │   │       ├── servicestruct.go
    │   │       ├── servicestruct_test.go
    │   │       └── usage.go
    │   ├── infra/
    │   │   ├── caches/
    │   │   │   ├── cache_test.go
    │   │   │   ├── cluster.go
    │   │   │   ├── errors.go
    │   │   │   ├── keyspace.go
    │   │   │   ├── keyspace_test.go
    │   │   │   ├── testdata/
    │   │   │   │   └── cluster.txt
    │   │   │   └── usage.go
    │   │   ├── config/
    │   │   │   ├── config.go
    │   │   │   ├── errors.go
    │   │   │   └── usage.go
    │   │   ├── crons/
    │   │   │   ├── cron.go
    │   │   │   ├── cron_test.go
    │   │   │   └── errors.go
    │   │   ├── internal/
    │   │   │   ├── literals/
    │   │   │   │   ├── constants.go
    │   │   │   │   ├── decode.go
    │   │   │   │   ├── decode_test.go
    │   │   │   │   ├── errors.go
    │   │   │   │   ├── literals.go
    │   │   │   │   └── literals_test.go
    │   │   │   ├── locations/
    │   │   │   │   ├── locations.go
    │   │   │   │   └── locations_test.go
    │   │   │   └── parseutil/
    │   │   │       ├── aststringer.go
    │   │   │       ├── errors.go
    │   │   │       ├── names.go
    │   │   │       ├── parseutil.go
    │   │   │       └── reference.go
    │   │   ├── metrics/
    │   │   │   ├── errors.go
    │   │   │   ├── metrics.go
    │   │   │   ├── metrics_string.go
    │   │   │   └── metrics_test.go
    │   │   ├── objects/
    │   │   │   ├── bucket.go
    │   │   │   ├── errors.go
    │   │   │   ├── usage.go
    │   │   │   └── usage_test.go
    │   │   ├── pubsub/
    │   │   │   ├── errors.go
    │   │   │   ├── subscription.go
    │   │   │   ├── topic.go
    │   │   │   ├── usage.go
    │   │   │   └── usage_test.go
    │   │   ├── secrets/
    │   │   │   ├── errors.go
    │   │   │   └── secrets.go
    │   │   └── sqldb/
    │   │       ├── errors.go
    │   │       ├── implicit.go
    │   │       ├── named.go
    │   │       ├── sqldb.go
    │   │       ├── sqldb_test.go
    │   │       └── usage.go
    │   ├── internal/
    │   │   └── utils/
    │   │       └── prettyprint.go
    │   ├── parser.go
    │   ├── parser_test.go
    │   ├── resource/
    │   │   ├── bind.go
    │   │   ├── resource.go
    │   │   ├── resource_string.go
    │   │   ├── resourceparser/
    │   │   │   ├── registry.go
    │   │   │   └── resourceparser.go
    │   │   ├── resourcetest/
    │   │   │   └── resourcetest.go
    │   │   └── usage/
    │   │       ├── resolver.go
    │   │       ├── testdata/
    │   │       │   ├── pubsub_usage.txt
    │   │       │   ├── secret_usage.txt
    │   │       │   └── sqldb_usage.txt
    │   │       ├── usage.go
    │   │       ├── usage_test.go
    │   │       └── usagetest/
    │   │           └── usagetest.go
    │   └── result.go
    ├── tsbuilder/
    │   └── tsbuilder.go
    └── v2builder/
        └── v2builder.go

================================================
FILE CONTENTS
================================================

================================================
FILE: .devcontainer/Dockerfile
================================================
FROM golang:1.24

RUN apt-get update && apt-get install -y sudo
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - && \
	apt-get install -y nodejs

ADD scripts /scripts
RUN bash /scripts/install.sh
RUN bash /scripts/godeps.sh

ENV ENCORE_GOROOT=/encore-release/encore-go


================================================
FILE: .devcontainer/devcontainer.json
================================================
{
  "build": {"dockerfile": "Dockerfile"},
  "containerEnv": {
    "ENCORE_DAEMON_DEV": "1",
    "ENCORE_RUNTIMES_PATH": "${containerWorkspaceFolder}/runtimes"
  },
  "extensions": ["golang.go"],
  "postCreateCommand": "bash /scripts/prepare.sh",
  "forwardPorts": [4000, 9400]
}


================================================
FILE: .devcontainer/scripts/godeps.sh
================================================
#!/usr/bin/env
set -ex

go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest 
go install github.com/ramya-rao-a/go-outline@latest
go install github.com/cweill/gotests/gotests@latest
go install github.com/fatih/gomodifytags@latest
go install github.com/josharian/impl@latest
go install github.com/haya14busa/goplay/cmd/goplay@latest
go install github.com/go-delve/delve/cmd/dlv@latest
go install honnef.co/go/tools/cmd/staticcheck@master
go install golang.org/x/tools/gopls@latest

GOBIN=/tmp/ go install github.com/go-delve/delve/cmd/dlv@master
mv /tmp/dlv $GOPATH/bin/dlv-dap


================================================
FILE: .devcontainer/scripts/install.sh
================================================
#!/usr/bin/env bash
set -e

target="$(go env GOOS)_$(go env GOARCH)"

encore_uri=$(curl -sSf -N "https://encore.dev/api/releases?target=${target}&show=url")
if [ ! "$encore_uri" ]; then
    echo "Error: Unable to determine latest Encore release." 1>&2
    exit 1
fi

encore_install="/encore-release"
bin_dir="$encore_install/bin"
exe="$bin_dir/encore"
tar="$encore_install/encore.tar.gz"

if [ ! -d "$bin_dir" ]; then
 	mkdir -p "$bin_dir"
fi

curl --fail --location --progress-bar --output "$tar" "$encore_uri"
cd "$encore_install"
tar -C "$encore_install" -xzf "$tar"
chmod +x "$bin_dir"/*
rm "$tar"

"$exe" version

echo "Encore was installed successfully to $exe"
if command -v encore >/dev/null; then
	echo "Run 'encore --help' to get started"
else
	case $SHELL in
	/bin/zsh) shell_profile=".zshrc" ;;
	*) shell_profile=".bash_profile" ;;
	esac
	echo "Manually add the directory to your \$HOME/$shell_profile (or similar)"
	echo "  export ENCORE_INSTALL=\"$encore_install\""
	echo "  export PATH=\"\$ENCORE_INSTALL/bin:\$PATH\""
	echo "Run '$exe --help' to get started"
fi

================================================
FILE: .devcontainer/scripts/prepare.sh
================================================
#!/usr/bin/env bash

set -e
set -x

go mod download


================================================
FILE: .github/DISCUSSION_TEMPLATE/help.yml
================================================
body:
  - type: markdown
    attributes:
      value: |
        Before asking a question, please check our [documentation](https://encore.dev/docs) to see if your question is already answered there.

        If you are not sure if your issue is a bug you can ask a question on our [Discord community](https://encore.dev/discord).

        **NOTE:** You don't need to answer questions that you know that aren't relevant.

        ---

  - type: checkboxes
    attributes:
      label: "Is there an existing issue/discussion for this?"
      description: "Please search in Issues and Discussions to see if this question has already been asked"
      options:
      - label: "I have searched the existing issues and discussions"
        required: true

  - type: input
    attributes:
      label: "Encore CLI version"
      description: |
        Which exact version of `encore` CLI are you using? Run `encore version` in your terminal to see your version.
      placeholder: "1.54.0"

  - type: input
    attributes:
      label: "Node.js version"
      description: "Which version of Node.js are you using?"
      placeholder: "24.0.0"

  - type: checkboxes
    validations:
      required: true
    attributes:
      label: "In which operating systems have you tested?"
      options:
        - label: macOS
        - label: Windows
        - label: Linux

  - type: markdown
    attributes:
      value: |
        ---

  - type: textarea
    attributes:
      label: "Question"
      description: |
        What is your question?
        **Tip:** You can attach images, recordings or log files by clicking this area to highlight it and then dragging files in


================================================
FILE: .github/DISCUSSION_TEMPLATE/suggestions.yml
================================================
body:
  - type: markdown
    attributes:
      value: |
        Check out our [documentation](https://encore.dev/docs) to see if your suggestion is already implemented.

        If you are not sure if your suggestion is a feature request you can ask a question on our [Discord community](https://encore.dev/discord).

        ---

  - type: checkboxes
    attributes:
      label: "Is there an existing discussion that is already proposing this?"
      description: "Please search [here](https://github.com/encoredev/encore/discussions) to see if a discussion already exists for the feature you are requesting"
      options:
      - label: "I have searched the existing discussions"
        required: true

  - type: checkboxes
    validations:
      required: true
    attributes:
      label: "What part(s) of Encore does this feature request apply to?"
      options:
        - label: Encore.ts (TypeScript)
        - label: Encore.go (Go)
        - label: Encore CLI
        - label: Local Development Dashboard
        - label: Encore Cloud
        - label: Other

  - type: textarea
    validations:
      required: true
    attributes:
      label: "Is your feature request related to a problem? Please describe it"
      description: "A clear and concise description of what the problem is"
      placeholder: |
        I have an issue when ...

  - type: textarea
    validations:
      required: true
    attributes:
      label: "Describe the solution you'd like"
      description: "A clear and concise description of what you want to happen. Add any considered drawbacks"

  - type: textarea
    validations:
      required: true
    attributes:
      label: "What is the motivation / use case for changing the behavior?"
      description: "Describe the motivation or the concrete use case"


================================================
FILE: .github/ISSUE_TEMPLATE/Bug_report.yml
================================================
name: "\U0001F41B Bug Report"
description: "If something isn't working as expected"
labels: ["type: bug"]
type: bug
body:
  - type: markdown
    attributes:
      value: |
        ### We use GitHub Issues to track bug reports

        For suggestions and feature requests, please add those to our [GitHub discussions](https://github.com/encoredev/encore/discussions) forum.

        If you are not sure if your issue is a bug you can ask a question on our [Discord community](https://encore.dev/discord).

        **NOTE:** You don't need to answer questions that you know that aren't relevant.

        ---

  - type: checkboxes
    attributes:
      label: "Is there an existing issue for this?"
      description: "Please search [here](../issues?q=is%3Aissue) to see if an issue already exists for the bug you encountered"
      options:
      - label: "I have searched the existing issues"
        required: true
  
  - type: checkboxes
    id: area
    attributes:
      label: "What part(s) of Encore does this bug report apply to?"
      options:
        - label: Encore.ts (TypeScript)
        - label: Encore.go (Go)
        - label: Encore CLI
        - label: Local Development Dashboard
        - label: Encore Cloud

  - type: textarea
    validations:
      required: true
    attributes:
      label: "Current behavior"
      description: "How the issue manifests?"

  - type: input
    attributes:
      label: "Minimum reproduction code"
      placeholder: "https://github.com/..."
      description: |
        URL to a Git repository that reproduces your issue. [What is a minimum reproduction?](https://github.com/encoredev/encore/blob/main/.github/minimum-reproduction.md)

  - type: textarea
    attributes:
      label: "Steps to reproduce"
      description: |
        How the issue manifests?
        You could leave this blank if you already write this in your reproduction code
      placeholder: |
        1. `encore run`
        2. `curl localhost:4000/path`
        3. See error...

  - type: textarea
    validations:
      required: true
    attributes:
      label: "Expected behavior"
      description: "A clear and concise description of what you expected to happened (or code)"

  - type: input
    attributes:
      label: "Encore CLI version"
      description: |
        Which exact version of `encore` CLI are you using? Run `encore version` in your terminal to see your version.
      placeholder: "1.54.0"

  - type: input
    attributes:
      label: "Node.js version"
      description: "Which version of Node.js are you using?"
      placeholder: "24.0.0"

  - type: checkboxes
    validations:
      required: true
    attributes:
      label: "In which operating systems have you tested?"
      options:
        - label: macOS
        - label: Windows
        - label: Linux

  - type: markdown
    attributes:
      value: |
        ---

  - type: textarea
    attributes:
      label: "Other"
      description: |
        Anything else relevant? eg: Logs, OS version, IDE, package manager, etc.
        **Tip:** You can attach images, recordings or log files by clicking this area to highlight it and then dragging files in


================================================
FILE: .github/ISSUE_TEMPLATE/config.yml
================================================
## To encourage contributors to use issue templates, we don't allow blank issues
blank_issues_enabled: false

contact_links:
  - name: "Suggestions and General Help"
    url: "https://github.com/encoredev/encore/discussions"
    about: "Please add suggestions or ask general help questions to our GitHub discussions forum."
  - name: "\U0001F4D5 Documentation"
    url: "https://encore.dev/docs"
    about: "Read about every Encore feature in-depth and search for things you are unsure about."


================================================
FILE: .github/dockerimg/Dockerfile
================================================
# syntax=docker/dockerfile:1.4
FROM --platform=$TARGETPLATFORM ubuntu:22.04 AS build
ARG TARGETPLATFORM
ARG RELEASE_VERSION
RUN mkdir /encore
ADD rename-binary-if-needed.bash rename-binary-if-needed.bash
ADD artifacts /artifacts
RUN /bin/bash -c 'SRC=encore-$(echo $TARGETPLATFORM | tr '/' '_'); tar -C /encore -xzf /artifacts/$SRC.tar.gz'
RUN /bin/bash rename-binary-if-needed.bash

FROM --platform=$TARGETPLATFORM ubuntu:22.04
RUN apt-get update && apt-get install -y -f ca-certificates
ENV PATH="/encore/bin:${PATH}"
WORKDIR /src
ADD encore-entrypoint.bash /bin/encore-entrypoint.bash
ENTRYPOINT ["/bin/encore-entrypoint.bash"]
COPY --from=build /encore /encore


================================================
FILE: .github/dockerimg/encore-entrypoint.bash
================================================
#!/usr/bin/env bash
set -eo pipefail

# If the ENCORE_AUTHKEY environment variable is set, log in with it.
if [ -n "$ENCORE_AUTHKEY" ]; then
  echo "Logging in to Encore using provided auth key..."
  encore auth login --auth-key "$ENCORE_AUTHKEY"
fi

# Run the encore command.
encore "$@"


================================================
FILE: .github/dockerimg/rename-binary-if-needed.bash
================================================
#!/usr/bin/env bash
set -eo pipefail

# Check if `encore-nightly`, `encore-beta` or `encore-develop` are present, and if one of them are, rename it to `encore`.
for binary in encore-nightly encore-beta encore-develop; do
  if [ -f "/encore/bin/$binary" ]; then
    echo "Renaming $binary to encore..."
    mv /encore/bin/$binary /encore/bin/encore
  fi
done

# Sanity check that /ecore/bin/encore exists.
if [ ! -f "/encore/bin/encore" ]; then
  echo "ERROR: /encore/bin/encore does not exist. Did you mount the Encore binary directory to /encore/bin?"
  exit 1
fi


================================================
FILE: .github/minimum-reproduction.md
================================================
# Minimum Reproduction Repository

A minimum reproduction repository is a git repository that can be shared publicly (doesn't expose private business logic), shows the problem you're running into, and has the fewest dependencies installed possible. It also has the steps in place for how to replicate the error you're running into. This is easiest to add to the README.

## Doesn't Expose Business Logic

If your error resolves around a specific step in business logic, replicate the business logic in a way that doesn't make it evident what you're working on.

## Shows The Problem You're Running Into

This is why the minimum reproduction should be created in the first place, cause you have an error you want someone to look into.

## Has The Fewest Dependencies Installed Possible

If the reproduction doesn't need it, get rid of it.

## Steps To Replicate

A set of clear, defined steps on how to replicate the error. You can separate the setup and reproduction steps as well if you'd like. An example would be something like

```
# Setup

1) npm install

# Reproduction

1) encore run
2) open new terminal
3) curl http://localhost:4000/users
4) see the error
```

## Okay I Understand What It Is, What Else Do I Need?

Generally speaking, if you meet the above, it's good to go. This helps out those who debug errors and provide support immensely.

## So why am I being asked for this?

There's a few reasons to provide a minimum reproduction:

1. it makes debugging where the error _could_ be so much easier. Instead of looking across 20 files and 5 directories, it's now 2 files in 1 directory. Much less to dig through and understand
2. half the time while creating the minimum reproduction, you'll find what the problem was yourself and grow as a developer and as a knowledge sharer.

================================================
FILE: .github/workflows/ci.yml
================================================
name: CI

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
  schedule:
    - cron: "30 2 * * *" # Every night at 2:30am UTC (if you change this schedule, also change the if statement in the test steps)

jobs:
  build:
    name: "Build"
    runs-on: ubuntu-24.04

    steps:
      - uses: actions/checkout@v4
        with:
          path: encr.dev

      - name: Set up Node
        uses: actions/setup-node@v3

      - name: Set up Go
        uses: actions/setup-go@v4
        with:
          go-version-file: "encr.dev/go.mod"
          check-latest: true
          cache-dependency-path: "encr.dev/go.sum"

      - name: Build
        run: cd encr.dev && go build ./...

      - name: Build for Windows
        run: cd encr.dev && go build ./...
        env:
          GOOS: windows

  test:
    name: "Test"
    runs-on: ubuntu-24.04

    steps:
      - uses: actions/checkout@v4
        with:
          path: encr.dev

      - name: Set up Node
        uses: actions/setup-node@v3

      - name: Set up Go
        uses: actions/setup-go@v4
        with:
          go-version-file: "encr.dev/go.mod"
          check-latest: true
          cache-dependency-path: "encr.dev/go.sum"

      - name: Set up Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable
      - name: Install Protoc
        uses: arduino/setup-protoc@a8b67ba40b37d35169e222f3bb352603327985b6 # v2
      - name: Set up cargo cache
        uses: actions/cache@v3
        continue-on-error: false
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo

      - name: Install encore-go
        run: |
          URL=$(curl -s https://api.github.com/repos/encoredev/go/releases/latest | grep "browser_download_url.*linux_x86-64.tar.gz" | cut -d : -f 2,3 | tr -d \" | tr -d '[:space:]')
          curl --fail -L -o encore-go.tar.gz $URL && tar -C . -xzf ./encore-go.tar.gz

      - name: Install tsparser
        run: cargo install --path encr.dev/tsparser --force --debug

      # If we're not running on a schedule, we only want to run tests on changed code
      - name: Run tests on changed code on the CLI
        run: cd encr.dev && go test -short -tags=dev_build 2>&1 ./...
        if: github.event.schedule != '30 2 * * *'
        env:
          ENCORE_GOROOT: ${{ github.workspace }}/encore-go
          ENCORE_RUNTIMES_PATH: ${{ github.workspace }}/encr.dev/runtimes

      - name: Run tests on changed runtime code
        run: cd encr.dev/runtimes/go && go test -short -tags=dev_build ./...
        if: github.event.schedule != '30 2 * * *'

      # Each night we want to run all tests multiple times to catch any flaky tests
      # We will shuffle the order in which tests are run and run them 25 times looking
      # for failures. We will also fail fast so that we don't waste time running tests
      # that are already failing.
      - name: Run all tests multiple times on the CLI
        run: cd encr.dev && go test -v --count=5 -failfast -shuffle=on -timeout=30m -tags=dev_build ./...
        if: github.event.schedule == '30 2 * * *'
        env:
          ENCORE_GOROOT: ${{ github.workspace }}/encore-go
          ENCORE_RUNTIMES_PATH: ${{ github.workspace }}/encr.dev/runtimes

      - name: Run all tests multiple times on the runtime
        run: cd encr.dev/runtimes/go && go test -v --count=5 -failfast -shuffle=on -timeout=30m -tags=dev_build ./...
        if: github.event.schedule == '30 2 * * *'

      - name: Report Nightly Failure
        uses: ravsamhq/notify-slack-action@bca2d7f5660b833a27bda4f6b8bef389ebfefd25
        if: ${{ failure() && github.event.schedule == '30 2 * * *' }}
        with:
          status: ${{ job.status }} # required
          notification_title: "{workflow} has {status_message}"
          message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
          footer: "Linked Repo <{repo_url}|{repo}> | <{workflow_url}|View Workflow>"
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ALERT_WEBHOOK_URL }} # required

  test-e2e:
    name: "Test e2e"
    runs-on: ubuntu-24.04

    steps:
      - uses: actions/checkout@v4
        with:
          path: encr.dev

      - name: Set up Node
        uses: actions/setup-node@v3

      - name: Set up Go
        uses: actions/setup-go@v4
        with:
          go-version-file: "encr.dev/go.mod"
          check-latest: true
          cache-dependency-path: "encr.dev/go.sum"

      - name: Set up Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable
      - name: Install Protoc
        uses: arduino/setup-protoc@a8b67ba40b37d35169e222f3bb352603327985b6 # v2
      - name: Set up cargo cache
        uses: actions/cache@v3
        continue-on-error: false
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo

      - name: Install encore-go
        run: |
          URL=$(curl -s https://api.github.com/repos/encoredev/go/releases/latest | grep "browser_download_url.*linux_x86-64.tar.gz" | cut -d : -f 2,3 | tr -d \" | tr -d '[:space:]')
          curl --fail -L -o encore-go.tar.gz $URL && tar -C . -xzf ./encore-go.tar.gz

      - name: Install tsparser
        run: cargo install --path encr.dev/tsparser --force --debug

      - name: Install tsbundler
        run: cd encr.dev && go install ./cli/cmd/tsbundler-encore

      - name: Build jsruntime
        run: cd encr.dev && go run ./pkg/encorebuild/cmd/build-local-binary encore-runtime.node

      # If we're not running on a schedule, we only want to run tests on changed code
      - name: Run tests on changed code on the CLI
        run: cd encr.dev && go test -short -tags=e2e 2>&1 ./e2e-tests
        if: github.event.schedule != '30 2 * * *'
        env:
          ENCORE_GOROOT: ${{ github.workspace }}/encore-go
          ENCORE_RUNTIMES_PATH: ${{ github.workspace }}/encr.dev/runtimes

      # Each night we want to run all tests multiple times to catch any flaky tests
      # We will shuffle the order in which tests are run and run them 25 times looking
      # for failures. We will also fail fast so that we don't waste time running tests
      # that are already failing.
      - name: Run all tests multiple times on the CLI
        run: cd encr.dev && go test -v --count=5 -failfast -shuffle=on -timeout=30m -tags=e2e ./e2e-tests
        if: github.event.schedule == '30 2 * * *'
        env:
          ENCORE_GOROOT: ${{ github.workspace }}/encore-go
          ENCORE_RUNTIMES_PATH: ${{ github.workspace }}/encr.dev/runtimes

      - name: Report Nightly Failure
        uses: ravsamhq/notify-slack-action@bca2d7f5660b833a27bda4f6b8bef389ebfefd25
        if: ${{ failure() && github.event.schedule == '30 2 * * *' }}
        with:
          status: ${{ job.status }} # required
          notification_title: "{workflow} has {status_message}"
          message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
          footer: "Linked Repo <{repo_url}|{repo}> | <{workflow_url}|View Workflow>"
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_ALERT_WEBHOOK_URL }} # required

  # Run static analysis on the PR
  static-analysis:
    name: "Static Analysis"
    # We're using buildjet for this as it's very slow on Github's own runners
    runs-on: buildjet-4vcpu-ubuntu-2204

    # Skip any PR created by dependabot to avoid permission issues:
    if: (github.actor != 'dependabot[bot]')

    permissions:
      checks: write
      contents: read
      pull-requests: write

    steps:
      - uses: actions/checkout@v4

      - name: Install jq
        uses: dcarbone/install-jq-action@91d8da7268538e8a0ae0c8b72af44f1763228455

      - name: Install semgrep
        run: |
          python3 -m pip install semgrep
          python3 -m pip install --upgrade requests

      - name: Set up Go
        uses: actions/setup-go@v4
        with:
          go-version-file: "go.mod"
          cache: false

      - name: Install ci tools
        run: |
          go install honnef.co/go/tools/cmd/staticcheck@master
          go install github.com/kisielk/errcheck@latest
          go install github.com/gordonklaus/ineffassign@latest

  rust_core:
    name: "Test core runtime"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout codebase
        uses: actions/checkout@v4
      - name: Set up Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable
          components: rustfmt,clippy
      - name: Install Protoc
        uses: arduino/setup-protoc@a8b67ba40b37d35169e222f3bb352603327985b6 # v2
      - name: Set up cargo cache
        uses: actions/cache@v3
        continue-on-error: false
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo
      - uses: taiki-e/install-action@nextest
      - name: Run test
        run: cargo nextest run
        env:
          CARGO_TERM_COLOR: always
      - name: Run rustfmt
        run: cargo fmt --all --check
      - name: Run clippy
        run: cargo clippy --all-targets --all-features -- -D warnings

  wasm_build:
    name: "Build tsparser WASM"
    runs-on: ubuntu-latest
    steps:
      - name: Checkout codebase
        uses: actions/checkout@v4
      - name: Set up Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable
          targets: wasm32-unknown-unknown
          components: clippy
      - name: Install Protoc
        uses: arduino/setup-protoc@a8b67ba40b37d35169e222f3bb352603327985b6 # v2
      - name: Set up cargo cache
        uses: actions/cache@v3
        continue-on-error: false
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-wasm
      - name: Build
        run: cargo build --target wasm32-unknown-unknown -p tsparser-wasm
      - name: Run clippy for WASM
        run: cargo clippy --target wasm32-unknown-unknown -p tsparser-wasm -- -D warnings


================================================
FILE: .github/workflows/makefile
================================================
# This makefile is used inconjunction with the .reviewdog.yml file in the root of the repo
.PHONY: list-modules go-vet staticcheck errcheck ineffassign go-fmt

# Automatically gather all information
ALL_SRC :=  $(shell find ../../ -name "*.go")
ALL_MODS = $(shell find ../../ -name go.mod)
MOD_DIRS = $(sort $(realpath $(dir $(ALL_MODS))))
REPO_DIR := $(realpath ../../)
SEMGREP_DIR := "$(REPO_DIR)/tools/semgrep-rules"

# List modules reports all found Go modules within the repository
list-modules:
	@echo $(MOD_DIRS)

# Function to run a command in each Go module with appropriate build tags
#
# REL_DIR is the relative path to the file from the repository root
#         it is computed by removing the REPO_DIR prefix from the $dir variable,
#		  then we remove the prefix "/" to make it relative
#         and finally escaping the slashes so we can use it in sed
define run_for_each_module
	@for dir in $(MOD_DIRS); do \
		TAGS=""; \
		if [ "$$dir" != "$(REPO_DIR)" ]; then \
			TAGS="-tags encore,encore_internal,encore_app"; \
		fi; \
		REL_DIR=$$(echo "$${dir#$(REPO_DIR)}/" | sed 's/^\///' | sed 's/\//\\\//g'); \
		(cd "$$dir" && $(1) $$TAGS $(2) | sed "s/^\.\//$$REL_DIR/"); \
	done;
endef

# Run Go vet
go-vet: $(ALL_SRC)
	# The sed statements are:
	#
	# 1. Remove any lines starting with "#" (go vet uses these for each package)
	# 2. Remove any "vet: " prefix from the output (sometimes we get this sometimes we dont)
	# 3. Remove any "./" prefix from the output (we'll get this for files which exist directly in the module root folder - this is done so we don't double up next)
	# 4. Add a "./" prefix to the output (this is so the sed within the run_for_each_module function can add the module path to each line)
	$(call run_for_each_module,go vet,./... 2>&1  | sed '/^#/d' | sed 's/^vet: //' | sed 's/^\.\///' | sed "s/^/\.\//")

## Run staticcheck
staticcheck: $(ALL_SRC)
	$(call run_for_each_module,staticcheck -tests=false -f=json,./... | jq -f "$(REPO_DIR)/.github/workflows/staticcheck-to-rdjsonl.jq" -c)

# Run errcheck
errcheck: $(ALL_SRC)
	$(call run_for_each_module,errcheck -abspath,./...)


## Run ineffassign
ineffassign: $(ALL_SRC)
	$(call run_for_each_module,ineffassign,./... 2>&1)

semgrep: $(ALL_SRC)
	@cd $(REPO_DIR) && semgrep scan --quiet --config=auto --config=$(SEMGREP_DIR) --json | jq -f "$(REPO_DIR)/.github/workflows/semgrep-to-rdjson.jq" -c

go-fmt: $(ALL_SRC)
	@cd $(REPO_DIR) && gofmt -s -d . || exit 0


================================================
FILE: .github/workflows/release-2.yml
================================================
name: Release (2.0)

on:
  workflow_dispatch:
    inputs:
      version:
        description: 'Version to build ("v1.2.3", "v1.2.3-nightly.20231231", "v1.2.3-beta.1" or "v0.0.0-develop+[commitHash]")'
        type: string
        required: true

jobs:
  release:
    name: "Run Release Script"
    runs-on: self-hosted
    env:
      GOROOT: /usr/local/go-1.21.4
      RUSTUP_HOME: /usr/local/rust/rustup

    steps:
      - name: Checkout the repo
        uses: actions/checkout@v4
        with:
          path: encr.dev

      - name: Trigger release script
        env:
          NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
        run: |
          cd ${{ github.workspace }}/encr.dev
          go run ./pkg/encorebuild/cmd/make-release/ -dst "${{ github.workspace	}}/build" -v "${{ github.event.inputs.version }}" -publish-npm=true

      - name: Publish artifact (darwin_amd64)
        uses: actions/upload-artifact@v3
        with:
          name: encore-${{ github.event.inputs.version }}-darwin_amd64
          path: ${{ github.workspace }}/build/artifacts/encore-${{ github.event.inputs.version }}-darwin_amd64.tar.gz

      - name: Publish artifact (darwin_arm64)
        uses: actions/upload-artifact@v3
        with:
          name: encore-${{ github.event.inputs.version }}-darwin_arm64
          path: ${{ github.workspace }}/build/artifacts/encore-${{ github.event.inputs.version }}-darwin_arm64.tar.gz

      - name: Publish artifact (linux_amd64)
        uses: actions/upload-artifact@v3
        with:
          name: encore-${{ github.event.inputs.version }}-linux_amd64
          path: ${{ github.workspace }}/build/artifacts/encore-${{ github.event.inputs.version }}-linux_amd64.tar.gz

      - name: Publish artifact (linux_arm64)
        uses: actions/upload-artifact@v3
        with:
          name: encore-${{ github.event.inputs.version }}-linux_arm64
          path: ${{ github.workspace }}/build/artifacts/encore-${{ github.event.inputs.version }}-linux_arm64.tar.gz

      - name: Publish artifact (windows_amd64)
        uses: actions/upload-artifact@v3
        with:
          name: encore-${{ github.event.inputs.version }}-windows_amd64
          path: ${{ github.workspace }}/build/artifacts/encore-${{ github.event.inputs.version }}-windows_amd64.tar.gz

      - name: Setup Docker Buildx
        uses: docker/setup-buildx-action@v3

      - name: Login to Docker Registry
        uses: docker/login-action@v3
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: Copy linux artifacts to docker context folder
        run: |
          mkdir -p ${{ github.workspace }}/encr.dev/.github/dockerimg/artifacts
          cp ${{ github.workspace }}/build/artifacts/encore-${{ github.event.inputs.version }}-linux_amd64.tar.gz ${{ github.workspace }}/encr.dev/.github/dockerimg/artifacts/encore-linux_amd64.tar.gz
          cp ${{ github.workspace }}/build/artifacts/encore-${{ github.event.inputs.version }}-linux_arm64.tar.gz ${{ github.workspace }}/encr.dev/.github/dockerimg/artifacts/encore-linux_arm64.tar.gz

      - name: Create metadata (tags, labels) for Docker image
        id: docker-meta
        uses: docker/metadata-action@v5
        with:
          images: encoredotdev/encore
          labels: |
            org.opencontainers.image.title=Encore
            org.opencontainers.image.vendor=encore.dev
            org.opencontainers.image.authors=support@encore.dev
            org.opencontainers.image.description=Encore is the end-to-end Backend Development Platform that lets you escape cloud complexity.
          tags: |
            type=raw,value=latest,enable=${{ !contains(github.event.inputs.version, '-') }}
            type=semver,pattern={{version}},value=${{ github.event.inputs.version }}
            type=sha
            type=schedule,pattern=nightly,enable=${{ contains(github.event.inputs.version, '-nightly.') }}
            type=semver,pattern={{major}}.{{minor}},value=${{ github.event.inputs.version }},enable=${{ !contains(github.event.inputs.version, '-') }}
            type=semver,pattern={{major}},value=${{ github.event.inputs.version }},enable=${{ !contains(github.event.inputs.version, '-') }}

      - name: Build and push docker images
        uses: docker/build-push-action@v4
        with:
          context: encr.dev/.github/dockerimg
          platforms: linux/amd64,linux/arm64
          push: true
          tags: ${{ steps.docker-meta.outputs.tags }}
          labels: ${{ steps.docker-meta.outputs.labels }}
          cache-from: type=inline
          cache-to: type=inline
          build-args: |
            RELEASE_VERSION=${{ github.event.inputs.version }}

  notify_release_success:
    name: "Notify release system of successful build"
    runs-on: self-hosted
    needs:
      - release
    steps:
      - name: Webhook
        uses: distributhor/workflow-webhook@f5a294e144d6ef44cfac4d3d5e20b613bcee0d4b # v3.0.7
        env:
          webhook_type: "json"
          webhook_url: ${{ secrets.RELEASE_WEBHOOK }}
          data: '{ "version": "${{ github.event.inputs.version }}", "run_id": "${{ github.run_id }}" }'


================================================
FILE: .github/workflows/release.yml
================================================
name: Release

on:
  workflow_dispatch:
    inputs:
      version:
        description: 'Version to build ("1.2.3")'
        required: true
      encorego_version:
        description: 'Encore-Go version to use ("encore-go1.17.7")'
        required: true

jobs:
  build:
    strategy:
      matrix:
        include:
          - builder: ubuntu-24.04
            goos: linux
            goarch: amd64
            release_key: linux_x86-64
          - builder: ubuntu-24.04
            goos: linux
            goarch: arm64
            release_key: linux_arm64
          - builder: macos-11
            goos: darwin
            goarch: amd64
            release_key: macos_x86-64
          - builder: macos-11
            goos: darwin
            goarch: arm64
            release_key: macos_arm64
          - builder: windows-latest
            goos: windows
            goarch: amd64
            release_key: windows_x86-64

    runs-on: ${{ matrix.builder }}
    steps:
      - name: Check out repo
        uses: actions/checkout@v4
        with:
          path: encr.dev

      - name: Set up Go
        uses: actions/setup-go@v4
        with:
          go-version-file: "encr.dev/go.mod"
          check-latest: true
          cache-dependency-path: "encr.dev/go.sum"

      - name: Set up Zig
        uses: goto-bus-stop/setup-zig@7ab2955eb728f5440978d5824358023be3a2802d # v2.2.0
        with:
          version: 0.10.1

      - name: Install encore-go
        run: curl --fail -o encore-go.tar.gz -L https://github.com/encoredev/go/releases/download/${{ github.event.inputs.encorego_version }}/${{ matrix.release_key }}.tar.gz && tar -C ${{ github.workspace }} -xzf ./encore-go.tar.gz

      - name: Build
        run: cd encr.dev && go run ./pkg/make-release/make-release.go -v="${{ github.event.inputs.version }}" -dst=dist -goos=${{ matrix.goos }} -goarch=${{ matrix.goarch }} -encore-go="../encore-go"
        env:
          GO111MODULE: "on"
        if: runner.os != 'windows'

      - name: Build
        run: cd encr.dev && .\pkg\make-release\windows\build.bat
        env:
          GO111MODULE: "on"
          ENCORE_VERSION: "${{ github.event.inputs.version }}"
          ENCORE_GOROOT: "../encore-go"
        if: runner.os == 'windows'

      - name: "Tar artifacts"
        run: tar -czvf encore-${{ github.event.inputs.version }}-${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz -C encr.dev/dist/${{ matrix.goos }}_${{ matrix.goarch }} .
      - name: Publish artifact
        uses: actions/upload-artifact@v3
        with:
          name: encore-${{ github.event.inputs.version }}-${{ matrix.goos }}_${{ matrix.goarch }}
          path: encore-${{ github.event.inputs.version }}-${{ matrix.goos }}_${{ matrix.goarch }}.tar.gz

  publish-docker-images:
    name: "publish docker images"
    runs-on: ubuntu-24.04
    needs: build
    permissions:
      contents: read
      packages: write

    steps:
      - uses: actions/checkout@v4
        with:
          sparse-checkout: .github
      - name: Download Artifacts
        uses: actions/download-artifact@v3
        with:
          path: .github/dockerimg/artifacts
      - name: Setup Docker Buildx
        uses: docker/setup-buildx-action@v1

      - name: Login to Docker Registry
        uses: docker/login-action@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}

      - name: Cache Docker layers
        uses: actions/cache@v2
        with:
          path: /tmp/.buildx-cache
          key: ${{ runner.os }}-buildx-${{ github.sha }}
          restore-keys: |
            ${{ runner.os }}-buildx-

      - name: Extract metadata (tags, labels) for Docker
        id: meta
        uses: docker/metadata-action@v4
        with:
          images: encoredotdev/encore
          labels: |
            org.opencontainers.image.title=Encore
            org.opencontainers.image.vendor=encore.dev
            org.opencontainers.image.authors=support@encore.dev
            org.opencontainers.image.description=Encore is the end-to-end Backend Development Platform that lets you escape cloud complexity.
          tags: |
            type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
            type=semver,pattern={{version}},value=v${{ github.event.inputs.version }}
            type=semver,pattern={{major}}.{{minor}},value=v${{ github.event.inputs.version }}
            type=semver,pattern={{major}},value=v${{ github.event.inputs.version }}

      - name: Build and push
        uses: docker/build-push-action@v4
        with:
          context: .github/dockerimg
          platforms: linux/amd64,linux/arm64
          push: true
          tags: ${{ steps.meta.outputs.tags }}
          labels: ${{ steps.meta.outputs.labels }}
          cache-from: type=gha
          cache-to: type=gha,mode=max
          build-args: |
            RELEASE_VERSION=${{ github.event.inputs.version }}

  notify_release_success:
    needs:
      - build
      - publish-docker-images
    runs-on: ubuntu-24.04
    steps:
      - name: Webhook
        uses: distributhor/workflow-webhook@v3.0.7
        env:
          webhook_type: "json"
          webhook_url: ${{ secrets.RELEASE_WEBHOOK }}
          data: '{ "version": "${{ github.event.inputs.version }}", "run_id": "${{ github.run_id }}" }'


================================================
FILE: .github/workflows/semgrep-to-rdjson.jq
================================================
# See https://github.com/reviewdog/reviewdog/tree/master/proto/rdf
{
    source: {
        name: "semgrep",
        url: "https://semgrep.dev/",
    },
    diagnostics: [
        .results[] | {
            code: {
                value: .check_id,
                url: [
                        .extra.metadata.shortlink?,
                        .extra.metadata.source?,
                        .extra."semgrep.dev".rule.url?,
                        "https://github.com/encoredev/encore/blob/main/\(.check_id | gsub("\\."; "/")).yml"
                    ] | map(select(. != null)) | first,
            },
            message: .extra.message,
            location: {
                path: .path,
                range: {
                    start: {
                        line: .start.line,
                        column: .start.col
                    },
                    end: {
                        line: .end.line,
                        column: .end.col
                    },
                },
            },
            severity: .extra.severity,

            # Temporary variable we store to track the fix
            _res: .
        } |
            if ._res.extra.fix then .suggestions = [{
                range: .location.range,
                text: ._res.extra.fix,
            }] else . end |
            del(._res)
    ]
}


================================================
FILE: .github/workflows/staticcheck-to-rdjsonl.jq
================================================
# See https://github.com/reviewdog/reviewdog/tree/master/proto/rdf
{
  source: {
    name: "staticcheck",
    url: "https://staticcheck.io"
  },
  message: .message,
  code: {value: .code, url: "https://staticcheck.io/docs/checks#\(.code)"},
  location: {
    path: .location.file,
    range: {
      start: {
        line: .location.line,
        column: .location.column
      }
    }
  },
  severity: ((.severity|ascii_upcase|select(match("ERROR|WARNING|INFO")))//null)
}


================================================
FILE: .gitignore
================================================
# Prevent built binaries from being checked in accidentally.
/dist
/encore
/git-remote-encore
/target
/__debug_*

# Don't commit dotfiles
/.encore
/.vscode
/.zed

# Build artifact that must be placed alongside go files for Windows
*.syso

# JetBrains
.idea
.fleet
.run

# MacOS
.DS_Store

runtimes/supervisor-encore

runtimes/supervisor-encore-linux-amd64

encore-runtime.node-linux-amd64


================================================
FILE: .prettierrc.toml
================================================
trailingComma = "none"


================================================
FILE: .reviewdog.yml
================================================
# Encore's reviewdog configuration file.
#
# This runs in our CI pipeline when you open a PR. To run this locally
# and get the same results as our CI pipeline, run: `./check.bash`
#
# We use a makefile rather than the commands directly as this repo
# has multiple Go modules within it and most tools only look at the
# module in the current directory. Thus our make file runs the tool
# for each module, combining the results into a single standardised
# that review dog can then parse and display as a single "run" for
# each tool.
runner:
  go-vet:
    cmd: make -s -C .github/workflows go-vet
    format: govet
  go-fmt:
    cmd: make -s -C .github/workflows go-fmt
    format: diff
# Disable staticcheck until it supports Go 1.21: https://github.com/dominikh/go-tools/issues/1431
#  staticcheck:
#    cmd: make -s -C .github/workflows staticcheck
#    format: rdjsonl
  errcheck:
    cmd: make -s -C .github/workflows errcheck
    errorformat:
      - "%f:%l:%c:\t%m"
  ineffassign:
    cmd: make -s -C .github/workflows ineffassign
    errorformat:
      - "%f:%l:%c: %m"
  semgrep:
    cmd: make -s -C .github/workflows semgrep
    format: rdjson


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation
in our community a harassment-free experience for everyone, regardless
of age, body size, visible or invisible disability, ethnicity, sex
characteristics, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance,
race, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open,
welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for
our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our
  mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
  overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or
  advances of any kind
* Trolling, insulting or derogatory comments, and personal or
  political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
  address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in
  a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our
standards of acceptable behavior and will take appropriate and fair
corrective action in response to any behavior that they deem
inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit,
or reject comments, commits, code, wiki edits, issues, and other
contributions that are not aligned to this Code of Conduct, and will
communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also
applies when an individual is officially representing the community in
public spaces. Examples of representing our community include using an
official e-mail address, posting via an official social media account,
or acting as an appointed representative at an online or offline
event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior
may be reported to the community leaders responsible for enforcement
at [info@encore.dev](mailto:info@encore.dev). All complaints
will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and
security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in
determining the consequences for any action they deem in violation of
this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior
deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders,
providing clarity around the nature of the violation and an
explanation of why the behavior was inappropriate. A public apology
may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series
of actions.

**Consequence**: A warning with consequences for continued
behavior. No interaction with the people involved, including
unsolicited interaction with those enforcing the Code of Conduct, for
a specified period of time. This includes avoiding interactions in
community spaces as well as external channels like social
media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards,
including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or
public communication with the community for a specified period of
time. No public or private interaction with the people involved,
including unsolicited interaction with those enforcing the Code of
Conduct, is allowed during this period. Violating these terms may lead
to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of
community standards, including sustained inappropriate behavior,
harassment of an individual, or aggression toward or disparagement of
classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction
within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor
Covenant][homepage], version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of
conduct enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the
FAQ at https://www.contributor-covenant.org/faq. Translations are
available at https://www.contributor-covenant.org/translations.


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to Encore

We're so excited that you are interested in contributing to Encore!
All contributions are welcome, and there are several valuable ways to contribute.

Below is a technical walkthrough of developing the `encore` command for contributing code
to the Encore project. Head over to the community section for [more ways to contribute](https://encore.dev/docs/community/contribute)!

## GitHub Codespaces / VS Code Remote Containers
The easiest way to get started with developing Encore is using
GitHub Codespaces. Simply open this repository in a new Codespace
and your development environment will be set up with everything preconfigured for building the `encore` CLI and running applications with it.

This also works just as well with [Visual Studio Code's Remote Development](https://code.visualstudio.com/docs/remote/remote-overview).


## Building the encore command from source
To build from the source simply run `go build ./cli/cmd/encore` and `go install ./cli/cmd/git-remote-encore`.

Running an Encore application requires both the Encore runtime (the `encore.dev` package) as well as a custom-built
[Go runtime](https://github.com/encoredev/go) to implement Encore's request semantics and automated instrumentation.

As a result, the Encore Daemon must know where these two things exist on the filesystem to compile the Encore application properly.

This must be done in one of two ways: embedding the installation path at compile time (similar to `GOROOT`)
or by setting an environment variable at runtime.

The environment variables are:
- `ENCORE_RUNTIMES_PATH` – the path to the `encore.dev` runtime implementation.
- `ENCORE_GOROOT` – the path to encore-go on disk

**ENCORE_RUNTIMES_PATH**

This must be set to the location of the `encore.dev` runtime package.
It's located in this Git repository in the `runtimes` directory:

```bash
export ENCORE_RUNTIMES_PATH=/path/to/encore/runtimes
```

**ENCORE_GOROOT**

The `ENCORE_GOROOT` must be set to the path to the [Encore Go runtime](https://github.com/encoredev/go).
Unless you want to make changes to the Go runtime it's easiest to point this to an existing Encore installation.

To do that, run `encore daemon env` and grab the value of `ENCORE_GOROOT`. For example (yours is probably different):

```bash
export ENCORE_GOROOT=/opt/homebrew/Cellar/encore/0.16.2/libexec/encore-go
```

### Running applications when building from source
Once you've built your own `encore` binary and set the environment variables above, you're ready to go!

Start the daemon with the built binary: `./encore daemon -f`

Note that when you run commands like `encore run` must use the same `encore` binary the daemon is running.


### Testing the Daemon run logic
The codegen tests in the `internal/clientgen/client_test.go` file uses many auto generated files from the
`e2e-tests/testdata` directory. To generate the client files and other test files, run `go test -golden-update` from
the `e2e-tests` directory. This will generate client files for all the supported client generation languages.

Running `go test ./internal/clientgen` will now work and use the most recent client generated files. If
you change the client or content of the `testdata` folder, you may need to regenerate the client files again.

## Architecture

The code base is divided into several parts:

### cli
The `encore` command line interface. The encore background daemon
is located at `cli/daemon` and is responsible for managing processes,
setting up databases and talking with the Encore servers for operations like
fetching production logs.

### parser
The Encore Parser statically analyzes Encore apps to build up a model
of the application dubbed the Encore Syntax Tree (EST) that lives in
`parser/est`.

For speed the parser does not perform traditional type-checking; it does
limited type-checking for enforcing Encore-specific rules but otherwise
relies on the underlying Go compiler to perform type-checking as part of
building the application.

### compiler
The Encore Compiler rewrites the source code based on the parsed
Encore Syntax Tree to create a fully functioning application.
It rewrites API calls & API handlers, injects instrumentation
and secret values, and more.


================================================
FILE: Cargo.toml
================================================
[workspace]
resolver = "2"
members = [
    "runtimes/core",
    "runtimes/js",
    "tsparser",
    "tsparser/wasm",
    "supervisor",
    "miniredis",
]

[profile.dev.package]
insta.opt-level = 3

[profile.release]
lto = true

[patch.crates-io]
tokio-postgres = { git = "https://github.com/encoredev/rust-postgres", branch = "encore-patches-sync" }
postgres-protocol = { git = "https://github.com/encoredev/rust-postgres", branch = "encore-patches-sync" }
postgres-types = { git = "https://github.com/encoredev/rust-postgres", branch = "encore-patches-sync" }
swc_ecma_parser = { git = "https://github.com/encoredev/swc", branch = "node-resolve-exports" }
swc_ecma_ast = { git = "https://github.com/encoredev/swc", branch = "node-resolve-exports" }
swc_ecma_transforms_base = { git = "https://github.com/encoredev/swc", branch = "node-resolve-exports" }
swc_atoms = { git = "https://github.com/encoredev/swc", branch = "node-resolve-exports" }
swc_common = { git = "https://github.com/encoredev/swc", branch = "node-resolve-exports" }
swc_ecma_loader = { git = "https://github.com/encoredev/swc", branch = "node-resolve-exports" }
swc_ecma_visit = { git = "https://github.com/encoredev/swc", branch = "node-resolve-exports" }


================================================
FILE: Cross.toml
================================================
[build]
pre-build = [
    "apt-get install unzip &&",
    "curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v24.4/protoc-24.4-linux-x86_64.zip &&",
    "unzip protoc-24.4-linux-x86_64.zip -d /usr/local &&",
    "rm protoc-24.4-linux-x86_64.zip &&",
    "export PATH=$PATH:/usr/local/bin",
]

[build.env]
volumes = ["ENCORE_WORKDIR"]
passthrough = ["TYPE_DEF_TMP_PATH", "ENCORE_VERSION"]

================================================
FILE: LICENSE
================================================
Mozilla Public License, version 2.0

1. Definitions

1.1. "Contributor"

     means each individual or legal entity that creates, contributes to the
     creation of, or owns Covered Software.

1.2. "Contributor Version"

     means the combination of the Contributions of others (if any) used by a
     Contributor and that particular Contributor's Contribution.

1.3. "Contribution"

     means Covered Software of a particular Contributor.

1.4. "Covered Software"

     means Source Code Form to which the initial Contributor has attached the
     notice in Exhibit A, the Executable Form of such Source Code Form, and
     Modifications of such Source Code Form, in each case including portions
     thereof.

1.5. "Incompatible With Secondary Licenses"
     means

     a. that the initial Contributor has attached the notice described in
        Exhibit B to the Covered Software; or

     b. that the Covered Software was made available under the terms of
        version 1.1 or earlier of the License, but not also under the terms of
        a Secondary License.

1.6. "Executable Form"

     means any form of the work other than Source Code Form.

1.7. "Larger Work"

     means a work that combines Covered Software with other material, in a
     separate file or files, that is not Covered Software.

1.8. "License"

     means this document.

1.9. "Licensable"

     means having the right to grant, to the maximum extent possible, whether
     at the time of the initial grant or subsequently, any and all of the
     rights conveyed by this License.

1.10. "Modifications"

     means any of the following:

     a. any file in Source Code Form that results from an addition to,
        deletion from, or modification of the contents of Covered Software; or

     b. any new file in Source Code Form that contains any Covered Software.

1.11. "Patent Claims" of a Contributor

      means any patent claim(s), including without limitation, method,
      process, and apparatus claims, in any patent Licensable by such
      Contributor that would be infringed, but for the grant of the License,
      by the making, using, selling, offering for sale, having made, import,
      or transfer of either its Contributions or its Contributor Version.

1.12. "Secondary License"

      means either the GNU General Public License, Version 2.0, the GNU Lesser
      General Public License, Version 2.1, the GNU Affero General Public
      License, Version 3.0, or any later versions of those licenses.

1.13. "Source Code Form"

      means the form of the work preferred for making modifications.

1.14. "You" (or "Your")

      means an individual or a legal entity exercising rights under this
      License. For legal entities, "You" includes any entity that controls, is
      controlled by, or is under common control with You. For purposes of this
      definition, "control" means (a) the power, direct or indirect, to cause
      the direction or management of such entity, whether by contract or
      otherwise, or (b) ownership of more than fifty percent (50%) of the
      outstanding shares or beneficial ownership of such entity.


2. License Grants and Conditions

2.1. Grants

     Each Contributor hereby grants You a world-wide, royalty-free,
     non-exclusive license:

     a. under intellectual property rights (other than patent or trademark)
        Licensable by such Contributor to use, reproduce, make available,
        modify, display, perform, distribute, and otherwise exploit its
        Contributions, either on an unmodified basis, with Modifications, or
        as part of a Larger Work; and

     b. under Patent Claims of such Contributor to make, use, sell, offer for
        sale, have made, import, and otherwise transfer either its
        Contributions or its Contributor Version.

2.2. Effective Date

     The licenses granted in Section 2.1 with respect to any Contribution
     become effective for each Contribution on the date the Contributor first
     distributes such Contribution.

2.3. Limitations on Grant Scope

     The licenses granted in this Section 2 are the only rights granted under
     this License. No additional rights or licenses will be implied from the
     distribution or licensing of Covered Software under this License.
     Notwithstanding Section 2.1(b) above, no patent license is granted by a
     Contributor:

     a. for any code that a Contributor has removed from Covered Software; or

     b. for infringements caused by: (i) Your and any other third party's
        modifications of Covered Software, or (ii) the combination of its
        Contributions with other software (except as part of its Contributor
        Version); or

     c. under Patent Claims infringed by Covered Software in the absence of
        its Contributions.

     This License does not grant any rights in the trademarks, service marks,
     or logos of any Contributor (except as may be necessary to comply with
     the notice requirements in Section 3.4).

2.4. Subsequent Licenses

     No Contributor makes additional grants as a result of Your choice to
     distribute the Covered Software under a subsequent version of this
     License (see Section 10.2) or under the terms of a Secondary License (if
     permitted under the terms of Section 3.3).

2.5. Representation

     Each Contributor represents that the Contributor believes its
     Contributions are its original creation(s) or it has sufficient rights to
     grant the rights to its Contributions conveyed by this License.

2.6. Fair Use

     This License is not intended to limit any rights You have under
     applicable copyright doctrines of fair use, fair dealing, or other
     equivalents.

2.7. Conditions

     Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in
     Section 2.1.


3. Responsibilities

3.1. Distribution of Source Form

     All distribution of Covered Software in Source Code Form, including any
     Modifications that You create or to which You contribute, must be under
     the terms of this License. You must inform recipients that the Source
     Code Form of the Covered Software is governed by the terms of this
     License, and how they can obtain a copy of this License. You may not
     attempt to alter or restrict the recipients' rights in the Source Code
     Form.

3.2. Distribution of Executable Form

     If You distribute Covered Software in Executable Form then:

     a. such Covered Software must also be made available in Source Code Form,
        as described in Section 3.1, and You must inform recipients of the
        Executable Form how they can obtain a copy of such Source Code Form by
        reasonable means in a timely manner, at a charge no more than the cost
        of distribution to the recipient; and

     b. You may distribute such Executable Form under the terms of this
        License, or sublicense it under different terms, provided that the
        license for the Executable Form does not attempt to limit or alter the
        recipients' rights in the Source Code Form under this License.

3.3. Distribution of a Larger Work

     You may create and distribute a Larger Work under terms of Your choice,
     provided that You also comply with the requirements of this License for
     the Covered Software. If the Larger Work is a combination of Covered
     Software with a work governed by one or more Secondary Licenses, and the
     Covered Software is not Incompatible With Secondary Licenses, this
     License permits You to additionally distribute such Covered Software
     under the terms of such Secondary License(s), so that the recipient of
     the Larger Work may, at their option, further distribute the Covered
     Software under the terms of either this License or such Secondary
     License(s).

3.4. Notices

     You may not remove or alter the substance of any license notices
     (including copyright notices, patent notices, disclaimers of warranty, or
     limitations of liability) contained within the Source Code Form of the
     Covered Software, except that You may alter any license notices to the
     extent required to remedy known factual inaccuracies.

3.5. Application of Additional Terms

     You may choose to offer, and to charge a fee for, warranty, support,
     indemnity or liability obligations to one or more recipients of Covered
     Software. However, You may do so only on Your own behalf, and not on
     behalf of any Contributor. You must make it absolutely clear that any
     such warranty, support, indemnity, or liability obligation is offered by
     You alone, and You hereby agree to indemnify every Contributor for any
     liability incurred by such Contributor as a result of warranty, support,
     indemnity or liability terms You offer. You may include additional
     disclaimers of warranty and limitations of liability specific to any
     jurisdiction.

4. Inability to Comply Due to Statute or Regulation

   If it is impossible for You to comply with any of the terms of this License
   with respect to some or all of the Covered Software due to statute,
   judicial order, or regulation then You must: (a) comply with the terms of
   this License to the maximum extent possible; and (b) describe the
   limitations and the code they affect. Such description must be placed in a
   text file included with all distributions of the Covered Software under
   this License. Except to the extent prohibited by statute or regulation,
   such description must be sufficiently detailed for a recipient of ordinary
   skill to be able to understand it.

5. Termination

5.1. The rights granted under this License will terminate automatically if You
     fail to comply with any of its terms. However, if You become compliant,
     then the rights granted under this License from a particular Contributor
     are reinstated (a) provisionally, unless and until such Contributor
     explicitly and finally terminates Your grants, and (b) on an ongoing
     basis, if such Contributor fails to notify You of the non-compliance by
     some reasonable means prior to 60 days after You have come back into
     compliance. Moreover, Your grants from a particular Contributor are
     reinstated on an ongoing basis if such Contributor notifies You of the
     non-compliance by some reasonable means, this is the first time You have
     received notice of non-compliance with this License from such
     Contributor, and You become compliant prior to 30 days after Your receipt
     of the notice.

5.2. If You initiate litigation against any entity by asserting a patent
     infringement claim (excluding declaratory judgment actions,
     counter-claims, and cross-claims) alleging that a Contributor Version
     directly or indirectly infringes any patent, then the rights granted to
     You by any and all Contributors for the Covered Software under Section
     2.1 of this License shall terminate.

5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user
     license agreements (excluding distributors and resellers) which have been
     validly granted by You or Your distributors under this License prior to
     termination shall survive termination.

6. Disclaimer of Warranty

   Covered Software is provided under this License on an "as is" basis,
   without warranty of any kind, either expressed, implied, or statutory,
   including, without limitation, warranties that the Covered Software is free
   of defects, merchantable, fit for a particular purpose or non-infringing.
   The entire risk as to the quality and performance of the Covered Software
   is with You. Should any Covered Software prove defective in any respect,
   You (not any Contributor) assume the cost of any necessary servicing,
   repair, or correction. This disclaimer of warranty constitutes an essential
   part of this License. No use of  any Covered Software is authorized under
   this License except under this disclaimer.

7. Limitation of Liability

   Under no circumstances and under no legal theory, whether tort (including
   negligence), contract, or otherwise, shall any Contributor, or anyone who
   distributes Covered Software as permitted above, be liable to You for any
   direct, indirect, special, incidental, or consequential damages of any
   character including, without limitation, damages for lost profits, loss of
   goodwill, work stoppage, computer failure or malfunction, or any and all
   other commercial damages or losses, even if such party shall have been
   informed of the possibility of such damages. This limitation of liability
   shall not apply to liability for death or personal injury resulting from
   such party's negligence to the extent applicable law prohibits such
   limitation. Some jurisdictions do not allow the exclusion or limitation of
   incidental or consequential damages, so this exclusion and limitation may
   not apply to You.

8. Litigation

   Any litigation relating to this License may be brought only in the courts
   of a jurisdiction where the defendant maintains its principal place of
   business and such litigation shall be governed by laws of that
   jurisdiction, without reference to its conflict-of-law provisions. Nothing
   in this Section shall prevent a party's ability to bring cross-claims or
   counter-claims.

9. Miscellaneous

   This License represents the complete agreement concerning the subject
   matter hereof. If any provision of this License is held to be
   unenforceable, such provision shall be reformed only to the extent
   necessary to make it enforceable. Any law or regulation which provides that
   the language of a contract shall be construed against the drafter shall not
   be used to construe this License against a Contributor.


10. Versions of the License

10.1. New Versions

      Mozilla Foundation is the license steward. Except as provided in Section
      10.3, no one other than the license steward has the right to modify or
      publish new versions of this License. Each version will be given a
      distinguishing version number.

10.2. Effect of New Versions

      You may distribute the Covered Software under the terms of the version
      of the License under which You originally received the Covered Software,
      or under the terms of any subsequent version published by the license
      steward.

10.3. Modified Versions

      If you create software not governed by this License, and you want to
      create a new license for such software, you may create and use a
      modified version of this License if you rename the license and remove
      any references to the name of the license steward (except to note that
      such modified license differs from this License).

10.4. Distributing Source Code Form that is Incompatible With Secondary
      Licenses If You choose to distribute Source Code Form that is
      Incompatible With Secondary Licenses under the terms of this version of
      the License, the notice described in Exhibit B of this License must be
      attached.

Exhibit A - Source Code Form License Notice

      This Source Code Form is subject to the
      terms of the Mozilla Public License, v.
      2.0. If a copy of the MPL was not
      distributed with this file, You can
      obtain one at
      http://mozilla.org/MPL/2.0/.

If it is not possible or desirable to put the notice in a particular file,
then You may include the notice in a location (such as a LICENSE file in a
relevant directory) where a recipient would be likely to look for such a
notice.

You may add additional accurate notices of copyright ownership.

Exhibit B - "Incompatible With Secondary Licenses" Notice

      This Source Code Form is "Incompatible
      With Secondary Licenses", as defined by
      the Mozilla Public License, v. 2.0.


================================================
FILE: README.md
================================================
<p align="center" dir="auto">
<a href="https://encore.dev"><img src="https://user-images.githubusercontent.com/78424526/214602214-52e0483a-b5fc-4d4c-b03e-0b7b23e012df.svg" width="160px" alt="encore icon"></img></a><br/><br/><br/>
<b>Open Source Framework for creating type-safe distributed systems with declarative infrastructure</b><br/>
</p>

- **Framework:** The Encore framework, available for TypeScript and Go, lets you define APIs, services, and infrastructure (databases, Pub/Sub, caching, buckets, cron jobs) as type-safe objects in your code. Write your application once, then deploy it anywhere without code changes by [exporting a Docker image](https://encore.dev/docs/ts/self-host/build) and supplying the infra configuration.

- **Local Dev Tools:** The Encore CLI runs your app locally and automatically provisions local infrastructure. Encore's local dev dashboard provides tools for a productive workflow: Tracing, API Explorer, Service Catalog, Architecture Diagrams, and Database Explorer.

- **DevOps Platform (Optional):** [Encore Cloud](https://encore.cloud) parses your application and automatically provisions the required infrastructure in your own AWS/GCP account. Other tools include Preview Environments for each PR, Service Catalog, Distributed Tracing, Metrics, and Cost Analytics.

**⭐ Star this repository** to help spread the word and stay up to date.

### Get started

**Install Encore:**

- **macOS:** `brew install encoredev/tap/encore`
- **Linux:** `curl -L https://encore.dev/install.sh | bash`
- **Windows:** `iwr https://encore.dev/install.ps1 | iex`

**Create your first app:**

- **TypeScript:** `encore app create --example=ts/hello-world`
- **Go:** `encore app create --example=hello-world`

**Use with AI coding assistants:**

Add Encore's [LLM instructions](https://encore.dev/docs/ts/ai-integration) to your project, so your AI tools can understand your architecture, generate type-safe code, and use Encore's infrastructure primitives.
Use the built-in [MCP server](https://encore.dev/docs/ts/ai-integration) to give your AI runtime context (query databases, call APIs, analyze traces) for seamless debugging and faster iterations. [Learn more](https://encore.dev/docs/ts/ai-integration)

https://github.com/user-attachments/assets/461b902f-8fd3-46f1-a73c-0ebbfa789ce3

_Encore's local development dashboard_

## How it works

Encore's open source backend frameworks, [Encore.ts](https://encore.dev/docs/ts) and [Encore.go](https://encore.dev/docs/primitives/overview), enable you to define resources like services, databases, Pub/Sub, caches, buckets, and cron jobs, as type-safe objects in your application code.

You only define **infrastructure semantics** (_what matters for the behavior of the application_), not configuration for specific cloud services. Here's how you define a database in Encore.ts:

```typescript
const db = new SQLDatabase("users", { migrations: "./migrations" });
```

Encore parses your application to understand your infrastructure requirements, then sets up infrastructure in different environments:

- **Locally:** The Encore CLI sets up local infrastructure (microservices, Postgres, Pub/Sub, etc.) and provides a development dashboard with distributed tracing, API documentation, service catalog, architecture diagrams, and database explorer. Works offline, no Docker Compose needed.

- **AWS/GCP:** Encore Cloud deploys to your AWS/GCP account without any Terraform or YAML needed. It automatically sets up compute instances (serverless or Kubernetes), databases (RDS/Cloud SQL), Pub/Sub (SQS/GCP Pub/Sub), storage (S3/GCS), caching (ElastiCache/Memorystore), and all other required resources like security groups and IAM policies, according to best practices.

- **Self-hosted:** Use the Encore CLI to export your app as Docker images, then supply your infra config to host anywhere.

<img width="578" alt="Encore overview" src="https://github.com/user-attachments/assets/89fb83cf-2400-4b54-969d-6f7a5911e76c" />

_Encore orchestrates infrastructure from local development and testing, to production in your cloud._

#### Encore makes it simpler to build distributed systems

- **Microservices without boilerplate:** Call APIs in other services like regular functions. Encore handles service discovery, networking, and serialization. Get cross-service type-safety and auto-complete in your IDE.

- **Modular monolith to microservices:** Structure your application using independent services for clarity. Then deploy them colocated in a single process or as distributed microservices, without changing a single line of code. Encore handles service communication whether in-process or over the network.

- **Testing built-in:** Mock API calls, get dedicated test infrastructure, and use distributed tracing for tests.

### Example: Hello World

Defining microservices and API endpoints is very simple. With less than 10 lines of code, you can create a production-ready, deployable service.

**Hello World in Encore.ts**

```typescript
import { api } from "encore.dev/api";

export const get = api(
  { expose: true, method: "GET", path: "/hello/:name" },
  async ({ name }: { name: string }): Promise<Response> => {
    const msg = `Hello ${name}!`;
    return { message: msg };
  }
);

interface Response {
  message: string;
}
```

**Hello World in Encore.go**

```go
package hello

//encore:api public path=/hello/:name
func World(ctx context.Context, name string) (*Response, error) {
	msg := fmt.Sprintf("Hello, %s!", name)
	return &Response{Message: msg}, nil
}

type Response struct {
	Message string
}
```

### Example: Using Pub/Sub

If you want a Pub/Sub Topic, you declare it directly in your application code and Encore will integrate the infrastructure and generate the boilerplate code necessary.
Encore orchestrates the relevant Pub/Sub infrastructure for different environments:

- **NSQ** for local environments
- **GCP Pub/Sub** for environments on GCP
- **SNS/SQS** for environments on AWS

**Using Pub/Sub in Encore.ts**

```typescript
import { Topic } "encore.dev/pubsub"

export interface SignupEvent {
    userID: string;
}

export const signups = new Topic<SignupEvent>("signups", {
    deliveryGuarantee: "at-least-once",
});
```

**Using Pub/Sub in Encore.go**

```go
import "encore.dev/pubsub"

type User struct { /* fields... */ }

var Signup = pubsub.NewTopic[*User]("signup", pubsub.TopicConfig{
  DeliveryGuarantee: pubsub.AtLeastOnce,
})

// Publish messages by calling a method
Signup.Publish(ctx, &User{...})
```

### Need some infrastructure Encore doesn't provide?

Encore never prevents you from using arbitrary infrastructure.

You can use any external resource as you normally would, directly integrating standard SDKs (AWS SDK, GCP client libraries, third-party APIs, etc.). You then provision that resource yourself as you normally would.

### Want to use Encore in an existing system?

You don't need a complete rewrite, Encore supports incremental adoption.

**Service-by-service adoption (recommended):** Build new services with Encore and run them alongside your existing system, integrated via APIs. Then incrementally migrate existing services as needed. Each migrated service immediately gets Encore's full feature set: infrastructure provisioning, tracing, architecture diagrams.

#### Deployment options:

- **Your Kubernetes cluster:** Deploy directly to your existing Kubernetes infrastructure. Run Encore alongside legacy systems in the same environment.
- **Encore-managed infrastructure:** Encore provisions and manages infrastructure in your AWS/GCP account, deployed within your existing VPC and security setup.
- **Terraform provider:** Encore provides a [Terraform provider](https://encore.dev/docs/platform/integrations/terraform) to make it simple to integrate Encore managed infrastructure with your existing infrastructure landscape.

Start with low-risk, frequently-changed services to validate the approach. Learn more in our [migration guide](https://encore.dev/docs/platform/migration/migrate-to-encore).

## Learn more

- **Documentation:** [Encore Docs](https://encore.dev/docs)

- **See example apps:** [Example Apps Repo](https://github.com/encoredev/examples/)

- **See products built with Encore:** [Showcase](https://encore.cloud/showcase)

- **Hear from teams using Encore:** [Case studies](https://encore.cloud/customers)

- **Have questions?** Join the friendly developer community on [Discord](https://encore.dev/discord)

- **Talk to a human:** [Book a 1:1 demo](https://encore.dev/book) with one of our founders

- **Videos:**
  - <a href="https://youtu.be/vvqTGfoXVsw" alt="Intro video: Encore concepts & features" target="_blank">Intro: Encore concepts & features</a>
  - <a href="https://youtu.be/wiLDz-JUuqY" alt="Demo video: Getting started with Encore.ts" target="_blank">Demo video: Getting started with Encore.ts</a>
  - <a href="https://youtu.be/IwplIbwJtD0" alt="Demo video: Building and deploying a simple service" target="_blank">Demo: Building and deploying a simple Go service</a>
  - <a href="https://youtu.be/ipj1HdG4dWA" alt="Demo video: Building an event-driven system" target="_blank">Demo: Building an event-driven system in Go</a>
  - Find more videos in our [YouTube channel](youtube.com/channel/UCvqeAqMPotfuA6SPXa4VhNQ/).

### How Encore compares to other tools

| Tool                               | What it does                                                  | How Encore differs                                                                                                                                                                                                                                                           |
| ---------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Pulumi / CDK / Terraform / SST** | Infrastructure-as-Code tools for provisioning cloud resources | Other solutions define configuration for specific infra services, coupling your application to one set of infrastructure. Encore uses semantic infrastructure (services, databases, Pub/Sub), write once, deploy anywhere (AWS/GCP/local), colocated or distributed services |
| **Serverless Framework / Chalice** | Frameworks for deploying serverless functions to AWS          | Encore supports any architecture (monolith, microservices, serverless) and any cloud (AWS, GCP, self-hosted)                                                                                                                                                                 |
| **NestJS / Express / Fiber**       | Web frameworks for building APIs and services                 | Encore provides the same capabilities plus infrastructure primitives, local dev tooling, observability, and optional cloud deployment                                                                                                                                        |
| **Convex / Supabase / Firebase**   | Managed backend-as-a-service platforms                        | Encore gives you similar productivity but supports microservices and event-driven systems, and deploys to your own cloud account with no vendor lock-in                                                                                                                      |
| **Vercel / Netlify / Railway**     | Deployment platforms (primarily frontend/full-stack)          | Encore is backend-specialized with deeper primitives (Pub/Sub, cron, caching) and multi-cloud infrastructure automation                                                                                                                                                      |

### Why teams use Encore

- **Faster Development**: Encore streamlines the development process by providing guardrails, clear abstractions, and removing manual infrastructure tasks from development iterations.
- **Scalability & Performance**: Encore simplifies building large-scale microservices applications that can handle growing user bases and demands, without the normal boilerplate and complexity.
- **Control & Standardization**: Built-in tools like automated architecture diagrams, infrastructure tracking and approval workflows, make it easy for teams and leaders to get an overview of the entire application.
- **Security & Compliance**: Encore Cloud helps ensure your application is secure and compliant by enforcing security standards like least privilege IAM, and provisioning infrastructure according to best practices for each cloud provider.
- **Reduced Costs**: Encore Cloud's automatic infrastructure management removes common cloud expenses like overprovisioned test environments, and reduces DevOps workload.

## Open Source

Everything needed to develop and deploy Encore applications is Open Source, including the backend frameworks, parser, compiler, runtime, and CLI.

This includes all code needed for local development, everything that runs in your application when it is deployed, and everything needed to generate a Docker image for your application, so you can easily deploy your application anywhere. [Learn more in the docs](https://encore.dev/docs/ts/self-host/build).

## Join our growing developer community

Developers building with Encore are part of fast-moving teams that want to focus on creative programming and building great software to solve meaningful problems. It's a friendly place, great for exchanging ideas and learning new things!

**Join the community on [Discord](https://encore.dev/discord).**

We rely on your contributions and feedback to improve Encore for everyone who is using it.
Here's how you can contribute:

- ⭐ **Star and watch this repository to help spread the word and stay up to date.**
- Meet fellow Encore developers and chat on [Discord](https://encore.dev/discord).
- Follow Encore on [Twitter](https://twitter.com/encoredotdev).
- Share feedback or ask questions via [email](mailto:hello@encore.dev).
- Leave feedback on the [Public Roadmap](https://encore.dev/roadmap).
- Send a pull request here on GitHub with your contribution.

## Frequently Asked Questions (FAQ)

### Who's behind Encore?

Encore was founded by long-time engineers from Spotify and Google. We've lived through the challenges of building complex distributed systems with thousands of services, and scaling to hundreds of millions of users.

Encore grew out of these experiences and is a solution to the frustrations that came with them: unnecessary infrastructure complexity and tedious repetitive work that suffocates developers' productivity and creativity.

### Who is Encore for?

**Individual developers:** Build cloud applications without managing infrastructure configuration. Go from idea to deployed application in minutes instead of days.

**Startup teams:** Get a production-ready backend on AWS/GCP without dedicated DevOps engineers. Focus your time on your product instead of reinventing infrastructure patterns and building platform tooling.

**Large organizations:** Standardize backend development across teams. Reduce onboarding time and operational overhead. Spin up new services in minutes with consistent patterns, without needing days of back and forth between development and DevOps teams.

### Does defining infrastructure in code couple my app to infrastructure?

No. Encore keeps your application code cloud-agnostic by letting you refer only to **logical resources** (like "a Postgres database" or "a Pub/Sub topic"). A backend-agnostic interface means your code has no cloud-specific imports or configurations.

Encore's compiler and runtime handle the mapping of logical resources to actual infrastructure, which is configured per environment. Your code stays identical whether the environment uses e.g.:

- **AWS RDS** or **GCP Cloud SQL** for databases
- **SQS/SNS** or **GCP Pub/Sub** for messaging
- **AWS Fargate**, **Cloud Run**, or **Kubernetes** for compute

This **reduces coupling** compared to traditional Infrastructure-as-Code or cloud SDKs, which embed cloud-specific decisions directly in your codebase. With Encore, swapping cloud providers or infrastructure services requires no code changes.

### What kind of support does Encore offer?

Encore is fully open source and maintained by a dedicated full-time team. Support options include:

- **Community Support:** Free support via [Discord](https://encore.dev/discord)
- **Documentation:** Comprehensive guides and API references at [encore.dev/docs](https://encore.dev/docs)
- **Paid Support:** For teams requiring guaranteed response times or dedicated support, [contact us](mailto:hello@encore.dev) about support plans

### What if I want to migrate away from Encore?

Encore is designed to let you go outside of the framework when you want to, and easily drop down in abstraction level when you need to, so you never run into any dead-ends.

Should you want to migrate away, it's straightforward and does not require a big rewrite. 99% of your code is regular Go or TypeScript.

Encore provides tools for [self-hosting](https://encore.dev/docs/ts/self-host/build) your application, by using the Open Source CLI to produce a standalone Docker image that can be deployed anywhere you'd like.

Learn more in the [migration guide](https://encore.dev/docs/ts/migration/migrate-away)

## Roadmap

We're actively expanding Encore's capabilities. Here's what's on the horizon:

**Languages**

- **Python**: Next on the roadmap for broader ecosystem support

**Cloud Providers**

- **Azure**: Planned to complement existing AWS and GCP support

**Infrastructure Primitives**

- Expanding storage, compute, and queue options

See the full [Public Roadmap](https://encore.dev/roadmap) and share your feedback on what you'd like to see next.

## Contributing to Encore and building from source

See [CONTRIBUTING.md](CONTRIBUTING.md).


================================================
FILE: check.bash
================================================
#!/usr/bin/env bash
#
# This script will run the same checks as Encore's CI pipeline and report the same static analysis errors
# as the pipeline by default. It can be used to check for what errors might be reported by the pipeline
# before you commit and open a PR.
#
# Usage:
#   ./check.bash [options]
#
# Options:
#   --base <ref>         The merge base to compare against (default: origin/main)
#   --diff               Show the diff against base instead of running the checks
#   --filter-mode <mode> The filter mode to use for reviewdog; added, file, diff_context, nofilter (default: file)
#   --all                Alias for `--filter-mode nofilter` (runs checks against all files in the working directory)
#
# Examples:
#
#   # Run the checks against files changed since branching from origin/main
#   # (This is the default behavior and what our CI process does)
#   ./check.bash
#
#   # Show the diff between the current working directory and origin/main
#   ./check.bash --diff
#
#   # Run the checks against the entire working directory (regardless of changes made)
#   ./check.bash --all


##############################################################################################################################
# Step 0: Setup the script with basic error handling                                                                         #
##############################################################################################################################

  set -euo pipefail
  # nosemgrep
  IFS=$'\n\t'

  function errHandler() {
    echo "Exiting due to an error line $1" >&2
    echo "" >&2
    awk 'NR>L-4 && NR<L+4 { printf "%-5d%3s%s\n",NR,(NR==L?">> ":""),$0 }' L="$1" "$0" >&2
  }
  trap 'errHandler $LINENO' ERR


##############################################################################################################################
# Step 1: Configure the script with the parameters the use wants                                                             #
##############################################################################################################################

  # Parameters
  WORK_DIR=$( dirname "${BASH_SOURCE[0]}" ) # Get the directory this script is in
  BASE_REF="origin/main"                    # The merge base to compare against
  DIFF_ONLY="false"                         # If true, show the diff instead of running the checks
  FILTER_MODE="file"                        # The filter mode to use for reviewdog (added, file, diff_context, nofilter)

  # Parse the command line arguments
  while [[ $# -gt 0 ]]; do
    case "$1" in
      --base)
        BASE_REF="$2"
        shift 2
        ;;
      --diff)
        DIFF_ONLY="true"
        shift 1
        ;;
      --filter-mode)
        FILTER_MODE="$2"
        shift 2
        ;;
      --all)
        FILTER_MODE="nofilter"
        shift 1
        ;;
      *)
        echo "Unknown argument: $1"
        exit 1
        ;;
    esac
  done


##############################################################################################################################
# Step 2: Check for required tools and error out if anything is missing which we can't install for the user                  #
##############################################################################################################################

  # Check for tools we can't install using go
  command -v go >/dev/null 2>&1 || { echo >&2 "go is required but not installed. Aborting."; exit 1; }
  command -v git >/dev/null 2>&1 || { echo >&2 "git is required but not installed. Aborting."; exit 1; }
  command -v sed >/dev/null 2>&1 || { echo >&2 "sed is required but not installed. Aborting."; exit 1; }
  command -v semgrep >/dev/null 2>&1 || { echo >&2 "semgrep is required but not installed. Aborting."; exit 1; }

  # Now install all missing tools
  command -v reviewdog >/dev/null 2>&1 || go install github.com/reviewdog/reviewdog/cmd/reviewdog@latest || { echo >&2 "Unable to install reviewdog. Aborting."; exit 1; }
  command -v staticcheck >/dev/null 2>&1 || go install honnef.co/go/tools/cmd/staticcheck@latest || { echo >&2 "Unable to install staticcheck. Aborting."; exit 1; }
  command -v errcheck >/dev/null 2>&1 || go install github.com/kisielk/errcheck@latest || { echo >&2 "Unable to install errcheck. Aborting."; exit 1; }
  command -v ineffassign >/dev/null 2>&1 || go install github.com/gordonklaus/ineffassign@latest || { echo >&2 "Unable to install ineffassign. Aborting."; exit 1; }


##############################################################################################################################
# Step 3: Create a diff of the changes in the working directory against the common ancestor of the current branch and main   #
#         This will be used to run static analysis checks on only the files that have changed. This diff should mimic the    #
#         diff that would be created by GitHub when all current changes are committed and pushed into a PR on GitHub.        #
##############################################################################################################################

  # Don't generate the diff if we don't need it to filter!
  if [[ "$FILTER_MODE" != "nofilter" ]]; then

    # Create a temp directory to store the common ancestor commit
    TMP_DIR=$(mktemp -d)
    if [[ ! "$TMP_DIR" || ! -d "$TMP_DIR" ]]; then
      echo "Could not create temp dir"
      exit 1
    fi

    # Create a temp file to store the diff we need
    DIFF_FILE=$(mktemp)
    if [[ ! "$DIFF_FILE" || ! -f "$DIFF_FILE" ]]; then
      echo "Could not create temp diff file"
      exit 1
    fi

    # Create a blank file to use as a comparison when a file is missing because either it's new or been deleted
    BLANK_FILE=$(mktemp)
    if [[ ! "$BLANK_FILE" || ! -f "$BLANK_FILE" ]]; then
      echo "Could not create blank file"
      exit 1
    fi

    # Clean up on exit and delete all the temp files we just created
    function cleanup() {
      rm -rf "$TMP_DIR"
      rm -f "$DIFF_FILE"
      rm -f "$BLANK_FILE"
    }
    trap cleanup EXIT

    # Clone the repo into the temp directory
    git clone -q "$WORK_DIR" "$TMP_DIR"

    # Change our temp directory to be a clean copy of the common ancestor commit
    pushd "$TMP_DIR" > /dev/null
    git reset -q --hard HEAD
    git checkout -q "$(git merge-base "$BASE_REF" HEAD)"
    TRACKED_FILES_FROM_MAIN=$(git ls-files)
    popd > /dev/null

    # Create a list of files that we care about
    MODIFICATIONS_IN_WORKING_DIR=$(git status --short | awk '{print $2}')
    TRACKED_FILES_IN_WORKING_DIR=$(git ls-files)
    ALL_FILES=$(echo "$TRACKED_FILES_IN_WORKING_DIR $MODIFICATIONS_IN_WORKING_DIR $TRACKED_FILES_FROM_MAIN" | tr ' ' '\n' | sort -u)

    # Create a diff of the changes in the working directory against the common ancestor of the current branch and main
    for file in $ALL_FILES; do
      # If the original file doesn't exist, use a blank file instead
      # (This means it was a new file that was added in the current version of the code base)
      ORIGINAL_FILE="$TMP_DIR/$file"
      if [[ ! -f "$ORIGINAL_FILE" ]]; then
        ORIGINAL_FILE="$BLANK_FILE"
      fi

      # If the updated file doesn't exist, use a blank file instead
      # (This means the file was deleted in the current version of the code base)
      UPDATED_FILE="$WORK_DIR/$file"
      if [[ ! -f "$UPDATED_FILE" ]]; then
        UPDATED_FILE="$BLANK_FILE"
      fi

      # Run git diff between the original file and the updated file
      # Replace the file paths in the diff to match the relative path in the working directory
      # Then write the diff into our diff file
      git diff "$ORIGINAL_FILE" "$UPDATED_FILE" | sed "s|$ORIGINAL_FILE|/$file|g" | sed "s|$UPDATED_FILE|/$file|g" >> "$DIFF_FILE" || true # Suppress the exit code
    done

    if [[ "$DIFF_ONLY" == "true" ]]; then
      cat "$DIFF_FILE"
      exit 0
    fi
  fi


##############################################################################################################################
# Step 4: Run review dog using the diff we just created, allowing reviewdog to only show errors from changes we've made      #
##############################################################################################################################

  if [[ "$FILTER_MODE" == "nofilter" ]]; then
    reviewdog -filter-mode=nofilter
  else
    reviewdog -filter-mode="$FILTER_MODE" -diff="cat $DIFF_FILE"
  fi


================================================
FILE: cli/cmd/encore/app/app.go
================================================
package app

import (
	"github.com/spf13/cobra"

	"encr.dev/cli/cmd/encore/root"
)

// These can be overwritten using
// `go build -ldflags "-X encr.dev/cli/cmd/encore/app.defaultGitRemoteName=encore"`.
var (
	defaultGitRemoteName = "encore"
	defaultGitRemoteURL  = "encore://"
)

var appCmd = &cobra.Command{
	Use:   "app",
	Short: "Commands to create and link Encore apps",
}

func init() {
	root.Cmd.AddCommand(appCmd)
}


================================================
FILE: cli/cmd/encore/app/clone.go
================================================
package app

import (
	"os"
	"os/exec"

	"github.com/spf13/cobra"

	"encr.dev/cli/cmd/encore/cmdutil"
)

var cloneAppCmd = &cobra.Command{
	Use:   "clone [app-id] [directory]",
	Short: "Clone an Encore app to your computer",
	Args:  cobra.MinimumNArgs(1),

	DisableFlagsInUseLine: true,
	Run: func(c *cobra.Command, args []string) {
		cmdArgs := append([]string{"clone", "--origin", defaultGitRemoteName, defaultGitRemoteURL + args[0]}, args[1:]...)
		cmd := exec.Command("git", cmdArgs...)
		cmd.Stdin = os.Stdin
		cmd.Stdout = os.Stdout
		cmd.Stderr = os.Stderr
		if err := cmd.Run(); err != nil {
			os.Exit(1)
		}
	},
	ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
		switch len(args) {
		case 0:
			return cmdutil.AutoCompleteAppSlug(cmd, args, toComplete)
		case 1:
			return nil, cobra.ShellCompDirectiveFilterDirs
		default:
			return nil, cobra.ShellCompDirectiveDefault
		}
	},
}

func init() {
	appCmd.AddCommand(cloneAppCmd)
}


================================================
FILE: cli/cmd/encore/app/create.go
================================================
package app

import (
	"bytes"
	"context"
	"encoding/json"
	"fmt"
	"io/fs"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
	"time"

	"github.com/briandowns/spinner"
	"github.com/cockroachdb/errors"
	"github.com/fatih/color"
	"github.com/spf13/cobra"
	"github.com/tailscale/hujson"
	"golang.org/x/term"

	"encr.dev/cli/cmd/encore/auth"
	"encr.dev/cli/cmd/encore/cmdutil"
	"encr.dev/cli/cmd/encore/llm_rules"
	"encr.dev/cli/internal/platform"
	"encr.dev/cli/internal/telemetry"
	"encr.dev/internal/conf"
	"encr.dev/internal/env"
	"encr.dev/internal/userconfig"
	"encr.dev/internal/version"
	"encr.dev/pkg/github"
	"encr.dev/pkg/xos"
	daemonpb "encr.dev/proto/encore/daemon"
)

var (
	createAppTemplate   string
	createAppOnPlatform bool
	createAppLang       = cmdutil.Oneof{
		Value:     "",
		Allowed:   cmdutil.LanguageFlagValues(),
		Flag:      "lang",
		FlagShort: "l",
		Desc:      "Programming language to use for the app",
		TypeDesc:  "string",
	}
	createAppLLMRules = cmdutil.Oneof{
		Value:     "",
		Allowed:   llm_rules.LLMRulesFlagValues(),
		Flag:      "llm-rules",
		FlagShort: "r",
		Desc:      "Initialize the app with llm rules for a specific tool",
		TypeDesc:  "string",
	}
)

var createAppCmd = &cobra.Command{
	Use:   "create [name]",
	Short: "Create a new Encore app",
	Args:  cobra.MaximumNArgs(1),

	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		name := ""
		if len(args) > 0 {
			name = args[0]
		}

		var tool llm_rules.Tool
		if createAppLLMRules.Value == "" {
			cfg, err := userconfig.Global().Get()
			if err != nil {
				cmdutil.Fatalf("Couldn't read user config: %s", err)
			}
			tool = llm_rules.Tool(cfg.LLMRules)
		} else {
			tool = llm_rules.Tool(createAppLLMRules.Value)
		}

		if err := createApp(context.Background(), name, createAppTemplate, cmdutil.Language(createAppLang.Value), tool); err != nil {
			cmdutil.Fatal(err)
		}
	},
}

func init() {
	appCmd.AddCommand(createAppCmd)
	createAppCmd.Flags().BoolVar(&createAppOnPlatform, "platform", true, "whether to create the app with the Encore Platform")
	createAppCmd.Flags().StringVar(&createAppTemplate, "example", "", "URL to example code to use.")
	createAppLang.AddFlag(createAppCmd)
	createAppLLMRules.AddFlag(createAppCmd)
}

func promptAccountCreation() {
	// If shell is non-interactive, don't prompt
	if !term.IsTerminal(int(os.Stdin.Fd())) {
		return
	}
	cyan := color.New(color.FgCyan)
	red := color.New(color.FgRed)
	// Prompt the user for creating an account if they're not logged in.
	if _, err := conf.CurrentUser(); errors.Is(err, fs.ErrNotExist) && createAppOnPlatform {
	PromptLoop:
		for {
			_, _ = cyan.Fprint(os.Stderr, "Log in / Sign up for a free Encore Cloud account to enable automated cloud deployments? (Y/n): ")
			var input string
			_, _ = fmt.Scanln(&input)
			input = strings.TrimSpace(input)
			switch input {
			case "Y", "y", "yes", "":
				telemetry.Send("app.create.account", map[string]any{"response": true})
				if err := auth.DoLogin(auth.AutoFlow); err != nil {
					cmdutil.Fatal(err)
				}
			case "N", "n", "no":
				telemetry.Send("app.create.account", map[string]any{"response": false})
				// Continue without creating an account.
			case "q", "quit", "exit":
				os.Exit(1)
			default:
				// Try again.
				_, _ = red.Fprintln(os.Stderr, "Unexpected answer, please enter 'y' or 'n'.")
				continue PromptLoop
			}
			break
		}
	}
}

func promptRunApp() bool {
	// If shell is non-interactive, don't prompt
	if !term.IsTerminal(int(os.Stdin.Fd())) {
		return false
	}

	cyan := color.New(color.FgCyan)
	red := color.New(color.FgRed)
	for {
		_, _ = cyan.Fprint(os.Stderr, "Run your app now? (Y/n): ")
		var input string
		_, _ = fmt.Scanln(&input)
		input = strings.TrimSpace(input)
		switch input {
		case "Y", "y", "yes", "":
			telemetry.Send("app.create.run", map[string]any{"response": true})
			return true
		case "N", "n", "no":
			telemetry.Send("app.create.run", map[string]any{"response": false})
			return false
		case "q", "quit", "exit":
			telemetry.Send("app.create.run", map[string]any{"response": false})
			return false
		default:
			// Try again.
			_, _ = red.Fprintln(os.Stderr, "Unexpected answer, please enter 'y' or 'n'.")
		}
	}
}

// createApp is the implementation of the "encore app create" command.
func createApp(ctx context.Context, name, template string, lang cmdutil.Language, llmRules llm_rules.Tool) (err error) {
	defer func() {
		// We need to send the telemetry synchronously to ensure it's sent before the command exits.
		telemetry.SendSync("app.create", map[string]any{
			"template": template,
			"lang":     lang,
			"error":    err != nil,
		})
	}()
	cyan := color.New(color.FgCyan)
	green := color.New(color.FgGreen)

	promptAccountCreation()

	if name == "" || template == "" || llmRules == "" {
		name, template, lang, llmRules = createAppForm(name, template, lang, llmRules, false)
	}
	// Treat the special name "empty" as the empty app template
	// (the rest of the code assumes that's the empty string).
	if template == "empty" {
		template = ""
	}
	if template == "" && lang == cmdutil.LanguageTS {
		template = "ts/empty"
	}

	if err := validateName(name); err != nil {
		return err
	} else if _, err := os.Stat(name); err == nil {
		return fmt.Errorf("directory %s already exists", name)
	}

	// Parse template information, if provided.
	var ex *github.Tree
	if template != "" {
		var err error
		ex, err = parseTemplate(ctx, template)
		if err != nil {
			return err
		}
	}

	if err := os.Mkdir(name, 0755); err != nil {
		return err
	}
	defer func() {
		if err != nil {
			// Clean up the directory we just created in case of an error.
			_ = os.RemoveAll(name)
		}
	}()

	if ex != nil {
		s := spinner.New(spinner.CharSets[14], 100*time.Millisecond)
		s.Prefix = fmt.Sprintf("Downloading template %s ", ex.Name())
		s.Start()
		err := github.ExtractTree(ctx, ex, name)
		s.Stop()
		fmt.Println()

		if err != nil {
			return fmt.Errorf("failed to download template %s: %v", ex.Name(), err)
		}
		gray := color.New(color.Faint)
		_, _ = gray.Printf("Downloaded template %s.\n", ex.Name())
	} else {
		// Set up files that we need when we don't have an example
		if err := xos.WriteFile(filepath.Join(name, ".gitignore"), []byte("/.encore\n"), 0644); err != nil {
			cmdutil.Fatal(err)
		}
		encoreModData := []byte("module encore.app\n")
		if err := xos.WriteFile(filepath.Join(name, "go.mod"), encoreModData, 0644); err != nil {
			cmdutil.Fatal(err)
		}
	}

	_, err = conf.CurrentUser()
	loggedIn := err == nil

	exCfg, err := parseExampleConfig(name)
	if err != nil {
		return fmt.Errorf("failed to parse example config: %v", err)
	}

	// Delete the example config file.
	_ = os.Remove(exampleJSONPath(name))

	var app *platform.App
	if loggedIn && createAppOnPlatform {
		s := spinner.New(spinner.CharSets[14], 100*time.Millisecond)
		s.Prefix = "Creating app on encore.dev "
		s.Start()
		app, err = createAppOnServer(name, exCfg)
		s.Stop()
		if err != nil {
			return fmt.Errorf("creating app on encore.dev: %v", err)
		}
	}

	appRootRelpath := filepath.FromSlash(exCfg.EncoreAppPath)
	encoreAppPath := filepath.Join(name, appRootRelpath, "encore.app")
	appData, err := os.ReadFile(encoreAppPath)
	if err != nil {
		appData, err = []byte("{}"), nil
	}

	if app != nil {
		appData, err = setEncoreAppID(appData, app.Slug, []string{})
	} else {
		appData, err = setEncoreAppID(appData, "", []string{
			"The app is not currently linked to the encore.dev platform.",
			`Use "encore app link" to link it.`,
		})
	}
	if err != nil {
		return errors.Wrap(err, "write encore.app file")
	}
	if err := xos.WriteFile(encoreAppPath, appData, 0644); err != nil {
		return errors.Wrap(err, "write encore.app file")
	}

	// Update to latest encore.dev release
	if _, err := os.Stat(filepath.Join(name, appRootRelpath, "go.mod")); err == nil {
		lang = cmdutil.LanguageGo
		s := spinner.New(spinner.CharSets[14], 100*time.Millisecond)
		s.Prefix = "Running go get encore.dev@latest"
		s.Start()
		if err := gogetEncore(filepath.Join(name, appRootRelpath)); err != nil {
			s.FinalMSG = fmt.Sprintf("failed, skipping: %v", err.Error())
		}
		s.Stop()
	} else if _, err := os.Stat(filepath.Join(name, appRootRelpath, "package.json")); err == nil {
		lang = cmdutil.LanguageTS
		s := spinner.New(spinner.CharSets[14], 100*time.Millisecond)
		s.Prefix = "Running npm install encore.dev@latest"
		s.Start()
		if err := npmInstallEncore(filepath.Join(name, appRootRelpath)); err != nil {
			s.FinalMSG = fmt.Sprintf("failed, skipping: %v", err.Error())
		}
		s.Stop()
	}

	// Rewrite any existence of ENCORE_APP_ID to the allocated app id.
	if app != nil {
		if err := rewritePlaceholders(name, app); err != nil {
			red := color.New(color.FgRed)
			_, _ = red.Printf("Failed rewriting source code placeholders, skipping: %v\n", err)
		}
	}

	if err := initGitRepo(name, app); err != nil {
		return err
	}

	// Try to generate wrappers. Don't error out if it fails for some reason,
	// it's a nice-to-have to avoid IDEs thinking there are compile errors before 'encore run' runs.
	_ = generateWrappers(filepath.Join(name, appRootRelpath))

	// Create the app on the daemon.
	appRoot, err := filepath.Abs(filepath.Join(name, appRootRelpath))
	if err != nil {
		cmdutil.Fatalf("failed to get absolute path: %v", err)
	}
	daemon := cmdutil.ConnectDaemon(ctx)
	appResp, err := daemon.CreateApp(ctx, &daemonpb.CreateAppRequest{
		AppRoot:  appRoot,
		Tutorial: exCfg.Tutorial,
		Template: template,
	})
	if err != nil {
		color.Red("Failed to create app on daemon: %s\n", err)
	}

	if err := llm_rules.SetupLLMRules(llmRules, lang, filepath.Join(name, appRootRelpath), appResp.AppId); err != nil {
		color.Red("Failed to setup LLM rules: %s\n", err)
	}

	cmdutil.ClearTerminalExceptFirstNLines(0)
	_, _ = green.Printf("Successfully created app %s!\n", name)
	cyanf := cyan.SprintfFunc()
	fmt.Println()
	if app != nil {
		fmt.Printf("App ID:   %s\n", cyanf(app.Slug))
		fmt.Printf("Web URL:  %s%s", cyanf("https://app.encore.cloud/"+app.Slug), cmdutil.Newline)
	}
	fmt.Printf("App Root: %s\n", cyanf(appRoot))
	llm_rules.PrintLLMRulesInfo(llmRules)
	greenBoldF := green.Add(color.Bold).SprintfFunc()
	fmt.Printf("Run your app with: %s\n", greenBoldF("cd %s && encore run", filepath.Join(name, appRootRelpath)))
	fmt.Println()
	if promptRunApp() {
		cmdutil.ClearTerminalExceptFirstNLines(0)
		stream, err := daemon.Run(ctx, &daemonpb.RunRequest{
			AppRoot:    appRoot,
			Watch:      true,
			WorkingDir: ".",
			Environ:    os.Environ(),
			ListenAddr: "127.0.0.1:4000",
			Browser:    daemonpb.RunRequest_BROWSER_ALWAYS,
		})
		if err != nil {
			cmdutil.Fatalf("failed to run app: %v", err)
		}
		converter := cmdutil.ConvertJSONLogs(cmdutil.Colorize(true))
		_ = cmdutil.StreamCommandOutput(stream, converter)
		return nil
	}
	cmdutil.ClearTerminalExceptFirstNLines(0)
	fmt.Print("Useful commands:\n\n")

	_, _ = cyan.Printf("    encore run\n")
	fmt.Print("        Run your app locally\n\n")

	if lang == cmdutil.LanguageGo {
		_, _ = cyan.Printf("    encore test ./...\n")
	} else {
		_, _ = cyan.Printf("    encore test\n")
	}
	fmt.Print("        Run tests\n\n")

	if app != nil {
		_, _ = cyan.Printf("    git push encore\n")
		fmt.Print("        Deploys your app\n\n")
	}

	fmt.Printf("Get started now: %s\n", greenBoldF("cd %s && encore run", filepath.Join(name, appRootRelpath)))
	return nil
}

// detectLang attempts to detect the application language for an Encore application
// situated at appRoot.
func detectLang(appRoot string) cmdutil.Language {
	if _, err := os.Stat(filepath.Join(appRoot, "go.mod")); err == nil {
		return cmdutil.LanguageGo
	} else if _, err := os.Stat(filepath.Join(appRoot, "package.json")); err == nil {
		return cmdutil.LanguageTS
	}
	return cmdutil.LanguageGo
}

func validateName(name string) error {
	ln := len(name)
	if ln == 0 {
		return fmt.Errorf("name must not be empty")
	} else if ln > 50 {
		return fmt.Errorf("name too long (max 50 chars)")
	}

	for i, s := range name {
		// Outside of [a-z], [0-9] and != '-'?
		if !((s >= 'a' && s <= 'z') || (s >= '0' && s <= '9') || s == '-') {
			return fmt.Errorf("name must only contain lowercase letters, digits, or dashes")
		} else if s == '-' {
			if i == 0 {
				return fmt.Errorf("name cannot start with a dash")
			} else if (i + 1) == ln {
				return fmt.Errorf("name cannot end with a dash")
			} else if name[i-1] == '-' {
				return fmt.Errorf("name cannot contain repeated dashes")
			}
		}
	}
	return nil
}

func gogetEncore(dir string) error {
	var goBinPath string

	// Prefer the 'go' binary from the Encore GOROOT if available.
	if goroot, ok := env.OptEncoreGoRoot().Get(); ok {
		goBinPath = filepath.Join(goroot, "bin", "go")
	} else {
		// Otherwise fall back to just "go", so that exec.Command
		// does a path lookup.
		goBinPath = "go"
	}

	// Use the 'go' binary from the Encore GOROOT in case the user
	// does not have Go installed separately from Encore.
	// nosemgrep go.lang.security.audit.dangerous-exec-command.dangerous-exec-command
	cmd := exec.Command(goBinPath, "get", "encore.dev@latest")
	cmd.Dir = dir
	if out, err := cmd.CombinedOutput(); err != nil {
		return errors.Newf("go get failed: %v: %s", err, out)
	}
	return nil
}

func npmInstallEncore(dir string) error {
	args := []string{"install"}
	if version.Channel == version.DevBuild {
		args = append(args, filepath.Join(env.EncoreRuntimesPath(), "js", "encore.dev"))
	} else {
		args = append(args, fmt.Sprintf("encore.dev@%s", strings.TrimPrefix(version.Version, "v")))
	}

	// First install the 'encore.dev' package.
	cmd := exec.Command("npm", args...)
	cmd.Dir = dir
	out, err := cmd.CombinedOutput()
	if err != nil {
		err = fmt.Errorf("installing encore.dev package failed: %v: %s", err, out)
	}

	// Then run 'npm install'.
	cmd = exec.Command("npm", "install")
	cmd.Dir = dir
	if out2, err2 := cmd.CombinedOutput(); err2 != nil && err == nil {
		err = fmt.Errorf("'npm install' failed: %v: %s", err2, out2)
	}

	return err
}

func createAppOnServer(name string, cfg exampleConfig) (*platform.App, error) {
	if _, err := conf.CurrentUser(); err != nil {
		return nil, err
	}
	ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
	defer cancel()
	params := &platform.CreateAppParams{
		Name:           name,
		InitialSecrets: cfg.InitialSecrets,
		AppRootDir:     cfg.EncoreAppPath,
	}
	return platform.CreateApp(ctx, params)
}

func parseTemplate(ctx context.Context, tmpl string) (*github.Tree, error) {
	// If the template does not contain a colon or a dot, it's definitely
	// not a github.com URL. Assume it's a simple template name.
	if !strings.Contains(tmpl, ":") && !strings.Contains(tmpl, ".") {
		tmpl = "https://github.com/encoredev/examples/tree/main/" + tmpl
	}
	return github.ParseTree(ctx, tmpl)
}

// initGitRepo initializes the git repo.
// If app is not nil, it configures the repo to push to the given app.
// If git does not exist, it reports an error matching exec.ErrNotFound.
func initGitRepo(path string, app *platform.App) (err error) {
	defer func() {
		if e := recover(); e != nil {
			if ee, ok := e.(error); ok {
				err = ee
			} else {
				panic(e)
			}
		}
	}()

	git := func(args ...string) []byte {
		cmd := exec.Command("git", args...)
		cmd.Dir = path
		out, err := cmd.CombinedOutput()
		if err != nil && !errors.Is(err, exec.ErrNotFound) {
			panic(fmt.Errorf("git %s: %s (%w)", strings.Join(args, " "), out, err))
		}
		return out
	}

	// Initialize git repo
	git("init")
	if app != nil && app.MainBranch != nil {
		git("checkout", "-b", *app.MainBranch)
	}
	git("config", "--local", "push.default", "current")
	git("add", "-A")

	cmd := exec.Command("git", "commit", "-m", "Initial commit")
	cmd.Dir = path
	// Configure the committer if the user hasn't done it themselves yet.
	if ok, _ := gitUserConfigured(); !ok {
		cmd.Env = append(os.Environ(),
			"GIT_AUTHOR_NAME=Encore",
			"GIT_AUTHOR_EMAIL=git-bot@encore.dev",
			"GIT_COMMITTER_NAME=Encore",
			"GIT_COMMITTER_EMAIL=git-bot@encore.dev",
		)
	}
	if out, err := cmd.CombinedOutput(); err != nil && !errors.Is(err, exec.ErrNotFound) {
		return fmt.Errorf("create initial commit repository: %s (%v)", out, err)
	}

	if app != nil {
		git("remote", "add", defaultGitRemoteName, defaultGitRemoteURL+app.Slug)
	}

	return nil
}

func addEncoreRemote(root, appID string) {
	// Determine if there are any remotes
	cmd := exec.Command("git", "remote")
	cmd.Dir = root
	out, err := cmd.CombinedOutput()
	if err != nil {
		return
	}
	out = bytes.TrimSpace(out)
	if len(out) == 0 {
		cmd = exec.Command("git", "remote", "add", defaultGitRemoteName, defaultGitRemoteURL+appID)
		cmd.Dir = root
		if err := cmd.Run(); err == nil {
			fmt.Println("Configured git remote 'encore' to push/pull with Encore.")
		}
	}
}

// gitUserConfigured reports whether the user has configured
// user.name and user.email in git.
func gitUserConfigured() (bool, error) {
	for _, s := range []string{"user.name", "user.email"} {
		out, err := exec.Command("git", "config", s).CombinedOutput()
		if err != nil {
			return false, err
		} else if len(bytes.TrimSpace(out)) == 0 {
			return false, nil
		}
	}
	return true, nil
}

// rewritePlaceholders recursively rewrites all files within basePath
// to replace placeholders with the actual values for this particular app.
func rewritePlaceholders(basePath string, app *platform.App) error {
	var first error
	err := filepath.WalkDir(basePath, func(path string, info fs.DirEntry, err error) error {
		if err != nil {
			return err
		}
		if !info.Type().IsRegular() {
			return nil
		}
		if err := rewritePlaceholder(path, info, app); err != nil {
			if first == nil {
				first = err
			}
		}
		return nil
	})
	if err == nil {
		err = first
	}
	return err
}

// rewritePlaceholder rewrites a file to replace placeholders with the
// actual values for this particular app. If the file contains none of
// the placeholders, this is a no-op.
func rewritePlaceholder(path string, info fs.DirEntry, app *platform.App) error {
	data, err := os.ReadFile(path)
	if err != nil {
		return err
	}
	placeholders := []string{
		"{{ENCORE_APP_ID}}", app.Slug,
	}

	var replaced bool
	for i := 0; i < len(placeholders); i += 2 {
		placeholder := []byte(placeholders[i])
		target := []byte(placeholders[i+1])
		if bytes.Contains(data, placeholder) {
			data = bytes.ReplaceAll(data, placeholder, target)
			replaced = true
		}
	}

	if replaced {
		return xos.WriteFile(path, data, info.Type().Perm())
	}
	return nil
}

// exampleConfig is the optional configuration file for example apps.
type exampleConfig struct {
	// Relative path to the directory where the `encore.app` should be located.
	// Defaults to ".".
	EncoreAppPath string `json:"encore_app_path"`

	InitialSecrets map[string]string `json:"initial_secrets"`
	Tutorial       bool              `json:"tutorial"`
}

func parseExampleConfig(repoPath string) (cfg exampleConfig, err error) {
	baseConfig := exampleConfig{
		EncoreAppPath: ".",
	}
	data, err := os.ReadFile(exampleJSONPath(repoPath))
	if errors.Is(err, fs.ErrNotExist) {
		return baseConfig, nil
	} else if err != nil {
		return baseConfig, err
	}

	data, err = hujson.Standardize(data)
	if err != nil {
		return baseConfig, err
	} else if err := json.Unmarshal(data, &cfg); err != nil {
		return baseConfig, err
	}

	if cfg.EncoreAppPath == "" {
		cfg.EncoreAppPath = "."
	}
	if !filepath.IsLocal(cfg.EncoreAppPath) {
		return baseConfig, errors.New("encore_app_path must be a local path")
	}
	return cfg, nil
}

func exampleJSONPath(repoPath string) string {
	return filepath.Join(repoPath, "example-initial-setup.json")
}

// setEncoreAppID rewrites the encore.app file to replace the app id, preserving comments.
// It optionally adds comment lines before the "id" field if commentLines is not nil.
func setEncoreAppID(data []byte, id string, commentLines []string) ([]byte, error) {
	if len(data) == 0 {
		data = []byte("{}")
	}

	root, err := hujson.Parse(data)
	if err != nil {
		return data, errors.Wrap(err, "parse encore.app")
	}
	obj, ok := root.Value.(*hujson.Object)
	if !ok {
		return data, errors.New("invalid encore.app format: not a json object")
	}

	var buf bytes.Buffer
	for i, ln := range commentLines {
		if i == 0 {
			fmt.Fprintf(&buf, "\n")
		}
		fmt.Fprintf(&buf, "\t// %s\n", strings.TrimSpace(ln))
	}
	extra := hujson.Extra(buf.Bytes())
	jsonValue, _ := json.Marshal(id)
	value := hujson.Value{
		Value: hujson.Literal(jsonValue),
	}

	found := false
	for i := range obj.Members {
		m := &obj.Members[i]
		if lit, ok := m.Name.Value.(hujson.Literal); ok && lit.String() == "id" {
			if commentLines != nil {
				m.Name.BeforeExtra = extra
			}
			m.Value = value
			found = true
			break
		}
	}

	if !found {
		obj.Members = append([]hujson.ObjectMember{{
			Name: hujson.Value{
				BeforeExtra: extra,
				Value:       hujson.Literal(`"id"`),
			},
			Value: value,
		}}, obj.Members...)
	}

	root.Format()
	return root.Pack(), nil
}

// generateWrappers runs 'encore gen wrappers' in the given directory.
func generateWrappers(dir string) error {
	// Use this executable if we can.
	exe, err := os.Executable()
	if err != nil {
		exe = "encore"
	}
	// nosemgrep go.lang.security.audit.dangerous-exec-command.dangerous-exec-command
	cmd := exec.Command(exe, "gen", "wrappers")
	cmd.Dir = dir
	if out, err := cmd.CombinedOutput(); err != nil {
		return fmt.Errorf("encore gen wrappers failed: %v: %s", err, out)
	}
	return nil
}


================================================
FILE: cli/cmd/encore/app/create_form.go
================================================
package app

import (
	"context"
	"encoding/json"
	"fmt"
	"io"
	"net/http"
	"os"
	"slices"
	"strings"
	"sync"
	"time"

	"github.com/charmbracelet/bubbles/list"
	"github.com/charmbracelet/bubbles/spinner"
	"github.com/charmbracelet/bubbles/textinput"
	tea "github.com/charmbracelet/bubbletea"
	"github.com/charmbracelet/lipgloss"
	"github.com/tailscale/hujson"
	"golang.org/x/term"

	"encr.dev/cli/cmd/encore/cmdutil"
	"encr.dev/cli/cmd/encore/llm_rules"
	"encr.dev/pkg/option"
)

type templateItem struct {
	ItemTitle string           `json:"title"`
	Desc      string           `json:"desc"`
	Template  string           `json:"template"`
	Lang      cmdutil.Language `json:"lang"`
}

func (i templateItem) Title() string       { return i.ItemTitle }
func (i templateItem) Description() string { return i.Desc }
func (i templateItem) FilterValue() string { return i.ItemTitle }

type CreateStep int

const (
	CreateStepLang CreateStep = iota
	CreateStepTemplate
	CreateStepAppName
	CreateStepLLMRules
)

type createFormModel struct {
	steps []CreateStep

	lang      langSelectModel
	templates templateListModel
	appName   appNameModel
	llmRules  llm_rules.ToolSelectModel

	initExistingApp bool

	width   int
	height  int
	aborted bool
}

func (m createFormModel) currentStep() option.Option[CreateStep] {
	if len(m.steps) == 0 {
		return option.None[CreateStep]()
	}
	return option.Some(m.steps[0])
}

func (m createFormModel) hasStep(s CreateStep) bool {
	return slices.Contains(m.steps, s)
}

func (m *createFormModel) removeStep(s CreateStep) {
	m.steps = slices.DeleteFunc(m.steps, func(step CreateStep) bool {
		return step == s
	})
}

func (m createFormModel) Init() tea.Cmd {
	return tea.Batch(
		m.appName.Init(),
		m.templates.Init(),
	)
}

const checkmark = "✔"

type appNameDone struct{}

type appNameModel struct {
	predefined string
	text       textinput.Model
	dirExists  bool
}

func (m appNameModel) Init() tea.Cmd {
	return tea.Batch(
		textinput.Blink,
	)
}

func (m appNameModel) Selected() string {
	if m.predefined != "" {
		return m.predefined
	}
	return m.text.Value()
}

func (m appNameModel) Update(msg tea.Msg) (appNameModel, tea.Cmd) {
	var cmds []tea.Cmd
	var c tea.Cmd
	m.text, c = m.text.Update(msg)
	cmds = append(cmds, c)

	if val := m.text.Value(); val != "" {
		_, err := os.Stat(val)
		m.dirExists = err == nil
	}

	switch msg := msg.(type) {
	case tea.KeyMsg:
		switch msg.Type {
		case tea.KeyEnter:
			if m.text.Value() != "" && !m.dirExists {
				cmds = append(cmds, func() tea.Msg {
					return appNameDone{}
				})
			}
		}
	}

	return m, tea.Batch(cmds...)
}

func (m appNameModel) View() string {
	var b strings.Builder
	if m.text.Focused() {
		b.WriteString(cmdutil.InputStyle.Render("App Name"))
		b.WriteString(cmdutil.DescStyle.Render(" [Use only lowercase letters, digits, and dashes]"))
		b.WriteByte('\n')
		b.WriteString(m.text.View())
		if m.dirExists {
			b.WriteString(cmdutil.ErrorStyle.Render(" error: dir already exists"))
		}
	} else {
		fmt.Fprintf(&b, "%s App Name: %s", checkmark, m.text.Value())
	}
	b.WriteByte('\n')
	return b.String()
}

type templateListModel struct {
	predefined string
	filter     cmdutil.Language

	all     []templateItem
	list    list.Model
	loading spinner.Model
}

func (m templateListModel) Init() tea.Cmd {
	return tea.Batch(
		loadTemplates,
		m.loading.Tick,
	)
}

func (m *templateListModel) SetSize(width, height int) {
	m.list.SetWidth(width)
	m.list.SetHeight(max(height-1, 0))
}

type templateSelectDone struct{}

func (m templateListModel) Update(msg tea.Msg) (templateListModel, tea.Cmd) {
	var cmds []tea.Cmd
	switch msg := msg.(type) {
	case tea.KeyMsg:
		switch msg.Type {
		case tea.KeyEnter:
			// Have we selected a template?
			if idx := m.list.Index(); idx >= 0 {
				return m, func() tea.Msg { return templateSelectDone{} }
			}
		}

	case spinner.TickMsg:
		m.loading, _ = m.loading.Update(msg)

	case loadedTemplates:
		m.all = msg
		m.refreshFilter()
		newList, c := m.list.Update(msg)
		m.list = newList
		cmds = append(cmds, c)
	}

	newList, c := m.list.Update(msg)
	m.list = newList
	cmds = append(cmds, c)

	return m, tea.Batch(cmds...)
}

func (m *templateListModel) UpdateFilter(lang cmdutil.Language) {
	m.filter = lang
	m.refreshFilter()
}

func (m *templateListModel) refreshFilter() {
	var listItems []list.Item
	for _, it := range m.all {
		if it.Lang == m.filter {
			listItems = append(listItems, it)
		}
	}
	m.list.SetItems(listItems)
}

func (m templateListModel) View() string {
	var b strings.Builder
	b.WriteString(cmdutil.InputStyle.Render("Template"))
	b.WriteString(cmdutil.DescStyle.Render(" [Use arrows to move]"))
	b.WriteByte('\n')
	b.WriteString(m.list.View())

	return b.String()
}

func (m templateListModel) Selected() string {
	if m.predefined != "" {
		return m.predefined
	}
	idx := m.list.Index()
	if idx < 0 {
		return ""
	}
	return m.list.Items()[idx].FilterValue()
}

func (m createFormModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	var (
		cmds []tea.Cmd
		c    tea.Cmd
	)

	switch msg := msg.(type) {
	case tea.KeyMsg:
		switch msg.String() {
		case "ctrl+c", "esc":
			m.aborted = true
			return m, tea.Quit
		case "q":
			// Only quit if no text input is focused
			if step, ok := m.currentStep().Get(); ok && step == CreateStepAppName {
				if m.appName.text.Focused() {
					break
				}
			}
			m.aborted = true
			return m, tea.Quit
		}

		if step, ok := m.currentStep().Get(); ok {
			switch step {
			case CreateStepLang:
				m.lang, c = m.lang.Update(msg)
				cmds = append(cmds, c)
			case CreateStepTemplate:
				m.templates, c = m.templates.Update(msg)
				cmds = append(cmds, c)
			case CreateStepAppName:
				m.appName, c = m.appName.Update(msg)
				cmds = append(cmds, c)
			case CreateStepLLMRules:
				m.llmRules, c = m.llmRules.Update(msg)
				cmds = append(cmds, c)
			}
		}
		return m, tea.Batch(cmds...)

	case langSelectDone:
		m.removeStep(CreateStepLang)
		m.templates.UpdateFilter(msg.Selected)
		m.SetSize(m.width, m.height)

	case llm_rules.ToolSelectDone:
		m.removeStep(CreateStepLLMRules)
		m.SetSize(m.width, m.height)

	case templateSelectDone:
		m.removeStep(CreateStepTemplate)
		if m.appName.predefined != "" {
			m.removeStep(CreateStepAppName)
		}
		m.SetSize(m.width, m.height)

	case appNameDone:
		m.removeStep(CreateStepAppName)
		m.SetSize(m.width, m.height)

	case tea.WindowSizeMsg:
		m.width = msg.Width
		m.height = msg.Height
		m.SetSize(msg.Width, msg.Height)
		return m, nil
	}

	// No more steps, quit
	if !m.currentStep().Present() {
		cmds = append(cmds, tea.Quit)
	}

	// Update all submodels for other messages.
	m.lang, c = m.lang.Update(msg)
	cmds = append(cmds, c)
	m.templates, c = m.templates.Update(msg)
	cmds = append(cmds, c)
	m.llmRules, c = m.llmRules.Update(msg)
	cmds = append(cmds, c)
	m.appName, c = m.appName.Update(msg)
	cmds = append(cmds, c)

	return m, tea.Batch(cmds...)
}

func (m *createFormModel) SetSize(width, height int) {
	doneHeight := lipgloss.Height(m.doneView())
	availHeight := height - doneHeight

	// CreateStepLang
	m.lang.SetSize(width, availHeight)

	// CreateStepTemplate
	m.templates.SetSize(width, availHeight)

	// CreateStepLLMRules
	m.llmRules.SetSize(width, availHeight)
}

func (m createFormModel) doneView() string {
	var b strings.Builder

	renderDone := func(title, value string) {
		b.WriteString(cmdutil.SuccessStyle.Render(fmt.Sprintf("%s %s: ", checkmark, title)))
		b.WriteString(value)
		b.WriteByte('\n')
	}

	renderLangDone := func() {
		renderDone("Language", m.lang.Selected().Display())
	}

	renderNameDone := func() {
		renderDone("App Name", m.appName.Selected())
	}

	renderTemplateDone := func() {
		renderDone("Template", m.templates.Selected())
	}

	renderLLMRulesDone := func() {
		renderDone("LLM Rules", m.llmRules.Selected().Display())
	}

	if m.appName.predefined != "" {
		renderNameDone()
	}
	if m.templates.predefined == "" && !m.hasStep(CreateStepLang) {
		renderLangDone()
	}
	if !m.initExistingApp {
		if m.templates.predefined != "" || !m.hasStep(CreateStepTemplate) {
			renderTemplateDone()
		}
		if m.llmRules.Predefined != "" || !m.hasStep(CreateStepLLMRules) {
			if m.llmRules.Selected() != llm_rules.LLMRulesToolNone {
				renderLLMRulesDone()
			}
		}
	}
	if m.appName.predefined == "" && !m.hasStep(CreateStepAppName) {
		renderNameDone()
	}

	return b.String()
}

func (m createFormModel) View() string {
	var b strings.Builder

	doneView := m.doneView()

	b.WriteString(doneView)
	if doneView != "" {
		b.WriteByte('\n')
	}

	if step, ok := m.currentStep().Get(); ok {
		if step == CreateStepLang {
			b.WriteString(m.lang.View())
		}

		if step == CreateStepTemplate {
			b.WriteString(m.templates.View())
		}

		if step == CreateStepAppName {
			b.WriteString(m.appName.View())
		}

		if step == CreateStepLLMRules {
			b.WriteString(m.llmRules.View())
		}
	}

	return cmdutil.DocStyle.Render(b.String())
}

func (m templateListModel) SelectedItem() (templateItem, bool) {
	if m.predefined != "" {
		return templateItem{}, false
	}
	idx := m.list.Index()
	items := m.list.Items()
	if idx >= 0 && len(items) > idx {
		return items[idx].(templateItem), true
	}
	return templateItem{}, false
}

func createAppForm(inputName, inputTemplate string, inputLang cmdutil.Language, inputLLMRules llm_rules.Tool, initExistingApp bool) (appName, template string, selectedLang cmdutil.Language, selectedRules llm_rules.Tool) {
	// If all is set, just return
	if inputName != "" && inputTemplate != "" && inputLLMRules != "" {
		return inputName, inputTemplate, inputLang, inputLLMRules
	}

	// If shell is non-interactive, don't prompt
	if !term.IsTerminal(int(os.Stdin.Fd())) {
		if inputName == "" {
			cmdutil.Fatal("specify an app name")
		}
		return inputName, inputTemplate, inputLang, inputLLMRules
	}

	var langModel langSelectModel
	{
		ls := list.NewDefaultItemStyles()
		ls.SelectedTitle = ls.SelectedTitle.Foreground(lipgloss.Color(cmdutil.CodeBlue)).BorderForeground(lipgloss.Color(cmdutil.CodeBlue))
		ls.SelectedDesc = ls.SelectedDesc.Foreground(lipgloss.Color(cmdutil.CodeBlue)).BorderForeground(lipgloss.Color(cmdutil.CodeBlue))
		del := list.NewDefaultDelegate()
		del.Styles = ls
		del.ShowDescription = false
		del.SetSpacing(0)

		items := []list.Item{
			langItem{
				lang: cmdutil.LanguageGo,
				desc: "Build performant and scalable backends with Go",
			},
			langItem{
				lang: cmdutil.LanguageTS,
				desc: "Build backend and full-stack applications with TypeScript",
			},
		}

		ll := list.New(items, del, 0, 0)
		ll.SetShowTitle(false)
		ll.SetShowHelp(false)
		ll.SetShowPagination(true)
		ll.SetShowFilter(false)
		ll.SetFilteringEnabled(false)
		ll.SetShowStatusBar(false)
		ll.DisableQuitKeybindings() // quit handled by createFormModel
		langModel = langSelectModel{
			List:       ll,
			Predefined: inputLang,
		}
		langModel.SetSize(0, 20)
	}

	var templateModel templateListModel
	{
		ls := list.NewDefaultItemStyles()
		ls.SelectedTitle = ls.SelectedTitle.Foreground(lipgloss.Color(cmdutil.CodeBlue)).BorderForeground(lipgloss.Color(cmdutil.CodeBlue))
		ls.SelectedDesc = ls.SelectedDesc.Foreground(lipgloss.Color(cmdutil.CodeBlue)).BorderForeground(lipgloss.Color(cmdutil.CodeBlue))
		del := list.NewDefaultDelegate()
		del.Styles = ls

		ll := list.New(nil, del, 0, 20)
		ll.SetShowTitle(false)
		ll.SetShowHelp(false)
		ll.SetShowPagination(true)
		ll.SetShowFilter(false)
		ll.SetFilteringEnabled(false)
		ll.SetShowStatusBar(false)
		ll.DisableQuitKeybindings() // quit handled by createFormModel

		sp := spinner.New()
		sp.Spinner = spinner.Dot
		sp.Style = cmdutil.InputStyle.Copy().Inline(true)
		templateModel = templateListModel{
			predefined: inputTemplate,
			list:       ll,
			loading:    sp,
		}
	}
	var llmRulesModel llm_rules.ToolSelectModel
	{
		ls := list.NewDefaultItemStyles()
		ls.SelectedTitle = ls.SelectedTitle.Foreground(lipgloss.Color(cmdutil.CodeBlue)).BorderForeground(lipgloss.Color(cmdutil.CodeBlue))
		ls.SelectedDesc = ls.SelectedDesc.Foreground(lipgloss.Color(cmdutil.CodeBlue)).BorderForeground(lipgloss.Color(cmdutil.CodeBlue))
		del := list.NewDefaultDelegate()
		del.Styles = ls
		del.ShowDescription = false
		del.SetSpacing(0)

		items := make([]list.Item, 0, len(llm_rules.AllLLMRules)+1)
		items = append(items, llm_rules.NewLLMRulesItem(llm_rules.LLMRulesToolNone))
		for _, rule := range llm_rules.AllLLMRules {
			items = append(items, llm_rules.NewLLMRulesItem(rule))
		}

		ll := list.New(items, del, 0, 0)
		ll.SetShowTitle(false)
		ll.SetShowHelp(false)
		ll.SetShowPagination(true)
		ll.SetShowFilter(false)
		ll.SetFilteringEnabled(false)
		ll.SetShowStatusBar(false)
		ll.DisableQuitKeybindings() // quit handled by createFormModel

		llmRulesModel = llm_rules.ToolSelectModel{
			List:       ll,
			Predefined: inputLLMRules,
		}
		llmRulesModel.SetSize(0, 20)

	}

	var nameModel appNameModel
	{
		text := textinput.New()
		text.Focus()
		text.CharLimit = 20
		text.Width = 30
		text.Validate = incrementalValidateNameInput

		nameModel = appNameModel{predefined: inputName, text: text}
	}

	// Setup what steps and in what order they should be presented
	var steps []CreateStep
	if initExistingApp {
		if langModel.Predefined == "" {
			steps = append(steps, CreateStepLang)
		}
	} else {
		if templateModel.predefined == "" {
			if langModel.Predefined == "" {
				steps = append(steps, CreateStepLang)
			} else {
				templateModel.UpdateFilter(inputLang)
			}
			steps = append(steps, CreateStepTemplate)
		}
		if llmRulesModel.Predefined == "" {
			steps = append(steps, CreateStepLLMRules)
		}
	}
	if nameModel.predefined == "" {
		steps = append(steps, CreateStepAppName)
	}

	m := createFormModel{
		steps:           steps,
		lang:            langModel,
		templates:       templateModel,
		llmRules:        llmRulesModel,
		appName:         nameModel,
		initExistingApp: initExistingApp,
	}

	// If we have a name, start the list without any selection.
	if m.appName.predefined != "" {
		m.templates.list.Select(-1)
	}

	p := tea.NewProgram(m)

	result, err := p.Run()
	if err != nil {
		cmdutil.Fatal(err)
	}

	// Validate the result.
	res := result.(createFormModel)
	if res.aborted {
		os.Exit(1)
	}

	appName, template = inputName, inputTemplate

	if appName == "" {
		appName = res.appName.text.Value()
	}

	if template == "" && !initExistingApp {
		sel, ok := res.templates.SelectedItem()
		if !ok {
			cmdutil.Fatal("no template selected")
		}
		template = sel.Template
	}

	return appName, template, res.lang.Selected(), res.llmRules.Selected()
}

type langItem struct {
	lang cmdutil.Language
	desc string
}

func (i langItem) FilterValue() string          { return i.lang.Display() }
func (i langItem) Title() string                { return i.FilterValue() }
func (i langItem) Description() string          { return "" }
func (i langItem) SelectedID() cmdutil.Language { return i.lang }

type langSelectModel = cmdutil.SimpleSelectModel[cmdutil.Language, langItem]
type langSelectDone = cmdutil.SimpleSelectDone[cmdutil.Language]

type loadedTemplates []templateItem

var defaultTutorials = []templateItem{
	{
		ItemTitle: "Intro to Encore.ts",
		Desc:      "An interactive tutorial",
		Template:  "ts/introduction",
		Lang:      "ts",
	},
}

var defaultTemplates = []templateItem{
	{
		ItemTitle: "Hello World",
		Desc:      "A simple REST API",
		Template:  "hello-world",
		Lang:      "go",
	},
	{
		ItemTitle: "Hello World",
		Desc:      "A simple REST API",
		Template:  "ts/hello-world",
		Lang:      "ts",
	},
	{
		ItemTitle: "Uptime Monitor",
		Desc:      "Microservices, SQL Databases, Pub/Sub, Cron Jobs",
		Template:  "uptime",
		Lang:      "go",
	},
	{
		ItemTitle: "Uptime Monitor",
		Desc:      "Microservices, SQL Databases, Pub/Sub, Cron Jobs",
		Template:  "ts/uptime",
		Lang:      "ts",
	},
	{
		ItemTitle: "GraphQL",
		Desc:      "GraphQL API, Microservices, SQL Database",
		Template:  "graphql",
		Lang:      "go",
	},
	{
		ItemTitle: "URL Shortener",
		Desc:      "REST API, SQL Database",
		Template:  "url-shortener",
		Lang:      "go",
	},
	{
		ItemTitle: "URL Shortener",
		Desc:      "REST API, SQL Database",
		Template:  "ts/url-shortener",
		Lang:      "ts",
	},
	{
		ItemTitle: "SaaS Starter",
		Desc:      "Complete app with Clerk auth, Stripe billing, etc. (advanced)",
		Template:  "ts/saas-starter",
		Lang:      "ts",
	},
	{
		ItemTitle: "Empty app",
		Desc:      "Start from scratch (experienced users only)",
		Template:  "",
		Lang:      "go",
	},
	{
		ItemTitle: "Empty app",
		Desc:      "Start from scratch (experienced users only)",
		Template:  "ts/empty",
		Lang:      "ts",
	},
}

func fetchTemplates(url string, defaults []templateItem) []templateItem {
	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
	defer cancel()
	if req, err := http.NewRequestWithContext(ctx, "GET", url, nil); err == nil {
		if resp, err := http.DefaultClient.Do(req); err == nil {
			if data, err := io.ReadAll(resp.Body); err == nil {
				data, err = hujson.Standardize(data)
				if err == nil {
					var items []templateItem
					if err := json.Unmarshal(data, &items); err == nil && len(items) > 0 {
						return items
					}
				}
			}
		}
	}
	return defaults
}

func loadTemplates() tea.Msg {
	var wg sync.WaitGroup
	var templates, tutorials []templateItem
	wg.Add(1)
	go func() {
		defer wg.Done()
		templates = fetchTemplates("https://raw.githubusercontent.com/encoredev/examples/main/cli-templates.json", defaultTemplates)
	}()
	wg.Add(1)
	go func() {
		defer wg.Done()
		tutorials = fetchTemplates("https://raw.githubusercontent.com/encoredev/examples/main/cli-tutorials.json", defaultTutorials)
	}()
	wg.Wait()
	return loadedTemplates(append(tutorials, templates...))
}

// incrementalValidateNameInput is like validateName but only
// checks for valid/invalid characters. It can't check for
// whether the last character is a dash, since if we treat that
// as an error the user won't be able to enter dashes at all.
func incrementalValidateNameInput(name string) error {
	ln := len(name)
	if ln == 0 {
		return fmt.Errorf("name must not be empty")
	} else if ln > 50 {
		return fmt.Errorf("name too long (max 50 chars)")
	}

	for i, s := range name {
		// Outside of [a-z], [0-9] and != '-'?
		if !((s >= 'a' && s <= 'z') || (s >= '0' && s <= '9') || s == '-') {
			return fmt.Errorf("name must only contain lowercase letters, digits, or dashes")
		} else if s == '-' {
			if i == 0 {
				return fmt.Errorf("name cannot start with a dash")
			} else if name[i-1] == '-' {
				return fmt.Errorf("name cannot contain repeated dashes")
			}
		}
	}

	return nil
}


================================================
FILE: cli/cmd/encore/app/create_test.go
================================================
package app

import (
	"fmt"
	"testing"
)

func Test_setEncoreAppID(t *testing.T) {
	tests := []struct {
		data         []byte
		id           string
		commentLines []string
		want         string
	}{
		{
			data:         []byte(`{}`),
			id:           "foo",
			commentLines: []string{"bar"},
			want: `{
	// bar
	"id": "foo",
}
`,
		},
		{
			data:         []byte(``),
			id:           "foo",
			commentLines: []string{"bar"},
			want: `{
	// bar
	"id": "foo",
}
`,
		},
		{
			data: []byte(`{
	// foo
	"id": "test",
}`),
			id:           "foo",
			commentLines: []string{"bar", "baz"},
			want: `{
	// bar
	// baz
	"id": "foo",
}
`,
		},
		{
			data: []byte(`{
	"some_other_field": true,
	// foo
	"id": "test",
}`),
			id:           "foo",
			commentLines: []string{"bar", "baz"},
			want: `{
	"some_other_field": true,
	// bar
	// baz
	"id": "foo",
}
`,
		},
	}
	for i, tt := range tests {
		t.Run(fmt.Sprintf("%d", i), func(t *testing.T) {
			got, err := setEncoreAppID(tt.data, tt.id, tt.commentLines)
			if err != nil {
				t.Fatal(err)
			}

			gotStr := string(got)
			if gotStr != tt.want {
				t.Errorf("setEncoreAppID() = %q, want %q", gotStr, tt.want)
			}
		})
	}
}


================================================
FILE: cli/cmd/encore/app/initialize.go
================================================
package app

import (
	"errors"
	"fmt"
	"os"
	"strings"
	"time"

	"github.com/briandowns/spinner"
	"github.com/fatih/color"
	"github.com/spf13/cobra"

	"encr.dev/cli/cmd/encore/cmdutil"
	"encr.dev/cli/cmd/encore/llm_rules"
	"encr.dev/internal/conf"
	"encr.dev/pkg/xos"
)

const (
	tsEncoreAppData = `{%s
	"id": "%s",
	"lang": "typescript",
}
`
	goEncoreAppData = `{%s
	"id": "%s",
}
`
)

var (
	initAppLang = cmdutil.Oneof{
		Value:     "",
		Allowed:   cmdutil.LanguageFlagValues(),
		Flag:      "lang",
		FlagShort: "l",
		Desc:      "Programming language to use for the app",
		TypeDesc:  "string",
	}
)

// Create a new app from scratch: `encore app create`
// Link an existing app to an existing repo: `encore app link <app-id>`
// Link an existing repo to a new app: `encore app init <name>`
func init() {
	initAppCmd := &cobra.Command{
		Use:   "init [name]",
		Short: "Create a new Encore app from an existing repository",
		Args:  cobra.MaximumNArgs(1),

		DisableFlagsInUseLine: true,
		Run: func(cmd *cobra.Command, args []string) {
			var name string
			if len(args) > 0 {
				name = args[0]
			}
			if err := initializeApp(name); err != nil {
				cmdutil.Fatal(err)
			}
		},
	}

	appCmd.AddCommand(initAppCmd)
	initAppLang.AddFlag(initAppCmd)
}

func initializeApp(name string) error {
	// Check if encore.app file exists
	_, _, err := cmdutil.MaybeAppRoot()
	if errors.Is(err, cmdutil.ErrNoEncoreApp) {
		// expected
	} else if err != nil {
		cmdutil.Fatal(err)
	} else {
		// There is already an app here or in a parent directory.
		cmdutil.Fatal("an encore.app file already exists (here or in a parent directory)")
	}

	cyan := color.New(color.FgCyan)
	promptAccountCreation()

	name, _, lang, _ := createAppForm(name, "", cmdutil.Language(initAppLang.Value), llm_rules.LLMRulesToolNone, true)

	if err := validateName(name); err != nil {
		return err
	}

	appSlug := ""
	appSlugComments := ""
	// Create the app on the server.
	if _, err := conf.CurrentUser(); err == nil {
		s := spinner.New(spinner.CharSets[14], 100*time.Millisecond)
		s.Prefix = "Creating app on encore.dev "
		s.Start()

		app, err := createAppOnServer(name, exampleConfig{})
		s.Stop()
		if err != nil {
			return fmt.Errorf("creating app on encore.dev: %v", err)
		}
		appSlug = app.Slug
	}

	// Create the encore.app file
	var encoreAppTemplate = goEncoreAppData
	if lang == "ts" {
		encoreAppTemplate = tsEncoreAppData
	}
	if appSlug == "" {
		appSlugComments = strings.Join([]string{
			"",
			"The app is not currently linked to the encore.dev platform.",
			`Use "encore app link" to link it.`,
		}, "\n\t//")
	}
	encoreAppData := fmt.Appendf(nil, encoreAppTemplate, appSlugComments, appSlug)
	if err := xos.WriteFile("encore.app", encoreAppData, 0644); err != nil {
		return err
	}

	// Update to latest encore.dev release
	if _, err := os.Stat("go.mod"); err == nil {
		lang = cmdutil.LanguageGo
		s := spinner.New(spinner.CharSets[14], 100*time.Millisecond)
		s.Prefix = "Running go get encore.dev@latest"
		s.Start()
		if err := gogetEncore("."); err != nil {
			s.FinalMSG = fmt.Sprintf("failed, skipping: %v", err.Error())
		}
		s.Stop()
	} else if _, err := os.Stat("package.json"); err == nil {
		lang = cmdutil.LanguageTS
		s := spinner.New(spinner.CharSets[14], 100*time.Millisecond)
		s.Prefix = "Running npm install encore.dev@latest"
		s.Start()
		if err := npmInstallEncore("."); err != nil {
			s.FinalMSG = fmt.Sprintf("failed, skipping: %v", err.Error())
		}
		s.Stop()
	}

	green := color.New(color.FgGreen)
	_, _ = green.Fprint(os.Stdout, "Successfully initialized application on Encore Cloud!\n")
	if appSlug == "" {
		_, _ = fmt.Fprintf(os.Stdout, "The app is not currently linked to the encore.dev platform.\n")
		_, _ = fmt.Fprintf(os.Stdout, "Use \"encore app link\" to link it.\n")
		return nil
	}
	_, _ = fmt.Fprintf(os.Stdout, "- App ID:          %s\n", cyan.Sprint(appSlug))
	_, _ = fmt.Fprintf(os.Stdout, "- Cloud Dashboard: %s\n\n", cyan.Sprintf("https://app.encore.cloud/%s", appSlug))

	return nil
}


================================================
FILE: cli/cmd/encore/app/link.go
================================================
package app

import (
	"bytes"
	"context"
	"errors"
	"fmt"
	"io/fs"
	"os"
	"path/filepath"
	"time"

	"github.com/spf13/cobra"
	"github.com/tailscale/hujson"

	"encr.dev/cli/cmd/encore/cmdutil"
	"encr.dev/cli/internal/platform"
	"encr.dev/internal/conf"
	"encr.dev/pkg/xos"
)

var forceLink bool
var linkAppCmd = &cobra.Command{
	Use:   "link [app-id]",
	Short: "Link an Encore app with the server",
	Args:  cobra.MaximumNArgs(1),

	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		var appID string
		if len(args) > 0 {
			appID = args[0]
		}
		linkApp(appID, forceLink)
	},
	ValidArgsFunction: cmdutil.AutoCompleteAppSlug,
}

func init() {
	appCmd.AddCommand(linkAppCmd)
	linkAppCmd.Flags().BoolVarP(&forceLink, "force", "f", false, "Force link even if the app is already linked.")
}

func linkApp(appID string, force bool) {
	// Determine the app root.
	root, _, err := cmdutil.MaybeAppRoot()
	if errors.Is(err, cmdutil.ErrNoEncoreApp) {
		root, err = os.Getwd()
	}
	if err != nil {
		cmdutil.Fatal(err)
	}

	filePath := filepath.Join(root, "encore.app")
	data, err := os.ReadFile(filePath)
	if err != nil && !errors.Is(err, fs.ErrNotExist) {
		cmdutil.Fatal(err)
		os.Exit(1)
	}
	if len(bytes.TrimSpace(data)) == 0 {
		// Treat missing and empty files as an empty object.
		data = []byte("{}")
	}

	val, err := hujson.Parse(data)
	if err != nil {
		cmdutil.Fatal("could not parse encore.app: ", err)
	}

	appData, ok := val.Value.(*hujson.Object)
	if !ok {
		cmdutil.Fatal("could not parse encore.app: expected JSON object")
	}

	// Find the "id" value, if any.
	var idValue *hujson.Value
	for i := 0; i < len(appData.Members); i++ {
		kv := &appData.Members[i]
		lit, ok := kv.Name.Value.(hujson.Literal)
		if !ok || lit.String() != "id" {
			continue
		}
		idValue = &kv.Value
	}

	if idValue != nil {
		val, ok := idValue.Value.(hujson.Literal)
		if ok && val.String() != "" && val.String() != appID && !force {
			cmdutil.Fatal("the app is already linked.\n\nNote: to link to a different app, specify the --force flag.")
		}
	}

	if appID == "" {
		// The app is not linked. Prompt the user for an app ID.
		fmt.Println("Make sure the app is created on app.encore.cloud, and then enter its ID to link it.")
		fmt.Print("App ID: ")
		if _, err := fmt.Scanln(&appID); err != nil {
			cmdutil.Fatal(err)
		} else if appID == "" {
			cmdutil.Fatal("no app id given.")
		}
	}

	if linked, err := validateAppSlug(appID); err != nil {
		cmdutil.Fatal(err)
	} else if !linked {
		fmt.Fprintln(os.Stderr, "Error: that app does not exist, or you don't have access to it.")
		os.Exit(1)
	}

	// Write it back to our data structure.
	if idValue != nil {
		idValue.Value = hujson.String(appID)
	} else {
		appData.Members = append(appData.Members, hujson.ObjectMember{
			Name:  hujson.Value{Value: hujson.String("id")},
			Value: hujson.Value{Value: hujson.String(appID)},
		})
	}

	val.Format()
	if err := xos.WriteFile(filePath, val.Pack(), 0644); err != nil {
		cmdutil.Fatal(err)
		os.Exit(1)
	}

	addEncoreRemote(root, appID)
	fmt.Println("Successfully linked app!")
}

func validateAppSlug(slug string) (ok bool, err error) {
	if _, err := conf.CurrentUser(); errors.Is(err, fs.ErrNotExist) {
		cmdutil.Fatal("not logged in. Run 'encore auth login' first.")
	} else if err != nil {
		return false, err
	}

	ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
	defer cancel()
	if _, err := platform.GetApp(ctx, slug); err != nil {
		var e platform.Error
		if errors.As(err, &e) && e.HTTPCode == 404 {
			return false, nil
		}
		return false, err
	}
	return true, nil
}


================================================
FILE: cli/cmd/encore/auth/auth.go
================================================
package auth

import (
	"errors"
	"fmt"
	"os"

	"github.com/spf13/cobra"

	"encr.dev/cli/cmd/encore/cmdutil"
	"encr.dev/cli/cmd/encore/root"
	"encr.dev/cli/internal/login"
	"encr.dev/internal/conf"
)

var authKey string

func init() {
	authCmd := &cobra.Command{
		Use:   "auth",
		Short: "Commands to authenticate with Encore",
	}

	signupCmd := &cobra.Command{
		Use:   "signup",
		Short: "Create a new Encore account",

		DisableFlagsInUseLine: true,
		Run: func(cmd *cobra.Command, args []string) {
			if err := DoLogin(DeviceAuth); err != nil {
				cmdutil.Fatal(err)
			}
		},
	}

	loginCmd := &cobra.Command{
		Use:   "login [--auth-key=<KEY>]",
		Short: "Log in to Encore",

		Run: func(cmd *cobra.Command, args []string) {
			if authKey != "" {
				if err := DoLoginWithAuthKey(); err != nil {
					cmdutil.Fatal(err)
				}
			} else {
				if err := DoLogin(DeviceAuth); err != nil {
					cmdutil.Fatal(err)
				}
			}
		},
	}

	logoutCmd := &cobra.Command{
		Use:   "logout",
		Short: "Logs out the currently logged in user",

		DisableFlagsInUseLine: true,
		Run: func(cmd *cobra.Command, args []string) {
			DoLogout()
		},
	}

	whoamiCmd := &cobra.Command{
		Use:   "whoami",
		Short: "Show the current logged in user",

		DisableFlagsInUseLine: true,
		Run: func(cmd *cobra.Command, args []string) {
			Whoami()
		},
	}

	authCmd.AddCommand(signupCmd)

	authCmd.AddCommand(loginCmd)
	loginCmd.Flags().StringVarP(&authKey, "auth-key", "k", "", "Auth Key to use for login")

	authCmd.AddCommand(logoutCmd)
	authCmd.AddCommand(whoamiCmd)
	root.Cmd.AddCommand(authCmd)
}

type Flow int

const (
	AutoFlow Flow = iota
	Interactive
	DeviceAuth
)

func DoLogin(flow Flow) (err error) {
	var fn func() (*conf.Config, error)
	switch flow {
	case Interactive:
		fn = login.Interactive
	case DeviceAuth:
		fn = login.DeviceAuth
	default:
		fn = login.DecideFlow
	}
	cfg, err := fn()
	if err != nil {
		return err
	}

	if err := conf.Write(cfg); err != nil {
		return fmt.Errorf("write credentials: %v", err)
	}
	fmt.Fprintln(os.Stdout, "Successfully logged in!")
	return nil
}

func DoLogout() {
	if err := conf.Logout(); err != nil {
		fmt.Fprintln(os.Stderr, "could not logout:", err)
		os.Exit(1)
	}
	// Stop running daemon to clear any cached credentials
	cmdutil.StopDaemon()
	fmt.Fprintln(os.Stdout, "encore: logged out.")
}

func DoLoginWithAuthKey() error {
	cfg, err := login.WithAuthKey(authKey)
	if err != nil {
		return err
	}
	if err := conf.Write(cfg); err != nil {
		return fmt.Errorf("write credentials: %v", err)
	}
	fmt.Fprintln(os.Stdout, "Successfully logged in!")
	return nil
}

func Whoami() {
	cfg, err := conf.CurrentUser()
	if err != nil {
		if errors.Is(err, os.ErrNotExist) {
			fmt.Fprint(os.Stdout, "not logged in.", cmdutil.Newline)
			return
		}
		cmdutil.Fatal(err)
	}

	if cfg.AppSlug != "" {
		fmt.Fprintf(os.Stdout, "logged in as app %s%s", cfg.AppSlug, cmdutil.Newline)
	} else {
		fmt.Fprintf(os.Stdout, "logged in as %s%s", cfg.Email, cmdutil.Newline)
	}
}


================================================
FILE: cli/cmd/encore/bits/add.go
================================================
package bits

import (
	"context"
	"fmt"
	"os"

	"github.com/cockroachdb/errors"
	"github.com/spf13/cobra"

	"encr.dev/cli/cmd/encore/cmdutil"
	"encr.dev/pkg/bits"
)

var addCmd = &cobra.Command{
	Use:   "add <name> [<path>]",
	Short: "Add an Encore Bit to your application",
	Args:  cobra.MinimumNArgs(1),

	DisableFlagsInUseLine: true,
	Run: func(c *cobra.Command, args []string) {
		slug := args[0]
		ctx := context.Background()
		bit, err := bits.Get(ctx, slug)
		if errors.Is(err, errBitNotFound) {
			cmdutil.Fatalf("encore bit not found: %s", slug)
		} else if err != nil {
			cmdutil.Fatalf("could not lookup encore bit: %v", err)
		}

		workdir, err := os.MkdirTemp("", "encore-bit")
		if err != nil {
			cmdutil.Fatal(err)
		}
		defer os.RemoveAll(workdir)

		//prefix := args[0]
		//if len(args) > 1 {
		//	prefix = args[1]
		//}

		fmt.Fprintf(os.Stderr, "Downloading Encore Bit: %s\n", bit.Title)
		if err := bits.Extract(ctx, bit, workdir); err != nil {
			cmdutil.Fatalf("download failed: %v", err)
		}

		meta, err := bits.Describe(ctx, workdir)
		if err != nil {
			cmdutil.Fatalf("could not parse bit metadata: %v", err)
		}

		fmt.Fprintf(os.Stderr, "successfully got bit: %+v\n", meta)

		//fmt.Fprintf(os.Stderr, "\n\nSuccessfully added Encore Bit: %s!\n", bit.Title)
		//fmt.Fprintf(os.Stderr, "You can find the new bit under the %s/ directory.\n", prefix)
	},
}

func init() {
	bitsCmd.AddCommand(addCmd)
}


================================================
FILE: cli/cmd/encore/bits/api.go
================================================
package bits

import (
	"context"
	"encoding/json"
	"io"
	"net/http"
	"net/url"

	"github.com/cockroachdb/errors"
)

type Bit struct {
	ID          int64
	Slug        string
	Title       string
	Description string
	GitRepo     string
	GitBranch   string
}

type ListResponse struct {
	Bits []*Bit
}

func List(ctx context.Context) ([]*Bit, error) {
	resp, err := http.Get("https://automativity.encore.dev/bits")
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	if resp.StatusCode != 200 {
		slurp, _ := io.ReadAll(resp.Body)
		return nil, errors.Newf("got status %d: %s", resp.StatusCode, slurp)
	}
	var data ListResponse
	if err := json.NewDecoder(resp.Body).Decode(&data); err != nil {
		return nil, errors.Wrap(err, "decode json response")
	}
	return data.Bits, nil
}

var errBitNotFound = errors.New("bit not found")

func Get(ctx context.Context, slug string) (*Bit, error) {
	resp, err := http.Get("https://automativity.encore.dev/bits/" + url.PathEscape(slug))
	if err != nil {
		return nil, err
	}
	defer resp.Body.Close()

	if resp.StatusCode == 404 {
		return nil, errBitNotFound
	} else if resp.StatusCode != 200 {
		slurp, _ := io.ReadAll(resp.Body)
		return nil, errors.Newf("got status %d: %s", resp.StatusCode, slurp)
	}
	var bit Bit
	if err := json.NewDecoder(resp.Body).Decode(&bit); err != nil {
		return nil, errors.Wrap(err, "decode json response")
	}
	return &bit, nil
}


================================================
FILE: cli/cmd/encore/bits/bits.go
================================================
package bits

import (
	"github.com/spf13/cobra"

	"encr.dev/cli/cmd/encore/root"
)

var bitsCmd = &cobra.Command{
	Use:   "bits",
	Short: "Commands to manage encore bits, reusable functionality for Encore applications",
}

func init() {
	root.Cmd.AddCommand(bitsCmd)
}


================================================
FILE: cli/cmd/encore/bits/list.go
================================================
package bits

import (
	"context"
	"fmt"
	"os"
	"text/tabwriter"

	"github.com/spf13/cobra"

	"encr.dev/cli/cmd/encore/cmdutil"
	"encr.dev/pkg/bits"
)

var listCmd = &cobra.Command{
	Use:   "list",
	Short: "Lists available Encore Bits to add to your application",
	Args:  cobra.ExactArgs(0),
	Run: func(c *cobra.Command, args []string) {
		bits, err := bits.List(context.Background())
		if err != nil {
			cmdutil.Fatalf("could not list encore bits: %v", err)
		}

		tw := tabwriter.NewWriter(os.Stdout, 0, 8, 0, '\t', 0)
		fmt.Fprintln(tw, "ID\tTitle\tDescription")
		for _, bit := range bits {
			fmt.Fprintf(tw, "%s\t%s\t%s\n", bit.Slug, bit.Title, bit.Description)
			fmt.Fprintln(tw)
		}
		tw.Flush()
	},
}

func init() {
	bitsCmd.AddCommand(listCmd)
}


================================================
FILE: cli/cmd/encore/build.go
================================================
package main

import (
	"context"
	"fmt"
	"os"
	"os/signal"
	"path/filepath"

	"github.com/spf13/cobra"

	"encr.dev/cli/cmd/encore/cmdutil"
	"encr.dev/pkg/appfile"
	daemonpb "encr.dev/proto/encore/daemon"
)

var (
	targetOS = cmdutil.Oneof{
		Value:   "linux",
		Allowed: []string{"linux"},
		Flag:    "os",
		Desc:    "the target operating system",
	}
	targetArch = cmdutil.Oneof{
		Value:   "amd64",
		Allowed: []string{"amd64", "arm64"},
		Flag:    "arch",
		Desc:    "the target architecture",
	}
)

func init() {
	buildCmd := &cobra.Command{
		Use:     "build",
		Aliases: []string{"eject"},
		Short:   "build provides ways to build your application for deployment",
	}

	p := buildParams{
		CgoEnabled: os.Getenv("CGO_ENABLED") == "1",
	}
	dockerBuildCmd := &cobra.Command{
		Use:   "docker IMAGE_TAG",
		Short: "docker builds a portable docker image of your Encore application",
		Args:  cobra.ExactArgs(1),
		Run: func(cmd *cobra.Command, args []string) {
			p.Goarch = targetArch.Value
			p.Goos = targetOS.Value
			p.AppRoot, _ = determineAppRoot()
			p.WorkspaceRoot = determineWorkspaceRoot(p.AppRoot)
			file, err := appfile.ParseFile(filepath.Join(p.AppRoot, appfile.Name))
			if err == nil {
				if !cmd.Flag("base").Changed && file.Lang == appfile.LangTS {
					p.BaseImg = "node:slim"
				}
				if !cmd.Flag("cgo").Changed {
					p.CgoEnabled = file.Build.CgoEnabled
				}
			}
			p.ImageTag = args[0]
			dockerBuild(p)
		},
	}

	dockerBuildCmd.Flags().BoolVarP(&p.Push, "push", "p", false, "push image to remote repository")
	dockerBuildCmd.Flags().StringVar(&p.BaseImg, "base", "scratch", "base image to build from")
	dockerBuildCmd.Flags().BoolVar(&p.CgoEnabled, "cgo", false, "enable cgo")
	dockerBuildCmd.Flags().BoolVar(&p.SkipInfraConf, "skip-config", false, "do not read or generate a infra configuration file")
	dockerBuildCmd.Flags().StringVar(&p.InfraConfPath, "config", "", "infra configuration file path")
	p.Services = dockerBuildCmd.Flags().StringSlice("services", nil, "services to include in the image")
	p.Gateways = dockerBuildCmd.Flags().StringSlice("gateways", nil, "gateways to include in the image")
	targetOS.AddFlag(dockerBuildCmd)
	targetArch.AddFlag(dockerBuildCmd)
	rootCmd.AddCommand(buildCmd)
	buildCmd.AddCommand(dockerBuildCmd)
}

type buildParams struct {
	AppRoot       string
	WorkspaceRoot string
	ImageTag      string
	Push          bool
	BaseImg       string
	Goos          string
	Goarch        string
	CgoEnabled    bool
	SkipInfraConf bool
	InfraConfPath string
	Services      *[]string
	Gateways      *[]string
}

func dockerBuild(p buildParams) {
	interrupt := make(chan os.Signal, 1)
	signal.Notify(interrupt, os.Interrupt)

	ctx, cancel := context.WithCancel(context.Background())
	go func() {
		<-interrupt
		cancel()
	}()

	daemon := setupDaemon(ctx)
	params := &daemonpb.DockerExportParams{
		BaseImageTag: p.BaseImg,
	}
	if p.Push {
		params.PushDestinationTag = p.ImageTag
	} else {
		params.LocalDaemonTag = p.ImageTag
	}

	var services, gateways []string
	if p.Services != nil {
		services = *p.Services
	}
	if p.Gateways != nil {
		gateways = *p.Gateways
	}
	var err error
	cfgPath := ""
	if p.InfraConfPath != "" {
		cfgPath, err = filepath.Abs(p.InfraConfPath)
		if err != nil {
			cmdutil.Fatalf("failed to resolve absolute path for %s: %v", p.InfraConfPath, err)
		}
	}
	stream, err := daemon.Export(ctx, &daemonpb.ExportRequest{
		AppRoot:       p.AppRoot,
		WorkspaceRoot: p.WorkspaceRoot,
		CgoEnabled:    p.CgoEnabled,
		Goos:          p.Goos,
		Goarch:        p.Goarch,
		Environ:       os.Environ(),
		Format: &daemonpb.ExportRequest_Docker{
			Docker: params,
		},
		InfraConfPath: cfgPath,
		Services:      services,
		Gateways:      gateways,
		SkipInfraConf: p.SkipInfraConf,
	})
	if err != nil {
		fmt.Fprintln(os.Stderr, "fatal: ", err)
		os.Exit(1)
	}
	if code := cmdutil.StreamCommandOutput(stream, cmdutil.ConvertJSONLogs()); code != 0 {
		os.Exit(code)
	}
}

func or(a, b string) string {
	if a != "" {
		return a
	}
	return b
}


================================================
FILE: cli/cmd/encore/check.go
================================================
package main

import (
	"context"
	"fmt"
	"os"
	"os/signal"

	"github.com/spf13/cobra"

	"encr.dev/cli/cmd/encore/cmdutil"
	daemonpb "encr.dev/proto/encore/daemon"
)

var (
	codegenDebug    bool
	checkParseTests bool
)

var checkCmd = &cobra.Command{
	Use:   "check",
	Short: "Checks your application for compile-time errors using Encore's compiler.",

	DisableFlagsInUseLine: true,
	Run: func(cmd *cobra.Command, args []string) {
		appRoot, relPath := determineAppRoot()
		runChecks(appRoot, relPath)
	},
}

func init() {
	rootCmd.AddCommand(checkCmd)
	checkCmd.Flags().BoolVar(&codegenDebug, "codegen-debug", false, "Dump generated code (for debugging Encore's code generation)")
	checkCmd.Flags().BoolVar(&checkParseTests, "tests", false, "Parse tests as well")
}

func runChecks(appRoot, relPath string) {
	interrupt := make(chan os.Signal, 1)
	signal.Notify(interrupt, os.Interrupt)

	ctx, cancel := context.WithCancel(context.Background())
	go func() {
		<-interrupt
		cancel()
	}()

	daemon := setupDaemon(ctx)
	stream, err := daemon.Check(ctx, &daemonpb.CheckRequest{
		AppRoot:      appRoot,
		WorkingDir:   relPath,
		CodegenDebug: codegenDebug,
		ParseTests:   checkParseTests,
		Environ:      os.Environ(),
	})
	if err != nil {
		fmt.Fprintln(os.Stderr, "fatal: ", err)
		os.Exit(1)
	}
	os.Exit(cmdutil.StreamCommandOutput(stream, nil))
}


================================================
FILE: cli/cmd/encore/cmdutil/autocompletes.go
================================================
package cmdutil

import (
	"fmt"
	"strings"

	"github.com/spf13/cobra"

	"encr.dev/cli/internal/platform"
	"encr.dev/internal/conf"
)

func AutoCompleteFromStaticList(args ...string) func(cmd *cobra.Command, _ []string, toComplete string) ([]string, cobra.ShellCompDirective) {
	return func(cmd *cobra.Command, _ []string, toComplete string) (rtn []string, dir cobra.ShellCompDirective) {
		toComplete = strings.ToLower(toComplete)

		for _, option := range args {
			before, _, _ := strings.Cut(option, "\t")

			if strings.HasPrefix(before, toComplete) {
				rtn = append(rtn, option)
			}
		}

		return rtn, cobra.ShellCompDirectiveNoFileComp
	}
}

func AutoCompleteAppSlug(cmd *cobra.Command, _ []string, toComplete string) ([]string, cobra.ShellCompDirective) {
	// incase of not being logged in or an error, we give no auto competition
	_, err := conf.CurrentUser()
	if err != nil {
		return nil, cobra.ShellCompDirectiveError
	}

	apps, err := platform.ListApps(cmd.Context())
	if err != nil {
		return nil, cobra.ShellCompDirectiveError
	}

	toComplete = strings.ToLower(toComplete)

	rtn := make([]string, 0, len(apps))
	for _, app := range apps {
		if strings.HasPrefix(strings.ToLower(app.Slug), toComplete) {
			desc := app.Description
			if desc == "" {
				desc = app.Name
			}

			rtn = append(rtn, fmt.Sprintf("%s\t%s", app.Slug, desc))
		}
	}

	return rtn, cobra.ShellCompDirectiveNoFileComp
}

func AutoCompleteEnvSlug(cmd *cobra.Command, args []string, toComplete string) (rtn []string, dir cobra.ShellCompDirective) {
	toComplete = strings.ToLower(toComplete)

	// Support the local environment
	if strings.HasPrefix("local", toComplete) {
		rtn = append(rtn, "local\tThis local development environment")
	}

	_, err := conf.CurrentUser()
	if err != nil {
		return rtn, cobra.ShellCompDirectiveError
	}

	// Assume the app slug is the first argument
	appSlug := args[len(args)-1]

	// Get the environments for the app and filter by what the user has already entered
	envs, err := platform.ListEnvs(cmd.Context(), appSlug)
	if err != nil {
		return rtn, cobra.ShellCompDirectiveError
	}

	for _, env := range envs {
		if strings.HasPrefix(strings.ToLower(env.Slug), toComplete) {
			rtn = append(rtn, fmt.Sprintf("%s\tA %s enviroment running on %s", env.Slug, env.Type, env.Cloud))
		}
	}

	return rtn, cobra.ShellCompDirectiveNoFileComp
}


================================================
FILE: cli/cmd/encore/cmdutil/cmdutil.go
================================================
package cmdutil

import (
	"encoding/json"
	"errors"
	"fmt"
	"io/fs"
	"os"
	"path/filepath"
	"runtime"

	"github.com/fatih/color"
	"golang.org/x/crypto/ssh/terminal"
	"google.golang.org/grpc/status"

	"encr.dev/cli/internal/manifest"
	"encr.dev/pkg/appfile"
	"encr.dev/pkg/errinsrc"
	"encr.dev/pkg/errlist"
)

var (
	ErrNoEncoreApp    = errors.New("no encore.app found in directory (or any of the parent directories)")
	ErrEncoreAppIsDir = errors.New("encore.app is a directory, not a file")
)

// MaybeAppRoot determines the app root by looking for the "encore.app" file,
// initially in the current directory and then recursively in parent directories
// up to the filesystem root.
//
// It reports the absolute path to the app root, and the
// relative path from the app root to the working directory.
func MaybeAppRoot() (appRoot, relPath string, err error) {
	dir, err := os.Getwd()
	if err != nil {
		return "", "", err
	}
	return FindAppRootFromDir(dir)
}

func FindAppRootFromDir(dir string) (appRoot, relPath string, err error) {
	rel := "."
	for {
		path := filepath.Join(dir, "encore.app")
		fi, err := os.Stat(path)
		if errors.Is(err, fs.ErrNotExist) {
			dir2 := filepath.Dir(dir)
			if dir2 == dir {
				return "", "", ErrNoEncoreApp
			}
			rel = filepath.Join(filepath.Base(dir), rel)
			dir = dir2
			continue
		} else if err != nil {
			return "", "", err
		} else if fi.IsDir() {
			return "", "", ErrEncoreAppIsDir
		} else {
			return dir, rel, nil
		}
	}
}

// AppRoot is like MaybeAppRoot but instead of returning an error
// it prints it to stderr and exits.
func AppRoot() (appRoot, relPath string) {
	appRoot, relPath, err := MaybeAppRoot()
	if err != nil {
		Fatal(err)
	}
	return appRoot, relPath
}

// WorkspaceRoot determines the workspace root by looking for the .git folder in app root or parents to it.
// It reports the absolute path to the workspace root.
func WorkspaceRoot(appRoot string) string {
	dir := appRoot
	for {
		path := filepath.Join(dir, ".git")
		fi, err := os.Stat(path)
		if errors.Is(err, fs.ErrNotExist) {
			dir2 := filepath.Dir(dir)
			if dir2 == dir {
				return appRoot
			}
			dir = dir2
			continue
		} else if err != nil {
			Fatal(err)
		} else if !fi.IsDir() {
			continue
		} else {
			return dir
		}
	}
}

func AppSlugOrLocalID() string {
	appRoot, _ := AppRoot()
	appID, _ := appfile.Slug(appRoot)
	if appID == "" {
		mf, err := manifest.ReadOrCreate(appRoot)
		if err != nil {
			Fatalf("failed to read app manifest: %v", err)
		}
		appID = mf.LocalID
	}
	return appID
}

// AppSlug reports the current app's app slug.
// It throws a fatal error if the app is not connected with the Encore Platform.
func AppSlug() string {
	appRoot, _ := AppRoot()
	appSlug, err := appfile.Slug(appRoot)
	if err != nil {
		Fatal(err)
	} else if appSlug == "" {
		Fatal("app is not linked with the Encore Platform (see 'encore app link')")
	}
	return appSlug
}

func Fatal(args ...any) {
	// Prettify gRPC errors
	for i, arg := range args {
		if err, ok := arg.(error); ok {
			if s, ok := status.FromError(err); ok {
				args[i] = s.Message()
			}
		}
	}

	red := color.New(color.FgRed)
	_, _ = red.Fprint(os.Stderr, "error: ")
	_, _ = red.Fprintln(os.Stderr, args...)
	os.Exit(1)
}

func Fatalf(format string, args ...any) {
	// Prettify gRPC errors
	for i, arg := range args {
		if err, ok := arg.(error); ok {
			if s, ok := status.FromError(err); ok {
				args[i] = s.Message()
			}
		}
	}

	Fatal(fmt.Sprintf(format, args...))
}

func DisplayError(out *os.File, err []byte) {
	if len(err) == 0 {
		return
	}

	// Get the width of the terminal we're rendering in
	// if we can so we render using the most space possible.
	width, _, sizeErr := terminal.GetSize(int(out.Fd()))
	if sizeErr == nil {
		errinsrc.TerminalWidth = width
	}

	// Unmarshal the error into a structured errlist
	errList := errlist.New(nil)
	if err := json.Unmarshal(err, &errList); err != nil {
		Fatalf("unable to parse error: %v", err)
	}

	if errList.Len() == 0 {
		return
	}

	_, _ = os.Stderr.Write([]byte(errList.Error()))
}

var Newline string

func init() {
	switch runtime.GOOS {
	case "windows":
		Newline = "\r\n"
	default:
		Newline = "\n"
	}
}


================================================
FILE: cli/cmd/encore/cmdutil/daemon.go
================================================
package cmdutil

import (
	"context"
	"fmt"
	"net"
	"os"
	"os/exec"
	"path/filepath"
	"time"

	"github.com/golang/protobuf/ptypes/empty"
	"google.golang.org/genproto/googleapis/rpc/errdetails"
	"google.golang.org/grpc"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"

	"encr.dev/internal/version"
	"encr.dev/pkg/xos"
	daemonpb "encr.dev/proto/encore/daemon"
)

func IsDaemonRunning(ctx context.Context) bool {
	socketPath, err := daemonSockPath()
	if err != nil {
		return false
	}
	if _, err := xos.SocketStat(socketPath); err == nil {
		// The socket exists; check that it is responsive.
		if cc, err := dialDaemon(ctx, socketPath); err == nil {
			_ = cc.Close()
			return true
		}
		// socket is not responding, remove it
		_ = os.Remove(socketPath)
	}
	return false

}

// ConnectDaemon returns a client connection to the Encore daemon.
// By default, it will start the daemon if it is not already running.
func ConnectDaemon(ctx context.Context) daemonpb.DaemonClient {
	socketPath, err := daemonSockPath()
	if err != nil {
		fmt.Fprintln(os.Stderr, "fatal: ", err)
		os.Exit(1)
	}

	if _, err := xos.SocketStat(socketPath); err == nil {
		// The socket exists; check that it is responsive.
		if cc, err := dialDaemon(ctx, socketPath); err == nil {
			// Make sure the daemon is running an up-to-date version;
			// restart it otherwise.
			cl := daemonpb.NewDaemonClient(cc)
			if resp, err := cl.Version(ctx, &empty.Empty{}); err == nil {
				diff := version.Compare(resp.Version)
				switch {
				case diff < 0:
					// Daemon is running a newer version
					return cl
				case diff == 0:
					if configHash, err := version.ConfigHash(); err != nil {
						Fatal("unable to get config path: ", err)
					} else if configHash == resp.ConfigHash {
						return cl
					}

					// If we're running a development release, and so is the daemon, don't restart.
					// This is to avoid spurious restarts during development.
					if version.Channel == version.DevBuild && version.ChannelFor(resp.Version) == version.DevBuild {
						return cl
					}

					// Daemon is running the same version but different config
					fmt.Fprintf(os.Stderr, "encore: restarting daemon due to configuration change.\n")
				case diff > 0:
					fmt.Fprintf(os.Stderr, "encore: daemon is running an outdated version (%s), restarting.\n", resp.Version)
				}
			}
		}
		// Remove the socket file which triggers the daemon to exit.
		_ = os.Remove(socketPath)
	}

	// Start the daemon.
	if err := StartDaemonInBackground(ctx); err != nil {
		Fatal("starting daemon: ", err)
	}
	cc, err := dialDaemon(ctx, socketPath)
	if err != nil {
		Fatal("dialing daemon: ", err)
	}
	return daemonpb.NewDaemonClient(cc)
}

func StopDaemon() {
	socketPath, err := daemonSockPath()
	if err != nil {
		Fatal("stopping daemon: ", err)
	}
	if _, err := xos.SocketStat(socketPath); err == nil {
		_ = os.Remove(socketPath)
	}
}

// daemonSockPath reports the path to the Encore daemon unix socket.
func daemonSockPath() (string, error) {
	cacheDir, err := os.UserCacheDir()
	if err != nil {
		return "", fmt.Errorf("could not determine cache dir: %v", err)
	}
	return filepath.Join(cacheDir, "encore", "encored.sock"), nil
}

// StartDaemonInBackground starts the Encore daemon in the background.
func StartDaemonInBackground(ctx context.Context) error {
	socketPath, err := daemonSockPath()
	if err != nil {
		return err
	}

	// nosemgrep
	exe, err := os.Executable()
	if err != nil {
		exe, err = exec.LookPath("encore")
	}
	if err != nil {
		return fmt.Errorf("could not determine location of encore executable: %v", err)
	}
	// nosemgrep
	cmd := exec.Command(exe, "daemon", "-f")
	cmd.SysProcAttr = xos.CreateNewProcessGroup()
	if err := cmd.Start(); err != nil {
		return fmt.Errorf("could not start encore daemon: %v", err)
	}

	// Wait for it to come up
	for i := 0; i < 50; i++ {
		if err := ctx.Err(); err != nil {
			return err
		}
		time.Sleep(100 * time.Millisecond)
		if _, err := xos.SocketStat(socketPath); err == nil {
			return nil
		}
	}
	return fmt.Errorf("timed out waiting for daemon to start")
}

func dialDaemon(ctx context.Context, socketPath string) (*grpc.ClientConn, error) {
	ctx, cancel := context.WithTimeout(ctx, 500*time.Millisecond)
	defer cancel()

	dialer := func(ctx context.Context, addr string) (net.Conn, error) {
		return (&net.Dialer{}).DialContext(ctx, "unix", socketPath)
	}
	// Set max message size to 16mb (up from default 4mb) for json formatted debug metadata for large applications.
	return grpc.DialContext(ctx, "",
		grpc.WithInsecure(),
		grpc.WithBlock(),
		grpc.WithUnaryInterceptor(errInterceptor),
		grpc.WithContextDialer(dialer),
		grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(16*1024*1024)),
	)
}

func errInterceptor(ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
	err := invoker(ctx, method, req, reply, cc, opts...)
	if err != nil {
		if st, ok := status.FromError(err); ok {
			if st.Code() == codes.Unauthenticated {
				Fatal("not logged in: run 'encore auth login' first")
			}
			for _, detail := range st.Details() {
				switch t := detail.(type) {
				case *errdetails.PreconditionFailure:
					for _, violation := range t.Violations {
						if violation.Type == "INVALID_REFRESH_TOKEN" {
							Fatal("OAuth refresh token was invalid. Please run `encore auth login` again.")
						}
					}
				}
			}
		}
	}
	return err
}


================================================
FILE: cli/cmd/encore/cmdutil/forms.go
================================================
package cmdutil

import (
	"strings"

	"github.com/charmbracelet/bubbles/list"
	tea "github.com/charmbracelet/bubbletea"
	"github.com/charmbracelet/lipgloss"
)

const (
	CodeBlue       = "#6D89FF"
	CodePurple     = "#A36C8C"
	CodeGreen      = "#B3D77E"
	ValidationFail = "#CB1010"
)

var (
	InputStyle   = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Dark: CodeBlue, Light: CodeBlue})
	DescStyle    = lipgloss.NewStyle().Foreground(lipgloss.AdaptiveColor{Dark: CodeGreen, Light: CodePurple})
	DocStyle     = lipgloss.NewStyle().Padding(0, 2, 0, 2)
	ErrorStyle   = lipgloss.NewStyle().Foreground(lipgloss.Color(ValidationFail))
	SuccessStyle = lipgloss.NewStyle().Foreground(lipgloss.Color("#00C200"))
)

type SelectedID[T any] interface {
	SelectedID() T
}

type Selectable interface {
	comparable
	SelectPrompt() string
}

type SimpleSelectDone[T any] struct {
	Selected T
}

type SimpleSelectModel[T Selectable, S SelectedID[T]] struct {
	Predefined T
	List       list.Model
}

func (m SimpleSelectModel[T, S]) Selected() T {
	var empty T
	if m.Predefined != empty {
		return m.Predefined
	}
	sel := m.List.SelectedItem()
	if sel == nil {
		return empty
	}
	return sel.(S).SelectedID()
}

func (m SimpleSelectModel[T, I]) Update(msg tea.Msg) (SimpleSelectModel[T, I], tea.Cmd) {
	var c tea.Cmd

	switch msg := msg.(type) {
	case tea.KeyMsg:
		switch msg.Type {
		case tea.KeyEnter:
			// Have we selected an item?
			if idx := m.List.Index(); idx >= 0 {
				return m, func() tea.Msg {
					return SimpleSelectDone[T]{
						Selected: m.Selected(),
					}
				}
			}
		}
	}

	m.List, c = m.List.Update(msg)
	return m, c
}

func (m *SimpleSelectModel[T, I]) SetSize(width, height int) {
	m.List.SetWidth(width)
	m.List.SetHeight(max(height-1, 0))
}

func (m SimpleSelectModel[T, I]) View() string {
	var b strings.Builder

	// Get the prompt from the type T
	var zero T
	prompt := zero.SelectPrompt()

	b.WriteString(InputStyle.Render(prompt))
	b.WriteString(DescStyle.Render(" [Use arrows to move]"))
	b.WriteString("\n")
	b.WriteString(m.List.View())

	return b.String()
}


================================================
FILE: cli/cmd/encore/cmdutil/language.go
================================================
package cmdutil

type Language string

const (
	LanguageGo Language = "go"
	LanguageTS Language = "ts"
)

var AllLanguages = []Language{
	LanguageGo,
	LanguageTS,
}

func LanguageFlagValues() []string {
	result := make([]string, 0, len(AllLanguages))
	for _, r := range AllLanguages {
		result = append(result, string(r))
	}
	return result
}

func (lang Language) Display() string {
	switch lang {
	case LanguageGo:
		return "Go"
	case LanguageTS:
		return "TypeScript"
	default:
		return string(lang)
	}
}

func (lang Language) SelectPrompt() string {
	return "Select language for your application"
}


================================================
FILE: cli/cmd/encore/cmdutil/output.go
================================================
package cmdutil

import (
	"errors"
	"slices"
	"strconv"
	"strings"

	"github.com/spf13/cobra"
	"github.com/spf13/pflag"
)

type Oneof struct {
	Value       string
	Allowed     []string
	Flag        string // defaults to "output" if empty
	FlagShort   string // defaults to "o" if both Flag and FlagShort are empty
	Desc        string // usage desc
	TypeDesc    string // type description, defaults to the name of the flag
	NoOptDefVal string // default value when no option is provided
}

func (o *Oneof) AddFlag(cmd *cobra.Command) {
	name, short := o.FlagName()
	cmd.Flags().AddFlag(
		&pflag.Flag{
			Name:        name,
			NoOptDefVal: o.NoOptDefVal,
			Shorthand:   short,
			Usage:       o.Usage(),
			Value:       o,
			DefValue:    o.String(),
		})
	_ = cmd.RegisterFlagCompletionFunc(name, func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
		return o.Allowed, cobra.ShellCompDirectiveNoFileComp
	})
}

func (o *Oneof) FlagName() (name, short string) {
	name, short = o.Flag, o.FlagShort
	if name == "" {
		name, short = "output", "o"
	}
	return name, short
}

func (o *Oneof) String() string {
	return o.Value
}

func (o *Oneof) Type() string {
	if o.TypeDesc != "" {
		return o.TypeDesc
	}
	name, _ := o.FlagName()
	return name
}

func (o *Oneof) Set(v string) error {
	if slices.Contains(o.Allowed, v) {
		o.Value = v
		return nil
	}

	var b strings.Builder
	b.WriteString("must be one of ")
	o.oneOf(&b)
	return errors.New(b.String())
}

func (o *Oneof) Usage() string {
	var b strings.Builder
	desc := o.Desc
	if desc == "" {
		desc = "Output format"
	}
	b.WriteString(desc + ". One of (")
	o.oneOf(&b)
	b.WriteString(").")
	return b.String()
}

// Alternatives lists the alternatives in the format "a|b|c".
func (o *Oneof) Alternatives() string {
	var b strings.Builder
	for i, s := range o.Allowed {
		if i > 0 {
			b.WriteByte('|')
		}
		b.WriteString(s)
	}
	return b.String()
}

func (o *Oneof) oneOf(b *strings.Builder) {
	n := len(o.Allowed)
	for i, s := range o.Allowed {
		if i > 0 {
			switch {
			case n == 2:
				b.WriteString(" or ")
			case i == n-1:
				b.WriteString(", or ")
			default:
				b.WriteString(", ")
			}
		}

		b.WriteString(strconv.Quote(s))
	}
}


================================================
FILE: cli/cmd/encore/cmdutil/stream.go
================================================
package cmdutil

import (
	"bufio"
	"bytes"
	"encoding/json"
	"fmt"
	"io"
	"os"
	"strings"
	"sync"

	"github.com/logrusorgru/aurora/v3"
	"github.com/rs/zerolog"
	"github.com/rs/zerolog/log"
	"golang.org/x/crypto/ssh/terminal"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"

	"encr.dev/pkg/ansi"
	"encr.dev/proto/encore/daemon"
)

// CommandOutputStream is the interface for gRPC streams that
// stream the output of a command.
type CommandOutputStream interface {
	Recv() (*daemon.CommandMessage, error)
}

type OutputConverter func(line []byte) []byte

// StreamCommandOutput streams the output from the given command stream,
// and reports the command's exit code.
// If convertJSON is true, lines that look like JSON are fed through
// zerolog's console writer.
func StreamCommandOutput(stream CommandOutputStream, converter OutputConverter) int {
	var outWrite io.Writer = os.Stdout
	var errWrite io.Writer = os.Stderr

	var writesDone sync.WaitGroup
	defer writesDone.Wait()

	if converter != nil {
		// Create a pipe that we read from line-by-line so we can detect JSON lines.
		outRead, outw := io.Pipe()
		errRead, errw := io.Pipe()
		outWrite = outw
		errWrite = errw
		defer func() { _ = outw.Close() }()
		defer func() { _ = errw.Close() }()

		for i, read := range []io.Reader{outRead, errRead} {
			read := read
			stdout := i == 0
			writesDone.Add(1)
			go func() {
				defer writesDone.Done()

				for {
					scanner := bufio.NewScanner(read)
					for scanner.Scan() {
						line := append(scanner.Bytes(), '\n')
						line = converter(line)
						if stdout {
							_, _ = os.Stdout.Write(line)
						} else {
							_, _ = os.Stderr.Write(line)
						}
					}
					if err := scanner.Err(); err != nil {
						// The scanner failed, likely due to a too-long line. Log an error
						// and create a new scanner since the old one is in an unrecoverable state.
						fmt.Fprintln(os.Stderr, "failed to read output:", err)
						scanner = bufio.NewScanner(read)
						continue
					} else {
						break
					}
				}
			}()
		}
	}

	for {
		msg, err := stream.Recv()
		if err != nil {
			st := status.Convert(err)
			switch {
			case st.Code() == codes.FailedPrecondition:
				_, _ = fmt.Fprintln(os.Stderr, st.Message())
				return 1
			case err == io.EOF || st.Code() == codes.Canceled || strings.HasSuffix(err.Error(), "error reading from server: EOF"):
				return 0
			default:
				log.Fatal().Err(err).Msg("connection failure")
			}
		}

		switch m := msg.Msg.(type) {
		case *daemon.CommandMessage_Output:
			if m.Output.Stdout != nil {
				_, _ = outWrite.Write(m.Output.Stdout)
			}
			if m.Output.Stderr != nil {
				_, _ = errWrite.Write(m.Output.Stderr)
			}
		case *daemon.CommandMessage_Errors:
			DisplayError(os.Stderr, m.Errors.Errinsrc)

		case *daemon.CommandMessage_Exit:
			return int(m.Exit.Code)
		}
	}
}

type ConvertLogOptions struct {
	Color bool
}

type ConvertLogOption func(*ConvertLogOptions)

func Colorize(enable bool) ConvertLogOption {
	return func(clo *ConvertLogOptions) {
		clo.Color = enable
	}
}

func ConvertJSONLogs(opts ...ConvertLogOption) OutputConverter {
	// Default to colorized output.
	options := ConvertLogOptions{Color: true}

	for _, opt := range opts {
		opt(&options)
	}

	var logMutex sync.Mutex
	logLineBuffer := bytes.NewBuffer(make([]byte, 0, 1024))
	cout := zerolog.NewConsoleWriter(func(w *zerolog.ConsoleWriter) {
		w.Out = logLineBuffer
		w.FieldsExclude = []string{"stack"}
		w.FormatExtra = func(vals map[string]any, buf *bytes.Buffer) error {
			if stack, ok := vals["stack"]; ok {
				return FormatStack(stack, buf)
			}
			return nil
		}
	})
	if !options.Color {
		cout.NoColor = true
	}

	return func(line []byte) []byte {
		// If this isn't a JSON log line, just return it as-is
		if len(line) == 0 || line[0] != '{' {
			return line
		}

		// Otherwise grab the converter buffer and reset it
		logMutex.Lock()
		defer logMutex.Unlock()
		logLineBuffer.Reset()

		// Then convert the JSON log line to pretty formatted text
		_, err := cout.Write(line)
		if err != nil {
			return line
		}
		out := make([]byte, len(logLineBuffer.Bytes()))
		copy(out, logLineBuffer.Bytes())
		return out
	}
}

func FormatStack(val any, buf *bytes.Buffer) error {
	var frames []struct {
		File string
		Line int
		Func string
	}

	if jsonRepr, err := json.Marshal(val); err != nil {
		return err
	} else if err := json.Unmarshal(jsonRepr, &frames); err != nil {
		return err
	}
	for _, f := range frames {
		fmt.Fprintf(buf, "\n    %s\n        %s",
			f.Func,
			aurora.Gray(12, fmt.Sprintf("%s:%d", f.File, f.Line)))
	}
	return nil
}

func ClearTerminalExceptFirstNLines(n int) {
	// Clear the screen except for the first line.
	if _, height, err := terminal.GetSize(int(os.Stdout.Fd())); err == nil {
		count := height - (1 + n)
		if count > 0 {
			_, _ = os.Stdout.Write(bytes.Repeat([]byte{'\n'}, count))
		}
		_, _ = fmt.Fprint(os.Stdout, ansi.SetCursorPosition(2, 1)+ansi.ClearScreen(ansi.CursorToBottom))
	}
}


================================================
FILE: cli/cmd/encore/config/config.go
================================================
package config

import (
	"fmt"
	"os"
	"strings"

	"encr.dev/cli/cmd/encore/cmdutil"
	"encr.dev/cli/cmd/encore/root"
	"encr.dev/internal/userconfig"
	"github.com/spf13/cobra"
)

var (
	forceApp, forceGlobal bool
	viewAllSettings       bool
)

var autoCompleteConfigKeys = cmdutil.AutoCompleteFromStaticList(userconfig.Keys()...)

var longDocs = `Gets or sets configuration values for customizing the behavior of the Encore CLI.

Configuration options can be set both for individual Encore applications,
as well as globally for the local user.

Configuration options can be set using ` + bt("encore config <key> <value>") + `,
and options can similarly be read using ` + bt("encore config <key>") + `.

When running ` + bt("encore config") + ` within an Encore application,
it automatically sets and gets configuration for that application.

To set or get global configuration, use the ` + bt("--global") + ` flag.

Available configuration settings are:

` + userconfig.CLIDocs()

var configCmd = &cobra.Command{
	Use:   "config <key> [<value>]",
	Short: "Get or set a configuration value",
	Long:  longDocs,
	Args:  cobra.RangeArgs(0, 2),

	Run: func(cmd *cobra.Command, args []string) {
		appRoot, _, _ := cmdutil.MaybeAppRoot()

		appScope := appRoot != ""
		if forceApp {
			appScope = true
		} else if forceGlobal {
			appScope = false
		}

		if appScope && appRoot == "" {
			// If the user specified --app, error if there is no app.
			cmdutil.Fatal(cmdutil.ErrNoEncoreApp)
		}

		if len(args) == 2 {
			var err error
			if appScope {
				err = userconfig.SetForApp(appRoot, args[0], args[1])
			} else {
				err = userconfig.SetGlobal(args[0], args[1])
			}
			if err != nil {
				cmdutil.Fatal(err)
			}
		} else {
			var (
				cfg *userconfig.Config
				err error
			)
			if appScope {
				appRoot, _ := cmdutil.AppRoot()
				cfg, err = userconfig.ForApp(appRoot).Get()
			} else {
				cfg, err = userconfig.Global().Get()
			}
			if err != nil {
				cmdutil.Fatal(err)
			}

			if viewAllSettings {
				if len(args) > 0 {
					cmdutil.Fatalf("cannot specify a settings key when using --all")
				}
				s := strings.TrimSuffix(cfg.Render(), "\n")
				fmt.Println(s)
				return
			}

			if len(args) == 0 {
				// No args are only allowed when --all is specified.
				_ = cmd.Usage()
				os.Exit(1)
			}

			val, ok := cfg.GetByKey(args[0])
			if !ok {
				cmdutil.Fatalf("unknown key %q", args[0])
			}
			fmt.Printf("%v\n", val)
		}
	},
	ValidArgsFunction: func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
		if len(args) == 0 {
			// Completing the first argument, the config key
			return autoCompleteConfigKeys(cmd, args, toComplete)
		}
		return nil, cobra.ShellCompDirectiveNoFileComp
	},
}

func init() {
	configCmd.Flags().BoolVar(&viewAllSettings, "all", false, "view all settings")
	configCmd.Flags().BoolVar(&forceApp, "app", false, "set the value for the current app")
	configCmd.Flags().BoolVar(&forceGlobal, "global", false, "set the value at the global level")
	configCmd.MarkFlagsMutuallyExclusive("app", "global")

	root.Cmd.AddCommand(configCmd)
}

// bt renders a backtick-enclosed string.
func bt(val string) string {
	return fmt.Sprintf("`%s`", val)
}


================================================
FILE: cli/cmd/encore/daemon/daemon.go
================================================
package daemon

import (
	"context"
	"database/sql"
	"embed"
	_ "embed" // for go:embed
	"fmt"
	"io"
	"io/fs"
	"net"
	"net/http"
	"net/http/pprof"
	"net/netip"
	"os"
	"os/signal"
	"path/filepath"
	"strconv"
	"strings"
	"syscall"
	"time"

	"github.com/cenkalti/backoff/v4"
	"github.com/cockroachdb/errors"
	"github.com/golang-migrate/migrate/v4"
	"github.com/golang-migrate/migrate/v4/database"
	"github.com/golang-migrate/migrate/v4/database/sqlite3"
	"github.com/golang-migrate/migrate/v4/source/iofs"
	_ "github.com/mattn/go-sqlite3" // for "sqlite3" driver
	"github.com/rs/zerolog"
	"github.com/rs/zerolog/log"
	"google.golang.org/genproto/googleapis/rpc/errdetails"
	"google.golang.org/grpc"
	"google.golang.org/grpc/codes"
	"google.golang.org/grpc/status"

	"encr.dev/cli/daemon"
	"encr.dev/cli/daemon/apps"
	"encr.dev/cli/daemon/dash"
	"encr.dev/cli/daemon/engine"
	"encr.dev/cli/daemon/engine/trace2"
	"encr.dev/cli/daemon/engine/trace2/sqlite"
	"encr.dev/cli/daemon/mcp"
	"encr.dev/cli/daemon/namespace"
	"encr.dev/cli/daemon/objects"
	"encr.dev/cli/daemon/run"
	"encr.dev/cli/daemon/secret"
	"encr.dev/cli/daemon/sqldb"
	"encr.dev/cli/daemon/sqldb/docker"
	"encr.dev/cli/daemon/sqldb/external"
	"encr.dev/internal/conf"
	"encr.dev/internal/env"
	"encr.dev/pkg/eerror"
	"encr.dev/pkg/option"
	"encr.dev/pkg/watcher"
	"encr.dev/pkg/xos"
	daemonpb "encr.dev/proto/encore/daemon"
)

// Main runs the daemon.
func Main() {
	watcher.BumpRLimitSoftToHardLimit()

	if err := redirectLogOutput(); err != nil {
		log.Error().Err(err).Msg("could not setup daemon log file, skipping")
	}
	if err := runMain(); err != nil {
		log.Fatal().Err(err).Msg("daemon failed")
	}
}

func runMain() (err error) {
	ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT)
	defer cancel()

	// exit receives signals from the different subsystems
	// that something went wrong and it's time to exit.
	// Sending nil indicates it's time to gracefully exit.
	exit := make(chan error)

	d := &Daemon{dev: conf.DevDaemon, exit: exit}
	defer handleBailout(&err)
	defer d.closeAll()

	d.init(ctx)
	d.serve()

	select {
	case err := <-exit:
		return err
	case <-ctx.Done():
		return nil
	}
}

// Daemon orchestrates setting up the different daemon subsystems.
type Daemon struct {
	Daemon        *net.UnixListener
	Runtime       *retryingTCPListener
	DBProxy       *retryingTCPListener
	Dash          *retryingTCPListener
	Debug         *retryingTCPListener
	ObjectStorage *retryingTCPListener
	MCP           *retryingTCPListener
	EncoreDB      *sql.DB

	Apps          *apps.Manager
	Secret        *secret.Manager
	RunMgr        *run.Manager
	NS            *namespace.Manager
	ClusterMgr    *sqldb.ClusterManager
	ObjectsMgr    *objects.ClusterManager
	MCPMgr        *mcp.Manager
	PublicBuckets *objects.PublicBucketServer
	Trace         trace2.Store
	Server        *daemon.Server
	dev           bool // whether we're in development mode

	// exit is a channel that shuts down the daemon when sent on.
	// A nil error indicates graceful exit.
	exit chan<- error

	// close are the things to close when exiting.
	close []io.Closer
}

func (d *Daemon) init(ctx context.Context) {
	d.Daemon = d.listenDaemonSocket()
	d.Dash = d.listenTCPRetry("dashboard", env.EncoreDevDashListenAddr(), 9400)
	d.DBProxy = d.listenTCPRetry("dbproxy", option.None[string](), 9500)
	d.Runtime = d.listenTCPRetry("runtime", option.None[string](), 9600)
	d.Debug = d.listenTCPRetry("debug", option.None[string](), 9700)
	d.ObjectStorage = d.listenTCPRetry("objectstorage", env.EncoreObjectStorageListAddr(), 9800)
	d.MCP = d.listenTCPRetry("mcp", env.EncoreMCPSSEListenAddr(), 9900)
	d.EncoreDB = d.openDB()

	d.Apps = apps.NewManager(d.EncoreDB)
	d.close = append(d.close, d.Apps)

	// If ENCORE_SQLDB_HOST is set, use the external cluster instead of
	// creating our own docker container cluster.
	var sqldbDriver sqldb.Driver = &docker.Driver{}
	if host := os.Getenv("ENCORE_SQLDB_HOST"); host != "" {
		sqldbDriver = &external.Driver{
			Host:              host,
			Database:          os.Getenv("ENCORE_SQLDB_DATABASE"),
			SuperuserUsername: os.Getenv("ENCORE_SQLDB_USER"),
			SuperuserPassword: os.Getenv("ENCORE_SQLDB_PASSWORD"),
		}
		log.Info().Msgf("using external postgres cluster: %s", host)
	}

	d.NS = namespace.NewManager(d.EncoreDB)
	d.Secret = secret.New()
	d.ClusterMgr = sqldb.NewClusterManager(sqldbDriver, d.Apps, d.NS, d.Secret)
	d.ObjectsMgr = objects.NewClusterManager(d.NS)
	d.PublicBuckets = objects.NewPublicBucketServer("http://"+d.ObjectStorage.ClientAddr(), d.ObjectsMgr.PersistentStoreFallback)

	traceStore := sqlite.New(d.EncoreDB)
	go traceStore.CleanEvery(ctx, 1*time.Minute, 500, 100, 10000)
	d.Trace = traceStore

	d.RunMgr = &run.Manager{
		RuntimePort:   d.Runtime.Port(),
		DBProxyPort:   d.DBProxy.Port(),
		DashBaseURL:   fmt.Sprintf("http://%s", d.Dash.ClientAddr()),
		Secret:        d.Secret,
		ClusterMgr:    d.ClusterMgr,
		ObjectsMgr:    d.ObjectsMgr,
		PublicBuckets: d.PublicBuckets,
	}
	d.MCPMgr = mcp.NewManager(
		d.Apps,
		d.ClusterMgr,
		d.NS,
		d.Trace,
		d.RunMgr,
		fmt.Sprintf("http://%s", d.MCP.ClientAddr()),
	)

	// Register namespace deletion handlers.
	d.NS.RegisterDeletionHandler(d.ClusterMgr)
	d.NS.RegisterDeletionHandler(d.RunMgr)
	d.NS.RegisterDeletionHandler(d.ObjectsMgr)

	d.Server = daemon.New(d.Apps, d.RunMgr, d.ClusterMgr, d.Secret, d.NS, d.MCPMgr)
}

func (d *Daemon) serve() {
	go d.serveDaemon()
	go d.serveRuntime()
	go d.serveDBProxy()
	go d.serveDash()
	go d.serveDebug()
	go d.serveObjects()
	go d.serveMCP()
}

// listenDaemonSocket listens on the encored.sock UNIX socket
// and arranges to exit when the socket is closed.
func (d *Daemon) listenDaemonSocket() *net.UnixListener {
	userCacheDir, err := os.UserCacheDir()
	if err != nil {
		fatal(err)
	}
	socketPath := filepath.Join(userCacheDir, "encore", "encored.sock")
	if err := os.MkdirAll(filepath.Dir(socketPath), 0755); err != nil {
		fatal(err)
	}

	// If the daemon socket already exists, remove it so we can take over listening.
	if _, err := xos.SocketStat(socketPath); err == nil {
		_ = os.Remove(socketPath)
	}
	ln, err := net.ListenUnix("unix", &net.UnixAddr{Name: socketPath, Net: "unix"})
	if err != nil {
		fatal(err)
	}
	d.closeOnExit(ln)

	// Detect when the socket is closed.
	go func() {
		d.exit <- detectSocketClose(ln, socketPath)
	}()
	return ln
}

func failedPreconditionError(msg, typ, desc string) error {
	st, err := status.New(codes.FailedPrecondition, msg).WithDetails(
		&errdetails.PreconditionFailure{
			Violations: []*errdetails.PreconditionFailure_Violation{
				{
					Type:        typ,
					Description: desc,
				},
			},
		},
	)
	if err != nil {
		panic(err)
	}
	return st.Err()
}

func ErrInterceptor(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
	resp, err = handler(ctx, req)
	if errors.Is(err, conf.ErrInvalidRefreshToken) {
		return nil, failedPreconditionError("invalid refresh token", "INVALID_REFRESH_TOKEN", "invalid refresh token")
	} else if errors.Is(err, conf.ErrNotLoggedIn) {
		return nil, status.Error(codes.Unauthenticated, "not logged in")
	}
	return resp, err
}

func (d *Daemon) serveDaemon() {
	log.Info().Stringer("addr", d.Daemon.Addr()).Msg("serving daemon")
	srv := grpc.NewServer(grpc.UnaryInterceptor(ErrInterceptor))
	daemonpb.RegisterDaemonServer(srv, d.Server)
	d.exit <- srv.Serve(d.Daemon)
}

func (d *Daemon) serveRuntime() {
	log.Info().Stringer("addr", d.Runtime.Addr()).Msg("serving runtime")
	rec := trace2.NewRecorder(d.Trace)
	srv := engine.NewServer(d.RunMgr, rec)
	d.exit <- http.Serve(d.Runtime, srv)
}

func (d *Daemon) serveDBProxy() {
	log.Info().Stringer("addr", d.DBProxy.Addr()).Msg("serving dbproxy")
	d.exit <- d.ClusterMgr.ServeProxy(d.DBProxy)
}

func (d *Daemon) serveMCP() {
	log.Info().Stringer("addr", d.MCP.Addr()).Msg("serving mcp")
	d.exit <- d.MCPMgr.Serve(d.MCP)
}

func (d *Daemon) serveObjects() {
	log.Info().Stringer("addr", d.ObjectStorage.Addr()).Msg("serving object storage")
	d.exit <- d.PublicBuckets.Serve(d.ObjectStorage)
}

func (d *Daemon) serveDash() {
	log.Info().Stringer("addr", d.Dash.Addr()).Msg("serving dash")
	srv := dash.NewServer(d.Apps, d.RunMgr, d.NS, d.Trace, d.Dash.Port())
	d.exit <- http.Serve(d.Dash, srv)
}

func (d *Daemon) serveDebug() {
	log.Info().Stringer("addr", d.Debug.Addr()).Msg("serving debug")

	mux := http.NewServeMux()
	mux.HandleFunc("/debug/pprof/", pprof.Index)
	mux.HandleFunc("/debug/pprof/cmdline", pprof.Cmdline)
	mux.HandleFunc("/debug/pprof/profile", pprof.Profile)
	mux.HandleFunc("/debug/pprof/symbol", pprof.Symbol)
	mux.HandleFunc("/debug/pprof/trace", pprof.Trace)
	d.exit <- http.Serve(d.Debug, mux)
}

// listenTCPRetry listens for TCP connections on the given port, retrying
// in the background if it's already in use.
func (d *Daemon) listenTCPRetry(component string, addrOverride option.Option[string], defaultPort uint16) *retryingTCPListener {
	addr, err := parseInterface(addrOverride.GetOrElse("127.0.0.1:0"))
	if err != nil {
		log.Fatal().Str("component", component).Err(err).Msg("failed to parse interface")
	}
	if addr.Port() == 0 {
		addr = netip.AddrPortFrom(addr.Addr(), defaultPort)
	}
	ln := listenLocalhostTCP(component, addr)
	d.closeOnExit(ln)
	return ln
}

func (d *Daemon) openDB() *sql.DB {
	dir, err := conf.Dir()
	if err != nil {
		fatal(err)
	} else if err := os.MkdirAll(dir, 0755); err != nil {
		fatal(err)
	}

	dbPath := filepath.Join(dir, "encore.db")

	// Create the database file if it doesn't exist, as
	// we've observed some failures to open the database file when it doesn't already exist.
	if _, err := os.Stat(dbPath); os.IsNotExist(err) {
		if f, err := os.OpenFile(dbPath, os.O_CREATE|os.O_WRONLY, 0600); err == nil {
			_ = f.Close()
		}
	}

	db, err := sql.Open("sqlite3", fmt.Sprintf("file:%s?cache=shared&_journal=wal&_txlock=immediate", dbPath))
	if err != nil {
		fatal(err)
	}

	// Initialize db schema
	if err := d.runDBMigrations(db); err != nil {
		fatalf("unable to migrate management database: %v", err)
	}
	d.closeOnExit(db)

	return db
}

//go:embed migrations
var dbMigrations embed.FS

func (d *Daemon) runDBMigrations(db *sql.DB) error {
	{
		// Convert old-style schema definition to golang-migrate, if necessary.
		var isLegacy bool
		err := db.QueryRow(`
			SELECT COUNT(*) > 0 FROM pragma_table_info('schema_migrations') WHERE name = 'dummy'
		`).Scan(&isLegacy)
		if err != nil {
			return err
		} else if isLegacy {
			_, _ = db.Exec("DROP TABLE schema_migrations;")
		}
	}

	src, err := iofs.New(dbMigrations, "migrations")
	if err != nil {
		return fmt.Errorf("read db migrations: %v", err)
	}
	instance, err := sqlite3.WithInstance(db, &sqlite3.Config{})
	if err != nil {
		return fmt.Errorf("initialize migration instance: %v", err)
	}
	m, err := migrate.NewWithInstance("iofs", src, "encore", instance)
	if err != nil {
		return fmt.Errorf("setup migrate instance: %v", err)
	}

	err = m.Up()
	if errors.Is(err, migrate.ErrNoChange) {
		return nil
	}

	// If we have a dirty migration, reset the dirty flag and try again.
	// This is safe since all migrations run inside transactions.
	var dirty migrate.ErrDirty
	if errors.As(err, &dirty) {
		// Find the version that preceded the dirty version so
		// we can force the migration to that version and then
		// re-apply the migration.
		var prevVer uint
		prevVer, err = src.Prev(uint(dirty.Version))
		targetVer := int(prevVer)
		if errors.Is(err, fs.ErrNotExist) {
			// No previous migration exists
			targetVer = database.NilVersion
		} else if err != nil {
			return errors.Wrap(err, "failed to find previous version")
		}

		if err = m.Force(targetVer); err == nil {
			err = m.Up()
		}
	}

	return err
}

// detectSocketClose polls for the unix socket at socketPath to be removed
// or changed to a different underlying ino
Download .txt
gitextract_3htyukto/

├── .devcontainer/
│   ├── Dockerfile
│   ├── devcontainer.json
│   └── scripts/
│       ├── godeps.sh
│       ├── install.sh
│       └── prepare.sh
├── .github/
│   ├── DISCUSSION_TEMPLATE/
│   │   ├── help.yml
│   │   └── suggestions.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── Bug_report.yml
│   │   └── config.yml
│   ├── dockerimg/
│   │   ├── Dockerfile
│   │   ├── encore-entrypoint.bash
│   │   └── rename-binary-if-needed.bash
│   ├── minimum-reproduction.md
│   └── workflows/
│       ├── ci.yml
│       ├── makefile
│       ├── release-2.yml
│       ├── release.yml
│       ├── semgrep-to-rdjson.jq
│       └── staticcheck-to-rdjsonl.jq
├── .gitignore
├── .prettierrc.toml
├── .reviewdog.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── Cargo.toml
├── Cross.toml
├── LICENSE
├── README.md
├── check.bash
├── cli/
│   ├── cmd/
│   │   ├── encore/
│   │   │   ├── app/
│   │   │   │   ├── app.go
│   │   │   │   ├── clone.go
│   │   │   │   ├── create.go
│   │   │   │   ├── create_form.go
│   │   │   │   ├── create_test.go
│   │   │   │   ├── initialize.go
│   │   │   │   └── link.go
│   │   │   ├── auth/
│   │   │   │   └── auth.go
│   │   │   ├── bits/
│   │   │   │   ├── add.go
│   │   │   │   ├── api.go
│   │   │   │   ├── bits.go
│   │   │   │   └── list.go
│   │   │   ├── build.go
│   │   │   ├── check.go
│   │   │   ├── cmdutil/
│   │   │   │   ├── autocompletes.go
│   │   │   │   ├── cmdutil.go
│   │   │   │   ├── daemon.go
│   │   │   │   ├── forms.go
│   │   │   │   ├── language.go
│   │   │   │   ├── output.go
│   │   │   │   └── stream.go
│   │   │   ├── config/
│   │   │   │   └── config.go
│   │   │   ├── daemon/
│   │   │   │   ├── daemon.go
│   │   │   │   └── migrations/
│   │   │   │       ├── 1_initial_schema.up.sql
│   │   │   │       ├── 2_infra_namespaces.up.sql
│   │   │   │       ├── 3_test_tracing.up.sql
│   │   │   │       ├── 4_add_parent_span_id.up.sql
│   │   │   │       └── 5_add_caller_event_id.up.sql
│   │   │   ├── daemon.go
│   │   │   ├── db.go
│   │   │   ├── debug.go
│   │   │   ├── deploy.go
│   │   │   ├── exec.go
│   │   │   ├── gen.go
│   │   │   ├── init_windows.go
│   │   │   ├── k8s/
│   │   │   │   ├── auth.go
│   │   │   │   ├── config.go
│   │   │   │   ├── kubernetes.go
│   │   │   │   └── types/
│   │   │   │       ├── KUBERNETES_LICENSE.txt
│   │   │   │       ├── README.md
│   │   │   │       ├── clientauthentication_types.go
│   │   │   │       ├── homedir.go
│   │   │   │       ├── meta_types.go
│   │   │   │       └── runtime_types.go
│   │   │   ├── llm_rules/
│   │   │   │   ├── init.go
│   │   │   │   ├── llm_rules.go
│   │   │   │   └── tool.go
│   │   │   ├── logs.go
│   │   │   ├── main.go
│   │   │   ├── mcp.go
│   │   │   ├── namespace/
│   │   │   │   └── namespace.go
│   │   │   ├── rand.go
│   │   │   ├── root/
│   │   │   │   └── rootcmd.go
│   │   │   ├── run.go
│   │   │   ├── secrets/
│   │   │   │   ├── archive.go
│   │   │   │   ├── delete.go
│   │   │   │   ├── list.go
│   │   │   │   ├── secrets.go
│   │   │   │   └── set.go
│   │   │   ├── sqlc.go
│   │   │   ├── telemetry.go
│   │   │   ├── test.go
│   │   │   └── version.go
│   │   ├── git-remote-encore/
│   │   │   └── main.go
│   │   └── tsbundler-encore/
│   │       └── main.go
│   ├── daemon/
│   │   ├── apps/
│   │   │   └── apps.go
│   │   ├── check.go
│   │   ├── common.go
│   │   ├── create.go
│   │   ├── daemon.go
│   │   ├── dash/
│   │   │   ├── ai/
│   │   │   │   ├── assembler.go
│   │   │   │   ├── client.go
│   │   │   │   ├── codegen.go
│   │   │   │   ├── conv.go
│   │   │   │   ├── manager.go
│   │   │   │   ├── overlay.go
│   │   │   │   ├── parser.go
│   │   │   │   ├── sql.go
│   │   │   │   ├── types.go
│   │   │   │   └── types_test.go
│   │   │   ├── apiproxy/
│   │   │   │   └── apiproxy.go
│   │   │   ├── dash.go
│   │   │   ├── dash_test.go
│   │   │   ├── dashproxy/
│   │   │   │   └── dashproxy.go
│   │   │   ├── dbbrowser.go
│   │   │   └── server.go
│   │   ├── db.go
│   │   ├── debug.go
│   │   ├── engine/
│   │   │   ├── runtime.go
│   │   │   ├── trace/
│   │   │   │   ├── parse_test.go
│   │   │   │   └── trace.go
│   │   │   └── trace2/
│   │   │       ├── recorder.go
│   │   │       ├── sqlite/
│   │   │       │   ├── read.go
│   │   │       │   └── write.go
│   │   │       └── store.go
│   │   ├── exec_script.go
│   │   ├── export/
│   │   │   ├── download.go
│   │   │   ├── export.go
│   │   │   └── infra_config.go
│   │   ├── export.go
│   │   ├── internal/
│   │   │   ├── runlog/
│   │   │   │   └── runlog.go
│   │   │   └── sym/
│   │   │       ├── sym.go
│   │   │       ├── sym_darwin.go
│   │   │       ├── sym_elf.go
│   │   │       └── sym_windows.go
│   │   ├── mcp/
│   │   │   ├── api_tools.go
│   │   │   ├── bucket_tools.go
│   │   │   ├── cache_tools.go
│   │   │   ├── cron_tools.go
│   │   │   ├── db_tools.go
│   │   │   ├── docs_tools.go
│   │   │   ├── mcp.go
│   │   │   ├── metrics_tools.go
│   │   │   ├── pubsub_tools.go
│   │   │   ├── schema_json.go
│   │   │   ├── secret_tools.go
│   │   │   ├── src_tools.go
│   │   │   ├── trace_tools.go
│   │   │   └── util.go
│   │   ├── namespace/
│   │   │   └── namespace.go
│   │   ├── namespace.go
│   │   ├── objects/
│   │   │   ├── manager.go
│   │   │   ├── objects.go
│   │   │   └── public.go
│   │   ├── pubsub/
│   │   │   ├── nsq.go
│   │   │   └── utils.go
│   │   ├── redis/
│   │   │   └── redis.go
│   │   ├── run/
│   │   │   ├── call.go
│   │   │   ├── check.go
│   │   │   ├── errors.go
│   │   │   ├── exec_command.go
│   │   │   ├── exec_script.go
│   │   │   ├── http.go
│   │   │   ├── infra/
│   │   │   │   ├── encorecloudtesting.go
│   │   │   │   └── infra.go
│   │   │   ├── manager.go
│   │   │   ├── nsq_names.go
│   │   │   ├── proc_groups.go
│   │   │   ├── run.go
│   │   │   ├── runtime_config2.go
│   │   │   ├── tests.go
│   │   │   └── watch.go
│   │   ├── run.go
│   │   ├── schema.go
│   │   ├── secret/
│   │   │   └── secret.go
│   │   ├── sqldb/
│   │   │   ├── cluster.go
│   │   │   ├── db.go
│   │   │   ├── db_test.go
│   │   │   ├── docker/
│   │   │   │   └── docker.go
│   │   │   ├── driver.go
│   │   │   ├── external/
│   │   │   │   └── external.go
│   │   │   ├── manager.go
│   │   │   ├── migrate.go
│   │   │   ├── proxy.go
│   │   │   ├── remote.go
│   │   │   └── utils.go
│   │   ├── telemetry.go
│   │   ├── test.go
│   │   ├── tracing.go
│   │   ├── userfacing.go
│   │   └── watch.go
│   └── internal/
│       ├── browser/
│       │   └── browser.go
│       ├── bubbles/
│       │   ├── checklist/
│       │   │   └── checklist.go
│       │   └── selector/
│       │       └── selector.go
│       ├── dedent/
│       │   ├── dedent.go
│       │   └── dedent_test.go
│       ├── gosym/
│       │   ├── pclntab.go
│       │   ├── symtab.go
│       │   ├── symtab_test.go
│       │   └── testdata/
│       │       ├── main.go
│       │       ├── pclinetest.h
│       │       └── pclinetest.s
│       ├── jsonrpc2/
│       │   ├── conn.go
│       │   ├── handler.go
│       │   ├── jsonrpc2.go
│       │   ├── jsonrpc2_test.go
│       │   ├── messages.go
│       │   ├── serve.go
│       │   ├── serve_test.go
│       │   ├── servertest/
│       │   │   ├── servertest.go
│       │   │   └── servertest_test.go
│       │   ├── stream.go
│       │   ├── wire.go
│       │   └── wire_test.go
│       ├── login/
│       │   ├── deviceauth.go
│       │   ├── interactive.go
│       │   └── login.go
│       ├── manifest/
│       │   └── manifest.go
│       ├── onboarding/
│       │   └── onboarding.go
│       ├── platform/
│       │   ├── api.go
│       │   ├── client.go
│       │   ├── gql/
│       │   │   ├── app.go
│       │   │   ├── env.go
│       │   │   └── secrets.go
│       │   ├── jsoniter_ext.go
│       │   ├── jsoniter_ext_test.go
│       │   ├── login.go
│       │   └── secrets.go
│       ├── telemetry/
│       │   └── telemetry.go
│       └── update/
│           └── update.go
├── clippy.toml
├── context7.json
├── docs/
│   ├── go/
│   │   ├── ai-integration.md
│   │   ├── cli/
│   │   │   ├── cli-reference.md
│   │   │   ├── client-generation.md
│   │   │   ├── config-reference.md
│   │   │   ├── infra-namespaces.md
│   │   │   ├── mcp.md
│   │   │   └── telemetry.md
│   │   ├── community/
│   │   │   ├── contribute.md
│   │   │   ├── get-involved.md
│   │   │   ├── open-source.md
│   │   │   ├── principles.md
│   │   │   └── submit-template.md
│   │   ├── concepts/
│   │   │   ├── application-model.md
│   │   │   └── benefits.md
│   │   ├── develop/
│   │   │   ├── api-docs.md
│   │   │   ├── auth.md
│   │   │   ├── config.md
│   │   │   ├── cors.md
│   │   │   ├── env-vars.md
│   │   │   ├── metadata.md
│   │   │   ├── middleware.md
│   │   │   ├── mocking.md
│   │   │   ├── testing.md
│   │   │   └── validation.md
│   │   ├── faq.md
│   │   ├── how-to/
│   │   │   ├── atlas-gorm.md
│   │   │   ├── auth0-auth.md
│   │   │   ├── break-up-monolith.md
│   │   │   ├── cgo.md
│   │   │   ├── clerk-auth.md
│   │   │   ├── debug.md
│   │   │   ├── dependency-injection.md
│   │   │   ├── entgo-orm.md
│   │   │   ├── firebase-auth.md
│   │   │   ├── grpc-connect.md
│   │   │   ├── http-requests.md
│   │   │   ├── integrate-frontend.mdx
│   │   │   ├── logto-auth.md
│   │   │   ├── pubsub-outbox.md
│   │   │   └── temporal.md
│   │   ├── install.md
│   │   ├── migration/
│   │   │   ├── ai-migration.mdx
│   │   │   └── migrate-away.md
│   │   ├── observability/
│   │   │   ├── dev-dash.md
│   │   │   ├── encore-flow.md
│   │   │   ├── logging.md
│   │   │   ├── metrics.md
│   │   │   ├── service-catalog.md
│   │   │   └── tracing.md
│   │   ├── overview.md
│   │   ├── primitives/
│   │   │   ├── api-calls.md
│   │   │   ├── api-errors.md
│   │   │   ├── api-schemas.md
│   │   │   ├── app-structure.md
│   │   │   ├── caching.md
│   │   │   ├── change-db-schema.md
│   │   │   ├── code-snippets.md
│   │   │   ├── connect-existing-db.md
│   │   │   ├── cron-jobs.md
│   │   │   ├── database-extensions.md
│   │   │   ├── database-troubleshooting.md
│   │   │   ├── databases.md
│   │   │   ├── defining-apis.md
│   │   │   ├── insert-test-data-db.md
│   │   │   ├── object-storage.md
│   │   │   ├── pubsub.md
│   │   │   ├── raw-endpoints.md
│   │   │   ├── secrets.md
│   │   │   ├── service-structs.md
│   │   │   ├── services.md
│   │   │   └── share-db-between-services.md
│   │   ├── quick-start.mdx
│   │   ├── self-host/
│   │   │   ├── ci-cd.md
│   │   │   ├── configure-infra.md
│   │   │   ├── deploy-to-digital-ocean-wip.md
│   │   │   └── self-host.md
│   │   └── tutorials/
│   │       ├── booking-system.mdx
│   │       ├── graphql.mdx
│   │       ├── incident-management-tool.md
│   │       ├── meeting-notes.mdx
│   │       ├── rest-api.mdx
│   │       ├── slack-bot.md
│   │       └── uptime.md
│   ├── menu.cue
│   ├── platform/
│   │   ├── ai-integration.md
│   │   ├── deploy/
│   │   │   ├── deploying.md
│   │   │   ├── environments.md
│   │   │   ├── own-cloud.md
│   │   │   ├── preview-environments.md
│   │   │   └── security.md
│   │   ├── infrastructure/
│   │   │   ├── aws.md
│   │   │   ├── cloudflare.md
│   │   │   ├── configuration.md
│   │   │   ├── configure-kubectl.md
│   │   │   ├── configure-network.md
│   │   │   ├── gcp.md
│   │   │   ├── import-cloud-sql.md
│   │   │   ├── import-kubernetes-cluster.md
│   │   │   ├── import-project.md
│   │   │   ├── import-rds.md
│   │   │   ├── infra.md
│   │   │   ├── kubernetes.md
│   │   │   ├── manage-db-users.md
│   │   │   └── neon.md
│   │   ├── integrations/
│   │   │   ├── api-reference.md
│   │   │   ├── auth-keys.md
│   │   │   ├── custom-domains.md
│   │   │   ├── github.md
│   │   │   ├── oauth-clients.md
│   │   │   ├── terraform.md
│   │   │   └── webhooks.md
│   │   ├── introduction.md
│   │   ├── management/
│   │   │   ├── billing.md
│   │   │   ├── compliance.md
│   │   │   ├── permissions.md
│   │   │   ├── telemetry.md
│   │   │   └── usage.md
│   │   ├── migration/
│   │   │   ├── migrate-away.md
│   │   │   ├── migrate-to-encore.md
│   │   │   └── try-encore.md
│   │   ├── observability/
│   │   │   ├── encore-flow.md
│   │   │   ├── metrics.md
│   │   │   ├── service-catalog.md
│   │   │   └── tracing.md
│   │   ├── other/
│   │   │   ├── vs-heroku.md
│   │   │   ├── vs-supabase.md
│   │   │   └── vs-terraform.md
│   │   └── overview.md
│   └── ts/
│       ├── ai-integration.md
│       ├── cli/
│       │   ├── cli-reference.md
│       │   ├── client-generation.md
│       │   ├── config-reference.md
│       │   ├── infra-namespaces.md
│       │   ├── mcp.md
│       │   └── telemetry.md
│       ├── community/
│       │   ├── contribute.md
│       │   ├── get-involved.md
│       │   ├── open-source.md
│       │   ├── principles.md
│       │   └── submit-template.md
│       ├── concepts/
│       │   ├── application-model.md
│       │   ├── benefits.md
│       │   └── hello-world.md
│       ├── develop/
│       │   ├── auth.md
│       │   ├── debug.md
│       │   ├── env-vars.md
│       │   ├── integrations/
│       │   │   ├── better-auth.md
│       │   │   ├── polar.md
│       │   │   └── resend.md
│       │   ├── metadata.md
│       │   ├── middleware.md
│       │   ├── monorepo/
│       │   │   ├── nx.md
│       │   │   └── turborepo.md
│       │   ├── multithreading.md
│       │   ├── orms/
│       │   │   ├── drizzle.md
│       │   │   ├── knex.md
│       │   │   ├── overview.md
│       │   │   ├── prisma.md
│       │   │   └── sequelize.md
│       │   ├── running-scripts.md
│       │   └── testing.md
│       ├── faq.md
│       ├── frontend/
│       │   ├── cors.md
│       │   ├── hosting.mdx
│       │   ├── mono-vs-multi-repo.mdx
│       │   ├── request-client.mdx
│       │   └── template-engine.md
│       ├── how-to/
│       │   ├── file-uploads.md
│       │   └── nestjs.md
│       ├── install.md
│       ├── migration/
│       │   ├── ai-migration.mdx
│       │   ├── express-migration.md
│       │   └── migrate-away.md
│       ├── observability/
│       │   ├── dev-dash.md
│       │   ├── flow.md
│       │   ├── logging.md
│       │   ├── metrics.md
│       │   ├── service-catalog.md
│       │   └── tracing.md
│       ├── overview.md
│       ├── primitives/
│       │   ├── api-calls.mdx
│       │   ├── app-structure.md
│       │   ├── caching.md
│       │   ├── cookies.mdx
│       │   ├── cron-jobs.md
│       │   ├── database-extensions.md
│       │   ├── databases.md
│       │   ├── defining-apis.mdx
│       │   ├── errors.md
│       │   ├── graphql.mdx
│       │   ├── object-storage.md
│       │   ├── pubsub.md
│       │   ├── raw-endpoints.mdx
│       │   ├── secrets.md
│       │   ├── services.mdx
│       │   ├── static-assets.mdx
│       │   ├── streaming-apis.mdx
│       │   ├── types.mdx
│       │   └── validation.mdx
│       ├── quick-start.mdx
│       ├── self-host/
│       │   ├── build.md
│       │   ├── ci-cd.md
│       │   ├── configure-infra.md
│       │   ├── deploy-to-digital-ocean.md
│       │   └── deploy-to-railway.md
│       └── tutorials/
│           ├── graphql.mdx
│           ├── rest-api.mdx
│           ├── slack-bot.md
│           └── uptime.md
├── e2e-tests/
│   ├── README.md
│   ├── app_test.go
│   ├── echo_app_test.go
│   ├── testdata/
│   │   ├── echo/
│   │   │   ├── .gitignore
│   │   │   ├── cache/
│   │   │   │   └── cache.go
│   │   │   ├── di/
│   │   │   │   └── di.go
│   │   │   ├── echo/
│   │   │   │   ├── config.cue
│   │   │   │   ├── config.go
│   │   │   │   ├── config_test.go
│   │   │   │   ├── echo.go
│   │   │   │   └── echo_test.go
│   │   │   ├── empty_cfg/
│   │   │   │   └── service.go
│   │   │   ├── encore.app
│   │   │   ├── endtoend/
│   │   │   │   └── endtoend.go
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── middleware/
│   │   │   │   ├── middleware.go
│   │   │   │   └── middleware_test.go
│   │   │   ├── test/
│   │   │   │   └── endpoints.go
│   │   │   └── validation/
│   │   │       └── validation.go
│   │   ├── echo_client/
│   │   │   ├── .eslintrc.cjs
│   │   │   ├── .gitignore
│   │   │   ├── go.mod
│   │   │   ├── go.sum
│   │   │   ├── golang/
│   │   │   │   └── client/
│   │   │   │       └── goclient.go
│   │   │   ├── js/
│   │   │   │   ├── client.js
│   │   │   │   └── main.js
│   │   │   ├── main.go
│   │   │   ├── package.json
│   │   │   ├── ts/
│   │   │   │   ├── client.ts
│   │   │   │   └── main.ts
│   │   │   └── tsconfig.json
│   │   ├── testscript/
│   │   │   ├── encore_currentrequest.txt
│   │   │   ├── et_mocking.txt
│   │   │   ├── et_override_user.txt
│   │   │   ├── et_override_user_authdata.txt
│   │   │   ├── experiment_local_secrets_override.txtar
│   │   │   ├── fallback_routes.txt
│   │   │   ├── graceful_shutdown.txt
│   │   │   ├── pubsub_method_handler.txt
│   │   │   ├── pubsub_ref.txt
│   │   │   ├── ts_hello.txt
│   │   │   └── ts_worker_pooling.txt
│   │   └── tsapp/
│   │       ├── .gitignore
│   │       ├── encore.app
│   │       ├── package.json
│   │       ├── service1/
│   │       │   ├── api.test.ts
│   │       │   ├── api.ts
│   │       │   └── encore.service.ts
│   │       ├── service2/
│   │       │   ├── api.test.ts
│   │       │   ├── api.ts
│   │       │   └── encore.service.ts
│   │       ├── tsconfig.json
│   │       └── vite.config.ts
│   ├── testscript_test.go
│   └── ts_app_test.go
├── go.mod
├── go.sum
├── go_llm_instructions.txt
├── internal/
│   ├── conf/
│   │   └── conf.go
│   ├── env/
│   │   └── env.go
│   ├── etrace/
│   │   ├── etrace.go
│   │   ├── gid.go
│   │   └── protocol.go
│   ├── gocodegen/
│   │   ├── helpers.go
│   │   ├── marshalling.go
│   │   └── package.go
│   ├── goldfish/
│   │   └── goldfish.go
│   ├── httpcache/
│   │   ├── LICENSE.txt
│   │   ├── README.md
│   │   ├── diskcache/
│   │   │   ├── diskcache.go
│   │   │   └── diskcache_test.go
│   │   ├── httpcache.go
│   │   ├── httpcache_test.go
│   │   └── test/
│   │       ├── test.go
│   │       └── test_test.go
│   ├── lookpath/
│   │   └── lookpath.go
│   ├── optracker/
│   │   ├── async.go
│   │   └── optracker.go
│   ├── userconfig/
│   │   ├── config.go
│   │   ├── def.go
│   │   ├── docs.go
│   │   ├── files.go
│   │   ├── gendocs/
│   │   │   └── gendocs.go
│   │   ├── reflect.go
│   │   ├── value.go
│   │   └── write.go
│   └── version/
│       └── version.go
├── miniredis/
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── MINIREDIS_LICENSE.txt
│   ├── src/
│   │   ├── bin/
│   │   │   └── miniredis-rs-server.rs
│   │   ├── cmd/
│   │   │   ├── client.rs
│   │   │   ├── cluster.rs
│   │   │   ├── connection.rs
│   │   │   ├── generic.rs
│   │   │   ├── geo.rs
│   │   │   ├── hash.rs
│   │   │   ├── hll.rs
│   │   │   ├── list.rs
│   │   │   ├── mod.rs
│   │   │   ├── object.rs
│   │   │   ├── pubsub.rs
│   │   │   ├── scripting.rs
│   │   │   ├── server.rs
│   │   │   ├── set.rs
│   │   │   ├── sorted_set.rs
│   │   │   ├── stream.rs
│   │   │   ├── string.rs
│   │   │   └── transactions.rs
│   │   ├── connection.rs
│   │   ├── db.rs
│   │   ├── dispatch.rs
│   │   ├── error.rs
│   │   ├── frame.rs
│   │   ├── geo.rs
│   │   ├── hll.rs
│   │   ├── keys.rs
│   │   ├── lib.rs
│   │   ├── pubsub.rs
│   │   ├── server.rs
│   │   └── types.rs
│   └── tests/
│       ├── cmd_auth.rs
│       ├── cmd_bit.rs
│       ├── cmd_client.rs
│       ├── cmd_cluster.rs
│       ├── cmd_connection.rs
│       ├── cmd_generic.rs
│       ├── cmd_geo.rs
│       ├── cmd_hash.rs
│       ├── cmd_hll.rs
│       ├── cmd_list.rs
│       ├── cmd_misc.rs
│       ├── cmd_pubsub.rs
│       ├── cmd_resp3.rs
│       ├── cmd_scripting.rs
│       ├── cmd_server.rs
│       ├── cmd_set.rs
│       ├── cmd_sorted_set.rs
│       ├── cmd_stream.rs
│       ├── cmd_string.rs
│       ├── cmd_tls.rs
│       ├── cmd_transactions.rs
│       ├── direct_api.rs
│       ├── helpers/
│       │   └── mod.rs
│       ├── integration-go/
│       │   ├── Makefile
│       │   ├── README.md
│       │   ├── cluster_test.go
│       │   ├── command_test.go
│       │   ├── connection_test.go
│       │   ├── ephemeral.go
│       │   ├── generic_test.go
│       │   ├── geo_test.go
│       │   ├── go.mod
│       │   ├── go.sum
│       │   ├── hash_test.go
│       │   ├── hll_test.go
│       │   ├── list_test.go
│       │   ├── pubsub_test.go
│       │   ├── script_test.go
│       │   ├── server_test.go
│       │   ├── set_test.go
│       │   ├── sorted_set_test.go
│       │   ├── stream_test.go
│       │   ├── string_test.go
│       │   ├── test.go
│       │   ├── tls.go
│       │   └── tx_test.go
│       └── smoke.rs
├── parser/
│   └── encoding/
│       └── rpc.go
├── pkg/
│   ├── ansi/
│   │   └── ansi.go
│   ├── appfile/
│   │   └── appfile.go
│   ├── bits/
│   │   ├── bits.go
│   │   └── download.go
│   ├── builder/
│   │   ├── builder.go
│   │   └── builderimpl/
│   │       └── builders.go
│   ├── clientgen/
│   │   ├── client.go
│   │   ├── client_test.go
│   │   ├── clientgentypes/
│   │   │   └── clientgentypes.go
│   │   ├── errors.go
│   │   ├── golang.go
│   │   ├── javascript.go
│   │   ├── openapi/
│   │   │   ├── openapi.go
│   │   │   └── schema.go
│   │   ├── testdata/
│   │   │   ├── README.md
│   │   │   ├── goapp/
│   │   │   │   ├── expected_baseauth_golang.go
│   │   │   │   ├── expected_baseauth_javascript.js
│   │   │   │   ├── expected_baseauth_openapi.json
│   │   │   │   ├── expected_baseauth_typescript.ts
│   │   │   │   ├── expected_golang.go
│   │   │   │   ├── expected_httpstatus_golang.go
│   │   │   │   ├── expected_httpstatus_typescript.ts
│   │   │   │   ├── expected_javascript.js
│   │   │   │   ├── expected_noauth_golang.go
│   │   │   │   ├── expected_noauth_javascript.js
│   │   │   │   ├── expected_noauth_openapi.json
│   │   │   │   ├── expected_noauth_typescript.ts
│   │   │   │   ├── expected_openapi.json
│   │   │   │   ├── expected_typescript.ts
│   │   │   │   ├── input.go
│   │   │   │   ├── input_baseauth.go
│   │   │   │   ├── input_httpstatus.go
│   │   │   │   ├── input_noauth.go
│   │   │   │   └── tsconfig.json
│   │   │   └── tsapp/
│   │   │       ├── expected_decimal_golang.go
│   │   │       ├── expected_decimal_javascript.js
│   │   │       ├── expected_decimal_openapi.json
│   │   │       ├── expected_decimal_typescript.ts
│   │   │       ├── expected_golang.go
│   │   │       ├── expected_httpstatus_golang.go
│   │   │       ├── expected_httpstatus_typescript.ts
│   │   │       ├── expected_javascript.js
│   │   │       ├── expected_list_of_union_javascript.js
│   │   │       ├── expected_list_of_union_openapi.json
│   │   │       ├── expected_list_of_union_shared.ts
│   │   │       ├── expected_list_of_union_typescript.ts
│   │   │       ├── expected_openapi.json
│   │   │       ├── expected_shared.ts
│   │   │       ├── expected_stream_javascript.js
│   │   │       ├── expected_stream_shared.ts
│   │   │       ├── expected_stream_typescript.ts
│   │   │       ├── expected_typescript.ts
│   │   │       ├── input.ts
│   │   │       ├── input_decimal.ts
│   │   │       ├── input_httpstatus.ts
│   │   │       ├── input_list_of_union.ts
│   │   │       ├── input_stream.ts
│   │   │       └── tsconfig.json
│   │   ├── types.go
│   │   ├── typescript.go
│   │   └── utils.go
│   ├── cueutil/
│   │   ├── build.go
│   │   └── types.go
│   ├── dockerbuild/
│   │   ├── dockerbuild.go
│   │   ├── dockerbuild_test.go
│   │   ├── features.go
│   │   ├── manifest.go
│   │   ├── spec.go
│   │   ├── spec_test.go
│   │   └── tarcopy.go
│   ├── editors/
│   │   ├── LICENSE
│   │   ├── doc.go
│   │   ├── encore_names.go
│   │   ├── encore_urls.go
│   │   ├── launch.go
│   │   ├── lookup.go
│   │   ├── lookup_darwin.go
│   │   ├── lookup_linux.go
│   │   ├── lookup_test.go
│   │   ├── lookup_unsupported.go
│   │   ├── lookup_windows.go
│   │   └── utils.go
│   ├── eerror/
│   │   ├── error.go
│   │   ├── stack.go
│   │   └── zerolog.go
│   ├── emulators/
│   │   └── storage/
│   │       ├── LICENSE
│   │       ├── gcsemu/
│   │       │   ├── batch.go
│   │       │   ├── client.go
│   │       │   ├── errors.go
│   │       │   ├── filestore.go
│   │       │   ├── filestore_test.go
│   │       │   ├── gcsemu.go
│   │       │   ├── gcsemu_test.go
│   │       │   ├── http_wrappers.go
│   │       │   ├── memstore.go
│   │       │   ├── memstore_test.go
│   │       │   ├── meta.go
│   │       │   ├── multipart.go
│   │       │   ├── parse.go
│   │       │   ├── range.go
│   │       │   ├── range_test.go
│   │       │   ├── raw_http_test.go
│   │       │   ├── remote_test.go
│   │       │   ├── server.go
│   │       │   ├── store.go
│   │       │   ├── util.go
│   │       │   └── walk.go
│   │       └── gcsutil/
│   │           ├── counted_lock.go
│   │           ├── doc.go
│   │           ├── gcspagetoken.go
│   │           ├── gcspagetoken.pb.go
│   │           ├── gcspagetoken.proto
│   │           ├── gcspagetoken_test.go
│   │           ├── transient_lock_map.go
│   │           └── transient_lock_map_test.go
│   ├── encorebuild/
│   │   ├── buildconf/
│   │   │   └── config.go
│   │   ├── buildutil/
│   │   │   └── buildutil.go
│   │   ├── cmd/
│   │   │   ├── build-local-binary/
│   │   │   │   └── build-local-binary.go
│   │   │   └── make-release/
│   │   │       └── make-release.go
│   │   ├── compile/
│   │   │   └── compile.go
│   │   ├── dist_builder.go
│   │   ├── gentypedefs/
│   │   │   ├── gentypedefs.go
│   │   │   └── napi.cjs.tmpl
│   │   ├── githubrelease/
│   │   │   └── githubrelease.go
│   │   ├── jsruntimebuild.go
│   │   ├── supervisorbuild.go
│   │   └── windows/
│   │       ├── .gitignore
│   │       ├── build.bat
│   │       ├── manifest.xml
│   │       └── resources.rc
│   ├── environ/
│   │   └── environ.go
│   ├── errinsrc/
│   │   ├── characters.go
│   │   ├── errinsrc.go
│   │   ├── internal/
│   │   │   ├── cuelocation.go
│   │   │   ├── golocation.go
│   │   │   ├── helper.go
│   │   │   └── location.go
│   │   ├── list.go
│   │   ├── setup_test.go
│   │   ├── srcerrors/
│   │   │   ├── errors.go
│   │   │   ├── helpers.go
│   │   │   └── helptext.go
│   │   ├── srcrender.go
│   │   ├── srcrender_test.go
│   │   ├── stack.go
│   │   ├── stack_dev.go
│   │   ├── stack_release.go
│   │   ├── testdata/
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__on_following_lines_ascii.golden
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__on_following_lines_unicode.golden
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__on_same_line_ascii.golden
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__on_same_line_unicode.golden
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__spaced_apart_ascii.golden
│   │   │   ├── Test_renderSrc_MultipleSeperateInSameFile__spaced_apart_unicode.golden
│   │   │   ├── Test_renderSrc_MutlilineError_ascii.golden
│   │   │   ├── Test_renderSrc_MutlilineError_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__error_no_text_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__error_no_text_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__multiline_message_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__multiline_message_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__simple_error_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__simple_error_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__simple_help_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__simple_help_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__simple_warning_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__simple_warning_unicode.golden
│   │   │   ├── Test_renderSrc_Simple__single_character_error_ascii.golden
│   │   │   ├── Test_renderSrc_Simple__single_character_error_unicode.golden
│   │   │   ├── test.cue
│   │   │   └── test.go
│   │   └── utils.go
│   ├── errlist/
│   │   └── errlist.go
│   ├── errors/
│   │   ├── locations.go
│   │   ├── range.go
│   │   ├── template.go
│   │   └── utils.go
│   ├── fns/
│   │   └── fns.go
│   ├── github/
│   │   └── github.go
│   ├── golden/
│   │   └── golden.go
│   ├── idents/
│   │   ├── identifiers.go
│   │   └── identifiers_test.go
│   ├── jsonext/
│   │   ├── listencoder.go
│   │   ├── listencoder_test.go
│   │   └── protojson.go
│   ├── logging/
│   │   └── zerolog_adapter.go
│   ├── make-release/
│   │   ├── compilers.go
│   │   ├── dist_builder.go
│   │   ├── js_packager.go
│   │   ├── make-release.go
│   │   ├── utils.go
│   │   └── windows/
│   │       ├── .gitignore
│   │       ├── build.bat
│   │       ├── manifest.xml
│   │       └── resources.rc
│   ├── metascrub/
│   │   ├── metascrub.go
│   │   └── metascrub_test.go
│   ├── namealloc/
│   │   ├── namealloc.go
│   │   └── namealloc_test.go
│   ├── noopgateway/
│   │   ├── noopgateway.go
│   │   └── retry_dialer.go
│   ├── noopgwdesc/
│   │   └── gateway.go
│   ├── option/
│   │   ├── option.go
│   │   └── pkgfn.go
│   ├── paths/
│   │   └── paths.go
│   ├── pgproxy/
│   │   ├── README.md
│   │   ├── pgproxy.go
│   │   └── scram.go
│   ├── promise/
│   │   └── prom.go
│   ├── rtconfgen/
│   │   ├── base_builder.go
│   │   ├── convert.go
│   │   ├── infra_builder.go
│   │   └── resource_map.go
│   ├── supervisor/
│   │   ├── cmd/
│   │   │   └── supervisor-encore/
│   │   │       └── main.go
│   │   └── supervisor.go
│   ├── svcproxy/
│   │   ├── dialer.go
│   │   ├── doc.go
│   │   └── svcproxy.go
│   ├── tarstream/
│   │   ├── LICENSE
│   │   ├── datavec.go
│   │   ├── datavec_test.go
│   │   ├── tarstream.go
│   │   └── tarstream_test.go
│   ├── traceparser/
│   │   ├── binreader.go
│   │   ├── parser.go
│   │   └── parser_test.go
│   ├── vcs/
│   │   ├── app.go
│   │   └── vcs.go
│   ├── vfs/
│   │   ├── directory.go
│   │   ├── doc.go
│   │   ├── file.go
│   │   ├── node.go
│   │   ├── testdata/
│   │   │   └── filteredglob/
│   │   │       ├── blahsvc/
│   │   │       │   ├── another.json
│   │   │       │   └── test.json
│   │   │       ├── foosystem/
│   │   │       │   ├── README.md
│   │   │       │   ├── anotherservice/
│   │   │       │   │   └── test.txt
│   │   │       │   └── barservice/
│   │   │       │       ├── blah.json
│   │   │       │       └── test.txt
│   │   │       └── nope/
│   │   │           └── ignored.txt
│   │   ├── utils.go
│   │   ├── vfs.go
│   │   └── vfs_test.go
│   ├── watcher/
│   │   ├── event.go
│   │   ├── rlimit_nix.go
│   │   ├── rlimit_noop.go
│   │   ├── util.go
│   │   └── watcher.go
│   ├── words/
│   │   ├── funcs.go
│   │   ├── shortwords.txt
│   │   ├── words.go
│   │   └── words_test.go
│   └── xos/
│       ├── xos_unix.go
│       └── xos_windows.go
├── proto/
│   ├── encore/
│   │   ├── daemon/
│   │   │   ├── daemon.pb.go
│   │   │   ├── daemon.proto
│   │   │   └── daemon_grpc.pb.go
│   │   ├── engine/
│   │   │   ├── trace/
│   │   │   │   ├── trace.pb.go
│   │   │   │   ├── trace.proto
│   │   │   │   └── trace_util.go
│   │   │   └── trace2/
│   │   │       ├── trace2.pb.go
│   │   │       ├── trace2.proto
│   │   │       └── trace_util.go
│   │   ├── parser/
│   │   │   ├── meta/
│   │   │   │   └── v1/
│   │   │   │       ├── meta.pb.go
│   │   │   │       ├── meta.pb.ts
│   │   │   │       └── meta.proto
│   │   │   └── schema/
│   │   │       └── v1/
│   │   │           ├── schema.pb.go
│   │   │           ├── schema.pb.ts
│   │   │           ├── schema.proto
│   │   │           ├── walk.go
│   │   │           └── walk_test.go
│   │   └── runtime/
│   │       └── v1/
│   │           ├── infra.pb.go
│   │           ├── infra.proto
│   │           ├── runtime.pb.go
│   │           ├── runtime.proto
│   │           ├── secretdata.pb.go
│   │           └── secretdata.proto
│   ├── gen.go
│   ├── gen.sh
│   └── prompb/
│       ├── remote.proto
│       └── types.proto
├── runtimes/
│   ├── core/
│   │   ├── Cargo.toml
│   │   ├── build.rs
│   │   ├── resources/
│   │   │   └── test/
│   │   │       ├── infra.config.json
│   │   │       └── runtime.pb
│   │   └── src/
│   │       ├── api/
│   │       │   ├── auth/
│   │       │   │   ├── local.rs
│   │       │   │   ├── mod.rs
│   │       │   │   └── remote.rs
│   │       │   ├── call.rs
│   │       │   ├── cors/
│   │       │   │   ├── cors_headers_config/
│   │       │   │   │   ├── LICENSE
│   │       │   │   │   ├── allow_credentials.rs
│   │       │   │   │   ├── allow_headers.rs
│   │       │   │   │   ├── allow_methods.rs
│   │       │   │   │   ├── allow_origin.rs
│   │       │   │   │   ├── allow_private_network.rs
│   │       │   │   │   ├── expose_headers.rs
│   │       │   │   │   ├── max_age.rs
│   │       │   │   │   ├── mod.rs
│   │       │   │   │   └── vary.rs
│   │       │   │   ├── mod.rs
│   │       │   │   └── tests.rs
│   │       │   ├── encore_routes/
│   │       │   │   ├── healthz.rs
│   │       │   │   └── mod.rs
│   │       │   ├── endpoint.rs
│   │       │   ├── error.rs
│   │       │   ├── gateway/
│   │       │   │   ├── mod.rs
│   │       │   │   ├── router.rs
│   │       │   │   └── websocket.rs
│   │       │   ├── http.rs
│   │       │   ├── http_server.rs
│   │       │   ├── httputil.rs
│   │       │   ├── jsonschema/
│   │       │   │   ├── de.rs
│   │       │   │   ├── meta.rs
│   │       │   │   ├── mod.rs
│   │       │   │   ├── parse.rs
│   │       │   │   ├── ser.rs
│   │       │   │   └── validation.rs
│   │       │   ├── manager.rs
│   │       │   ├── mod.rs
│   │       │   ├── paths.rs
│   │       │   ├── pvalue.rs
│   │       │   ├── reqauth/
│   │       │   │   ├── caller.rs
│   │       │   │   ├── encoreauth/
│   │       │   │   │   ├── mod.rs
│   │       │   │   │   ├── ophash.rs
│   │       │   │   │   └── sign.rs
│   │       │   │   ├── meta.rs
│   │       │   │   ├── mod.rs
│   │       │   │   ├── platform.rs
│   │       │   │   └── svcauth.rs
│   │       │   ├── schema/
│   │       │   │   ├── body.rs
│   │       │   │   ├── cookie.rs
│   │       │   │   ├── encoding.rs
│   │       │   │   ├── header.rs
│   │       │   │   ├── httpstatus.rs
│   │       │   │   ├── method.rs
│   │       │   │   ├── mod.rs
│   │       │   │   ├── path.rs
│   │       │   │   └── query.rs
│   │       │   ├── server.rs
│   │       │   ├── snapshots/
│   │       │   │   ├── encore_runtime_core__api__paths__tests__basic.snap
│   │       │   │   ├── encore_runtime_core__api__paths__tests__fallback.snap
│   │       │   │   ├── encore_runtime_core__api__paths__tests__paths_to_register.snap
│   │       │   │   ├── encore_runtime_core__api__paths__tests__tsr_conflict.snap
│   │       │   │   └── encore_runtime_core__api__paths__tests__wildcard.snap
│   │       │   ├── static_assets.rs
│   │       │   ├── websocket.rs
│   │       │   └── websocket_client.rs
│   │       ├── base32.rs
│   │       ├── cache/
│   │       │   ├── client.rs
│   │       │   ├── client_tests.rs
│   │       │   ├── error.rs
│   │       │   ├── manager.rs
│   │       │   ├── miniredis.rs
│   │       │   ├── mod.rs
│   │       │   ├── noop.rs
│   │       │   └── tracer.rs
│   │       ├── error/
│   │       │   ├── conversions.rs
│   │       │   └── mod.rs
│   │       ├── infracfg.rs
│   │       ├── lib.rs
│   │       ├── log/
│   │       │   ├── consolewriter.rs
│   │       │   ├── fields.rs
│   │       │   ├── logger.rs
│   │       │   ├── mod.rs
│   │       │   └── writers.rs
│   │       ├── meta/
│   │       │   └── mod.rs
│   │       ├── metadata/
│   │       │   ├── aws.rs
│   │       │   ├── gce.rs
│   │       │   └── mod.rs
│   │       ├── metrics/
│   │       │   ├── atomic.rs
│   │       │   ├── counter.rs
│   │       │   ├── exporter/
│   │       │   │   ├── aws.rs
│   │       │   │   ├── datadog.rs
│   │       │   │   ├── gcp.rs
│   │       │   │   ├── mod.rs
│   │       │   │   └── prometheus.rs
│   │       │   ├── gauge.rs
│   │       │   ├── manager.rs
│   │       │   ├── mod.rs
│   │       │   ├── registry.rs
│   │       │   ├── system.rs
│   │       │   └── test.rs
│   │       ├── model/
│   │       │   └── mod.rs
│   │       ├── names.rs
│   │       ├── objects/
│   │       │   ├── gcs/
│   │       │   │   ├── bucket.rs
│   │       │   │   └── mod.rs
│   │       │   ├── manager.rs
│   │       │   ├── mod.rs
│   │       │   ├── noop/
│   │       │   │   └── mod.rs
│   │       │   └── s3/
│   │       │       ├── bucket.rs
│   │       │       └── mod.rs
│   │       ├── proccfg.rs
│   │       ├── pubsub/
│   │       │   ├── gcp/
│   │       │   │   ├── jwk.rs
│   │       │   │   ├── mod.rs
│   │       │   │   ├── push_sub.rs
│   │       │   │   ├── sub.rs
│   │       │   │   └── topic.rs
│   │       │   ├── manager.rs
│   │       │   ├── mod.rs
│   │       │   ├── noop/
│   │       │   │   └── mod.rs
│   │       │   ├── nsq/
│   │       │   │   ├── mod.rs
│   │       │   │   ├── sub.rs
│   │       │   │   └── topic.rs
│   │       │   ├── push_registry.rs
│   │       │   └── sqs_sns/
│   │       │       ├── fetcher.rs
│   │       │       ├── mod.rs
│   │       │       ├── sub.rs
│   │       │       └── topic.rs
│   │       ├── runtime_config/
│   │       │   └── mod.rs
│   │       ├── secrets/
│   │       │   └── mod.rs
│   │       ├── sqldb/
│   │       │   ├── client.rs
│   │       │   ├── manager.rs
│   │       │   ├── mod.rs
│   │       │   ├── numeric.rs
│   │       │   ├── transaction.rs
│   │       │   └── val.rs
│   │       └── trace/
│   │           ├── eventbuf.rs
│   │           ├── log.rs
│   │           ├── mod.rs
│   │           ├── protocol.rs
│   │           └── time_anchor.rs
│   ├── go/
│   │   ├── README.md
│   │   ├── appruntime/
│   │   │   ├── apisdk/
│   │   │   │   ├── api/
│   │   │   │   │   ├── auth.go
│   │   │   │   │   ├── auth_remote.go
│   │   │   │   │   ├── call_context.go
│   │   │   │   │   ├── call_meta.go
│   │   │   │   │   ├── call_meta_test.go
│   │   │   │   │   ├── callers.go
│   │   │   │   │   ├── capture.go
│   │   │   │   │   ├── encore_routes.go
│   │   │   │   │   ├── errmarshalling/
│   │   │   │   │   │   ├── fallback.go
│   │   │   │   │   │   ├── jsonextension.go
│   │   │   │   │   │   ├── marshal.go
│   │   │   │   │   │   └── marshal_test.go
│   │   │   │   │   ├── gateway.go
│   │   │   │   │   ├── handler.go
│   │   │   │   │   ├── handler_test.go
│   │   │   │   │   ├── middleware.go
│   │   │   │   │   ├── pubsub_push_proxy.go
│   │   │   │   │   ├── reflection.go
│   │   │   │   │   ├── reflection_test.go
│   │   │   │   │   ├── registry.go
│   │   │   │   │   ├── reqtrack.go
│   │   │   │   │   ├── server.go
│   │   │   │   │   ├── server_test.go
│   │   │   │   │   ├── services.go
│   │   │   │   │   ├── singleton.go
│   │   │   │   │   ├── svcauth/
│   │   │   │   │   │   ├── doc.go
│   │   │   │   │   │   ├── encoreauth.go
│   │   │   │   │   │   ├── noop.go
│   │   │   │   │   │   ├── pkgfn.go
│   │   │   │   │   │   └── svcauth.go
│   │   │   │   │   ├── transport/
│   │   │   │   │   │   ├── doc.go
│   │   │   │   │   │   ├── eh2c.go
│   │   │   │   │   │   ├── http.go
│   │   │   │   │   │   ├── meta.go
│   │   │   │   │   │   └── transport.go
│   │   │   │   │   └── util.go
│   │   │   │   ├── app/
│   │   │   │   │   ├── app.go
│   │   │   │   │   ├── appinit/
│   │   │   │   │   │   └── appinit.go
│   │   │   │   │   └── setup.go
│   │   │   │   ├── cors/
│   │   │   │   │   ├── cors.go
│   │   │   │   │   └── cors_test.go
│   │   │   │   └── service/
│   │   │   │       ├── service.go
│   │   │   │       └── singleton.go
│   │   │   ├── doc.go
│   │   │   ├── exported/
│   │   │   │   ├── config/
│   │   │   │   │   ├── config.go
│   │   │   │   │   ├── infra/
│   │   │   │   │   │   ├── config.go
│   │   │   │   │   │   ├── config_test.go
│   │   │   │   │   │   ├── testdata/
│   │   │   │   │   │   │   ├── infra.config.json
│   │   │   │   │   │   │   └── runtime.json
│   │   │   │   │   │   └── validation.go
│   │   │   │   │   ├── parse.go
│   │   │   │   │   └── parse_test.go
│   │   │   │   ├── experiments/
│   │   │   │   │   ├── cli.go
│   │   │   │   │   ├── errors.go
│   │   │   │   │   ├── names.go
│   │   │   │   │   └── set.go
│   │   │   │   ├── model/
│   │   │   │   │   ├── request.go
│   │   │   │   │   └── trace.go
│   │   │   │   ├── scrub/
│   │   │   │   │   ├── benchmark_test.go
│   │   │   │   │   ├── scanner.go
│   │   │   │   │   ├── scanner_test.go
│   │   │   │   │   ├── scrub.go
│   │   │   │   │   ├── scrub_test.go
│   │   │   │   │   └── token_string.go
│   │   │   │   ├── stack/
│   │   │   │   │   ├── stack.go
│   │   │   │   │   ├── stack_app.go
│   │   │   │   │   ├── stack_noapp.go
│   │   │   │   │   └── stack_test.go
│   │   │   │   ├── trace/
│   │   │   │   │   ├── events.go
│   │   │   │   │   ├── http.go
│   │   │   │   │   ├── log.go
│   │   │   │   │   ├── logger.go
│   │   │   │   │   ├── mock_trace/
│   │   │   │   │   │   └── mock_trace.go
│   │   │   │   │   ├── mutex_app.go
│   │   │   │   │   ├── mutex_noapp.go
│   │   │   │   │   └── version.go
│   │   │   │   └── trace2/
│   │   │   │       ├── events.go
│   │   │   │       ├── http.go
│   │   │   │       ├── log.go
│   │   │   │       ├── logger.go
│   │   │   │       ├── mutex_app.go
│   │   │   │       ├── mutex_noapp.go
│   │   │   │       ├── timeanchor.go
│   │   │   │       └── version.go
│   │   │   ├── infrasdk/
│   │   │   │   ├── metadata/
│   │   │   │   │   ├── aws_collector.go
│   │   │   │   │   ├── cloud_run_collector.go
│   │   │   │   │   └── metadata.go
│   │   │   │   ├── metrics/
│   │   │   │   │   ├── README.md
│   │   │   │   │   ├── aws/
│   │   │   │   │   │   ├── cloudwatch.go
│   │   │   │   │   │   └── cloudwatch_test.go
│   │   │   │   │   ├── aws_cloudwatch_exporter.go
│   │   │   │   │   ├── datadog/
│   │   │   │   │   │   └── datadog.go
│   │   │   │   │   ├── datadog_exporter.go
│   │   │   │   │   ├── encore_cloud_exporter.go
│   │   │   │   │   ├── gcp/
│   │   │   │   │   │   ├── cloud_monitoring.go
│   │   │   │   │   │   └── cloud_monitoring_test.go
│   │   │   │   │   ├── gcp_cloud_monitoring_exporter.go
│   │   │   │   │   ├── logs_based_exporter.go
│   │   │   │   │   ├── logs_based_exporter_test.go
│   │   │   │   │   ├── metrics.go
│   │   │   │   │   ├── metrics_test.go
│   │   │   │   │   ├── metricstest/
│   │   │   │   │   │   └── test_exporter.go
│   │   │   │   │   ├── null_exporter.go
│   │   │   │   │   ├── prometheus/
│   │   │   │   │   │   ├── prometheus.go
│   │   │   │   │   │   ├── prometheus_test.go
│   │   │   │   │   │   └── prompb/
│   │   │   │   │   │       ├── remote.pb.go
│   │   │   │   │   │       └── types.pb.go
│   │   │   │   │   ├── prometheus_exporter.go
│   │   │   │   │   ├── system/
│   │   │   │   │   │   └── system.go
│   │   │   │   │   └── zzz_singleton_internal.go
│   │   │   │   └── secrets/
│   │   │   │       ├── manager_internal.go
│   │   │   │       └── secrets.go
│   │   │   └── shared/
│   │   │       ├── appconf/
│   │   │       │   └── appconf.go
│   │   │       ├── cfgutil/
│   │   │       │   └── svc.go
│   │   │       ├── cloud/
│   │   │       │   └── clouds.go
│   │   │       ├── cloudtrace/
│   │   │       │   ├── extractors.go
│   │   │       │   ├── gcp.go
│   │   │       │   └── logfields.go
│   │   │       ├── encoreenv/
│   │   │       │   ├── app.go
│   │   │       │   ├── encoreenv.go
│   │   │       │   └── noapp.go
│   │   │       ├── etype/
│   │   │       │   ├── marshal.go
│   │   │       │   └── unmarshal.go
│   │   │       ├── health/
│   │   │       │   ├── check.go
│   │   │       │   ├── health.go
│   │   │       │   └── singleton.go
│   │   │       ├── jsonapi/
│   │   │       │   ├── jsonapi.go
│   │   │       │   └── jsonapi_nonapp.go
│   │   │       ├── logging/
│   │   │       │   └── logging.go
│   │   │       ├── nativehist/
│   │   │       │   ├── PROMETHEUS_LICENSE.txt
│   │   │       │   └── nativehist.go
│   │   │       ├── platform/
│   │   │       │   ├── platform.go
│   │   │       │   ├── singleton.go
│   │   │       │   └── streaming_trace.go
│   │   │       ├── reqtrack/
│   │   │       │   ├── impl.go
│   │   │       │   ├── impl_app.go
│   │   │       │   ├── impl_noapp.go
│   │   │       │   ├── reqtrack.go
│   │   │       │   ├── singleton.go
│   │   │       │   └── trace_stream.go
│   │   │       ├── serde/
│   │   │       │   └── utils.go
│   │   │       ├── shutdown/
│   │   │       │   ├── shutdown.go
│   │   │       │   └── singleton.go
│   │   │       ├── syncutil/
│   │   │       │   ├── once.go
│   │   │       │   ├── once_test.go
│   │   │       │   └── syncutil.go
│   │   │       ├── testsupport/
│   │   │       │   ├── runtimehooks_app.go
│   │   │       │   ├── testconfig.go
│   │   │       │   └── testsupport.go
│   │   │       └── traceprovider/
│   │   │           ├── mock_trace/
│   │   │           │   ├── factory.go
│   │   │           │   └── mock_trace.go
│   │   │           └── traceprovider.go
│   │   ├── beta/
│   │   │   ├── auth/
│   │   │   │   ├── auth.go
│   │   │   │   └── pkgfn.go
│   │   │   ├── errs/
│   │   │   │   ├── builder.go
│   │   │   │   ├── codes.go
│   │   │   │   ├── details.go
│   │   │   │   ├── error.go
│   │   │   │   └── errs_internal.go
│   │   │   └── package.go
│   │   ├── config/
│   │   │   ├── helpers_internal.go
│   │   │   ├── manager_internal.go
│   │   │   ├── pkgfn.go
│   │   │   ├── test_internal.go
│   │   │   └── types.go
│   │   ├── cron/
│   │   │   └── cron.go
│   │   ├── et/
│   │   │   ├── auth.go
│   │   │   ├── config.go
│   │   │   ├── manager_internal.go
│   │   │   ├── mocking.go
│   │   │   ├── package.go
│   │   │   ├── pkgfn.go
│   │   │   ├── pubsub.go
│   │   │   ├── singleton_internal.go
│   │   │   └── sqldb.go
│   │   ├── example_test.go
│   │   ├── go.mod
│   │   ├── go.sum
│   │   ├── internal/
│   │   │   ├── limiter/
│   │   │   │   ├── limiter.go
│   │   │   │   └── noop.go
│   │   │   └── platformauth/
│   │   │       └── platformauth.go
│   │   ├── meta.go
│   │   ├── metrics/
│   │   │   ├── bits_internal.go
│   │   │   ├── histogram_internal.go
│   │   │   ├── metrics.go
│   │   │   ├── metrics_test.go
│   │   │   ├── pkgfn.go
│   │   │   ├── registry_internal.go
│   │   │   ├── singleton_internal.go
│   │   │   └── units.go
│   │   ├── middleware/
│   │   │   ├── middleware.go
│   │   │   └── middleware_internal.go
│   │   ├── package.go
│   │   ├── pkgfn.go
│   │   ├── pubsub/
│   │   │   ├── internal/
│   │   │   │   ├── aws/
│   │   │   │   │   ├── manager.go
│   │   │   │   │   ├── topic.go
│   │   │   │   │   └── topic_test.go
│   │   │   │   ├── azure/
│   │   │   │   │   ├── clients.go
│   │   │   │   │   └── topic.go
│   │   │   │   ├── encorecloud/
│   │   │   │   │   ├── manager.go
│   │   │   │   │   └── topic.go
│   │   │   │   ├── gcp/
│   │   │   │   │   ├── clients.go
│   │   │   │   │   ├── push_handler.go
│   │   │   │   │   └── topic.go
│   │   │   │   ├── noop/
│   │   │   │   │   └── topic.go
│   │   │   │   ├── nsq/
│   │   │   │   │   ├── log_adapter.go
│   │   │   │   │   └── topic.go
│   │   │   │   ├── test/
│   │   │   │   │   └── topic.go
│   │   │   │   ├── types/
│   │   │   │   │   ├── private.go
│   │   │   │   │   ├── public.go
│   │   │   │   │   └── push_registry.go
│   │   │   │   └── utils/
│   │   │   │       ├── contexts.go
│   │   │   │       ├── utils.go
│   │   │   │       ├── utils_test.go
│   │   │   │       ├── workers.go
│   │   │   │       └── workers_test.go
│   │   │   ├── manager_internal.go
│   │   │   ├── package.go
│   │   │   ├── pkgfn.go
│   │   │   ├── provider_aws.go
│   │   │   ├── provider_azure.go
│   │   │   ├── provider_encorecloud.go
│   │   │   ├── provider_gcp.go
│   │   │   ├── provider_nsq.go
│   │   │   ├── refs.go
│   │   │   ├── subscription.go
│   │   │   ├── test_internal.go
│   │   │   ├── topic.go
│   │   │   ├── types.go
│   │   │   └── zzz_singleton_internal.go
│   │   ├── request.go
│   │   ├── rlog/
│   │   │   ├── pkgfn.go
│   │   │   ├── rlog.go
│   │   │   └── rlog_test.go
│   │   ├── shutdown/
│   │   │   └── shutdown.go
│   │   ├── storage/
│   │   │   ├── cache/
│   │   │   │   ├── basic.go
│   │   │   │   ├── basic_test.go
│   │   │   │   ├── cache.go
│   │   │   │   ├── cache_test.go
│   │   │   │   ├── error_internal.go
│   │   │   │   ├── list.go
│   │   │   │   ├── list_test.go
│   │   │   │   ├── manager_internal.go
│   │   │   │   ├── noop_internal.go
│   │   │   │   ├── pkgfn.go
│   │   │   │   ├── set.go
│   │   │   │   ├── set_test.go
│   │   │   │   ├── struct.go
│   │   │   │   └── zzz_singleton_internal.go
│   │   │   ├── objects/
│   │   │   │   ├── bucket.go
│   │   │   │   ├── internal/
│   │   │   │   │   ├── providers/
│   │   │   │   │   │   ├── gcs/
│   │   │   │   │   │   │   └── bucket.go
│   │   │   │   │   │   ├── noop/
│   │   │   │   │   │   │   └── noop.go
│   │   │   │   │   │   └── s3/
│   │   │   │   │   │       ├── bucket.go
│   │   │   │   │   │       ├── mock_client_test.go
│   │   │   │   │   │       ├── uploader.go
│   │   │   │   │   │       └── uploader_test.go
│   │   │   │   │   └── types/
│   │   │   │   │       └── types.go
│   │   │   │   ├── manager_internal.go
│   │   │   │   ├── objects.go
│   │   │   │   ├── options.go
│   │   │   │   ├── package.go
│   │   │   │   ├── path_escape.go
│   │   │   │   ├── provider_gcs.go
│   │   │   │   ├── provider_s3.go
│   │   │   │   ├── refs.go
│   │   │   │   ├── registry_internal.go
│   │   │   │   └── zzz_singleton_internal.go
│   │   │   └── sqldb/
│   │   │       ├── db.go
│   │   │       ├── db_hooks_test.go
│   │   │       ├── errors.go
│   │   │       ├── errors_internal.go
│   │   │       ├── errors_test.go
│   │   │       ├── internal/
│   │   │       │   └── stdlibdriver/
│   │   │       │       ├── LICENSE
│   │   │       │       └── stdlibdriver.go
│   │   │       ├── manager_internal.go
│   │   │       ├── pgx_tracer_internal.go
│   │   │       ├── pkgfn.go
│   │   │       ├── sqldb.go
│   │   │       ├── sqldb_test.go
│   │   │       ├── sqlerr/
│   │   │       │   └── sqlerr.go
│   │   │       ├── stdlib.go
│   │   │       ├── stdlib_noop_internal.go
│   │   │       ├── stdlib_wrapper_internal.go
│   │   │       ├── test_db.go
│   │   │       └── zzz_singleton_internal.go
│   │   └── types/
│   │       ├── option/
│   │       │   └── option.go
│   │       └── uuid/
│   │           ├── codec.go
│   │           ├── codec_test.go
│   │           ├── fuzz.go
│   │           ├── generator.go
│   │           ├── generator_test.go
│   │           ├── sql.go
│   │           ├── sql_test.go
│   │           ├── uuid.go
│   │           └── uuid_test.go
│   └── js/
│       ├── .gitignore
│       ├── Cargo.toml
│       ├── build.rs
│       ├── encore.dev/
│       │   ├── LICENSE
│       │   ├── README.md
│       │   ├── api/
│       │   │   ├── error.ts
│       │   │   ├── gateway.ts
│       │   │   ├── httpstatus.ts
│       │   │   ├── mod.ts
│       │   │   └── stream.ts
│       │   ├── app_meta.ts
│       │   ├── auth/
│       │   │   └── mod.ts
│       │   ├── config/
│       │   │   ├── mod.ts
│       │   │   └── secrets.ts
│       │   ├── cron/
│       │   │   └── mod.ts
│       │   ├── internal/
│       │   │   ├── api/
│       │   │   │   ├── mod.ts
│       │   │   │   └── node_http.ts
│       │   │   ├── appinit/
│       │   │   │   └── mod.ts
│       │   │   ├── auth/
│       │   │   │   └── mod.ts
│       │   │   ├── codegen/
│       │   │   │   ├── api.ts
│       │   │   │   ├── appinit.ts
│       │   │   │   └── auth.ts
│       │   │   ├── metrics/
│       │   │   │   ├── mod.ts
│       │   │   │   └── registry.ts
│       │   │   ├── reqtrack/
│       │   │   │   └── mod.ts
│       │   │   ├── runtime/
│       │   │   │   ├── .gitignore
│       │   │   │   ├── .npmignore
│       │   │   │   └── mod.ts
│       │   │   ├── types/
│       │   │   │   └── mod.ts
│       │   │   └── utils/
│       │   │       └── constraints.ts
│       │   ├── log/
│       │   │   └── mod.ts
│       │   ├── metrics/
│       │   │   └── mod.ts
│       │   ├── mod.ts
│       │   ├── package.json
│       │   ├── pubsub/
│       │   │   ├── mod.ts
│       │   │   ├── refs.ts
│       │   │   ├── subscription.ts
│       │   │   └── topic.ts
│       │   ├── req_meta.ts
│       │   ├── service/
│       │   │   └── mod.ts
│       │   ├── storage/
│       │   │   ├── cache/
│       │   │   │   ├── basic.ts
│       │   │   │   ├── cluster.ts
│       │   │   │   ├── errors.ts
│       │   │   │   ├── expiry.ts
│       │   │   │   ├── keyspace.ts
│       │   │   │   ├── list.ts
│       │   │   │   ├── mod.ts
│       │   │   │   └── set.ts
│       │   │   ├── objects/
│       │   │   │   ├── bucket.ts
│       │   │   │   ├── error.ts
│       │   │   │   ├── mod.ts
│       │   │   │   └── refs.ts
│       │   │   └── sqldb/
│       │   │       ├── database.ts
│       │   │       └── mod.ts
│       │   ├── tsconfig.json
│       │   ├── types/
│       │   │   └── mod.ts
│       │   └── validate/
│       │       └── mod.ts
│       └── src/
│           ├── api.rs
│           ├── cache.rs
│           ├── cookies.rs
│           ├── error.rs
│           ├── gateway.rs
│           ├── headers.rs
│           ├── lib.rs
│           ├── log.rs
│           ├── meta.rs
│           ├── metrics.rs
│           ├── napi_util.rs
│           ├── objects.rs
│           ├── pubsub.rs
│           ├── pvalue.rs
│           ├── raw_api.rs
│           ├── request_meta.rs
│           ├── runtime.rs
│           ├── runtime_config.rs
│           ├── secret.rs
│           ├── sqldb.rs
│           ├── stream/
│           │   ├── mod.rs
│           │   ├── read.rs
│           │   └── write.rs
│           ├── threadsafe_function.rs
│           └── websocket_api.rs
├── rustfmt.toml
├── supervisor/
│   ├── Cargo.toml
│   ├── build.rs
│   └── src/
│       ├── bin/
│       │   └── supervisor-encore.rs
│       ├── config.rs
│       ├── lib.rs
│       ├── proxy.rs
│       └── supervisor.rs
├── tools/
│   ├── publicapigen/
│   │   └── main.go
│   └── semgrep-rules/
│       ├── README.md
│       └── semgrep-go/
│           ├── LICENSE
│           ├── README.md
│           ├── badexponentiation.yml
│           ├── badnilguard.yml
│           ├── close-sql-query-rows.yml
│           ├── contextCancelable.yml
│           ├── contextTODO.yml
│           ├── ctx-time.yml
│           ├── errclosed.yml
│           ├── errnilcheck.yml
│           ├── errtodo.yml
│           ├── gofuzz.yml
│           ├── hashsum.yml
│           ├── hmac-bytes.yml
│           ├── hmac-hash.yml
│           ├── hostport.yml
│           ├── http-ctx-goroutine.yml
│           ├── ioutil-discard.yml
│           ├── ioutil-nop-closer.yml
│           ├── ioutil-readall.yml
│           ├── ioutil-readdir.yml
│           ├── ioutil-readfile.yml
│           ├── ioutil-tmpdir.yml
│           ├── ioutil-tmpfile.yml
│           ├── ioutil-writefile.yml
│           ├── joinpath.yml
│           ├── json-writer.yml
│           ├── mail-address.yml
│           ├── marshaljson.yml
│           ├── marshalyaml.yml
│           ├── mathbits.yml
│           ├── nilerr.yml
│           ├── nrtxn.yml
│           ├── oddbitwise.yml
│           ├── oddcompare-subtract-eq-zero.yml
│           ├── oddcompare-subtract-gt-zero.yml
│           ├── oddcompare-subtract-gte-zero.yml
│           ├── oddcompare-subtract-lt-zero.yml
│           ├── oddcompare-subtract-lte-zero.yml
│           ├── oddcompare-subtract-neq-zero.yml
│           ├── oddcompare-xor-eq-zero.yml
│           ├── oddcompare-xor-neq-zero.yml
│           ├── oddcompound.yml
│           ├── oddifsequence.yml
│           ├── oddmathbits.yml
│           ├── os-error-is-exist.yml
│           ├── os-error-is-not-exist.yml
│           ├── os-error-is-permission.yml
│           ├── os-error-is-timeout.yml
│           ├── parseint-downcast.yml
│           ├── readeof.yml
│           ├── readfull.yml
│           ├── returnnil.yml
│           ├── ruleguard.rules.go
│           ├── sortslice.yml
│           ├── sprinterr.yml
│           ├── timeafter.yml
│           ├── unixnano-after.yml
│           ├── unixnano-before.yml
│           ├── unmarshaljson.yml
│           ├── unmarshalyaml.yml
│           ├── use-fprintf-not-write-fsprint.yml
│           ├── use-write-not-fprint.yml
│           ├── use-writer-not-writestring.yml
│           ├── wrongerrcall.yml
│           └── wronglock.yml
├── ts_llm_instructions.txt
├── tsparser/
│   ├── Cargo.toml
│   ├── build.rs
│   ├── examples/
│   │   └── testparse.rs
│   ├── litparser/
│   │   ├── .gitignore
│   │   ├── Cargo.toml
│   │   └── src/
│   │       └── lib.rs
│   ├── litparser-derive/
│   │   ├── .gitignore
│   │   ├── Cargo.toml
│   │   ├── src/
│   │   │   └── lib.rs
│   │   └── tests/
│   │       └── integration_tests.rs
│   ├── src/
│   │   ├── app/
│   │   │   └── mod.rs
│   │   ├── bin/
│   │   │   └── tsparser-encore.rs
│   │   ├── builder/
│   │   │   ├── codegen.rs
│   │   │   ├── compile.rs
│   │   │   ├── mod.rs
│   │   │   ├── package_mgmt.rs
│   │   │   ├── parse.rs
│   │   │   ├── prepare.rs
│   │   │   ├── templates/
│   │   │   │   ├── catalog/
│   │   │   │   │   ├── auth/
│   │   │   │   │   │   ├── auth_ts.handlebars
│   │   │   │   │   │   └── index_ts.handlebars
│   │   │   │   │   └── clients/
│   │   │   │   │       ├── endpoints_d_ts.handlebars
│   │   │   │   │       ├── endpoints_js.handlebars
│   │   │   │   │       ├── endpoints_testing_js.handlebars
│   │   │   │   │       ├── index_d_ts.handlebars
│   │   │   │   │       └── index_js.handlebars
│   │   │   │   └── entrypoints/
│   │   │   │       ├── combined/
│   │   │   │       │   └── main.handlebars
│   │   │   │       ├── gateways/
│   │   │   │       │   └── main.handlebars
│   │   │   │       └── services/
│   │   │   │           └── main.handlebars
│   │   │   ├── test.rs
│   │   │   └── transpiler.rs
│   │   ├── exports.rs
│   │   ├── legacymeta/
│   │   │   ├── api_schema.rs
│   │   │   ├── mod.rs
│   │   │   └── schema.rs
│   │   ├── lib.rs
│   │   ├── parser/
│   │   │   ├── doc_comments.rs
│   │   │   ├── fileset.rs
│   │   │   ├── memory_resolver.rs
│   │   │   ├── mod.rs
│   │   │   ├── module_loader.rs
│   │   │   ├── parser.rs
│   │   │   ├── resourceparser/
│   │   │   │   ├── bind.rs
│   │   │   │   ├── mod.rs
│   │   │   │   ├── paths.rs
│   │   │   │   └── resource_parser.rs
│   │   │   ├── resources/
│   │   │   │   ├── apis/
│   │   │   │   │   ├── api.rs
│   │   │   │   │   ├── authhandler.rs
│   │   │   │   │   ├── encoding.rs
│   │   │   │   │   ├── gateway.rs
│   │   │   │   │   ├── mod.rs
│   │   │   │   │   ├── service.rs
│   │   │   │   │   └── service_client.rs
│   │   │   │   ├── infra/
│   │   │   │   │   ├── cache.rs
│   │   │   │   │   ├── cron.rs
│   │   │   │   │   ├── metrics.rs
│   │   │   │   │   ├── mod.rs
│   │   │   │   │   ├── objects.rs
│   │   │   │   │   ├── pubsub_subscription.rs
│   │   │   │   │   ├── pubsub_topic.rs
│   │   │   │   │   ├── secret.rs
│   │   │   │   │   └── sqldb.rs
│   │   │   │   ├── mod.rs
│   │   │   │   └── parseutil.rs
│   │   │   ├── respath.rs
│   │   │   ├── service_discovery.rs
│   │   │   ├── types/
│   │   │   │   ├── ast_id.rs
│   │   │   │   ├── binding.rs
│   │   │   │   ├── mod.rs
│   │   │   │   ├── object.rs
│   │   │   │   ├── resolved.rs
│   │   │   │   ├── snapshots/
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@basic.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@call_expressions.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@call_signatures.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@export_default.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@export_wildcard.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@extends.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@generic.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@generics.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@infer.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@keyofenum.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@mapped_as.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@method_signatures.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@namespace_import.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@qualified_name.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@reexport_local.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@reexport_single.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@reexport_wildcard.txt.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@typeof.ts.snap
│   │   │   │   │   ├── encore_tsparser__parser__types__tests__resolve_types@validation.ts.snap
│   │   │   │   │   └── encore_tsparser__parser__types__tests__resolve_types@wirespec.ts.snap
│   │   │   │   ├── testdata/
│   │   │   │   │   ├── basic.ts
│   │   │   │   │   ├── call_expressions.ts
│   │   │   │   │   ├── call_signatures.ts
│   │   │   │   │   ├── export_default.ts
│   │   │   │   │   ├── extends.ts
│   │   │   │   │   ├── generic.ts
│   │   │   │   │   ├── generics.ts
│   │   │   │   │   ├── infer.txt
│   │   │   │   │   ├── keyofenum.ts
│   │   │   │   │   ├── mapped_as.ts
│   │   │   │   │   ├── method_signatures.ts
│   │   │   │   │   ├── namespace_import.txt
│   │   │   │   │   ├── qualified_name.ts
│   │   │   │   │   ├── reexport_local.txt
│   │   │   │   │   ├── reexport_single.txt
│   │   │   │   │   ├── reexport_wildcard.txt
│   │   │   │   │   ├── typeof.ts
│   │   │   │   │   ├── validation.ts
│   │   │   │   │   └── wirespec.ts
│   │   │   │   ├── tests.rs
│   │   │   │   ├── typ.rs
│   │   │   │   ├── type_resolve.rs
│   │   │   │   ├── type_string.rs
│   │   │   │   ├── utils.rs
│   │   │   │   ├── validation.rs
│   │   │   │   └── visitor.rs
│   │   │   ├── universe.ts
│   │   │   └── usageparser/
│   │   │       └── mod.rs
│   │   ├── resolve_utils.rs
│   │   ├── runtimeresolve/
│   │   │   ├── mod.rs
│   │   │   ├── node.rs
│   │   │   └── tsconfig.rs
│   │   ├── span_err.rs
│   │   ├── testutil/
│   │   │   ├── mod.rs
│   │   │   ├── testparse.rs
│   │   │   ├── testresolve.rs
│   │   │   └── typeparse.rs
│   │   └── tsconfig.rs
│   ├── tests/
│   │   ├── common/
│   │   │   └── mod.rs
│   │   ├── parse_tests.rs
│   │   └── testdata/
│   │       ├── builtins.txt
│   │       ├── cache.txt
│   │       ├── cache_named.txt
│   │       ├── mapped_as_clause.txt
│   │       ├── mapped_types.txt
│   │       ├── metrics.txt
│   │       ├── query_header.txt
│   │       └── tsconfig.txt
│   ├── txtar/
│   │   ├── .gitignore
│   │   ├── Cargo.toml
│   │   ├── LICENSE-APACHE
│   │   ├── LICENSE-MIT
│   │   ├── README.md
│   │   └── src/
│   │       ├── error.rs
│   │       └── lib.rs
│   └── wasm/
│       ├── Cargo.toml
│       ├── README.md
│       ├── build.rs
│       └── src/
│           └── lib.rs
└── v2/
    ├── app/
    │   ├── api_framework.go
    │   ├── apiframework/
    │   │   └── apiframework.go
    │   ├── app.go
    │   ├── errors.go
    │   ├── gateway.go
    │   ├── legacymeta/
    │   │   ├── legacymeta.go
    │   │   ├── schema.go
    │   │   ├── selector_lookup.go
    │   │   └── trace_nodes.go
    │   ├── resource_usage.go
    │   ├── service.go
    │   ├── service_discovery.go
    │   ├── service_discovery_test.go
    │   ├── setup_test.go
    │   ├── testdata/
    │   │   ├── auth_handler_call.txt
    │   │   ├── auth_handler_data.txt
    │   │   ├── auth_handler_invalid_builtin.txt
    │   │   ├── auth_handler_invalid_field_source.txt
    │   │   ├── auth_handler_invalid_named_type.txt
    │   │   ├── auth_handler_multiple.txt
    │   │   ├── auth_handler_reference.txt
    │   │   ├── auth_handler_simple.txt
    │   │   ├── auth_handler_struct.txt
    │   │   ├── auth_handler_svc_struct.txt
    │   │   ├── cache_cluster_outside_svc.txt
    │   │   ├── cache_definition.txt
    │   │   ├── cache_err_duplicate_cluster.txt
    │   │   ├── cache_err_duplicate_paths.txt
    │   │   ├── cache_err_generic_type_nonbasic.txt
    │   │   ├── cache_err_keyspace_invalid.txt
    │   │   ├── cache_err_keyspace_outside_svc.txt
    │   │   ├── cache_generic_type.txt
    │   │   ├── config.txt
    │   │   ├── config_err_unexported_field.txt
    │   │   ├── config_err_use_from_other_service.txt
    │   │   ├── config_err_wrapper_used_in_wrapper.txt
    │   │   ├── cron_job_definition.txt
    │   │   ├── cron_job_definition_init.txt
    │   │   ├── cron_job_definition_repeat.txt
    │   │   ├── cron_job_definition_rpc.txt
    │   │   ├── cron_job_err_not_api.txt
    │   │   ├── et.txt
    │   │   ├── metrics_counter.txt
    │   │   ├── metrics_gauge.txt
    │   │   ├── middleware.txt
    │   │   ├── middleware_err_no_matches.txt
    │   │   ├── middleware_err_not_in_service.txt
    │   │   ├── missing_generic_param.txt
    │   │   ├── pubsub.txt
    │   │   ├── pubsub_err_attributes_not_start_encore.txt
    │   │   ├── pubsub_err_duplicate_subscription_names.txt
    │   │   ├── pubsub_err_import_aliased_and_used_in_func.txt
    │   │   ├── pubsub_err_missing_delivery_guarantee.txt
    │   │   ├── pubsub_err_new_topic_func_aliased.txt
    │   │   ├── pubsub_err_ordering_attribute_missing.txt
    │   │   ├── pubsub_err_subscriber_different_service.txt
    │   │   ├── pubsub_err_subscriber_missing_handler.txt
    │   │   ├── pubsub_err_subscriber_nil_handler.txt
    │   │   ├── pubsub_err_subscriber_not_function.txt
    │   │   ├── pubsub_err_subscription_func_not_in_service.txt
    │   │   ├── pubsub_err_subscription_name_invalid.txt
    │   │   ├── pubsub_err_topic_declared_in_func.txt
    │   │   ├── pubsub_err_topic_invalid_usage.txt
    │   │   ├── pubsub_err_topic_must_be_unique.txt
    │   │   ├── pubsub_err_topic_name_invalid.txt
    │   │   ├── pubsub_publish_in_middleware.txt
    │   │   ├── pubsub_subscriber_creates_service.txt
    │   │   ├── pubsub_subscriber_in_same_service.txt
    │   │   ├── recursive_types.txt
    │   │   ├── rlog_call_outside_svc.txt
    │   │   ├── rpc_auth.txt
    │   │   ├── rpc_auth_no_authhandler.txt
    │   │   ├── rpc_call_selector.txt
    │   │   ├── rpc_err_any.txt
    │   │   ├── rpc_invalid_header_type.txt
    │   │   ├── rpc_invalid_path_param_name.txt
    │   │   ├── rpc_invalid_path_param_type.txt
    │   │   ├── rpc_invalid_path_too_few_params.txt
    │   │   ├── rpc_invalid_query_type.txt
    │   │   ├── rpc_legacy_syntax.txt
    │   │   ├── rpc_method.txt
    │   │   ├── rpc_non_raw_path.txt
    │   │   ├── rpc_option_types.txt
    │   │   ├── rpc_outside_service.txt
    │   │   ├── rpc_path_params.txt
    │   │   ├── rpc_raw_call.txt
    │   │   ├── rpc_raw_custom_path.txt
    │   │   ├── rpc_raw_duplicate_path.txt
    │   │   ├── rpc_raw_internal.txt
    │   │   ├── rpc_raw_public.txt
    │   │   ├── rpc_receiver_invalid.txt
    │   │   ├── rpc_receiver_typo.txt
    │   │   ├── rpc_without_calling.txt
    │   │   ├── secrets.txt
    │   │   ├── secrets_non_string.txt
    │   │   ├── servicestruct_creates_service.txt
    │   │   ├── servicestruct_duplicate.txt
    │   │   ├── servicestruct_ref.txt
    │   │   ├── sqldb_cross_service.txt
    │   │   ├── sqldb_err_unknown_db.txt
    │   │   ├── sqldb_err_unknown_db_stdlib.txt
    │   │   ├── sqldb_helper.txt
    │   │   ├── sqldb_outside_ref.txt
    │   │   ├── sqldb_outside_svc.txt
    │   │   ├── sqldb_outside_svc_test.txt
    │   │   ├── sqldb_success.txt
    │   │   ├── sqldb_without_call.txt
    │   │   ├── struct_duplicate_json_ignore.txt
    │   │   ├── svc_migration_db.txt
    │   │   └── type_ref_non_svc.txt
    │   ├── validate.go
    │   ├── validate_apis.go
    │   ├── validate_authhandlers.go
    │   ├── validate_caches.go
    │   ├── validate_config.go
    │   ├── validate_crons.go
    │   ├── validate_databases.go
    │   ├── validate_middleware.go
    │   ├── validate_objects.go
    │   ├── validate_pubsub.go
    │   ├── validate_servicestructs.go
    │   ├── validate_test.go
    │   └── validate_types.go
    ├── codegen/
    │   ├── apigen/
    │   │   ├── apigen.go
    │   │   ├── apigenutil/
    │   │   │   └── apigenutil.go
    │   │   ├── authhandlergen/
    │   │   │   ├── authhandlergen.go
    │   │   │   ├── authhandlergen_test.go
    │   │   │   └── testdata/
    │   │   │       ├── authdata.txt
    │   │   │       ├── basic.txt
    │   │   │       ├── servicestruct.txt
    │   │   │       └── struct.txt
    │   │   ├── endpointgen/
    │   │   │   ├── api_calls.go
    │   │   │   ├── endpointgen.go
    │   │   │   ├── endpointgen_test.go
    │   │   │   ├── handlers.go
    │   │   │   ├── request.go
    │   │   │   ├── response.go
    │   │   │   └── testdata/
    │   │   │       ├── api_call.txt
    │   │   │       ├── api_call_servicestruct.txt
    │   │   │       ├── basic.txt
    │   │   │       ├── complex_omitempty.txt
    │   │   │       ├── endpoint_tags.txt
    │   │   │       ├── fallback_path.txt
    │   │   │       ├── path_params.txt
    │   │   │       ├── raw_endpoint.txt
    │   │   │       ├── recursive.txt
    │   │   │       ├── request_headers.txt
    │   │   │       ├── request_params.txt
    │   │   │       ├── request_query.txt
    │   │   │       ├── response_headers.txt
    │   │   │       ├── response_params.txt
    │   │   │       ├── response_status.txt
    │   │   │       ├── service_struct.txt
    │   │   │       └── unexported.txt
    │   │   ├── maingen/
    │   │   │   ├── load_app.go
    │   │   │   ├── maingen.go
    │   │   │   ├── maingen_test.go
    │   │   │   ├── testdata/
    │   │   │   │   ├── auth_handler.txt
    │   │   │   │   ├── basic.txt
    │   │   │   │   ├── multiple_services.txt
    │   │   │   │   ├── service_struct.txt
    │   │   │   │   └── subscription.txt
    │   │   │   └── testgen.go
    │   │   ├── middlewaregen/
    │   │   │   ├── middlewaregen.go
    │   │   │   ├── middlewaregen_test.go
    │   │   │   └── testdata/
    │   │   │       ├── basic.txt
    │   │   │       ├── global.txt
    │   │   │       └── service_struct.txt
    │   │   ├── servicestructgen/
    │   │   │   ├── servicestructgen.go
    │   │   │   ├── servicestructgen_test.go
    │   │   │   └── testdata/
    │   │   │       ├── basic.txt
    │   │   │       └── init_svc.txt
    │   │   ├── typescrub/
    │   │   │   ├── jen.go
    │   │   │   ├── typescrub.go
    │   │   │   └── typescrub_test.go
    │   │   └── userfacinggen/
    │   │       ├── testdata/
    │   │       │   └── service_struct.txt
    │   │       ├── userfacinggen.go
    │   │       └── userfacinggen_test.go
    │   ├── config.go
    │   ├── cuegen/
    │   │   ├── definition_generator.go
    │   │   ├── errors.go
    │   │   ├── generator.go
    │   │   ├── generator_test.go
    │   │   ├── service.go
    │   │   ├── testdata/
    │   │   │   ├── basic_config.txt
    │   │   │   ├── basic_config_svc.cue
    │   │   │   ├── basic_inline_struct.txt
    │   │   │   ├── basic_inline_struct_svc.cue
    │   │   │   ├── basic_lists.txt
    │   │   │   ├── basic_lists_svc.cue
    │   │   │   ├── basic_maps.txt
    │   │   │   ├── basic_maps_svc.cue
    │   │   │   ├── basic_named_struct_multiple_uses.txt
    │   │   │   ├── basic_named_struct_multiple_uses_svc.cue
    │   │   │   ├── basic_named_struct_single_use.txt
    │   │   │   ├── basic_named_struct_single_use_svc.cue
    │   │   │   ├── basic_no_config.txt
    │   │   │   ├── basic_no_config_svc.cue
    │   │   │   ├── basic_with_cue_imports.txt
    │   │   │   ├── basic_with_cue_imports_svc.cue
    │   │   │   ├── basic_wrappers.txt
    │   │   │   ├── basic_wrappers_svc.cue
    │   │   │   ├── cue_optional_tag.txt
    │   │   │   ├── cue_optional_tag_svc.cue
    │   │   │   ├── cue_tags.txt
    │   │   │   ├── cue_tags_svc.cue
    │   │   │   ├── generic_named_types.txt
    │   │   │   ├── generic_named_types_svc.cue
    │   │   │   ├── generic_top_level_type.txt
    │   │   │   ├── generic_top_level_type_svc.cue
    │   │   │   ├── json_tags.txt
    │   │   │   ├── json_tags_svc.cue
    │   │   │   ├── merge_identical_comments.txt
    │   │   │   ├── merge_identical_comments_svc.cue
    │   │   │   ├── multiple_configs_in_service.txt
    │   │   │   ├── multiple_configs_in_service_svc.cue
    │   │   │   ├── types_from_multiple_packages.txt
    │   │   │   └── types_from_multiple_packages_svc.cue
    │   │   └── utils.go
    │   ├── decls.go
    │   ├── errors.go
    │   ├── gen.go
    │   ├── infragen/
    │   │   ├── cachegen/
    │   │   │   └── cachegen.go
    │   │   ├── configgen/
    │   │   │   ├── configgen.go
    │   │   │   ├── configgen_test.go
    │   │   │   └── testdata/
    │   │   │       ├── basic_config.txt
    │   │   │       ├── basic_inline_struct.txt
    │   │   │       ├── basic_lists.txt
    │   │   │       ├── basic_maps.txt
    │   │   │       ├── basic_named_struct_multiple_uses.txt
    │   │   │       ├── basic_named_struct_single_use.txt
    │   │   │       ├── basic_no_config.txt
    │   │   │       ├── basic_with_cue_imports.txt
    │   │   │       ├── basic_wrappers.txt
    │   │   │       ├── cue_optional_tag.txt
    │   │   │       ├── cue_tags.txt
    │   │   │       ├── generics.txt
    │   │   │       ├── json_tags.txt
    │   │   │       ├── merge_identical_comments.txt
    │   │   │       ├── multi_package.txt
    │   │   │       ├── multiple_configs_in_service.txt
    │   │   │       └── name_conflicts.txt
    │   │   ├── infragen.go
    │   │   ├── metricsgen/
    │   │   │   └── metricsgen.go
    │   │   ├── pubsubgen/
    │   │   │   ├── pubsubgen.go
    │   │   │   ├── pubsubgen_test.go
    │   │   │   └── testdata/
    │   │   │       ├── basic.txt
    │   │   │       └── method_handler.txt
    │   │   └── secretsgen/
    │   │       └── secretsgen.go
    │   ├── internal/
    │   │   ├── codegentest/
    │   │   │   └── codegentest.go
    │   │   └── genutil/
    │   │       ├── etype.go
    │   │       └── types.go
    │   └── rewrite/
    │       ├── rewrite.go
    │       └── rewrite_test.go
    ├── compiler/
    │   └── build/
    │       ├── build.go
    │       ├── build_test.go
    │       ├── errors.go
    │       ├── testdata/
    │       │   ├── basic.txt
    │       │   ├── overlay.txt
    │       │   └── rewrite.txt
    │       └── tests.go
    ├── internals/
    │   ├── overlay/
    │   │   └── overlay.go
    │   ├── parsectx/
    │   │   └── pctx.go
    │   ├── perr/
    │   │   ├── aserror.go
    │   │   └── perr.go
    │   ├── pkginfo/
    │   │   ├── errors.go
    │   │   ├── loader.go
    │   │   ├── loader_test.go
    │   │   ├── modresolve.go
    │   │   ├── modresolve_test.go
    │   │   ├── names.go
    │   │   ├── names_test.go
    │   │   ├── pkgparse.go
    │   │   └── types.go
    │   ├── posmap/
    │   │   └── posmap.go
    │   ├── resourcepaths/
    │   │   ├── errors.go
    │   │   ├── paths.go
    │   │   └── paths_test.go
    │   ├── scan/
    │   │   ├── collect.go
    │   │   ├── collect_test.go
    │   │   ├── errors.go
    │   │   ├── scan.go
    │   │   └── scan_test.go
    │   ├── schema/
    │   │   ├── decls.go
    │   │   ├── errors.go
    │   │   ├── schema_parser.go
    │   │   ├── schema_parser_test.go
    │   │   ├── schematest/
    │   │   │   └── schematest.go
    │   │   ├── schemautil/
    │   │   │   ├── astutil.go
    │   │   │   ├── astutil_test.go
    │   │   │   ├── errors.go
    │   │   │   └── schemautil.go
    │   │   ├── types.go
    │   │   └── types_string.go
    │   └── testutil/
    │       ├── testutil.go
    │       ├── update_archive_file.go
    │       └── utils.go
    ├── parser/
    │   ├── apis/
    │   │   ├── api/
    │   │   │   ├── api.go
    │   │   │   ├── api_test.go
    │   │   │   ├── apienc/
    │   │   │   │   ├── encoding.go
    │   │   │   │   └── errors.go
    │   │   │   ├── errors.go
    │   │   │   └── usage.go
    │   │   ├── authhandler/
    │   │   │   ├── authhandler.go
    │   │   │   ├── authhandler_test.go
    │   │   │   ├── errors.go
    │   │   │   └── usage.go
    │   │   ├── directive/
    │   │   │   ├── directive.go
    │   │   │   ├── directive_test.go
    │   │   │   ├── errors.go
    │   │   │   └── fields.go
    │   │   ├── errors.go
    │   │   ├── middleware/
    │   │   │   ├── errors.go
    │   │   │   ├── middleware.go
    │   │   │   └── middleware_test.go
    │   │   ├── parser.go
    │   │   ├── selector/
    │   │   │   ├── errors.go
    │   │   │   ├── selector.go
    │   │   │   └── selector_test.go
    │   │   └── servicestruct/
    │   │       ├── errors.go
    │   │       ├── servicestruct.go
    │   │       ├── servicestruct_test.go
    │   │       └── usage.go
    │   ├── infra/
    │   │   ├── caches/
    │   │   │   ├── cache_test.go
    │   │   │   ├── cluster.go
    │   │   │   ├── errors.go
    │   │   │   ├── keyspace.go
    │   │   │   ├── keyspace_test.go
    │   │   │   ├── testdata/
    │   │   │   │   └── cluster.txt
    │   │   │   └── usage.go
    │   │   ├── config/
    │   │   │   ├── config.go
    │   │   │   ├── errors.go
    │   │   │   └── usage.go
    │   │   ├── crons/
    │   │   │   ├── cron.go
    │   │   │   ├── cron_test.go
    │   │   │   └── errors.go
    │   │   ├── internal/
    │   │   │   ├── literals/
    │   │   │   │   ├── constants.go
    │   │   │   │   ├── decode.go
    │   │   │   │   ├── decode_test.go
    │   │   │   │   ├── errors.go
    │   │   │   │   ├── literals.go
    │   │   │   │   └── literals_test.go
    │   │   │   ├── locations/
    │   │   │   │   ├── locations.go
    │   │   │   │   └── locations_test.go
    │   │   │   └── parseutil/
    │   │   │       ├── aststringer.go
    │   │   │       ├── errors.go
    │   │   │       ├── names.go
    │   │   │       ├── parseutil.go
    │   │   │       └── reference.go
    │   │   ├── metrics/
    │   │   │   ├── errors.go
    │   │   │   ├── metrics.go
    │   │   │   ├── metrics_string.go
    │   │   │   └── metrics_test.go
    │   │   ├── objects/
    │   │   │   ├── bucket.go
    │   │   │   ├── errors.go
    │   │   │   ├── usage.go
    │   │   │   └── usage_test.go
    │   │   ├── pubsub/
    │   │   │   ├── errors.go
    │   │   │   ├── subscription.go
    │   │   │   ├── topic.go
    │   │   │   ├── usage.go
    │   │   │   └── usage_test.go
    │   │   ├── secrets/
    │   │   │   ├── errors.go
    │   │   │   └── secrets.go
    │   │   └── sqldb/
    │   │       ├── errors.go
    │   │       ├── implicit.go
    │   │       ├── named.go
    │   │       ├── sqldb.go
    │   │       ├── sqldb_test.go
    │   │       └── usage.go
    │   ├── internal/
    │   │   └── utils/
    │   │       └── prettyprint.go
    │   ├── parser.go
    │   ├── parser_test.go
    │   ├── resource/
    │   │   ├── bind.go
    │   │   ├── resource.go
    │   │   ├── resource_string.go
    │   │   ├── resourceparser/
    │   │   │   ├── registry.go
    │   │   │   └── resourceparser.go
    │   │   ├── resourcetest/
    │   │   │   └── resourcetest.go
    │   │   └── usage/
    │   │       ├── resolver.go
    │   │       ├── testdata/
    │   │       │   ├── pubsub_usage.txt
    │   │       │   ├── secret_usage.txt
    │   │       │   └── sqldb_usage.txt
    │   │       ├── usage.go
    │   │       ├── usage_test.go
    │   │       └── usagetest/
    │   │           └── usagetest.go
    │   └── result.go
    ├── tsbuilder/
    │   └── tsbuilder.go
    └── v2builder/
        └── v2builder.go
Download .txt
Showing preview only (1,626K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (19069 symbols across 1259 files)

FILE: cli/cmd/encore/app/app.go
  function init (line 21) | func init() {

FILE: cli/cmd/encore/app/clone.go
  function init (line 40) | func init() {

FILE: cli/cmd/encore/app/create.go
  function init (line 86) | func init() {
  function promptAccountCreation (line 94) | func promptAccountCreation() {
  function promptRunApp (line 130) | func promptRunApp() bool {
  function createApp (line 161) | func createApp(ctx context.Context, name, template string, lang cmdutil....
  function detectLang (line 392) | func detectLang(appRoot string) cmdutil.Language {
  function validateName (line 401) | func validateName(name string) error {
  function gogetEncore (line 426) | func gogetEncore(dir string) error {
  function npmInstallEncore (line 449) | func npmInstallEncore(dir string) error {
  function createAppOnServer (line 475) | func createAppOnServer(name string, cfg exampleConfig) (*platform.App, e...
  function parseTemplate (line 489) | func parseTemplate(ctx context.Context, tmpl string) (*github.Tree, erro...
  function initGitRepo (line 501) | func initGitRepo(path string, app *platform.App) (err error) {
  function addEncoreRemote (line 552) | func addEncoreRemote(root, appID string) {
  function gitUserConfigured (line 572) | func gitUserConfigured() (bool, error) {
  function rewritePlaceholders (line 586) | func rewritePlaceholders(basePath string, app *platform.App) error {
  function rewritePlaceholder (line 611) | func rewritePlaceholder(path string, info fs.DirEntry, app *platform.App...
  type exampleConfig (line 637) | type exampleConfig struct
  function parseExampleConfig (line 646) | func parseExampleConfig(repoPath string) (cfg exampleConfig, err error) {
  function exampleJSONPath (line 673) | func exampleJSONPath(repoPath string) string {
  function setEncoreAppID (line 679) | func setEncoreAppID(data []byte, id string, commentLines []string) ([]by...
  function generateWrappers (line 734) | func generateWrappers(dir string) error {

FILE: cli/cmd/encore/app/create_form.go
  type templateItem (line 28) | type templateItem struct
    method Title (line 35) | func (i templateItem) Title() string       { return i.ItemTitle }
    method Description (line 36) | func (i templateItem) Description() string { return i.Desc }
    method FilterValue (line 37) | func (i templateItem) FilterValue() string { return i.ItemTitle }
  type CreateStep (line 39) | type CreateStep
  constant CreateStepLang (line 42) | CreateStepLang CreateStep = iota
  constant CreateStepTemplate (line 43) | CreateStepTemplate
  constant CreateStepAppName (line 44) | CreateStepAppName
  constant CreateStepLLMRules (line 45) | CreateStepLLMRules
  type createFormModel (line 48) | type createFormModel struct
    method currentStep (line 63) | func (m createFormModel) currentStep() option.Option[CreateStep] {
    method hasStep (line 70) | func (m createFormModel) hasStep(s CreateStep) bool {
    method removeStep (line 74) | func (m *createFormModel) removeStep(s CreateStep) {
    method Init (line 80) | func (m createFormModel) Init() tea.Cmd {
    method Update (line 242) | func (m createFormModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    method SetSize (line 328) | func (m *createFormModel) SetSize(width, height int) {
    method doneView (line 342) | func (m createFormModel) doneView() string {
    method View (line 390) | func (m createFormModel) View() string {
  constant checkmark (line 87) | checkmark = "✔"
  type appNameDone (line 89) | type appNameDone struct
  type appNameModel (line 91) | type appNameModel struct
    method Init (line 97) | func (m appNameModel) Init() tea.Cmd {
    method Selected (line 103) | func (m appNameModel) Selected() string {
    method Update (line 110) | func (m appNameModel) Update(msg tea.Msg) (appNameModel, tea.Cmd) {
    method View (line 136) | func (m appNameModel) View() string {
  type templateListModel (line 153) | type templateListModel struct
    method Init (line 162) | func (m templateListModel) Init() tea.Cmd {
    method SetSize (line 169) | func (m *templateListModel) SetSize(width, height int) {
    method Update (line 176) | func (m templateListModel) Update(msg tea.Msg) (templateListModel, tea...
    method UpdateFilter (line 206) | func (m *templateListModel) UpdateFilter(lang cmdutil.Language) {
    method refreshFilter (line 211) | func (m *templateListModel) refreshFilter() {
    method View (line 221) | func (m templateListModel) View() string {
    method Selected (line 231) | func (m templateListModel) Selected() string {
    method SelectedItem (line 421) | func (m templateListModel) SelectedItem() (templateItem, bool) {
  type templateSelectDone (line 174) | type templateSelectDone struct
  function createAppForm (line 433) | func createAppForm(inputName, inputTemplate string, inputLang cmdutil.La...
  type langItem (line 620) | type langItem struct
    method FilterValue (line 625) | func (i langItem) FilterValue() string          { return i.lang.Displa...
    method Title (line 626) | func (i langItem) Title() string                { return i.FilterValue...
    method Description (line 627) | func (i langItem) Description() string          { return "" }
    method SelectedID (line 628) | func (i langItem) SelectedID() cmdutil.Language { return i.lang }
  type loadedTemplates (line 633) | type loadedTemplates
  function fetchTemplates (line 707) | func fetchTemplates(url string, defaults []templateItem) []templateItem {
  function loadTemplates (line 726) | func loadTemplates() tea.Msg {
  function incrementalValidateNameInput (line 747) | func incrementalValidateNameInput(name string) error {

FILE: cli/cmd/encore/app/create_test.go
  function Test_setEncoreAppID (line 8) | func Test_setEncoreAppID(t *testing.T) {

FILE: cli/cmd/encore/app/initialize.go
  constant tsEncoreAppData (line 21) | tsEncoreAppData = `{%s
  constant goEncoreAppData (line 26) | goEncoreAppData = `{%s
  function init (line 46) | func init() {
  function initializeApp (line 68) | func initializeApp(name string) error {

FILE: cli/cmd/encore/app/link.go
  function init (line 39) | func init() {
  function linkApp (line 44) | func linkApp(appID string, force bool) {
  function validateAppSlug (line 131) | func validateAppSlug(slug string) (ok bool, err error) {

FILE: cli/cmd/encore/auth/auth.go
  function init (line 18) | func init() {
  type Flow (line 83) | type Flow
  constant AutoFlow (line 86) | AutoFlow Flow = iota
  constant Interactive (line 87) | Interactive
  constant DeviceAuth (line 88) | DeviceAuth
  function DoLogin (line 91) | func DoLogin(flow Flow) (err error) {
  function DoLogout (line 113) | func DoLogout() {
  function DoLoginWithAuthKey (line 123) | func DoLoginWithAuthKey() error {
  function Whoami (line 135) | func Whoami() {

FILE: cli/cmd/encore/bits/add.go
  function init (line 59) | func init() {

FILE: cli/cmd/encore/bits/api.go
  type Bit (line 13) | type Bit struct
  type ListResponse (line 22) | type ListResponse struct
  function List (line 26) | func List(ctx context.Context) ([]*Bit, error) {
  function Get (line 46) | func Get(ctx context.Context, slug string) (*Bit, error) {

FILE: cli/cmd/encore/bits/bits.go
  function init (line 14) | func init() {

FILE: cli/cmd/encore/bits/list.go
  function init (line 35) | func init() {

FILE: cli/cmd/encore/build.go
  function init (line 32) | func init() {
  type buildParams (line 78) | type buildParams struct
  function dockerBuild (line 93) | func dockerBuild(p buildParams) {
  function or (line 152) | func or(a, b string) string {

FILE: cli/cmd/encore/check.go
  function init (line 31) | func init() {
  function runChecks (line 37) | func runChecks(appRoot, relPath string) {

FILE: cli/cmd/encore/cmdutil/autocompletes.go
  function AutoCompleteFromStaticList (line 13) | func AutoCompleteFromStaticList(args ...string) func(cmd *cobra.Command,...
  function AutoCompleteAppSlug (line 29) | func AutoCompleteAppSlug(cmd *cobra.Command, _ []string, toComplete stri...
  function AutoCompleteEnvSlug (line 58) | func AutoCompleteEnvSlug(cmd *cobra.Command, args []string, toComplete s...

FILE: cli/cmd/encore/cmdutil/cmdutil.go
  function MaybeAppRoot (line 33) | func MaybeAppRoot() (appRoot, relPath string, err error) {
  function FindAppRootFromDir (line 41) | func FindAppRootFromDir(dir string) (appRoot, relPath string, err error) {
  function AppRoot (line 66) | func AppRoot() (appRoot, relPath string) {
  function WorkspaceRoot (line 76) | func WorkspaceRoot(appRoot string) string {
  function AppSlugOrLocalID (line 98) | func AppSlugOrLocalID() string {
  function AppSlug (line 113) | func AppSlug() string {
  function Fatal (line 124) | func Fatal(args ...any) {
  function Fatalf (line 140) | func Fatalf(format string, args ...any) {
  function DisplayError (line 153) | func DisplayError(out *os.File, err []byte) {
  function init (line 180) | func init() {

FILE: cli/cmd/encore/cmdutil/daemon.go
  function IsDaemonRunning (line 23) | func IsDaemonRunning(ctx context.Context) bool {
  function ConnectDaemon (line 43) | func ConnectDaemon(ctx context.Context) daemonpb.DaemonClient {
  function StopDaemon (line 97) | func StopDaemon() {
  function daemonSockPath (line 108) | func daemonSockPath() (string, error) {
  function StartDaemonInBackground (line 117) | func StartDaemonInBackground(ctx context.Context) error {
  function dialDaemon (line 151) | func dialDaemon(ctx context.Context, socketPath string) (*grpc.ClientCon...
  function errInterceptor (line 168) | func errInterceptor(ctx context.Context, method string, req, reply inter...

FILE: cli/cmd/encore/cmdutil/forms.go
  constant CodeBlue (line 12) | CodeBlue       = "#6D89FF"
  constant CodePurple (line 13) | CodePurple     = "#A36C8C"
  constant CodeGreen (line 14) | CodeGreen      = "#B3D77E"
  constant ValidationFail (line 15) | ValidationFail = "#CB1010"
  type SelectedID (line 26) | type SelectedID interface
  type Selectable (line 30) | type Selectable interface
  type SimpleSelectDone (line 35) | type SimpleSelectDone struct
  type SimpleSelectModel (line 39) | type SimpleSelectModel struct
  method Selected (line 44) | func (m SimpleSelectModel[T, S]) Selected() T {
  method Update (line 56) | func (m SimpleSelectModel[T, I]) Update(msg tea.Msg) (SimpleSelectModel[...
  method SetSize (line 78) | func (m *SimpleSelectModel[T, I]) SetSize(width, height int) {
  method View (line 83) | func (m SimpleSelectModel[T, I]) View() string {

FILE: cli/cmd/encore/cmdutil/language.go
  type Language (line 3) | type Language
    method Display (line 23) | func (lang Language) Display() string {
    method SelectPrompt (line 34) | func (lang Language) SelectPrompt() string {
  constant LanguageGo (line 6) | LanguageGo Language = "go"
  constant LanguageTS (line 7) | LanguageTS Language = "ts"
  function LanguageFlagValues (line 15) | func LanguageFlagValues() []string {

FILE: cli/cmd/encore/cmdutil/output.go
  type Oneof (line 13) | type Oneof struct
    method AddFlag (line 23) | func (o *Oneof) AddFlag(cmd *cobra.Command) {
    method FlagName (line 39) | func (o *Oneof) FlagName() (name, short string) {
    method String (line 47) | func (o *Oneof) String() string {
    method Type (line 51) | func (o *Oneof) Type() string {
    method Set (line 59) | func (o *Oneof) Set(v string) error {
    method Usage (line 71) | func (o *Oneof) Usage() string {
    method Alternatives (line 84) | func (o *Oneof) Alternatives() string {
    method oneOf (line 95) | func (o *Oneof) oneOf(b *strings.Builder) {

FILE: cli/cmd/encore/cmdutil/stream.go
  type CommandOutputStream (line 26) | type CommandOutputStream interface
  type OutputConverter (line 30) | type OutputConverter
  function StreamCommandOutput (line 36) | func StreamCommandOutput(stream CommandOutputStream, converter OutputCon...
  type ConvertLogOptions (line 116) | type ConvertLogOptions struct
  type ConvertLogOption (line 120) | type ConvertLogOption
  function Colorize (line 122) | func Colorize(enable bool) ConvertLogOption {
  function ConvertJSONLogs (line 128) | func ConvertJSONLogs(opts ...ConvertLogOption) OutputConverter {
  function FormatStack (line 174) | func FormatStack(val any, buf *bytes.Buffer) error {
  function ClearTerminalExceptFirstNLines (line 194) | func ClearTerminalExceptFirstNLines(n int) {

FILE: cli/cmd/encore/config/config.go
  function init (line 115) | func init() {
  function bt (line 125) | func bt(val string) string {

FILE: cli/cmd/encore/daemon.go
  function init (line 33) | func init() {
  function setupDaemon (line 39) | func setupDaemon(ctx context.Context) daemonpb.DaemonClient {

FILE: cli/cmd/encore/daemon/daemon.go
  function Main (line 61) | func Main() {
  function runMain (line 72) | func runMain() (err error) {
  type Daemon (line 97) | type Daemon struct
    method init (line 127) | func (d *Daemon) init(ctx context.Context) {
    method serve (line 189) | func (d *Daemon) serve() {
    method listenDaemonSocket (line 201) | func (d *Daemon) listenDaemonSocket() *net.UnixListener {
    method serveDaemon (line 255) | func (d *Daemon) serveDaemon() {
    method serveRuntime (line 262) | func (d *Daemon) serveRuntime() {
    method serveDBProxy (line 269) | func (d *Daemon) serveDBProxy() {
    method serveMCP (line 274) | func (d *Daemon) serveMCP() {
    method serveObjects (line 279) | func (d *Daemon) serveObjects() {
    method serveDash (line 284) | func (d *Daemon) serveDash() {
    method serveDebug (line 290) | func (d *Daemon) serveDebug() {
    method listenTCPRetry (line 304) | func (d *Daemon) listenTCPRetry(component string, addrOverride option....
    method openDB (line 317) | func (d *Daemon) openDB() *sql.DB {
    method runDBMigrations (line 352) | func (d *Daemon) runDBMigrations(db *sql.DB) error {
    method closeOnExit (line 443) | func (d *Daemon) closeOnExit(c io.Closer) {
    method closeAll (line 447) | func (d *Daemon) closeAll() {
  function failedPreconditionError (line 228) | func failedPreconditionError(msg, typ, desc string) error {
  function ErrInterceptor (line 245) | func ErrInterceptor(ctx context.Context, req interface{}, info *grpc.Una...
  function detectSocketClose (line 411) | func detectSocketClose(ln *net.UnixListener, socketPath string) error {
  type bailout (line 453) | type bailout struct
  function fatal (line 457) | func fatal(err error) {
  function fatalf (line 461) | func fatalf(format string, args ...interface{}) {
  function handleBailout (line 465) | func handleBailout(err *error) {
  function redirectLogOutput (line 476) | func redirectLogOutput() error {
  type retryingTCPListener (line 503) | type retryingTCPListener struct
    method Accept (line 529) | func (ln *retryingTCPListener) Accept() (net.Conn, error) {
    method Close (line 541) | func (ln *retryingTCPListener) Close() error {
    method Addr (line 553) | func (ln *retryingTCPListener) Addr() net.Addr {
    method ClientAddr (line 557) | func (ln *retryingTCPListener) ClientAddr() string {
    method Port (line 569) | func (ln *retryingTCPListener) Port() int {
    method listen (line 573) | func (ln *retryingTCPListener) listen() {
  function listenLocalhostTCP (line 516) | func listenLocalhostTCP(component string, addr netip.AddrPort) *retrying...
  function parseInterface (line 602) | func parseInterface(s string) (netip.AddrPort, error) {
  function splitAddrPort (line 647) | func splitAddrPort(s string) (ip, port string, v6 bool, err error) {

FILE: cli/cmd/encore/daemon/migrations/1_initial_schema.up.sql
  type app (line 1) | CREATE TABLE IF NOT EXISTS app (
  type trace_event (line 8) | CREATE TABLE IF NOT EXISTS trace_event (
  type trace_event_span_key (line 16) | CREATE INDEX IF NOT EXISTS trace_event_span_key ON trace_event (trace_id...
  type trace_span_index (line 18) | CREATE TABLE IF NOT EXISTS trace_span_index (

FILE: cli/cmd/encore/daemon/migrations/2_infra_namespaces.up.sql
  type namespace (line 1) | CREATE TABLE IF NOT EXISTS namespace (
  type active_namespace (line 12) | CREATE UNIQUE INDEX active_namespace ON namespace (app_id) WHERE active ...

FILE: cli/cmd/encore/db.go
  function getDBRole (line 38) | func getDBRole() daemonpb.DBRole {
  function init (line 294) | func init() {
  function dbClusterType (line 335) | func dbClusterType() daemonpb.DBClusterType {

FILE: cli/cmd/encore/debug.go
  function init (line 14) | func init() {
  type dumpMetaParams (line 59) | type dumpMetaParams struct
  function dumpMeta (line 67) | func dumpMeta(p dumpMetaParams) {

FILE: cli/cmd/encore/deploy.go
  function init (line 94) | func init() {

FILE: cli/cmd/encore/exec.go
  function execScript (line 43) | func execScript(appRoot, relWD string, args []string) {
  function init (line 145) | func init() {
  function init (line 149) | func init() {

FILE: cli/cmd/encore/gen.go
  function init (line 19) | func init() {

FILE: cli/cmd/encore/init_windows.go
  function init (line 12) | func init() {
  function setConsoleMode (line 18) | func setConsoleMode(handle windows.Handle, flag uint32) {

FILE: cli/cmd/encore/k8s/auth.go
  function init (line 23) | func init() {
  function generateExecCredentials (line 30) | func generateExecCredentials() {

FILE: cli/cmd/encore/k8s/config.go
  function init (line 51) | func init() {
  function configureForAppEnv (line 57) | func configureForAppEnv(ctx context.Context, appID string, envName strin...
  function readKubeConfig (line 175) | func readKubeConfig(file string) (*Cfg, error) {
  function writeKubeConfig (line 230) | func writeKubeConfig(file string, cfg *Cfg) error {
  type Cfg (line 254) | type Cfg struct
  function appendOrUpdate (line 263) | func appendOrUpdate(dst []any, val map[string]any) []any {

FILE: cli/cmd/encore/k8s/kubernetes.go
  function init (line 15) | func init() {

FILE: cli/cmd/encore/k8s/types/clientauthentication_types.go
  type ExecCredential (line 21) | type ExecCredential struct
  type ExecCredentialSpec (line 35) | type ExecCredentialSpec struct
  type ExecCredentialStatus (line 52) | type ExecCredentialStatus struct
  type Cluster (line 71) | type Cluster struct

FILE: cli/cmd/encore/k8s/types/homedir.go
  function HomeDir (line 31) | func HomeDir() string {

FILE: cli/cmd/encore/k8s/types/meta_types.go
  type TypeMeta (line 29) | type TypeMeta struct
  type Time (line 53) | type Time struct
    method UnmarshalJSON (line 63) | func (t *Time) UnmarshalJSON(b []byte) error {
    method MarshalJSON (line 85) | func (t Time) MarshalJSON() ([]byte, error) {
  function NewTime (line 58) | func NewTime(time time.Time) Time {

FILE: cli/cmd/encore/k8s/types/runtime_types.go
  type RawExtension (line 68) | type RawExtension struct

FILE: cli/cmd/encore/llm_rules/init.go
  function init (line 29) | func init() {
  function initLLMRules (line 59) | func initLLMRules(tool Tool) error {
  type toolSelectorModel (line 143) | type toolSelectorModel struct
    method Update (line 148) | func (t toolSelectorModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
    method Init (line 179) | func (t toolSelectorModel) Init() tea.Cmd {
    method View (line 183) | func (t toolSelectorModel) View() string {
    method SetSize (line 189) | func (t *toolSelectorModel) SetSize(width, height int) {

FILE: cli/cmd/encore/llm_rules/llm_rules.go
  function init (line 14) | func init() {

FILE: cli/cmd/encore/llm_rules/tool.go
  constant mdcTemplate (line 17) | mdcTemplate string = `---
  type Tool (line 25) | type Tool
    method Display (line 54) | func (e Tool) Display() string {
    method SelectPrompt (line 71) | func (e Tool) SelectPrompt() string {
  constant LLMRulesToolNone (line 29) | LLMRulesToolNone      Tool = ""
  constant LLMRulesToolCursor (line 30) | LLMRulesToolCursor    Tool = "cursor"
  constant LLMRulesToolClaudCode (line 31) | LLMRulesToolClaudCode Tool = "claudecode"
  constant LLMRulesToolVSCode (line 32) | LLMRulesToolVSCode    Tool = "vscode"
  constant LLMRulesToolAgentsMD (line 33) | LLMRulesToolAgentsMD  Tool = "agentsmd"
  constant LLMRulesToolZed (line 34) | LLMRulesToolZed       Tool = "zed"
  function LLMRulesFlagValues (line 46) | func LLMRulesFlagValues() []string {
  type ToolItem (line 75) | type ToolItem struct
    method FilterValue (line 83) | func (i ToolItem) FilterValue() string { return i.tool.Display() }
    method Title (line 84) | func (i ToolItem) Title() string       { return i.FilterValue() }
    method Description (line 85) | func (i ToolItem) Description() string { return "" }
    method SelectedID (line 86) | func (i ToolItem) SelectedID() Tool    { return i.tool }
  function NewLLMRulesItem (line 79) | func NewLLMRulesItem(tool Tool) ToolItem {
  function SetupLLMRules (line 91) | func SetupLLMRules(llmRules Tool, lang cmdutil.Language, appRootRelpath ...
  function PrintLLMRulesInfo (line 225) | func PrintLLMRulesInfo(tool Tool) {
  function updateJsonFile (line 246) | func updateJsonFile(path, parent string, updateFn func(field map[string]...
  function writeNewFileOrSkip (line 282) | func writeNewFileOrSkip(filePath string, data []byte) error {
  function downloadLLMInstructions (line 297) | func downloadLLMInstructions(lang cmdutil.Language) (string, error) {

FILE: cli/cmd/encore/logs.go
  function streamLogs (line 39) | func streamLogs(appRoot, envName string) {
  function mapCloudFieldNamesToExpected (line 105) | func mapCloudFieldNamesToExpected(jsonBytes []byte) []byte {
  function init (line 135) | func init() {

FILE: cli/cmd/encore/main.go
  function main (line 25) | func main() {
  function determineAppRoot (line 39) | func determineAppRoot() (appRoot, relPath string) {
  function determineWorkspaceRoot (line 43) | func determineWorkspaceRoot(appRoot string) string {
  function resolvePackages (line 47) | func resolvePackages(dir string, patterns ...string) ([]string, error) {
  function displayError (line 63) | func displayError(out *os.File, err []byte) {
  function fatal (line 67) | func fatal(args ...interface{}) {
  function fatalf (line 71) | func fatalf(format string, args ...interface{}) {
  function nonZeroPtr (line 75) | func nonZeroPtr[T comparable](v T) *T {

FILE: cli/cmd/encore/mcp.go
  type sseConnection (line 53) | type sseConnection struct
    method Read (line 67) | func (c *sseConnection) Read() (typ, data string, err error) {
    method Close (line 76) | func (c *sseConnection) Close() error {
    method reconnect (line 84) | func (c *sseConnection) reconnect(ctx context.Context) error {
    method connect (line 132) | func (c *sseConnection) connect(ctx context.Context) error {
    method SendMessage (line 168) | func (c *sseConnection) SendMessage(data []byte) error {
    method CreateErrorResponse (line 201) | func (c *sseConnection) CreateErrorResponse(id *jsonrpc2.ID, code int,...
    method RemoveRequestID (line 234) | func (c *sseConnection) RemoveRequestID(id jsonrpc2.ID) {
  type lineResult (line 348) | type lineResult struct
  function startLineReader (line 353) | func startLineReader[T any](ctx context.Context, rd func(byte) (T, error...
  function eventReader (line 379) | func eventReader(reader func() (string, error)) func() (typ, data string...
  function init (line 404) | func init() {

FILE: cli/cmd/encore/namespace/namespace.go
  function init (line 28) | func init() {
  function init (line 151) | func init() {
  function init (line 187) | func init() {
  function namespaceListCompletion (line 193) | func namespaceListCompletion(cmd *cobra.Command, args []string, toComple...

FILE: cli/cmd/encore/rand.go
  function init (line 25) | func init() {
  function init (line 30) | func init() {
  function init (line 64) | func init() {
  function init (line 155) | func init() {

FILE: cli/cmd/encore/root/rootcmd.go
  function AddPreRun (line 23) | func AddPreRun(f func(cmd *cobra.Command, args []string)) {
  function init (line 57) | func init() {

FILE: cli/cmd/encore/run.go
  function init (line 56) | func init() {
  function runApp (line 90) | func runApp(appRoot, wd string) {
  function init (line 164) | func init() {

FILE: cli/cmd/encore/secrets/archive.go
  function doArchiveOrUnarchive (line 33) | func doArchiveOrUnarchive(groupID string, archive bool) {
  function init (line 41) | func init() {

FILE: cli/cmd/encore/secrets/delete.go
  function doDelete (line 38) | func doDelete(groupID string, delete bool) {
  function init (line 56) | func init() {

FILE: cli/cmd/encore/secrets/list.go
  function init (line 136) | func init() {
  type secretEnvDesc (line 140) | type secretEnvDesc struct
  function getSecretEnvDesc (line 146) | func getSecretEnvDesc(groups []*gql.SecretGroup) secretEnvDesc {

FILE: cli/cmd/encore/secrets/secrets.go
  function init (line 15) | func init() {

FILE: cli/cmd/encore/secrets/set.go
  type secretEnvSelector (line 57) | type secretEnvSelector struct
    method ParseSelector (line 137) | func (s secretEnvSelector) ParseSelector(ctx context.Context, appSlug ...
  function init (line 64) | func init() {
  function setSecret (line 74) | func setSecret(key string) {
  function readSecretValue (line 210) | func readSecretValue() string {
  function findMatchingSecretGroup (line 233) | func findMatchingSecretGroup(secrets []*gql.Secret, key string, selector...
  function getConflictError (line 258) | func getConflictError(err error) (*gql.ConflictError, bool) {

FILE: cli/cmd/encore/sqlc.go
  type sqlcSQL (line 19) | type sqlcSQL struct
  type sqlcCodegen (line 26) | type sqlcCodegen struct
  type sqlcPlugin (line 31) | type sqlcPlugin struct
  type sqlcProcess (line 36) | type sqlcProcess struct
  type sqlcConfig (line 40) | type sqlcConfig struct
  function init (line 46) | func init() {

FILE: cli/cmd/encore/telemetry.go
  function printTelemetryStatus (line 24) | func printTelemetryStatus() {
  function updateTelemetry (line 47) | func updateTelemetry(ctx context.Context) {
  function isCommand (line 96) | func isCommand(cmd *cobra.Command, name ...string) bool {
  function init (line 106) | func init() {

FILE: cli/cmd/encore/test.go
  function runTests (line 84) | func runTests(appRoot, testDir string, args []string, traceFile string, ...
  function init (line 169) | func init() {
  function convertTestEventOutputOnly (line 182) | func convertTestEventOutputOnly(converter cmdutil.OutputConverter) cmdut...
  type testJSONEvent (line 207) | type testJSONEvent struct
  type textBytes (line 220) | type textBytes
    method MarshalText (line 222) | func (b *textBytes) MarshalText() ([]byte, error) { return *b, nil }
    method UnmarshalText (line 223) | func (b *textBytes) UnmarshalText(in []byte) error {

FILE: cli/cmd/encore/version.go
  function init (line 92) | func init() {

FILE: cli/cmd/git-remote-encore/main.go
  function main (line 18) | func main() {
  function run (line 39) | func run(args []string) error {
  function connect (line 66) | func connect(args []string, svc string) error {
  constant SentinelPrivateKey (line 140) | SentinelPrivateKey = `-----BEGIN OPENSSH PRIVATE KEY-----

FILE: cli/cmd/tsbundler-encore/main.go
  function main (line 34) | func main() {
  function printHelp (line 142) | func printHelp() {
  function validateEntrypointParams (line 168) | func validateEntrypointParams() {
  function readEngines (line 267) | func readEngines() []api.Engine {

FILE: cli/daemon/apps/apps.go
  function NewManager (line 31) | func NewManager(db *sql.DB) *Manager {
  type Manager (line 39) | type Manager struct
    method Track (line 68) | func (mgr *Manager) Track(appRoot string, options ...TrackOption) (*In...
    method FindLatestByPlatformID (line 91) | func (mgr *Manager) FindLatestByPlatformID(platformID string) (*Instan...
    method FindLatestByPlatformOrLocalID (line 109) | func (mgr *Manager) FindLatestByPlatformOrLocalID(id string) (*Instanc...
    method List (line 133) | func (mgr *Manager) List() ([]*Instance, error) {
    method listRoots (line 157) | func (mgr *Manager) listRoots() ([]string, error) {
    method RegisterAppListener (line 178) | func (mgr *Manager) RegisterAppListener(fn func(*Instance)) {
    method WatchAll (line 196) | func (mgr *Manager) WatchAll(fn WatchFunc) error {
    method onWatchEvent (line 212) | func (mgr *Manager) onWatchEvent(i *Instance, ev []watcher.Event) {
    method resolve (line 225) | func (mgr *Manager) resolve(appRoot string) (*Instance, error) {
    method Close (line 260) | func (mgr *Manager) Close() error {
  type TrackOption (line 53) | type TrackOption
  function WithTutorial (line 55) | func WithTutorial(tutorial string) TrackOption {
  type WatchFunc (line 193) | type WatchFunc
  type Instance (line 275) | type Instance struct
    method Tutorial (line 308) | func (i *Instance) Tutorial() string {
    method Root (line 314) | func (i *Instance) Root() string { return i.root }
    method LocalID (line 319) | func (i *Instance) LocalID() string { return i.localID }
    method PlatformID (line 323) | func (i *Instance) PlatformID() string {
    method PlatformOrLocalID (line 329) | func (i *Instance) PlatformOrLocalID() string {
    method Name (line 338) | func (i *Instance) Name() string {
    method fetchPlatformID (line 346) | func (i *Instance) fetchPlatformID() (string, error) {
    method Experiments (line 369) | func (i *Instance) Experiments(environ []string) (*experiments.Set, er...
    method Lang (line 378) | func (i *Instance) Lang() appfile.Lang {
    method Hooks (line 386) | func (i *Instance) Hooks() (*appfile.Hooks, error) {
    method AppFile (line 394) | func (i *Instance) AppFile() (*appfile.File, error) {
    method BuildSettings (line 398) | func (i *Instance) BuildSettings() (appfile.Build, error) {
    method GlobalCORS (line 408) | func (i *Instance) GlobalCORS() (appfile.CORS, error) {
    method Watch (line 423) | func (i *Instance) Watch(fn WatchFunc) (WatchSubscriptionID, error) {
    method Unwatch (line 436) | func (i *Instance) Unwatch(id WatchSubscriptionID) {
    method beginWatch (line 442) | func (i *Instance) beginWatch() error {
    method CachePath (line 490) | func (i *Instance) CachePath() (string, error) {
    method CacheMetadata (line 506) | func (i *Instance) CacheMetadata(md *meta.Data) error {
    method CachedMetadata (line 531) | func (i *Instance) CachedMetadata() (*meta.Data, error) {
    method Close (line 562) | func (i *Instance) Close() error {
  function NewInstance (line 295) | func NewInstance(root, localID, platformID string) *Instance {
  function readPlatformID (line 350) | func readPlatformID(appRoot string) (string, error) {
  type WatchSubscriptionID (line 569) | type WatchSubscriptionID
  type watchSubscription (line 571) | type watchSubscription struct

FILE: cli/daemon/check.go
  method Check (line 9) | func (s *Server) Check(req *daemonpb.CheckRequest, stream daemonpb.Daemo...

FILE: cli/daemon/common.go
  method OnStart (line 21) | func (s *Server) OnStart(r *run.Run) {}
  method OnCompileStart (line 23) | func (s *Server) OnCompileStart(r *run.Run) {}
  method OnReload (line 26) | func (s *Server) OnReload(r *run.Run) {}
  method OnStop (line 29) | func (s *Server) OnStop(r *run.Run) {}
  method OnStdout (line 32) | func (s *Server) OnStdout(r *run.Run, line []byte) {
  method OnStderr (line 43) | func (s *Server) OnStderr(r *run.Run, line []byte) {
  method OnError (line 53) | func (s *Server) OnError(r *run.Run, err *errlist.List) {
  function showFirstRunExperience (line 63) | func showFirstRunExperience(run *run.Run, md *meta.Data, stdout io.Write...
  function findAvailableAddr (line 89) | func findAvailableAddr(startAddr string) (host string, port int, ok bool) {
  function genCurlCommand (line 111) | func genCurlCommand(run *run.Run, md *meta.Data, rpc *meta.RPC) string {
  function errIsAddrInUse (line 163) | func errIsAddrInUse(err error) bool {

FILE: cli/daemon/create.go
  method CreateApp (line 11) | func (s *Server) CreateApp(ctx context.Context, req *daemonpb.CreateAppR...

FILE: cli/daemon/daemon.go
  type Server (line 43) | type Server struct
    method GenClient (line 89) | func (s *Server) GenClient(ctx context.Context, params *daemonpb.GenCl...
    method SecretsRefresh (line 184) | func (s *Server) SecretsRefresh(ctx context.Context, req *daemonpb.Sec...
    method Version (line 194) | func (s *Server) Version(context.Context, *empty.Empty) (*daemonpb.Ver...
    method availableUpdate (line 208) | func (s *Server) availableUpdate() *update.LatestVersion {
  function New (line 64) | func New(appsMgr *apps.Manager, mgr *run.Manager, cm *sqldb.ClusterManag...
  type commandStream (line 262) | type commandStream interface
  function newStreamLogger (line 266) | func newStreamLogger(slog *streamLog) zerolog.Logger {
  type streamWriter (line 270) | type streamWriter struct
    method Write (line 277) | func (w streamWriter) Write(b []byte) (int, error) {
  function streamExit (line 290) | func streamExit(stream commandStream, code int) {
  type streamLog (line 298) | type streamLog struct
    method Stdout (line 307) | func (log *streamLog) Stdout(buffer bool) io.Writer {
    method Stderr (line 311) | func (log *streamLog) Stderr(buffer bool) io.Writer {
    method Error (line 315) | func (log *streamLog) Error(err *errlist.List) {
    method FlushBuffers (line 321) | func (log *streamLog) FlushBuffers() {
    method writeBuffered (line 339) | func (log *streamLog) writeBuffered(b **bytes.Buffer, p []byte) (int, ...
    method writeStream (line 346) | func (log *streamLog) writeStream(stderr bool, b []byte) (int, error) {

FILE: cli/daemon/dash/ai/assembler.go
  type partialEndpoint (line 15) | type partialEndpoint struct
    method notification (line 21) | func (e *partialEndpoint) notification() LocalEndpointUpdate {
    method upsertType (line 37) | func (e *partialEndpoint) upsertType(name, doc string) *Type {
    method upsertError (line 82) | func (e *partialEndpoint) upsertError(err ErrorUpdate) *Error {
    method upsertPathParam (line 96) | func (e *partialEndpoint) upsertPathParam(up PathParamUpdate) PathSegm...
    method upsertField (line 115) | func (e *partialEndpoint) upsertField(up TypeFieldUpdate) *Type {
  function wrapDoc (line 54) | func wrapDoc(doc string, width int) string {
  type endpointsAssembler (line 150) | type endpointsAssembler struct
    method upsertEndpoint (line 170) | func (s *endpointsAssembler) upsertEndpoint(e EndpointUpdate) *partial...
    method endpoint (line 222) | func (s *endpointsAssembler) endpoint(service, endpoint string) *parti...
  function newEndpointAssembler (line 154) | func newEndpointAssembler(existing []Service) *endpointsAssembler {
  function newEndpointAssemblerHandler (line 235) | func newEndpointAssemblerHandler(existing []Service, notifier AINotifier...

FILE: cli/daemon/dash/ai/client.go
  type TaskMessage (line 16) | type TaskMessage struct
    method GetValue (line 29) | func (u *TaskMessage) GetValue() AIUpdateType {
  type AIStreamMessage (line 51) | type AIStreamMessage struct
  type aiTask (line 57) | type aiTask struct
  function getClient (line 61) | func getClient(errHandler func(err error)) *graphql.SubscriptionClient {
  type AITask (line 81) | type AITask struct
    method Stop (line 86) | func (t *AITask) Stop() error {
  function startAITask (line 92) | func startAITask[Query any](ctx context.Context, params map[string]inter...
  type AINotification (line 141) | type AINotification struct
  type AIError (line 148) | type AIError struct
  type AINotifier (line 153) | type AINotifier

FILE: cli/daemon/dash/ai/codegen.go
  constant defAuthHandler (line 31) | defAuthHandler = `package auth
  constant PathDocPrefix (line 49) | PathDocPrefix = "Path Parameters"
  constant ErrDocPrefix (line 50) | ErrDocPrefix  = "Errors"
  method Render (line 53) | func (p PathSegments) Render() (docPath string, goParams []string) {
  method Render (line 74) | func (s *Type) Render() string {
  method Render (line 102) | func (e *Endpoint) Render() string {
  function indentItem (line 130) | func indentItem(header, comment string) string {
  function renderDocList (line 143) | func renderDocList[T interface{ DocItem() (string, string) }](header str...
  function fmtComment (line 168) | func fmtComment(comment string, before, after int, args ...any) string {
  function generateSrcFiles (line 178) | func generateSrcFiles(services []Service, app *apps.Instance) (map[paths...
  function addMissingFuncBodies (line 235) | func addMissingFuncBodies(content []byte) (string, error) {
  function writeFiles (line 256) | func writeFiles(services []Service, app *apps.Instance) ([]paths.RelSlas...
  function toSrcFile (line 273) | func toSrcFile(filePath paths.FS, svc string, srcs ...string) (offset to...
  function updateCode (line 303) | func updateCode(ctx context.Context, services []Service, app *apps.Insta...

FILE: cli/daemon/dash/ai/conv.go
  function toPathSegments (line 13) | func toPathSegments(p *resourcepaths.Path, docs map[string]string) []Pat...
  function metaPathToPathSegments (line 45) | func metaPathToPathSegments(metaPath *meta.Path) []PathSegment {
  function toSegmentValueType (line 57) | func toSegmentValueType(valueType meta.PathSegment_ParamType) SegmentVal...
  function toSegmentType (line 66) | func toSegmentType(segmentType meta.PathSegment_SegmentType) SegmentType {
  function toVisibility (line 81) | func toVisibility(accessType meta.RPC_AccessType) VisibilityType {
  function renderTypesFromMetadata (line 94) | func renderTypesFromMetadata(md *meta.Data, svcs ...string) string {
  function parseServicesFromMetadata (line 113) | func parseServicesFromMetadata(md *meta.Data, svcs ...string) []ServiceI...

FILE: cli/daemon/dash/ai/manager.go
  type Manager (line 17) | type Manager struct
    method DefineEndpoints (line 23) | func (m *Manager) DefineEndpoints(ctx context.Context, appSlug string,...
    method ProposeSystemDesign (line 37) | func (m *Manager) ProposeSystemDesign(ctx context.Context, appSlug, pr...
    method ModifySystemDesign (line 47) | func (m *Manager) ModifySystemDesign(ctx context.Context, appSlug stri...
    method ParseCode (line 60) | func (m *Manager) ParseCode(ctx context.Context, services []Service, a...
    method UpdateCode (line 64) | func (m *Manager) UpdateCode(ctx context.Context, services []Service, ...
    method WriteFiles (line 72) | func (m *Manager) WriteFiles(ctx context.Context, services []Service, ...
    method PreviewFiles (line 86) | func (m *Manager) PreviewFiles(ctx context.Context, services []Service...
  function NewAIManager (line 19) | func NewAIManager() *Manager {
  type WriteFilesResponse (line 68) | type WriteFilesResponse struct
  type PreviewFile (line 77) | type PreviewFile struct
  type PreviewFilesResponse (line 82) | type PreviewFilesResponse struct

FILE: cli/daemon/dash/ai/overlay.go
  type servicePaths (line 26) | type servicePaths struct
    method IsNew (line 32) | func (s *servicePaths) IsNew(svc string) bool {
    method Add (line 37) | func (s *servicePaths) Add(svc string, path paths.RelSlash) *servicePa...
    method PkgPath (line 42) | func (s *servicePaths) PkgPath(svc string) paths.Pkg {
    method FullPath (line 47) | func (s *servicePaths) FullPath(svc string) paths.FS {
    method RelPath (line 52) | func (s *servicePaths) RelPath(svc string) paths.RelSlash {
    method FileName (line 60) | func (s *servicePaths) FileName(svc, name string) (paths.FS, error) {
    method RelFileName (line 68) | func (s *servicePaths) RelFileName(svc, name string) (paths.RelSlash, ...
  function newServicePaths (line 85) | func newServicePaths(app *apps.Instance) (*servicePaths, error) {
  type overlay (line 107) | type overlay struct
    method Type (line 116) | func (o *overlay) Type() os.FileMode {
    method Info (line 120) | func (o *overlay) Info() (os.FileInfo, error) {
    method Name (line 124) | func (o *overlay) Name() string {
    method Size (line 128) | func (o *overlay) Size() int64 {
    method Mode (line 132) | func (o *overlay) Mode() os.FileMode {
    method ModTime (line 136) | func (o *overlay) ModTime() time.Time {
    method IsDir (line 140) | func (o *overlay) IsDir() bool {
    method Sys (line 144) | func (o *overlay) Sys() any {
    method Stat (line 149) | func (o *overlay) Stat() (os.FileInfo, error) {
    method Reader (line 153) | func (o *overlay) Reader() io.ReadCloser {
  type overlayReader (line 158) | type overlayReader struct
    method Close (line 163) | func (o *overlayReader) Close() error { return nil }
  function newOverlays (line 170) | func newOverlays(app *apps.Instance, overwrite bool, services ...Service...
  type overlays (line 195) | type overlays struct
    method Stat (line 200) | func (o *overlays) Stat(name string) (os.FileInfo, error) {
    method ReadDir (line 209) | func (o *overlays) ReadDir(name string) ([]os.DirEntry, error) {
    method PkgOverlay (line 227) | func (o *overlays) PkgOverlay() map[string][]byte {
    method ReadFile (line 235) | func (o *overlays) ReadFile(name string) ([]byte, error) {
    method Open (line 244) | func (o *overlays) Open(name string) (io.ReadCloser, error) {
    method pkgPaths (line 253) | func (o *overlays) pkgPaths() []paths.Pkg {
    method get (line 261) | func (o *overlays) get(p paths.FS) (*overlay, bool) {
    method validationErrors (line 267) | func (o *overlays) validationErrors(list *perr.List) []ValidationError {
    method validationError (line 278) | func (o *overlays) validationError(err *errinsrc.ErrInSrc) []Validatio...
    method add (line 313) | func (o *overlays) add(s Service, e *Endpoint) error {

FILE: cli/daemon/dash/ai/parser.go
  function parseErrorList (line 28) | func parseErrorList(doc string) (string, []*Error) {
  function parsePathList (line 39) | func parsePathList(doc string) (string, map[string]string) {
  function parseDocList (line 54) | func parseDocList(doc, section string) (string, []docListItem) {
  type docListItem (line 100) | type docListItem struct
  function deref (line 106) | func deref(p schema.Type) schema.Type {
  function parseCode (line 118) | func parseCode(ctx context.Context, app *apps.Instance, services []Servi...
  function parseTypeField (line 290) | func parseTypeField(f schema.StructField) (*TypeField, bool) {
  function docText (line 310) | func docText(c *ast.CommentGroup) string {

FILE: cli/daemon/dash/ai/sql.go
  function ParseSQLSchema (line 16) | func ParseSQLSchema(app *apps.Instance, schema string) (*daemon.SQLCPlug...

FILE: cli/daemon/dash/ai/types.go
  type VisibilityType (line 7) | type VisibilityType
  constant VisibilityTypePublic (line 10) | VisibilityTypePublic  VisibilityType = "public"
  constant VisibilityTypePrivate (line 11) | VisibilityTypePrivate VisibilityType = "private"
  constant VisibilityTypeAuth (line 12) | VisibilityTypeAuth    VisibilityType = "auth"
  type SegmentType (line 15) | type SegmentType
  constant SegmentTypeLiteral (line 18) | SegmentTypeLiteral  SegmentType = "literal"
  constant SegmentTypeParam (line 19) | SegmentTypeParam    SegmentType = "param"
  constant SegmentTypeWildcard (line 20) | SegmentTypeWildcard SegmentType = "wildcard"
  constant SegmentTypeFallback (line 21) | SegmentTypeFallback SegmentType = "fallback"
  type SegmentValueType (line 24) | type SegmentValueType
  constant SegmentValueTypeString (line 26) | SegmentValueTypeString SegmentValueType = "string"
  type PathSegments (line 28) | type PathSegments
  type PathSegment (line 30) | type PathSegment struct
    method DocItem (line 37) | func (p PathSegment) DocItem() (string, string) {
  type Endpoint (line 41) | type Endpoint struct
    method Auth (line 57) | func (s *Endpoint) Auth() bool {
    method GraphQL (line 62) | func (s *Endpoint) GraphQL() *Endpoint {
  type Type (line 74) | type Type struct
  type Service (line 80) | type Service struct
    method GetName (line 87) | func (s Service) GetName() string {
    method GetEndpoints (line 91) | func (s Service) GetEndpoints() []*Endpoint {
    method GraphQL (line 101) | func (s Service) GraphQL() ServiceInput {
  type ServiceInput (line 98) | type ServiceInput
  type BaseAIUpdateType (line 109) | type BaseAIUpdateType struct
    method IsAIUpdateType (line 113) | func (b BaseAIUpdateType) IsAIUpdateType() {}
  type AIUpdateType (line 115) | type AIUpdateType interface
  function ptr (line 121) | func ptr[T any](val T) *T {
  type Result (line 125) | type Result struct
  type EndpointUpdate (line 131) | type EndpointUpdate struct
  type ServiceUpdate (line 144) | type ServiceUpdate struct
  type TypeUpdate (line 150) | type TypeUpdate struct
  type AISessionID (line 158) | type AISessionID
  type SessionUpdate (line 160) | type SessionUpdate struct
  type TitleUpdate (line 165) | type TitleUpdate struct
  type LocalEndpointUpdate (line 170) | type LocalEndpointUpdate struct
  type TypeField (line 176) | type TypeField struct
  type TypeFieldUpdate (line 184) | type TypeFieldUpdate struct
  type Error (line 194) | type Error struct
    method DocItem (line 199) | func (e Error) DocItem() (string, string) {
    method String (line 203) | func (e Error) String() string {
  type ErrorUpdate (line 207) | type ErrorUpdate struct
  type PathParamUpdate (line 215) | type PathParamUpdate struct
  type SyncResult (line 223) | type SyncResult struct
  type ValidationError (line 229) | type ValidationError struct
  type CodeType (line 238) | type CodeType
  constant CodeTypeEndpoint (line 241) | CodeTypeEndpoint CodeType = "endpoint"
  constant CodeTypeTypes (line 242) | CodeTypeTypes    CodeType = "types"
  type Pos (line 245) | type Pos struct

FILE: cli/daemon/dash/ai/types_test.go
  function TestWrapDoc (line 9) | func TestWrapDoc(t *testing.T) {

FILE: cli/daemon/dash/apiproxy/apiproxy.go
  function New (line 16) | func New(targetURL string) (*httputil.ReverseProxy, error) {

FILE: cli/daemon/dash/dash.go
  type handler (line 37) | type handler struct
    method GetMeta (line 46) | func (h *handler) GetMeta(appID string) (*meta.Data, error) {
    method GetNamespace (line 66) | func (h *handler) GetNamespace(ctx context.Context, appID string) (*na...
    method Handle (line 83) | func (h *handler) Handle(ctx context.Context, reply jsonrpc2.Replier, ...
    method listenNotify (line 621) | func (h *handler) listenNotify(ctx context.Context, ch <-chan *notific...
  type sourceContextResponse (line 616) | type sourceContextResponse struct
  method listenTraces (line 634) | func (s *Server) listenTraces() {
  method OnStart (line 664) | func (s *Server) OnStart(r *run.Run) {
  method OnCompileStart (line 684) | func (s *Server) OnCompileStart(r *run.Run) {
  method OnReload (line 700) | func (s *Server) OnReload(r *run.Run) {
  method OnStop (line 714) | func (s *Server) OnStop(r *run.Run) {
  method OnStdout (line 728) | func (s *Server) OnStdout(r *run.Run, out []byte) {
  method OnStderr (line 733) | func (s *Server) OnStderr(r *run.Run, out []byte) {
  method OnError (line 737) | func (s *Server) OnError(r *run.Run, err *errlist.List) {
  method onOutput (line 758) | func (s *Server) onOutput(r *run.Run, out []byte) {
  function makeProtoReplier (line 774) | func makeProtoReplier(rep jsonrpc2.Replier) jsonrpc2.Replier {
  type appStatus (line 787) | type appStatus struct
  type dbMigrationHistory (line 801) | type dbMigrationHistory struct
  type dbMigration (line 806) | type dbMigration struct
  function buildAppStatus (line 813) | func buildAppStatus(app *apps.Instance, runInstance *run.Run) (s appStat...
  function buildDbMigrationStatus (line 863) | func buildDbMigrationStatus(ctx context.Context, appMeta *meta.Data, clu...
  function buildMigrationHistory (line 881) | func buildMigrationHistory(dbMeta *meta.SQLDatabase, appliedVersions map...

FILE: cli/daemon/dash/dash_test.go
  function TestBuildMigrationHistory (line 10) | func TestBuildMigrationHistory(t *testing.T) {

FILE: cli/daemon/dash/dashproxy/dashproxy.go
  function New (line 21) | func New(targetURL string) (*httputil.ReverseProxy, error) {
  type versionAddingTransport (line 68) | type versionAddingTransport struct
    method RoundTrip (line 72) | func (t *versionAddingTransport) RoundTrip(req *http.Request) (*http.R...

FILE: cli/daemon/dash/dbbrowser.go
  type QueryRequest (line 14) | type QueryRequest struct
  type TransactionRequest (line 23) | type TransactionRequest struct
  method Query (line 32) | func (h *handler) Query(ctx context.Context, req QueryRequest) ([]any, e...
  method Transaction (line 83) | func (h *handler) Transaction(ctx context.Context, req TransactionReques...
  method browserConn (line 136) | func (s *handler) browserConn(ctx context.Context, appID string, dbID st...

FILE: cli/daemon/dash/server.go
  function NewServer (line 31) | func NewServer(appsMgr *apps.Manager, runMgr *run.Manager, nsMgr *namesp...
  type Server (line 64) | type Server struct
    method ServeHTTP (line 79) | func (s *Server) ServeHTTP(w http.ResponseWriter, req *http.Request) {
    method WebSocket (line 91) | func (s *Server) WebSocket(w http.ResponseWriter, req *http.Request) {
    method addClient (line 122) | func (s *Server) addClient(ch chan *notification) {
    method removeClient (line 128) | func (s *Server) removeClient(ch chan *notification) {
    method hasClients (line 135) | func (s *Server) hasClients() bool {
    method notify (line 147) | func (s *Server) notify(n *notification) {
  type notification (line 141) | type notification struct
  type wsStream (line 164) | type wsStream struct
    method Close (line 169) | func (s *wsStream) Close() error {
    method Read (line 175) | func (s *wsStream) Read(context.Context) (jsonrpc2.Message, int64, err...
    method Write (line 190) | func (s *wsStream) Write(ctx context.Context, msg jsonrpc2.Message) (i...

FILE: cli/daemon/db.go
  function toRoleType (line 25) | func toRoleType(role daemonpb.DBRole) sqldb.RoleType {
  method DBConnect (line 42) | func (s *Server) DBConnect(ctx context.Context, req *daemonpb.DBConnectR...
  method dbConnectLocal (line 61) | func (s *Server) dbConnectLocal(ctx context.Context, req *daemonpb.DBCon...
  method DBProxy (line 170) | func (s *Server) DBProxy(params *daemonpb.DBProxyRequest, stream daemonp...
  method DBReset (line 297) | func (s *Server) DBReset(req *daemonpb.DBResetRequest, stream daemonpb.D...
  function serveProxy (line 375) | func serveProxy(ctx context.Context, ln net.Listener, handler func(conte...
  function getClusterType (line 400) | func getClusterType(req interface{ GetClusterType() daemonpb.DBClusterTy...

FILE: cli/daemon/debug.go
  method DumpMeta (line 21) | func (s *Server) DumpMeta(ctx context.Context, req *daemonpb.DumpMetaReq...

FILE: cli/daemon/engine/runtime.go
  type server (line 16) | type server struct
    method ServeHTTP (line 27) | func (s *server) ServeHTTP(w http.ResponseWriter, req *http.Request) {
    method RecordTrace (line 36) | func (s *server) RecordTrace(w http.ResponseWriter, req *http.Request) {
    method parseTraceData (line 50) | func (s *server) parseTraceData(req *http.Request) (d trace2.RecordDat...
  function NewServer (line 21) | func NewServer(runMgr *run.Manager, rec *trace2.Recorder) http.Handler {

FILE: cli/daemon/engine/trace/parse_test.go
  type parseTest (line 15) | type parseTest struct
  method Name (line 21) | func (pt parseTest[T]) Name() string {
  method Data (line 25) | func (pt parseTest[T]) Data() []byte {
  function TestParse (line 31) | func TestParse(t *testing.T) {

FILE: cli/daemon/engine/trace/trace.go
  type ID (line 26) | type ID
  type TraceMeta (line 28) | type TraceMeta struct
  type Store (line 38) | type Store struct
    method Listen (line 55) | func (st *Store) Listen(ch chan<- *TraceMeta) {
    method Store (line 61) | func (st *Store) Store(ctx context.Context, tr *TraceMeta) error {
    method GetRootTrace (line 90) | func (st *Store) GetRootTrace(traceID *tracepb.TraceID) (rtn *tracepb....
    method List (line 103) | func (st *Store) List(appID string) []*TraceMeta {
  function NewStore (line 47) | func NewStore() *Store {
  function Parse (line 110) | func Parse(log *zerolog.Logger, traceID ID, data []byte, version trace.V...
  type goKey (line 137) | type goKey struct
  type SymTabler (line 142) | type SymTabler interface
  type traceParser (line 146) | type traceParser struct
    method Parse (line 164) | func (tp *traceParser) Parse() error {
    method parseEventV3 (line 201) | func (tp *traceParser) parseEventV3(ev trace.EventType, ts uint64, siz...
    method parseEventV1 (line 257) | func (tp *traceParser) parseEventV1(ev byte, ts uint64, size int) error {
    method requestStart (line 291) | func (tp *traceParser) requestStart(ts uint64) error {
    method bodyStream (line 426) | func (tp *traceParser) bodyStream(ts uint64) error {
    method requestEnd (line 451) | func (tp *traceParser) requestEnd(ts uint64) error {
    method goroutineStart (line 525) | func (tp *traceParser) goroutineStart(ts uint64) error {
    method goroutineEnd (line 548) | func (tp *traceParser) goroutineEnd(ts uint64) error {
    method goroutineClear (line 561) | func (tp *traceParser) goroutineClear(ts uint64) error {
    method transactionStart (line 574) | func (tp *traceParser) transactionStart(ts uint64) error {
    method transactionEnd (line 601) | func (tp *traceParser) transactionEnd(ts uint64) error {
    method queryStart (line 638) | func (tp *traceParser) queryStart(ts uint64) error {
    method queryEnd (line 676) | func (tp *traceParser) queryEnd(ts uint64) error {
    method callStart (line 687) | func (tp *traceParser) callStart(ts uint64, size int) error {
    method callEnd (line 724) | func (tp *traceParser) callEnd(ts uint64) error {
    method httpStart (line 737) | func (tp *traceParser) httpStart(ts uint64) error {
    method httpEnd (line 759) | func (tp *traceParser) httpEnd(ts uint64) error {
    method httpBodyClosed (line 784) | func (tp *traceParser) httpBodyClosed(ts uint64) error {
    method httpEvent (line 796) | func (tp *traceParser) httpEvent() (*tracepb.HTTPTraceEvent, error) {
    method logMessage (line 900) | func (tp *traceParser) logMessage(ts uint64) error {
    method logField (line 967) | func (tp *traceParser) logField() (*tracepb.LogField, error) {
    method publishStart (line 1017) | func (tp *traceParser) publishStart(ts uint64) error {
    method publishEnd (line 1040) | func (tp *traceParser) publishEnd(ts uint64) error {
    method serviceInitStart (line 1053) | func (tp *traceParser) serviceInitStart(ts uint64) error {
    method serviceInitEnd (line 1075) | func (tp *traceParser) serviceInitEnd(ts uint64) error {
    method cacheOpStart (line 1090) | func (tp *traceParser) cacheOpStart(ts uint64) error {
    method cacheOpEnd (line 1127) | func (tp *traceParser) cacheOpEnd(ts uint64) error {
    method stack (line 1165) | func (tp *traceParser) stack(filterMode stackFilter) *tracepb.StackTra...
    method formattedStack (line 1216) | func (tp *traceParser) formattedStack() *tracepb.StackTrace {
    method parseRequestType (line 1235) | func (tp *traceParser) parseRequestType() (tracepb.Request_Type, error) {
    method parseTraceID (line 1248) | func (tp *traceParser) parseTraceID() *tracepb.TraceID {
    method parseHTTPHeaders (line 1257) | func (tp *traceParser) parseHTTPHeaders() map[string]string {
  type stackFilter (line 1158) | type stackFilter
  constant filterNone (line 1161) | filterNone stackFilter = iota
  constant filterDB (line 1162) | filterDB
  type traceReader (line 1268) | type traceReader struct
    method Offset (line 1274) | func (tr *traceReader) Offset() int {
    method Done (line 1278) | func (tr *traceReader) Done() bool {
    method Overflow (line 1282) | func (tr *traceReader) Overflow() bool {
    method Bytes (line 1286) | func (tr *traceReader) Bytes(b []byte) {
    method Skip (line 1294) | func (tr *traceReader) Skip(n int) {
    method Byte (line 1302) | func (tr *traceReader) Byte() byte {
    method Bool (line 1308) | func (tr *traceReader) Bool() bool {
    method String (line 1312) | func (tr *traceReader) String() string {
    method ByteString (line 1316) | func (tr *traceReader) ByteString() []byte {
    method Time (line 1326) | func (tr *traceReader) Time() time.Time {
    method Int32 (line 1332) | func (tr *traceReader) Int32() int32 {
    method Uint32 (line 1343) | func (tr *traceReader) Uint32() uint32 {
    method Int64 (line 1349) | func (tr *traceReader) Int64() int64 {
    method Uint64 (line 1360) | func (tr *traceReader) Uint64() uint64 {
    method Varint (line 1366) | func (tr *traceReader) Varint() int64 {
    method UVarint (line 1377) | func (tr *traceReader) UVarint() uint64 {
    method Float32 (line 1390) | func (tr *traceReader) Float32() float32 {
    method Float64 (line 1395) | func (tr *traceReader) Float64() float64 {

FILE: cli/daemon/engine/trace2/recorder.go
  type Recorder (line 17) | type Recorder struct
    method RecordTrace (line 32) | func (h *Recorder) RecordTrace(data RecordData) error {
  function NewRecorder (line 21) | func NewRecorder(s Store) *Recorder {
  type RecordData (line 25) | type RecordData struct

FILE: cli/daemon/engine/trace2/sqlite/read.go
  method List (line 19) | func (s *Store) List(ctx context.Context, q *trace2.Query, iter trace2.L...
  method emitCompleteSpanToListeners (line 90) | func (s *Store) emitCompleteSpanToListeners(ctx context.Context, appID, ...
  method Get (line 123) | func (s *Store) Get(ctx context.Context, appID, traceID string, iter tra...
  method GetSpanSummaries (line 160) | func (s *Store) GetSpanSummaries(ctx context.Context, appID, traceID str...
  method GetEvents (line 197) | func (s *Store) GetEvents(ctx context.Context, appID, traceID, spanID st...

FILE: cli/daemon/engine/trace2/sqlite/write.go
  function New (line 23) | func New(db *sql.DB) *Store {
  type Store (line 29) | type Store struct
    method CleanEvery (line 50) | func (s *Store) CleanEvery(ctx context.Context, freq time.Duration, tr...
    method DoClean (line 64) | func (s *Store) DoClean(ctx context.Context, triggerAt, eventsToKeep, ...
    method Listen (line 124) | func (s *Store) Listen(ch chan<- trace2.NewSpanEvent) {
    method Clear (line 128) | func (s *Store) Clear(ctx context.Context, appID string) error {
    method WriteEvents (line 137) | func (s *Store) WriteEvents(ctx context.Context, meta *trace2.Meta, ev...
    method insertEvent (line 148) | func (s *Store) insertEvent(ctx context.Context, meta *trace2.Meta, ev...
    method updateSpanStartIndex (line 176) | func (s *Store) updateSpanStartIndex(ctx context.Context, meta *trace2...
    method updateSpanEndIndex (line 290) | func (s *Store) updateSpanEndIndex(ctx context.Context, meta *trace2.M...
  function scanRows (line 36) | func scanRows[T any](rows *sql.Rows) ([]T, error) {
  function encodeTraceID (line 386) | func encodeTraceID(id *tracepbcli.TraceID) string {
  function encodeSpanID (line 394) | func encodeSpanID(id uint64) string {

FILE: cli/daemon/engine/trace2/store.go
  type Meta (line 11) | type Meta struct
  type Query (line 15) | type Query struct
  type Tag (line 39) | type Tag struct
  type ListEntryIterator (line 52) | type ListEntryIterator
  type EventIterator (line 59) | type EventIterator
  type Store (line 62) | type Store interface
  type NewSpanEvent (line 87) | type NewSpanEvent struct

FILE: cli/daemon/exec_script.go
  method ExecScript (line 23) | func (s *Server) ExecScript(req *daemonpb.ExecScriptRequest, stream daem...
  method ExecSpec (line 123) | func (s *Server) ExecSpec(req *daemonpb.ExecSpecRequest, stream daemonpb...
  type execSpecStreamAdapter (line 213) | type execSpecStreamAdapter struct
    method Send (line 217) | func (a *execSpecStreamAdapter) Send(msg *daemonpb.CommandMessage) err...

FILE: cli/daemon/export.go
  method Export (line 11) | func (s *Server) Export(req *daemonpb.ExportRequest, stream daemonpb.Dae...

FILE: cli/daemon/export/download.go
  constant DOWNLOAD_BASE_URL (line 23) | DOWNLOAD_BASE_URL = "https://storage.googleapis.com/encore-optional/encore"
  function downloadBinary (line 26) | func downloadBinary(platform, arch string, binary string, log zerolog.Lo...
  function tryCleanupPreviousVersions (line 65) | func tryCleanupPreviousVersions(binDir dockerbuild.HostPath) {
  function downloadFile (line 83) | func downloadFile(url, dest string) error {
  function validateHash (line 135) | func validateHash(file, hash string) error {

FILE: cli/daemon/export/export.go
  function Docker (line 37) | func Docker(ctx context.Context, app *apps.Instance, req *daemonpb.Expor...
  function orDefault (line 293) | func orDefault[T comparable](value T, defaultValue T) T {
  function resolveBaseImage (line 301) | func resolveBaseImage(ctx context.Context, log zerolog.Logger, p *daemon...
  function pushDockerImage (line 348) | func pushDockerImage(ctx context.Context, log zerolog.Logger, img v1.Ima...
  function executeHook (line 358) | func executeHook(ctx context.Context, hook appfile.Hook, workingDir stri...

FILE: cli/daemon/export/infra_config.go
  constant defaultInfraConfigPath (line 27) | defaultInfraConfigPath dockerbuild.ImagePath = "/encore/infra.config.json"
  type EmbeddedInfraConfigParams (line 29) | type EmbeddedInfraConfigParams struct
  function buildAndValidateInfraConfig (line 45) | func buildAndValidateInfraConfig(params EmbeddedInfraConfigParams) (*inf...
  function formatCronJobInstructions (line 332) | func formatCronJobInstructions(services []string, md *meta.Data) (string...
  function generateTable (line 365) | func generateTable(rows [][]string) string {
  function pathToString (line 416) | func pathToString(path *meta.Path) string {
  function formatEnvVars (line 434) | func formatEnvVars(envVars map[infra.JSONPath]infra.EnvDesc) string {
  function configError (line 452) | func configError(missing map[string][]string, validation map[infra.JSONP...

FILE: cli/daemon/internal/runlog/runlog.go
  type Log (line 8) | type Log interface
  type oslog (line 13) | type oslog struct
    method Stdout (line 15) | func (oslog) Stdout(buffered bool) io.Writer { return os.Stdout }
    method Stderr (line 16) | func (oslog) Stderr(buffered bool) io.Writer { return os.Stderr }
  function OS (line 18) | func OS() Log {

FILE: cli/daemon/internal/sym/sym.go
  type Table (line 11) | type Table struct
  function Load (line 16) | func Load(r io.ReaderAt) (*Table, error) {

FILE: cli/daemon/internal/sym/sym_darwin.go
  function load (line 11) | func load(r io.ReaderAt) (*Table, error) {

FILE: cli/daemon/internal/sym/sym_elf.go
  function load (line 14) | func load(r io.ReaderAt) (*Table, error) {

FILE: cli/daemon/internal/sym/sym_windows.go
  function load (line 13) | func load(r io.ReaderAt) (*Table, error) {
  function findPESymbol (line 49) | func findPESymbol(f *pe.File, name string) (*pe.Symbol, error) {
  function loadPETable (line 65) | func loadPETable(f *pe.File, sname, ename string) ([]byte, error) {

FILE: cli/daemon/mcp/api_tools.go
  method registerAPITools (line 23) | func (m *Manager) registerAPITools() {
  method callEndpoint (line 67) | func (m *Manager) callEndpoint(ctx context.Context, request mcp.CallTool...
  method getEndpoints (line 191) | func (m *Manager) getEndpoints(ctx context.Context, request mcp.CallTool...
  method getMiddleware (line 405) | func (m *Manager) getMiddleware(ctx context.Context, request mcp.CallToo...
  method getAuthHandlers (line 554) | func (m *Manager) getAuthHandlers(ctx context.Context, request mcp.CallT...

FILE: cli/daemon/mcp/bucket_tools.go
  method registerBucketTools (line 14) | func (m *Manager) registerBucketTools() {
  method listObjects (line 29) | func (m *Manager) listObjects(ctx context.Context, request mcp.CallToolR...
  method getStorageBuckets (line 73) | func (m *Manager) getStorageBuckets(ctx context.Context, request mcp.Cal...

FILE: cli/daemon/mcp/cache_tools.go
  method registerCacheTools (line 14) | func (m *Manager) registerCacheTools() {
  method getCacheKeyspaces (line 20) | func (m *Manager) getCacheKeyspaces(ctx context.Context, request mcp.Cal...

FILE: cli/daemon/mcp/cron_tools.go
  method registerCronTools (line 11) | func (m *Manager) registerCronTools() {
  method getCronJobs (line 17) | func (m *Manager) getCronJobs(ctx context.Context, request mcp.CallToolR...

FILE: cli/daemon/mcp/db_tools.go
  method registerDatabaseTools (line 17) | func (m *Manager) registerDatabaseTools() {
  method getDatabases (line 51) | func (m *Manager) getDatabases(ctx context.Context, request mcp.CallTool...
  method getTablesForDatabase (line 116) | func (m *Manager) getTablesForDatabase(ctx context.Context, dbName strin...
  method withConn (line 180) | func (m *Manager) withConn(ctx context.Context, dbName string, fn func(d...
  method runQuery (line 228) | func (m *Manager) runQuery(ctx context.Context, request mcp.CallToolRequ...

FILE: cli/daemon/mcp/docs_tools.go
  method registerDocsTools (line 18) | func (m *Manager) registerDocsTools() {
  method searchDocs (line 43) | func (m *Manager) searchDocs(ctx context.Context, request mcp.CallToolRe...
  function performAlgoliaSearch (line 91) | func performAlgoliaSearch(ctx context.Context, query string, page, hitsP...
  method getDocs (line 142) | func (m *Manager) getDocs(ctx context.Context, request mcp.CallToolReque...
  function fetchDocContent (line 204) | func fetchDocContent(ctx context.Context, url string) (string, error) {
  function findMainElement (line 251) | func findMainElement(n *html.Node) *html.Node {
  function extractText (line 266) | func extractText(n *html.Node, sb *strings.Builder) {
  function cleanText (line 309) | func cleanText(text string) string {

FILE: cli/daemon/mcp/mcp.go
  type Manager (line 19) | type Manager struct
    method Serve (line 98) | func (m *Manager) Serve(listener net.Listener) error {
    method getApp (line 102) | func (m *Manager) getApp(ctx context.Context) (*apps.Instance, error) {
  type appContextKey (line 32) | type appContextKey struct
  type appContext (line 34) | type appContext struct
  function WithAppID (line 38) | func WithAppID(ctx context.Context, appID string) context.Context {
  function GetAppID (line 42) | func GetAppID(ctx context.Context) (string, bool) {
  function NewManager (line 49) | func NewManager(apps *apps.Manager, cluster *sqldb.ClusterManager, ns *n...
  function addAppToContext (line 91) | func addAppToContext(ctx context.Context, r *http.Request) context.Conte...

FILE: cli/daemon/mcp/metrics_tools.go
  method registerMetricsTools (line 12) | func (m *Manager) registerMetricsTools() {
  method getMetrics (line 18) | func (m *Manager) getMetrics(ctx context.Context, request mcp.CallToolRe...

FILE: cli/daemon/mcp/pubsub_tools.go
  method registerPubSubTools (line 12) | func (m *Manager) registerPubSubTools() {
  method getPubSub (line 18) | func (m *Manager) getPubSub(ctx context.Context, request mcp.CallToolReq...

FILE: cli/daemon/mcp/schema_json.go
  type FieldLocation (line 14) | type FieldLocation
  constant FieldLocationBody (line 17) | FieldLocationBody   FieldLocation = 0
  constant FieldLocationQuery (line 18) | FieldLocationQuery  FieldLocation = 1
  constant FieldLocationHeader (line 19) | FieldLocationHeader FieldLocation = 2
  constant FieldLocationCookie (line 20) | FieldLocationCookie FieldLocation = 3
  constant FieldLocationUnused (line 21) | FieldLocationUnused FieldLocation = 4
  type DescribedField (line 25) | type DescribedField struct
  function StructBits (line 34) | func StructBits(s *schema.Struct, method string, asResponse bool, asGoSt...
  function writeFieldsAsJSON (line 78) | func writeFieldsAsJSON(fields []DescribedField, asGoStruct bool) string {
  function writeCookiesAsJSON (line 104) | func writeCookiesAsJSON(fields []DescribedField, asGoStruct bool) string {
  function renderTypeValue (line 135) | func renderTypeValue(buf *bytes.Buffer, typ *schema.Type) {
  function renderBuiltinValue (line 188) | func renderBuiltinValue(buf *bytes.Buffer, b schema.Builtin, urlEncode b...
  function renderLiteralValue (line 231) | func renderLiteralValue(buf *bytes.Buffer, lit *schema.Literal) {
  function renderFieldValueAsQueryParam (line 254) | func renderFieldValueAsQueryParam(typ *schema.Type) string {
  function splitFieldsByLocation (line 269) | func splitFieldsByLocation(s *schema.Struct, method string, asResponse b...
  function fieldNameAndLocation (line 292) | func fieldNameAndLocation(f *schema.Field, method string, asResponse boo...
  function NamedOrInlineStruct (line 374) | func NamedOrInlineStruct(meta map[uint32]*schema.Decl, t *schema.Type) (...

FILE: cli/daemon/mcp/secret_tools.go
  method registerSecretTools (line 12) | func (m *Manager) registerSecretTools() {
  method getSecrets (line 18) | func (m *Manager) getSecrets(ctx context.Context, request mcp.CallToolRe...

FILE: cli/daemon/mcp/src_tools.go
  method registerSrcTools (line 14) | func (m *Manager) registerSrcTools() {
  method getMetadata (line 31) | func (m *Manager) getMetadata(ctx context.Context, request mcp.CallToolR...
  method getSrcFiles (line 45) | func (m *Manager) getSrcFiles(ctx context.Context, request mcp.CallToolR...

FILE: cli/daemon/mcp/trace_tools.go
  method registerTraceResources (line 17) | func (m *Manager) registerTraceResources() {
  method registerTraceTools (line 27) | func (m *Manager) registerTraceTools() {
  method listTraces (line 50) | func (m *Manager) listTraces(ctx context.Context, request mcp.CallToolRe...
  method getTrace (line 113) | func (m *Manager) getTrace(ctx context.Context, request mcp.CallToolRequ...
  method getTraceResource (line 158) | func (m *Manager) getTraceResource(ctx context.Context, request mcp.Read...

FILE: cli/daemon/mcp/util.go
  function findServiceNameForPackage (line 10) | func findServiceNameForPackage(md *metav1.Data, pkgPath string) string {
  function formatDuration (line 20) | func formatDuration(nanos int64) string {

FILE: cli/daemon/namespace.go
  method CreateNamespace (line 14) | func (s *Server) CreateNamespace(ctx context.Context, req *daemonpb.Crea...
  method ListNamespaces (line 26) | func (s *Server) ListNamespaces(ctx context.Context, req *daemonpb.ListN...
  method DeleteNamespace (line 39) | func (s *Server) DeleteNamespace(ctx context.Context, req *daemonpb.Dele...
  method SwitchNamespace (line 50) | func (s *Server) SwitchNamespace(ctx context.Context, req *daemonpb.Swit...
  method namespaceOrActive (line 70) | func (s *Server) namespaceOrActive(ctx context.Context, app *apps.Instan...

FILE: cli/daemon/namespace/namespace.go
  type ID (line 21) | type ID
    method String (line 25) | func (id ID) String() string { return string(id) }
  type Name (line 22) | type Name
  function ParseID (line 27) | func ParseID(s string) (ID, bool) {
  function NewManager (line 35) | func NewManager(db *sql.DB) *Manager {
  type Manager (line 40) | type Manager struct
    method RegisterDeletionHandler (line 45) | func (mgr *Manager) RegisterDeletionHandler(h DeletionHandler) {
    method Create (line 58) | func (m *Manager) Create(ctx context.Context, app *apps.Instance, name...
    method List (line 113) | func (m *Manager) List(ctx context.Context, app *apps.Instance) ([]*Na...
    method GetByName (line 150) | func (m *Manager) GetByName(ctx context.Context, app *apps.Instance, n...
    method GetByID (line 167) | func (m *Manager) GetByID(ctx context.Context, app *apps.Instance, id ...
    method Delete (line 184) | func (m *Manager) Delete(ctx context.Context, app *apps.Instance, name...
    method Switch (line 220) | func (m *Manager) Switch(ctx context.Context, app *apps.Instance, name...
    method GetActive (line 286) | func (m *Manager) GetActive(ctx context.Context, app *apps.Instance) (...
  type Namespace (line 49) | type Namespace struct
    method ToProto (line 314) | func (ns *Namespace) ToProto() *daemonpb.Namespace {
  type DeletionHandler (line 330) | type DeletionHandler interface

FILE: cli/daemon/objects/manager.go
  function NewClusterManager (line 14) | func NewClusterManager(ns *namespace.Manager) *ClusterManager {
  type ClusterManager (line 21) | type ClusterManager struct
    method BaseDir (line 25) | func (cm *ClusterManager) BaseDir(ns namespace.ID) (string, error) {
    method CanDeleteNamespace (line 35) | func (cm *ClusterManager) CanDeleteNamespace(ctx context.Context, app ...
    method DeleteNamespace (line 40) | func (cm *ClusterManager) DeleteNamespace(ctx context.Context, app *ap...
    method PersistentStoreFallback (line 50) | func (cm *ClusterManager) PersistentStoreFallback(id string) (gcsemu.S...

FILE: cli/daemon/objects/objects.go
  type Server (line 20) | type Server struct
    method Initialize (line 53) | func (s *Server) Initialize(md *meta.Data) error {
    method Start (line 62) | func (s *Server) Start() error {
    method Stop (line 86) | func (s *Server) Stop() {
    method Endpoint (line 93) | func (s *Server) Endpoint() string {
    method PublicBaseURL (line 102) | func (s *Server) PublicBaseURL() string {
  function NewInMemoryServer (line 32) | func NewInMemoryServer(public *PublicBucketServer) *Server {
  function NewDirServer (line 38) | func NewDirServer(public *PublicBucketServer, nsID namespace.ID, baseDir...
  function newServer (line 43) | func newServer(public *PublicBucketServer, id string, store gcsemu.Store...
  function IsUsed (line 107) | func IsUsed(md *meta.Data) bool {

FILE: cli/daemon/objects/public.go
  type Fallback (line 23) | type Fallback
  function NewPublicBucketServer (line 27) | func NewPublicBucketServer(baseAddr string, fallback Fallback) *PublicBu...
  type PublicBucketServer (line 39) | type PublicBucketServer struct
    method Serve (line 48) | func (s *PublicBucketServer) Serve(ln net.Listener) error {
    method Register (line 52) | func (s *PublicBucketServer) Register(namespace string, store gcsemu.S...
    method Deregister (line 58) | func (s *PublicBucketServer) Deregister(namespace string) {
    method ServeHTTP (line 64) | func (s *PublicBucketServer) ServeHTTP(w http.ResponseWriter, req *htt...
    method BaseAddr (line 68) | func (s *PublicBucketServer) BaseAddr() string {
    method handler (line 72) | func (s *PublicBucketServer) handler(w http.ResponseWriter, req *http....
  function validateGcsSignedRequest (line 162) | func validateGcsSignedRequest(req *http.Request, now time.Time) error {
  function queryLowerCase (line 201) | func queryLowerCase(req *http.Request) map[string]string {
  function parseObjectMeta (line 209) | func parseObjectMeta(req *http.Request) storage.Object {

FILE: cli/daemon/pubsub/nsq.go
  type NSQDaemon (line 15) | type NSQDaemon struct
    method Stats (line 22) | func (n *NSQDaemon) Stats() (*nsqd.Stats, error) {
    method isReady (line 30) | func (n *NSQDaemon) isReady() error {
    method Addr (line 42) | func (n *NSQDaemon) Addr() string {
    method Start (line 46) | func (n *NSQDaemon) Start() error {
    method Stop (line 82) | func (n *NSQDaemon) Stop() {
  type logAdapter (line 88) | type logAdapter struct
    method Output (line 92) | func (l *logAdapter) Output(maxdepth int, s string) error {
    method OutputLevel (line 117) | func (l *logAdapter) OutputLevel(lvl string) zerolog.Level {

FILE: cli/daemon/pubsub/utils.go
  function IsUsed (line 8) | func IsUsed(md *meta.Data) bool {

FILE: cli/daemon/redis/redis.go
  type Server (line 14) | type Server struct
    method Start (line 31) | func (s *Server) Start() error {
    method Stop (line 42) | func (s *Server) Stop() {
    method Miniredis (line 48) | func (s *Server) Miniredis() *miniredis.Miniredis {
    method Addr (line 52) | func (s *Server) Addr() string {
    method doCleanup (line 60) | func (s *Server) doCleanup() {
    method clearKeys (line 84) | func (s *Server) clearKeys() {
  constant tickInterval (line 22) | tickInterval = 1 * time.Second
  function New (line 24) | func New() *Server {
  function IsUsed (line 102) | func IsUsed(md *meta.Data) bool {

FILE: cli/daemon/run.go
  method Run (line 25) | func (s *Server) Run(req *daemonpb.RunRequest, stream daemonpb.Daemon_Ru...

FILE: cli/daemon/run/call.go
  type ApiCallParams (line 20) | type ApiCallParams struct
  function CallAPI (line 32) | func CallAPI(ctx context.Context, run *Run, p *ApiCallParams) (map[strin...
  function findRPC (line 79) | func findRPC(md *v1.Data, service, endpoint string) *v1.RPC {
  function prepareRequest (line 94) | func prepareRequest(ctx context.Context, baseURL string, md *v1.Data, p ...
  function handleResponse (line 161) | func handleResponse(md *v1.Data, p *ApiCallParams, headers http.Header, ...
  type httpRequestSpec (line 239) | type httpRequestSpec struct
  function newHTTPRequestSpec (line 254) | func newHTTPRequestSpec() *httpRequestSpec {
  function addToRequest (line 265) | func addToRequest(req *httpRequestSpec, rawPayload []byte, params map[st...

FILE: cli/daemon/run/check.go
  type CheckParams (line 18) | type CheckParams struct
  method Check (line 40) | func (mgr *Manager) Check(ctx context.Context, p CheckParams) (buildDir ...

FILE: cli/daemon/run/errors.go
  function AsErrorList (line 10) | func AsErrorList(err error) *errlist.List {

FILE: cli/daemon/run/exec_command.go
  type ExecSpecParams (line 27) | type ExecSpecParams struct
  type ExecSpecResponse (line 55) | type ExecSpecResponse struct
  method ExecSpec (line 64) | func (mgr *Manager) ExecSpec(ctx context.Context, p ExecSpecParams) (*Ex...

FILE: cli/daemon/run/exec_script.go
  type ExecScriptParams (line 34) | type ExecScriptParams struct
  method ExecScript (line 62) | func (mgr *Manager) ExecScript(ctx context.Context, p ExecScriptParams) ...

FILE: cli/daemon/run/http.go
  method ServeHTTP (line 16) | func (r *Run) ServeHTTP(w http.ResponseWriter, req *http.Request) {
  function addAuthKeyToRequest (line 21) | func addAuthKeyToRequest(req *http.Request, authKey config.EncoreAuthKey) {
  constant TestHeaderDisablePlatformAuth (line 39) | TestHeaderDisablePlatformAuth = "X-Encore-Test-Disable-Platform-Auth"

FILE: cli/daemon/run/infra/encorecloudtesting.go
  method setTestEncoreCloud (line 23) | func (rm *ResourceManager) setTestEncoreCloud(cfg *config.Runtime) (useL...

FILE: cli/daemon/run/infra/infra.go
  type Type (line 26) | type Type
  constant PubSub (line 29) | PubSub  Type = "pubsub"
  constant Cache (line 30) | Cache   Type = "cache"
  constant SQLDB (line 31) | SQLDB   Type = "sqldb"
  constant Objects (line 32) | Objects Type = "objects"
  constant encoreCloudExampleTopicID (line 38) | encoreCloudExampleTopicID = "res_0o9ioqnrirflhhm3t720"
  constant encoreCloudExampleSubscriptionID (line 42) | encoreCloudExampleSubscriptionID = "res_0o9ioqnrirflhhm3t730"
  type ResourceManager (line 47) | type ResourceManager struct
    method StopAll (line 78) | func (rm *ResourceManager) StopAll() {
    method StartRequiredServices (line 96) | func (rm *ResourceManager) StartRequiredServices(a *optracker.AsyncBui...
    method StartPubSub (line 115) | func (rm *ResourceManager) StartPubSub(ctx context.Context) error {
    method GetPubSub (line 129) | func (rm *ResourceManager) GetPubSub() *pubsub.NSQDaemon {
    method StartRedis (line 140) | func (rm *ResourceManager) StartRedis(ctx context.Context) error {
    method GetRedis (line 154) | func (rm *ResourceManager) GetRedis() *redis.Server {
    method StartObjects (line 165) | func (rm *ResourceManager) StartObjects(md *meta.Data) func(context.Co...
    method GetObjects (line 197) | func (rm *ResourceManager) GetObjects() *objects.Server {
    method StartSQLCluster (line 207) | func (rm *ResourceManager) StartSQLCluster(a *optracker.AsyncBuildJobs...
    method GetSQLCluster (line 262) | func (rm *ResourceManager) GetSQLCluster() *sqldb.Cluster {
    method UpdateConfig (line 275) | func (rm *ResourceManager) UpdateConfig(cfg *config.Runtime, md *meta....
    method SQLServerConfig (line 375) | func (rm *ResourceManager) SQLServerConfig() (config.SQLServer, error) {
    method SQLDatabaseConfig (line 389) | func (rm *ResourceManager) SQLDatabaseConfig(db *meta.SQLDatabase) (co...
    method PubSubProviderConfig (line 406) | func (rm *ResourceManager) PubSubProviderConfig() (config.PubsubProvid...
    method PubSubTopicConfig (line 420) | func (rm *ResourceManager) PubSubTopicConfig(topic *meta.PubSubTopic) ...
    method PubSubSubscriptionConfig (line 436) | func (rm *ResourceManager) PubSubSubscriptionConfig(_ *meta.PubSubTopi...
    method RedisConfig (line 447) | func (rm *ResourceManager) RedisConfig(redis *meta.CacheCluster) (conf...
    method BucketProviderConfig (line 466) | func (rm *ResourceManager) BucketProviderConfig() (config.BucketProvid...
  function NewResourceManager (line 62) | func NewResourceManager(app *apps.Instance, sqlMgr *sqldb.ClusterManager...
  type Resource (line 89) | type Resource interface

FILE: cli/daemon/run/manager.go
  type Manager (line 24) | type Manager struct
    method FindProc (line 59) | func (mgr *Manager) FindProc(procID string) *ProcGroup {
    method FindRunByAppID (line 72) | func (mgr *Manager) FindRunByAppID(appID string) *Run {
    method ListRuns (line 89) | func (mgr *Manager) ListRuns() []*Run {
    method AddListener (line 103) | func (mgr *Manager) AddListener(ln EventListener) {
    method RunStdout (line 107) | func (mgr *Manager) RunStdout(r *Run, out []byte) {
    method RunStderr (line 115) | func (mgr *Manager) RunStderr(r *Run, out []byte) {
    method RunError (line 123) | func (mgr *Manager) RunError(r *Run, err *errlist.List) {
    method generateServiceDiscoveryMap (line 154) | func (mgr *Manager) generateServiceDiscoveryMap(p generateConfigParams...
    method getInternalServiceToServiceAuthMethod (line 177) | func (mgr *Manager) getInternalServiceToServiceAuthMethod() config.Ser...
    method generateConfig (line 181) | func (mgr *Manager) generateConfig(p generateConfigParams) (*config.Ru...
  type EventListener (line 40) | type EventListener interface
  type parseAppParams (line 129) | type parseAppParams struct
  type generateConfigParams (line 137) | type generateConfigParams struct

FILE: cli/daemon/run/nsq_names.go
  function isValidNSQName (line 15) | func isValidNSQName(name string) bool {
  function hashNSQName (line 21) | func hashNSQName(name string) string {
  function ensureValidNSQName (line 27) | func ensureValidNSQName(name string) string {

FILE: cli/daemon/run/proc_groups.go
  type procGroupOptions (line 35) | type procGroupOptions struct
  function newProcGroup (line 47) | func newProcGroup(opts procGroupOptions) *ProcGroup {
  type ProcGroup (line 73) | type ProcGroup struct
    method ProxyReq (line 103) | func (pg *ProcGroup) ProxyReq(w http.ResponseWriter, req *http.Request) {
    method Done (line 114) | func (pg *ProcGroup) Done() <-chan struct{} {
    method Start (line 132) | func (pg *ProcGroup) Start() (err error) {
    method Close (line 149) | func (pg *ProcGroup) Close() {
    method Kill (line 167) | func (pg *ProcGroup) Kill() {
    method parseSymTable (line 178) | func (pg *ProcGroup) parseSymTable(binPath string) {
    method SymTable (line 194) | func (pg *ProcGroup) SymTable(ctx context.Context) (*sym.Table, error) {
    method newProc (line 204) | func (pg *ProcGroup) newProc(processName string, listenAddr netip.Addr...
    method NewAllInOneProc (line 241) | func (pg *ProcGroup) NewAllInOneProc(spec builder.Cmd, listenAddr neti...
    method NewProcForService (line 278) | func (pg *ProcGroup) NewProcForService(serviceName string, listenAddr ...
    method NewProcForGateway (line 315) | func (pg *ProcGroup) NewProcForGateway(gatewayName string, listenAddr ...
    method Warnings (line 361) | func (pg *ProcGroup) Warnings() (rtn []warning) {
  type warning (line 356) | type warning struct
  type Proc (line 373) | type Proc struct
    method Start (line 391) | func (p *Proc) Start() error {
    method start (line 401) | func (p *Proc) start() error {
    method Close (line 451) | func (p *Proc) Close() {
    method ProxyReq (line 472) | func (p *Proc) ProxyReq(w http.ResponseWriter, req *http.Request) {
    method Kill (line 479) | func (p *Proc) Kill() {
    method pollUntilProcessIsListening (line 490) | func (p *Proc) pollUntilProcessIsListening(ctx context.Context) (ok bo...
  function newNoopGateway (line 510) | func newNoopGateway(pg *ProcGroup) *noopgateway.Gateway {

FILE: cli/daemon/run/run.go
  type Run (line 53) | type Run struct
    method Close (line 220) | func (r *Run) Close() {
    method ProcGroup (line 245) | func (r *Run) ProcGroup() *ProcGroup {
    method StoreProc (line 254) | func (r *Run) StoreProc(p *ProcGroup) {
    method Done (line 259) | func (r *Run) Done() <-chan struct{} {
    method Reload (line 265) | func (r *Run) Reload() error {
    method start (line 279) | func (r *Run) start(ln net.Listener, tracker *optracker.OpTracker) (er...
    method buildAndStart (line 345) | func (r *Run) buildAndStart(ctx context.Context, tracker *optracker.Op...
    method StartProcGroup (line 546) | func (r *Run) StartProcGroup(params *StartProcGroupParams) (p *ProcGro...
  type StartParams (line 75) | type StartParams struct
  type BrowserMode (line 113) | type BrowserMode
  constant BrowserModeAuto (line 116) | BrowserModeAuto   BrowserMode = iota
  constant BrowserModeNever (line 117) | BrowserModeNever
  constant BrowserModeAlways (line 118) | BrowserModeAlways
  function BrowserModeFromConfig (line 121) | func BrowserModeFromConfig(cfg *userconfig.Config) BrowserMode {
  function BrowserModeFromProto (line 132) | func BrowserModeFromProto(b daemonpb.RunRequest_BrowserMode) BrowserMode {
  function DebugModeFromProto (line 145) | func DebugModeFromProto(d daemonpb.RunRequest_DebugMode) builder.DebugMo...
  method Start (line 160) | func (mgr *Manager) Start(ctx context.Context, params StartParams) (run ...
  type RunLogger (line 235) | type RunLogger interface
  type StartProcGroupParams (line 530) | type StartProcGroupParams struct
  constant gracefulShutdownTime (line 543) | gracefulShutdownTime = 10 * time.Second
  type logWriter (line 736) | type logWriter struct
    method Write (line 753) | func (w *logWriter) Write(b []byte) (int, error) {
    method Flush (line 779) | func (w *logWriter) Flush() {
  function newLogWriter (line 743) | func newLogWriter(run *Run, fn func(*Run, []byte)) *logWriter {
  function GenID (line 789) | func GenID() string {
  function encodeSecretsEnv (line 798) | func encodeSecretsEnv(secrets map[string]string) string {
  function usesSecrets (line 828) | func usesSecrets(md *meta.Data) bool {
  function genAuthKey (line 837) | func genAuthKey() config.EncoreAuthKey {
  method CanDeleteNamespace (line 854) | func (m *Manager) CanDeleteNamespace(ctx context.Context, app *apps.Inst...
  method DeleteNamespace (line 867) | func (m *Manager) DeleteNamespace(ctx context.Context, app *apps.Instanc...
  function isSingleProc (line 873) | func isSingleProc(outputs []builder.BuildOutput) bool {

FILE: cli/daemon/run/runtime_config2.go
  constant runtimeCfgEnvVar (line 38) | runtimeCfgEnvVar     = "ENCORE_RUNTIME_CONFIG"
  constant runtimeCfgPathEnvVar (line 39) | runtimeCfgPathEnvVar = "ENCORE_RUNTIME_CONFIG_PATH"
  constant appSecretsEnvVar (line 40) | appSecretsEnvVar     = "ENCORE_APP_SECRETS"
  constant serviceCfgEnvPrefix (line 41) | serviceCfgEnvPrefix  = "ENCORE_CFG_"
  constant listenEnvVar (line 42) | listenEnvVar         = "ENCORE_LISTEN_ADDR"
  constant metaEnvVar (line 43) | metaEnvVar           = "ENCORE_APP_META"
  constant metaPathEnvVar (line 44) | metaPathEnvVar       = "ENCORE_APP_META_PATH"
  type RuntimeConfigGenerator (line 47) | type RuntimeConfigGenerator struct
    method initialize (line 108) | func (g *RuntimeConfigGenerator) initialize() error {
    method ProcPerService (line 501) | func (g *RuntimeConfigGenerator) ProcPerService(proxy *svcproxy.SvcPro...
    method AllInOneProc (line 578) | func (g *RuntimeConfigGenerator) AllInOneProc(useRuntimeConfigV2 bool)...
    method ProcPerServiceWithNewRuntimeConfig (line 620) | func (g *RuntimeConfigGenerator) ProcPerServiceWithNewRuntimeConfig(pr...
    method ForTests (line 700) | func (g *RuntimeConfigGenerator) ForTests(newRuntimeConf bool) (envs [...
    method ProcEnvs (line 763) | func (g *RuntimeConfigGenerator) ProcEnvs(proc *ProcConfig, useRuntime...
    method writeRuntimeConfig (line 793) | func (g *RuntimeConfigGenerator) writeRuntimeConfig(rt *runtimev1.Runt...
    method writeMetadata (line 858) | func (g *RuntimeConfigGenerator) writeMetadata() ([]string, error) {
    method MissingSecrets (line 876) | func (g *RuntimeConfigGenerator) MissingSecrets() []string {
    method encodeSecrets (line 891) | func (g *RuntimeConfigGenerator) encodeSecrets(secretNames map[string]...
    method encodeConfigs (line 899) | func (g *RuntimeConfigGenerator) encodeConfigs(svcNames ...string) []s...
  type GatewayConfig (line 103) | type GatewayConfig struct
  type ProcConfig (line 493) | type ProcConfig struct
  function ptrOrNil (line 755) | func ptrOrNil[T comparable](val T) *T {
  function secretsUsedByServices (line 920) | func secretsUsedByServices(md *meta.Data, svcNames ...string) (secretNam...
  function freeLocalhostAddress (line 938) | func freeLocalhostAddress() (netip.AddrPort, error) {
  function encodeServiceConfigs (line 948) | func encodeServiceConfigs(svcCfgs map[string]string) []string {
  function gzipBytes (line 957) | func gzipBytes(data []byte) []byte {
  function reverseString (line 965) | func reverseString(s string) string {
  constant dummyPrivateKeyReversed (line 977) | dummyPrivateKeyReversed = `-----YEK ETAVIRP DNE-----

FILE: cli/daemon/run/tests.go
  type TestParams (line 32) | type TestParams struct
  method Test (line 40) | func (mgr *Manager) Test(ctx context.Context, params TestParams) (err er...
  type TestSpecParams (line 63) | type TestSpecParams struct
  type TestSpecResponse (line 92) | type TestSpecResponse struct
  method TestSpec (line 99) | func (mgr *Manager) TestSpec(ctx context.Context, params TestSpecParams)...
  method testSpec (line 119) | func (mgr *Manager) testSpec(ctx context.Context, bld builder.Impl, expS...

FILE: cli/daemon/run/watch.go
  method watch (line 13) | func (mgr *Manager) watch(run *Run) error {
  function IgnoreEvents (line 48) | func IgnoreEvents(events []watcher.Event) bool {
  function ignoreEvent (line 57) | func ignoreEvent(ev watcher.Event) bool {

FILE: cli/daemon/schema.go
  function genSchema (line 14) | func genSchema(meta *meta.Data, decl *schema.Type) []byte {
  type schemaRenderer (line 26) | type schemaRenderer struct
    method Render (line 33) | func (r *schemaRenderer) Render(d *schema.Type) []byte {
    method renderType (line 38) | func (r *schemaRenderer) renderType(typ *schema.Type) {
    method renderStruct (line 85) | func (r *schemaRenderer) renderStruct(s *schema.Struct) {
    method renderMap (line 106) | func (r *schemaRenderer) renderMap(m *schema.Map) {
    method renderList (line 114) | func (r *schemaRenderer) renderList(l *schema.List) {
    method renderBuiltin (line 120) | func (r *schemaRenderer) renderBuiltin(b schema.Builtin) {
    method renderNamed (line 152) | func (r *schemaRenderer) renderNamed(n *schema.Named) {

FILE: cli/daemon/secret/secret.go
  function New (line 30) | func New() *Manager {
  type Manager (line 35) | type Manager struct
    method Load (line 65) | func (mgr *Manager) Load(app *apps.Instance) *LoadResult {
    method UpdateKey (line 138) | func (mgr *Manager) UpdateKey(appSlug, key, value string) {
    method fetch (line 159) | func (mgr *Manager) fetch(appSlug string, poll bool) <-chan singleflig...
    method loadFromCache (line 190) | func (mgr *Manager) loadFromCache(appSlug string) (*Data, bool) {
    method startPolling (line 211) | func (mgr *Manager) startPolling() {
    method writeToDisk (line 235) | func (mgr *Manager) writeToDisk(appSlug string, data *Data) (err error) {
    method readFromDisk (line 263) | func (mgr *Manager) readFromDisk(appSlug string) (data *Data, err erro...
    method secretsPath (line 284) | func (mgr *Manager) secretsPath(appSlug string) (string, error) {
  type Data (line 44) | type Data struct
  type LoadResult (line 52) | type LoadResult struct
    method Get (line 81) | func (lr *LoadResult) Get(ctx context.Context, expSet *experiments.Set...
  function applyLocalOverrides (line 297) | func applyLocalOverrides(app *apps.Instance, src *Data) (*Data, error) {

FILE: cli/daemon/sqldb/cluster.go
  type Cluster (line 27) | type Cluster struct
    method Stop (line 54) | func (c *Cluster) Stop() {
    method Ready (line 59) | func (c *Cluster) Ready() <-chan struct{} {
    method Start (line 65) | func (c *Cluster) Start(ctx context.Context, tracker *optracker.OpTrac...
    method setupRoles (line 107) | func (c *Cluster) setupRoles(ctx context.Context, st *ClusterStatus) (...
    method determineRoles (line 162) | func (c *Cluster) determineRoles(ctx context.Context, st *ClusterStatu...
    method initDB (line 198) | func (c *Cluster) initDB(encoreName string) *DB {
    method Setup (line 230) | func (c *Cluster) Setup(ctx context.Context, appRoot string, md *meta....
    method SetupAndMigrate (line 252) | func (c *Cluster) SetupAndMigrate(ctx context.Context, appRoot string,...
    method GetDB (line 273) | func (c *Cluster) GetDB(name string) (*DB, bool) {
    method IsExternalDB (line 280) | func (c *Cluster) IsExternalDB(name string) bool {
    method Recreate (line 289) | func (c *Cluster) Recreate(ctx context.Context, appRoot string, databa...
    method Status (line 326) | func (c *Cluster) Status(ctx context.Context) (*ClusterStatus, error) {
    method updateStatusFromDriver (line 333) | func (c *Cluster) updateStatusFromDriver(ctx context.Context) (*Cluste...
    method pollStatus (line 342) | func (c *Cluster) pollStatus() {
    method Info (line 360) | func (c *Cluster) Info(ctx context.Context) (*ClusterInfo, error) {
  type ClusterInfo (line 372) | type ClusterInfo struct
  method ConnURI (line 382) | func (s *ClusterStatus) ConnURI(database string, r Role) string {
  type EncoreRoles (line 400) | type EncoreRoles
    method Superuser (line 402) | func (roles EncoreRoles) Superuser() (Role, bool) { return roles.find(...
    method Admin (line 403) | func (roles EncoreRoles) Admin() (Role, bool)     { return roles.find(...
    method Write (line 404) | func (roles EncoreRoles) Write() (Role, bool)     { return roles.find(...
    method Read (line 405) | func (roles EncoreRoles) Read() (Role, bool)      { return roles.find(...
    method First (line 407) | func (roles EncoreRoles) First(typs ...RoleType) (Role, bool) {
    method find (line 416) | func (roles EncoreRoles) find(typ RoleType) (Role, bool) {
  type RoleType (line 425) | type RoleType
    method String (line 427) | func (r RoleType) String() string { return string(r) }
  constant RoleSuperuser (line 430) | RoleSuperuser RoleType = "superuser"
  constant RoleAdmin (line 431) | RoleAdmin     RoleType = "admin"
  constant RoleWrite (line 432) | RoleWrite     RoleType = "write"
  constant RoleRead (line 433) | RoleRead      RoleType = "read"
  type Role (line 436) | type Role struct
  function quoteString (line 443) | func quoteString(str string) string {

FILE: cli/daemon/sqldb/db.go
  type DB (line 26) | type DB struct
    method ApplicationCloudName (line 51) | func (db *DB) ApplicationCloudName() string {
    method TemplateCloudName (line 56) | func (db *DB) TemplateCloudName() option.Option[string] {
    method Ready (line 64) | func (db *DB) Ready() <-chan struct{} {
    method Setup (line 69) | func (db *DB) Setup(ctx context.Context, appRoot string, dbMeta *meta....
    method doCreate (line 146) | func (db *DB) doCreate(ctx context.Context, cloudName string, template...
    method renameDB (line 180) | func (db *DB) renameDB(ctx context.Context, from, to string) error {
    method ensureRoles (line 195) | func (db *DB) ensureRoles(ctx context.Context, cloudName string, roles...
    method doMigrate (line 257) | func (db *DB) doMigrate(ctx context.Context, cloudName, appRoot string...
    method ListAppliedMigrations (line 316) | func (db *DB) ListAppliedMigrations(ctx context.Context) (map[uint64]b...
    method drop (line 407) | func (db *DB) drop(ctx context.Context) error {
    method terminateConnectionsToDB (line 419) | func (db *DB) terminateConnectionsToDB(ctx context.Context, cloudName ...
    method doDrop (line 431) | func (db *DB) doDrop(ctx context.Context, cloudName string) error {
    method CloseConns (line 459) | func (db *DB) CloseConns() {
    method connectSuperuser (line 465) | func (db *DB) connectSuperuser(ctx context.Context) (*pgx.Conn, error) {
    method connectToDB (line 504) | func (db *DB) connectToDB(ctx context.Context) (*sql.Conn, error) {
  function RunMigration (line 325) | func RunMigration(ctx context.Context, dbName string, allowNonSeq bool, ...
  function findClosestLowerVersion (line 392) | func findClosestLowerVersion(first func() (uint, error), dirtyVer int, n...

FILE: cli/daemon/sqldb/db_test.go
  function TestFindClosestVersion (line 11) | func TestFindClosestVersion(t *testing.T) {

FILE: cli/daemon/sqldb/docker/docker.go
  type Driver (line 23) | type Driver struct
    method CreateCluster (line 34) | func (d *Driver) CreateCluster(ctx context.Context, p *sqldb.CreatePar...
    method ClusterStatus (line 172) | func (d *Driver) ClusterStatus(ctx context.Context, id sqldb.ClusterID...
    method CheckRequirements (line 177) | func (d *Driver) CheckRequirements(ctx context.Context) error {
    method clusterStatus (line 187) | func (d *Driver) clusterStatus(ctx context.Context, id sqldb.ClusterID...
    method CanDestroyCluster (line 284) | func (d *Driver) CanDestroyCluster(ctx context.Context, id sqldb.Clust...
    method DestroyCluster (line 292) | func (d *Driver) DestroyCluster(ctx context.Context, id sqldb.ClusterI...
    method DestroyNamespaceData (line 306) | func (d *Driver) DestroyNamespaceData(ctx context.Context, ns *namespa...
    method createVolumeIfNeeded (line 319) | func (d *Driver) createVolumeIfNeeded(ctx context.Context, name string...
    method Meta (line 327) | func (d *Driver) Meta() sqldb.DriverMeta {
  constant DefaultSuperuserUsername (line 28) | DefaultSuperuserUsername = "postgres"
  constant DefaultSuperuserPassword (line 29) | DefaultSuperuserPassword = "postgres"
  constant DefaultRootDatabase (line 30) | DefaultRootDatabase      = "postgres"
  constant defaultDataDir (line 31) | defaultDataDir           = "/var/lib/postgresql/data"
  function containerNames (line 332) | func containerNames(id sqldb.ClusterID) []string {
  function ImageExists (line 362) | func ImageExists(ctx context.Context) (ok bool, err error) {
  function PullImage (line 378) | func PullImage(ctx context.Context) error {
  constant Image (line 385) | Image = "encoredotdev/postgres:15"
  function isDockerRunning (line 387) | func isDockerRunning(ctx context.Context) bool {
  function clusterVolumeNames (line 393) | func clusterVolumeNames(ns *namespace.Namespace) (candidates []string) {

FILE: cli/daemon/sqldb/driver.go
  type Driver (line 16) | type Driver interface
  type DriverMeta (line 45) | type DriverMeta struct
  type ConnConfig (line 51) | type ConnConfig struct
  type ClusterType (line 62) | type ClusterType
    method Memfs (line 70) | func (ct ClusterType) Memfs() bool {
  constant Run (line 65) | Run    ClusterType = "run"
  constant Shadow (line 66) | Shadow ClusterType = "shadow"
  constant Test (line 67) | Test   ClusterType = "test"
  type CreateParams (line 82) | type CreateParams struct
  type Status (line 94) | type Status
  constant Running (line 98) | Running Status = "running"
  constant Stopped (line 100) | Stopped Status = "stopped"
  constant NotFound (line 102) | NotFound Status = "notfound"
  type ClusterStatus (line 106) | type ClusterStatus struct

FILE: cli/daemon/sqldb/external/external.go
  type Driver (line 13) | type Driver struct
    method CreateCluster (line 22) | func (d *Driver) CreateCluster(ctx context.Context, p *sqldb.CreatePar...
    method ClusterStatus (line 27) | func (d *Driver) ClusterStatus(ctx context.Context, id sqldb.ClusterID...
    method CanDestroyCluster (line 43) | func (d *Driver) CanDestroyCluster(ctx context.Context, id sqldb.Clust...
    method DestroyCluster (line 47) | func (d *Driver) DestroyCluster(ctx context.Context, id sqldb.ClusterI...
    method DestroyNamespaceData (line 51) | func (d *Driver) DestroyNamespaceData(ctx context.Context, ns *namespa...
    method CheckRequirements (line 55) | func (d *Driver) CheckRequirements(ctx context.Context) error {
    method Meta (line 59) | func (d *Driver) Meta() sqldb.DriverMeta {
  function def (line 63) | func def(val, orDefault string) string {

FILE: cli/daemon/sqldb/manager.go
  function NewClusterManager (line 21) | func NewClusterManager(driver Driver, apps *apps.Manager, ns *namespace....
  type ClusterManager (line 35) | type ClusterManager struct
    method Ready (line 69) | func (cm *ClusterManager) Ready() error {
    method Create (line 76) | func (cm *ClusterManager) Create(ctx context.Context, params *CreatePa...
    method LookupPassword (line 127) | func (cm *ClusterManager) LookupPassword(password string) (*Cluster, b...
    method Get (line 140) | func (cm *ClusterManager) Get(id ClusterID) (*Cluster, bool) {
    method get (line 148) | func (cm *ClusterManager) get(id ClusterID) (*Cluster, bool) {
    method CanDeleteNamespace (line 154) | func (cm *ClusterManager) CanDeleteNamespace(ctx context.Context, app ...
    method DeleteNamespace (line 168) | func (cm *ClusterManager) DeleteNamespace(ctx context.Context, app *ap...
  type ClusterID (line 52) | type ClusterID struct
    method clusterKey (line 60) | func (id ClusterID) clusterKey() clusterKey {
  type clusterKey (line 58) | type clusterKey
  function GetClusterID (line 64) | func GetClusterID(app *apps.Instance, typ ClusterType, ns *namespace.Nam...
  function genPassword (line 198) | func genPassword() string {

FILE: cli/daemon/sqldb/migrate.go
  type MigrationReader (line 26) | type MigrationReader interface
  function NewOsMigrationReader (line 31) | func NewOsMigrationReader(path string) *OsMigrationReader {
  type OsMigrationReader (line 35) | type OsMigrationReader struct
    method Read (line 39) | func (src *OsMigrationReader) Read(m *meta.DBMigration) (r io.ReadClos...
  function MultiReadCloser (line 51) | func MultiReadCloser(r ...io.Reader) io.ReadCloser {
  type multiReadCloser (line 58) | type multiReadCloser struct
    method Read (line 63) | func (m multiReadCloser) Read(p []byte) (n int, err error) {
    method Close (line 67) | func (m multiReadCloser) Close() error {
  function NewMetadataSource (line 82) | func NewMetadataSource(reader MigrationReader, migrations []*meta.DBMigr...
  type MetadataSource (line 107) | type MetadataSource struct
    method validate (line 91) | func (src *MetadataSource) validate() {
    method ReadUp (line 113) | func (src *MetadataSource) ReadUp(version uint) (r io.ReadCloser, iden...
    method Open (line 134) | func (src *MetadataSource) Open(url string) (source.Driver, error) {
    method Close (line 138) | func (src *MetadataSource) Close() error {
    method First (line 142) | func (src *MetadataSource) First() (version uint, err error) {
    method Prev (line 149) | func (src *MetadataSource) Prev(version uint) (prevVersion uint, err e...
    method Next (line 157) | func (src *MetadataSource) Next(version uint) (nextVersion uint, err e...
    method ReadDown (line 165) | func (src *MetadataSource) ReadDown(version uint) (r io.ReadCloser, id...
    method migration (line 169) | func (src *MetadataSource) migration(version uint, offset int) (*meta....
  type nonSequentialDbDriver (line 186) | type nonSequentialDbDriver struct
    method Version (line 238) | func (p *nonSequentialDbDriver) Version() (version int, dirty bool, er...
    method SetVersion (line 256) | func (p *nonSequentialDbDriver) SetVersion(version int, dirty bool) er...
    method loadAppliedVersions (line 311) | func (p *nonSequentialDbDriver) loadAppliedVersions() error {
  type nonSequentialSource (line 195) | type nonSequentialSource struct
    method Prev (line 323) | func (src *nonSequentialSource) Prev(version uint) (prevVersion uint, ...
    method Next (line 336) | func (src *nonSequentialSource) Next(version uint) (nextVersion uint, ...
  function NonSequentialMigrator (line 205) | func NonSequentialMigrator(ctx context.Context, conn *sql.Conn, mdSource...
  function LoadAppliedVersions (line 285) | func LoadAppliedVersions(ctx context.Context, conn *sql.Conn, schemaName...

FILE: cli/daemon/sqldb/proxy.go
  method ServeProxy (line 21) | func (cm *ClusterManager) ServeProxy(ln net.Listener) error {
  method ProxyConn (line 54) | func (cm *ClusterManager) ProxyConn(client net.Conn, waitForSetup bool) ...
  method PreauthProxyConn (line 280) | func (cm *ClusterManager) PreauthProxyConn(client net.Conn, id ClusterID...
  method cancelRequest (line 416) | func (cm *ClusterManager) cancelRequest(client io.Writer, req *pgproxy.C...
  function writeMsg (line 451) | func writeMsg(w io.Writer, msg pgproto3.Message) error {

FILE: cli/daemon/sqldb/remote.go
  function OneshotProxy (line 22) | func OneshotProxy(appSlug, envSlug string, role RoleType) (port int, pas...
  function oneshotServer (line 37) | func oneshotServer(ctx context.Context, ln net.Listener, passwd, appSlug...
  type WebsocketLogicalConn (line 65) | type WebsocketLogicalConn struct
    method Write (line 72) | func (c *WebsocketLogicalConn) Write(p []byte) (int, error) {
    method Read (line 80) | func (c *WebsocketLogicalConn) Read(p []byte) (int, error) {
    method Cancel (line 106) | func (c *WebsocketLogicalConn) Cancel(req *pgproxy.CancelData) error {
    method SetDeadline (line 118) | func (c *WebsocketLogicalConn) SetDeadline(t time.Time) error {

FILE: cli/daemon/sqldb/utils.go
  function WaitForConn (line 14) | func WaitForConn(ctx context.Context, uri string) error {
  function IsUsed (line 36) | func IsUsed(md *meta.Data) bool {

FILE: cli/daemon/telemetry.go
  method Telemetry (line 12) | func (s *Server) Telemetry(ctx context.Context, req *daemonpb.TelemetryC...

FILE: cli/daemon/test.go
  method Test (line 20) | func (s *Server) Test(req *daemonpb.TestRequest, stream daemonpb.Daemon_...
  method TestSpec (line 98) | func (s *Server) TestSpec(ctx context.Context, req *daemonpb.TestSpecReq...

FILE: cli/daemon/tracing.go
  method beginTracing (line 10) | func (s *Server) beginTracing(ctx context.Context, appRoot, workingDir s...

FILE: cli/daemon/userfacing.go
  method GenWrappers (line 19) | func (s *Server) GenWrappers(ctx context.Context, req *daemonpb.GenWrapp...
  method genUserFacing (line 31) | func (s *Server) genUserFacing(ctx context.Context, app *apps.Instance) ...

FILE: cli/daemon/watch.go
  method watchApps (line 23) | func (s *Server) watchApps() {
  method onWatchEvent (line 40) | func (s *Server) onWatchEvent(i *apps.Instance, events []watcher.Event) {
  type regenerateCodeDebouncer (line 60) | type regenerateCodeDebouncer struct
    method ChangeEvent (line 69) | func (g *regenerateCodeDebouncer) ChangeEvent() {
  method regenerateUserCode (line 97) | func (s *Server) regenerateUserCode(ctx context.Context, app *apps.Insta...
  method updateGitIgnore (line 106) | func (s *Server) updateGitIgnore(i *apps.Instance) error {

FILE: cli/internal/browser/browser.go
  function Commands (line 20) | func Commands() [][]string {
  function CanOpen (line 46) | func CanOpen() bool {
  function Open (line 57) | func Open(url string) bool {
  function appearsSuccessful (line 70) | func appearsSuccessful(cmd *exec.Cmd, timeout time.Duration) bool {

FILE: cli/internal/bubbles/checklist/checklist.go
  type Item (line 11) | type Item interface
  type Model (line 15) | type Model struct
  method Selected (line 38) | func (m Model[I]) Selected() (I, bool) {
  method Checked (line 47) | func (m Model[I]) Checked() []I {
  method CheckedIndices (line 56) | func (m Model[I]) CheckedIndices() []int {
  method View (line 66) | func (m Model[I]) View() string {
  method Update (line 94) | func (m Model[I]) Update(msg tea.Msg) (Model[I], tea.Cmd) {
  method toggle (line 123) | func (m *Model[I]) toggle() {
  method moveDown (line 132) | func (m *Model[I]) moveDown() {
  method moveUp (line 160) | func (m *Model[I]) moveUp() {
  method nextPage (line 188) | func (m *Model[I]) nextPage() {
  method prePage (line 217) | func (m *Model[I]) prePage() {
  method forward (line 246) | func (m *Model[I]) forward(pageIndex int) {
  method initData (line 263) | func (m *Model[I]) initData() {
  method pageIndexInfo (line 282) | func (m *Model[I]) pageIndexInfo() (start, end int) {

FILE: cli/internal/bubbles/selector/selector.go
  type Item (line 11) | type Item interface
  function New (line 15) | func New[I Item](data []I, perPage int) Model[I] {
  type Model (line 21) | type Model struct
  method Selected (line 40) | func (m Model[I]) Selected() (I, bool) {
  method View (line 49) | func (m Model[I]) View() string {
  method Focus (line 67) | func (m *Model[I]) Focus() tea.Cmd {
  method Blur (line 72) | func (m *Model[I]) Blur() tea.Cmd {
  method Update (line 79) | func (m Model[I]) Update(msg tea.Msg) (Model[I], tea.Cmd) {
  method moveDown (line 109) | func (m *Model[I]) moveDown() {
  method moveUp (line 137) | func (m *Model[I]) moveUp() {
  method nextPage (line 165) | func (m *Model[I]) nextPage() {
  method prePage (line 194) | func (m *Model[I]) prePage() {
  method forward (line 223) | func (m *Model[I]) forward(pageIndex int) {
  method initData (line 240) | func (m *Model[I]) initData() {
  method pageIndexInfo (line 257) | func (m *Model[I]) pageIndexInfo() (start, end int) {

FILE: cli/internal/dedent/dedent.go
  function Dedent (line 43) | func Dedent(text string) string {
  function Bytes (line 81) | func Bytes(text []byte) []byte {

FILE: cli/internal/dedent/dedent_test.go
  constant errorMsg (line 8) | errorMsg = "\nexpected %q\ngot %q"
  type dedentTest (line 10) | type dedentTest struct
  function TestDedentNoMargin (line 14) | func TestDedentNoMargin(t *testing.T) {
  function TestDedentEven (line 33) | func TestDedentEven(t *testing.T) {
  function TestDedentUneven (line 59) | func TestDedentUneven(t *testing.T) {
  function TestDedentPreserveInternalTabs (line 93) | func TestDedentPreserveInternalTabs(t *testing.T) {
  function TestDedentPreserveMarginTabs (line 108) | func TestDedentPreserveMarginTabs(t *testing.T) {
  function ExampleDedent (line 149) | func ExampleDedent() {
  function BenchmarkDedent (line 171) | func BenchmarkDedent(b *testing.B) {

FILE: cli/internal/gosym/pclntab.go
  type version (line 18) | type version
  constant verUnknown (line 21) | verUnknown version = iota
  constant ver11 (line 22) | ver11
  constant ver12 (line 23) | ver12
  constant ver116 (line 24) | ver116
  type LineTable (line 40) | type LineTable struct
    method parse (line 77) | func (t *LineTable) parse(targetPC uint64, targetLine int) (b []byte, ...
    method slice (line 112) | func (t *LineTable) slice(pc uint64) *LineTable {
    method PCToLine (line 120) | func (t *LineTable) PCToLine(pc uint64) int {
    method LineToPC (line 132) | func (t *LineTable) LineToPC(line int, maxpc uint64) uint64 {
    method isGo12 (line 164) | func (t *LineTable) isGo12() bool {
    method uintptr (line 174) | func (t *LineTable) uintptr(b []byte) uint64 {
    method parsePclnTab (line 182) | func (t *LineTable) parsePclnTab() {
    method go12Funcs (line 264) | func (t *LineTable) go12Funcs() []Func {
    method findFunc (line 291) | func (t *LineTable) findFunc(pc uint64) []byte {
    method readvarint (line 316) | func (t *LineTable) readvarint(pp *[]byte) uint32 {
    method funcName (line 332) | func (t *LineTable) funcName(off uint32) string {
    method stringFrom (line 343) | func (t *LineTable) stringFrom(arr []byte, off uint32) string {
    method string (line 354) | func (t *LineTable) string(off uint32) string {
    method step (line 359) | func (t *LineTable) step(p *[]byte, pc *uint64, val *int32, first bool...
    method pcvalue (line 373) | func (t *LineTable) pcvalue(off uint32, entry, targetpc uint64, fn *Fu...
    method findFileLine (line 392) | func (t *LineTable) findFileLine(entry uint64, filetab, linetab uint32...
    method go12PCToLine (line 434) | func (t *LineTable) go12PCToLine(pc uint64, fn *Func) (line int) {
    method go12PCToFile (line 454) | func (t *LineTable) go12PCToFile(pc uint64, fn *Func) (file string) {
    method go12LineToPC (line 489) | func (t *LineTable) go12LineToPC(file string, line int) (pc uint64) {
    method initFileMap (line 524) | func (t *LineTable) initFileMap() {
    method go12MapFiles (line 552) | func (t *LineTable) go12MapFiles(m map[string]*Obj, obj *Obj) {
  constant oldQuantum (line 75) | oldQuantum = 1
  function NewLineTable (line 148) | func NewLineTable(data []byte, text uint64) *LineTable {
  constant go12magic (line 169) | go12magic = 0xfffffffb
  constant go116magic (line 170) | go116magic = 0xfffffffa

FILE: cli/internal/gosym/symtab.go
  type Sym (line 23) | type Sym struct
    method Static (line 33) | func (s *Sym) Static() bool { return s.Type >= 'a' }
    method PackageName (line 37) | func (s *Sym) PackageName() string {
    method ReceiverName (line 59) | func (s *Sym) ReceiverName() string {
    method BaseName (line 73) | func (s *Sym) BaseName() string {
  type Func (line 81) | type Func struct
  type Obj (line 103) | type Obj struct
    method lineFromAline (line 602) | func (o *Obj) lineFromAline(aline int) (string, int) {
    method alineFromLine (line 644) | func (o *Obj) alineFromLine(path string, line int) (int, error) {
  type Table (line 121) | type Table struct
    method PCToFunc (line 486) | func (t *Table) PCToFunc(pc uint64) *Func {
    method PCToLine (line 505) | func (t *Table) PCToLine(pc uint64) (file string, line int, fn *Func) {
    method LineToPC (line 521) | func (t *Table) LineToPC(file string, line int) (pc uint64, fn *Func, ...
    method LookupSym (line 551) | func (t *Table) LookupSym(name string) *Sym {
    method LookupFunc (line 567) | func (t *Table) LookupFunc(name string) *Func {
    method SymByAddr (line 578) | func (t *Table) SymByAddr(addr uint64) *Sym {
  type sym (line 130) | type sym struct
  function walksymtab (line 143) | func walksymtab(data []byte, fn func(sym) error) error {
  function NewTable (line 286) | func NewTable(symtab []byte, pcln *LineTable) (*Table, error) {
  type UnknownFileError (line 692) | type UnknownFileError
    method Error (line 694) | func (e UnknownFileError) Error() string { return "unknown file: " + s...
  type UnknownLineError (line 699) | type UnknownLineError struct
    method Error (line 704) | func (e *UnknownLineError) Error() string {
  type DecodingError (line 710) | type DecodingError struct
    method Error (line 716) | func (e *DecodingError) Error() string {

FILE: cli/internal/gosym/symtab_test.go
  function assertString (line 12) | func assertString(t *testing.T, dsc, out, tgt string) {
  function TestStandardLibPackage (line 18) | func TestStandardLibPackage(t *testing.T) {
  function TestStandardLibPathPackage (line 27) | func TestStandardLibPathPackage(t *testing.T) {
  function TestRemotePackage (line 36) | func TestRemotePackage(t *testing.T) {
  function TestIssue29551 (line 45) | func TestIssue29551(t *testing.T) {

FILE: cli/internal/gosym/testdata/main.go
  function linefrompc (line 3) | func linefrompc()
  function pcfromline (line 4) | func pcfromline()
  function main (line 6) | func main() {

FILE: cli/internal/jsonrpc2/conn.go
  type Conn (line 20) | type Conn interface
  type conn (line 57) | type conn struct
    method Notify (line 78) | func (c *conn) Notify(ctx context.Context, method string, params inter...
    method Call (line 88) | func (c *conn) Call(ctx context.Context, method string, params, result...
    method replier (line 133) | func (c *conn) replier(req Request) Replier {
    method write (line 154) | func (c *conn) write(ctx context.Context, msg Message) (int64, error) {
    method Go (line 160) | func (c *conn) Go(ctx context.Context, handler Handler) {
    method run (line 164) | func (c *conn) run(ctx context.Context, handler Handler) {
    method Close (line 193) | func (c *conn) Close() error {
    method Done (line 197) | func (c *conn) Done() <-chan struct{} {
    method Err (line 201) | func (c *conn) Err() error {
    method fail (line 209) | func (c *conn) fail(err error) {
  function NewConn (line 69) | func NewConn(s Stream) Conn {

FILE: cli/internal/jsonrpc2/handler.go
  type Handler (line 17) | type Handler
  type Replier (line 21) | type Replier
  function MethodNotFound (line 26) | func MethodNotFound(ctx context.Context, reply Replier, req Request) err...
  function MustReplyHandler (line 32) | func MustReplyHandler(handler Handler) Handler {
  function CancelHandler (line 51) | func CancelHandler(handler Handler) (Handler, func(id ID)) {
  function AsyncHandler (line 87) | func AsyncHandler(handler Handler) Handler {

FILE: cli/internal/jsonrpc2/jsonrpc2.go
  constant ErrIdleTimeout (line 12) | ErrIdleTimeout = constError("timed out waiting for new connections")
  type constError (line 15) | type constError
    method Error (line 17) | func (e constError) Error() string { return string(e) }

FILE: cli/internal/jsonrpc2/jsonrpc2_test.go
  type callTest (line 22) | type callTest struct
    method newResults (line 36) | func (test *callTest) newResults() interface{} {
    method verifyResults (line 51) | func (test *callTest) verifyResults(t *testing.T, results interface{}) {
  function TestCall (line 61) | func TestCall(t *testing.T) {
  function prepare (line 88) | func prepare(ctx context.Context, t *testing.T, withHeaders bool) (jsonr...
  function run (line 101) | func run(ctx context.Context, withHeaders bool, nc net.Conn) jsonrpc2.Co...
  function testHandler (line 113) | func testHandler(log bool) jsonrpc2.Handler {

FILE: cli/internal/jsonrpc2/messages.go
  type Message (line 17) | type Message interface
  type Request (line 26) | type Request interface
  type Notification (line 38) | type Notification struct
    method Method (line 73) | func (msg *Notification) Method() string          { return msg.method }
    method Params (line 74) | func (msg *Notification) Params() json.RawMessage { return msg.params }
    method isJSONRPC2Message (line 75) | func (msg *Notification) isJSONRPC2Message()      {}
    method isJSONRPC2Request (line 76) | func (msg *Notification) isJSONRPC2Request()      {}
    method MarshalJSON (line 78) | func (n *Notification) MarshalJSON() ([]byte, error) {
    method UnmarshalJSON (line 87) | func (n *Notification) UnmarshalJSON(data []byte) error {
  type Call (line 46) | type Call struct
    method Method (line 106) | func (msg *Call) Method() string          { return msg.method }
    method Params (line 107) | func (msg *Call) Params() json.RawMessage { return msg.params }
    method ID (line 108) | func (msg *Call) ID() ID                  { return msg.id }
    method isJSONRPC2Message (line 109) | func (msg *Call) isJSONRPC2Message()      {}
    method isJSONRPC2Request (line 110) | func (msg *Call) isJSONRPC2Request()      {}
    method MarshalJSON (line 112) | func (c *Call) MarshalJSON() ([]byte, error) {
    method UnmarshalJSON (line 121) | func (c *Call) UnmarshalJSON(data []byte) error {
  type Response (line 57) | type Response struct
    method ID (line 143) | func (msg *Response) ID() ID                  { return msg.id }
    method Result (line 144) | func (msg *Response) Result() json.RawMessage { return msg.result }
    method Err (line 145) | func (msg *Response) Err() error              { return msg.err }
    method isJSONRPC2Message (line 146) | func (msg *Response) isJSONRPC2Message()      {}
    method MarshalJSON (line 148) | func (r *Response) MarshalJSON() ([]byte, error) {
    method UnmarshalJSON (line 179) | func (r *Response) UnmarshalJSON(data []byte) error {
  function NewNotification (line 68) | func NewNotification(method string, params interface{}) (*Notification, ...
  function NewCall (line 101) | func NewCall(id ID, method string, params interface{}) (*Call, error) {
  function NewResponse (line 138) | func NewResponse(id ID, result interface{}, err error) (*Response, error) {
  function toWireError (line 160) | func toWireError(err error) *wireError {
  function DecodeMessage (line 196) | func DecodeMessage(data []byte) (Message, error) {
  function marshalToRaw (line 232) | func marshalToRaw(obj interface{}) (json.RawMessage, error) {

FILE: cli/internal/jsonrpc2/serve.go
  type StreamServer (line 26) | type StreamServer interface
  type ServerFunc (line 32) | type ServerFunc
    method ServeStream (line 35) | func (f ServerFunc) ServeStream(ctx context.Context, c Conn) error {
  function HandlerServer (line 41) | func HandlerServer(h Handler) StreamServer {
  function ListenAndServe (line 52) | func ListenAndServe(ctx context.Context, network, addr string, server St...
  function Serve (line 67) | func Serve(ctx context.Context, ln net.Listener, server StreamServer, id...
  function isClosingError (line 128) | func isClosingError(err error) bool {

FILE: cli/internal/jsonrpc2/serve_test.go
  function TestIdleTimeout (line 15) | func TestIdleTimeout(t *testing.T) {

FILE: cli/internal/jsonrpc2/servertest/servertest.go
  type Connector (line 20) | type Connector interface
  type TCPServer (line 27) | type TCPServer struct
    method Connect (line 53) | func (s *TCPServer) Connect(ctx context.Context) jsonrpc2.Conn {
  function NewTCPServer (line 39) | func NewTCPServer(ctx context.Context, server jsonrpc2.StreamServer, fra...
  type PipeServer (line 64) | type PipeServer struct
    method Connect (line 79) | func (s *PipeServer) Connect(ctx context.Context) jsonrpc2.Conn {
  function NewPipeServer (line 71) | func NewPipeServer(ctx context.Context, server jsonrpc2.StreamServer, fr...
  type connList (line 95) | type connList struct
    method add (line 100) | func (l *connList) add(conn jsonrpc2.Conn) {
    method Close (line 106) | func (l *connList) Close() error {

FILE: cli/internal/jsonrpc2/servertest/servertest_test.go
  type msg (line 15) | type msg struct
  function fakeHandler (line 19) | func fakeHandler(ctx context.Context, reply jsonrpc2.Replier, req jsonrp...
  function TestTestServer (line 23) | func TestTestServer(t *testing.T) {

FILE: cli/internal/jsonrpc2/stream.go
  type Stream (line 24) | type Stream interface
  type Framer (line 37) | type Framer
  function NewRawStream (line 42) | func NewRawStream(conn net.Conn) Stream {
  type rawStream (line 49) | type rawStream struct
    method Read (line 54) | func (s *rawStream) Read(ctx context.Context) (Message, int64, error) {
    method Write (line 68) | func (s *rawStream) Write(ctx context.Context, msg Message) (int64, er...
    method Close (line 82) | func (s *rawStream) Close() error {
  function NewHeaderStream (line 89) | func NewHeaderStream(conn net.Conn) Stream {
  type headerStream (line 96) | type headerStream struct
    method Read (line 101) | func (s *headerStream) Read(ctx context.Context) (Message, int64, erro...
    method Write (line 149) | func (s *headerStream) Write(ctx context.Context, msg Message) (int64,...
    method Close (line 168) | func (s *headerStream) Close() error {

FILE: cli/internal/jsonrpc2/wire.go
  type wireRequest (line 37) | type wireRequest struct
  type wireResponse (line 54) | type wireResponse struct
  type wireCombined (line 67) | type wireCombined struct
  type wireError (line 77) | type wireError struct
    method Error (line 105) | func (err *wireError) Error() string {
  type wireVersionTag (line 90) | type wireVersionTag struct
    method MarshalJSON (line 109) | func (wireVersionTag) MarshalJSON() ([]byte, error) {
    method UnmarshalJSON (line 113) | func (wireVersionTag) UnmarshalJSON(data []byte) error {
  type ID (line 93) | type ID struct
    method Format (line 133) | func (id ID) Format(f fmt.State, r rune) {
    method MarshalJSON (line 146) | func (id *ID) MarshalJSON() ([]byte, error) {
    method UnmarshalJSON (line 153) | func (id *ID) UnmarshalJSON(data []byte) error {
  function NewError (line 98) | func NewError(code int64, message string) error {
  function NewIntID (line 125) | func NewIntID(v int64) ID { return ID{number: v} }
  function NewStringID (line 128) | func NewStringID(v string) ID { return ID{name: v} }

FILE: cli/internal/jsonrpc2/wire_test.go
  function TestIDFormat (line 43) | func TestIDFormat(t *testing.T) {
  function TestIDEncode (line 56) | func TestIDEncode(t *testing.T) {
  function TestIDDecode (line 68) | func TestIDDecode(t *testing.T) {
  function TestErrorEncode (line 84) | func TestErrorEncode(t *testing.T) {
  function TestErrorResponse (line 95) | func TestErrorResponse(t *testing.T) {
  function checkJSON (line 113) | func checkJSON(t *testing.T, got, want []byte) {

FILE: cli/internal/login/deviceauth.go
  function DeviceAuth (line 22) | func DeviceAuth() (*conf.Config, error) {
  type deviceAuthResult (line 106) | type deviceAuthResult struct
  function pollForDeviceAuthResult (line 111) | func pollForDeviceAuthResult(codeVerifier string, data *platform.BeginAu...
  type enterPressWaiter (line 147) | type enterPressWaiter struct
    method run (line 163) | func (w *enterPressWaiter) run() {
    method Stop (line 172) | func (w *enterPressWaiter) Stop() {
  function waitForEnterPress (line 153) | func waitForEnterPress() *enterPressWaiter {

FILE: cli/internal/login/interactive.go
  type interactive (line 24) | type interactive struct
    method oauthHandler (line 93) | func (f *interactive) oauthHandler(w http.ResponseWriter, req *http.Re...
  function Interactive (line 35) | func Interactive() (*conf.Config, error) {

FILE: cli/internal/login/login.go
  function DecideFlow (line 16) | func DecideFlow() (*conf.Config, error) {
  function WithAuthKey (line 23) | func WithAuthKey(authKey string) (*conf.Config, error) {
  function genRandData (line 40) | func genRandData() (string, error) {

FILE: cli/internal/manifest/manifest.go
  type Manifest (line 20) | type Manifest struct
  function SetTutorial (line 35) | func SetTutorial(appRoot string, tutorial string) (err error) {
  function ReadOrCreate (line 69) | func ReadOrCreate(appRoot string) (mf *Manifest, err error) {
  constant encodeStr (line 114) | encodeStr = "23456789abcdefghikmnopqrstuvwxyz"
  function genID (line 122) | func genID() (string, error) {

FILE: cli/internal/onboarding/onboarding.go
  type Event (line 14) | type Event struct
    method IsSet (line 35) | func (e *Event) IsSet() bool {
    method Set (line 39) | func (e *Event) Set() bool {
  type State (line 18) | type State struct
    method Property (line 24) | func (e *State) Property(prop string) *Event {
    method Write (line 72) | func (cfg *State) Write() error {
  function Load (line 47) | func Load() (*State, error) {
  function configPath (line 86) | func configPath() (string, error) {

FILE: cli/internal/platform/api.go
  type CreateAppParams (line 18) | type CreateAppParams struct
  type App (line 24) | type App struct
  type Rollout (line 33) | type Rollout struct
  type Env (line 38) | type Env struct
  function CreateApp (line 45) | func CreateApp(ctx context.Context, p *CreateAppParams) (*App, error) {
  function Deploy (line 51) | func Deploy(ctx context.Context, appSlug, env, sha, branch string) (*Rol...
  function ListApps (line 69) | func ListApps(ctx context.Context) ([]*App, error) {
  function GetApp (line 75) | func GetApp(ctx context.Context, appSlug string) (*App, error) {
  function ListEnvs (line 81) | func ListEnvs(ctx context.Context, appSlug string) ([]*Env, error) {
  type SecretKind (line 87) | type SecretKind
  constant DevelopmentSecrets (line 90) | DevelopmentSecrets SecretKind = "development"
  constant ProductionSecrets (line 91) | ProductionSecrets  SecretKind = "production"
  function GetLocalSecretValues (line 94) | func GetLocalSecretValues(ctx context.Context, appSlug string, poll bool...
  type SecretVersion (line 103) | type SecretVersion struct
  function SetAppSecret (line 108) | func SetAppSecret(ctx context.Context, appSlug string, kind SecretKind, ...
  function GetEnvMeta (line 122) | func GetEnvMeta(ctx context.Context, appSlug, envName string) (*metav1.D...
  function DBConnect (line 140) | func DBConnect(ctx context.Context, appSlug, envSlug, dbName, role strin...
  function EnvLogs (line 150) | func EnvLogs(ctx context.Context, appSlug, envSlug string) (*websocket.C...
  function KubernetesClusters (line 155) | func KubernetesClusters(ctx context.Context, appSlug string, envName str...
  type KubeCtlConfig (line 167) | type KubeCtlConfig struct
  function escapef (line 174) | func escapef(format string, args ...string) string {

FILE: cli/internal/platform/client.go
  type Error (line 22) | type Error struct
    method Error (line 34) | func (e Error) Error() string {
  type ValidationDetails (line 29) | type ValidationDetails struct
  function call (line 43) | func call(ctx context.Context, method, path string, reqParams, respParam...
  type graphqlRequest (line 81) | type graphqlRequest struct
  function graphqlCall (line 95) | func graphqlCall(ctx context.Context, req graphqlRequest, respData any, ...
  function rawCall (line 131) | func rawCall(ctx context.Context, method, path string, reqParams interfa...
  function sendPlatformReq (line 158) | func sendPlatformReq(ctx context.Context, method, path string, reqParams...
  function doPlatformReq (line 185) | func doPlatformReq(req *http.Request, auth bool) (httpResp *http.Respons...
  function wsDial (line 200) | func wsDial(ctx context.Context, path string, auth bool, extraHeaders ma...
  function decodeErrorResponse (line 257) | func decodeErrorResponse(resp *http.Response) error {

FILE: cli/internal/platform/gql/app.go
  type App (line 8) | type App struct
  type Error (line 13) | type Error struct
    method Error (line 19) | func (e *Error) Error() string {
  type ErrorList (line 23) | type ErrorList
    method Error (line 25) | func (err ErrorList) Error() string {

FILE: cli/internal/platform/gql/env.go
  type Env (line 3) | type Env struct

FILE: cli/internal/platform/gql/secrets.go
  type Secret (line 9) | type Secret struct
  type SecretGroup (line 14) | type SecretGroup struct
  type SecretSelector (line 24) | type SecretSelector interface
  type SecretSelectorEnvType (line 29) | type SecretSelectorEnvType struct
    method secretSelector (line 33) | func (SecretSelectorEnvType) secretSelector()   {}
    method String (line 34) | func (s *SecretSelectorEnvType) String() string { return "type:" + s.K...
  type SecretSelectorSpecificEnv (line 36) | type SecretSelectorSpecificEnv struct
    method String (line 40) | func (s *SecretSelectorSpecificEnv) String() string { return "id:" + s...
    method secretSelector (line 41) | func (SecretSelectorSpecificEnv) secretSelector()   {}
  type ConflictError (line 43) | type ConflictError struct
  type GroupConflict (line 49) | type GroupConflict struct

FILE: cli/internal/platform/jsoniter_ext.go
  type InterfaceCodecExtension (line 13) | type InterfaceCodecExtension struct
    method DecorateDecoder (line 21) | func (e *InterfaceCodecExtension) DecorateDecoder(typ reflect2.Type, d...
  function NewInterfaceCodecExtension (line 17) | func NewInterfaceCodecExtension() *InterfaceCodecExtension {
  constant gqlPackage (line 28) | gqlPackage = "encr.dev/cli/internal/platform/gql"
  type interfaceCodec (line 30) | type interfaceCodec struct
    method Decode (line 36) | func (codec *interfaceCodec) Decode(ptr unsafe.Pointer, iter *jsoniter...
    method IsEmpty (line 73) | func (codec *interfaceCodec) IsEmpty(ptr unsafe.Pointer) bool {

FILE: cli/internal/platform/jsoniter_ext_test.go
  function TestInterfaceDecoder (line 12) | func TestInterfaceDecoder(t *testing.T) {

FILE: cli/internal/platform/login.go
  type CreateOAuthSessionParams (line 16) | type CreateOAuthSessionParams struct
  function CreateOAuthSession (line 22) | func CreateOAuthSession(ctx context.Context, p *CreateOAuthSessionParams...
  type BeginAuthorizationFlowParams (line 30) | type BeginAuthorizationFlowParams struct
  type BeginAuthorizationFlowResponse (line 35) | type BeginAuthorizationFlowResponse struct
  function BeginDeviceAuthFlow (line 53) | func BeginDeviceAuthFlow(ctx context.Context, p BeginAuthorizationFlowPa...
  type PollDeviceAuthFlowParams (line 82) | type PollDeviceAuthFlowParams struct
  type OAuthToken (line 87) | type OAuthToken struct
  function PollDeviceAuthFlow (line 94) | func PollDeviceAuthFlow(ctx context.Context, p PollDeviceAuthFlowParams)...
  type ExchangeOAuthTokenParams (line 125) | type ExchangeOAuthTokenParams struct
  type OAuthData (line 130) | type OAuthData struct
  function ExchangeOAuthToken (line 137) | func ExchangeOAuthToken(ctx context.Context, p *ExchangeOAuthTokenParams...
  type ExchangeAuthKeyParams (line 143) | type ExchangeAuthKeyParams struct
  function ExchangeAuthKey (line 147) | func ExchangeAuthKey(ctx context.Context, p *ExchangeAuthKeyParams) (*OA...

FILE: cli/internal/platform/secrets.go
  function ListSecretGroups (line 11) | func ListSecretGroups(ctx context.Context, appSlug string, keys []string...
  type CreateSecretGroupParams (line 47) | type CreateSecretGroupParams struct
  function CreateSecretGroup (line 55) | func CreateSecretGroup(ctx context.Context, p CreateSecretGroupParams) e...
  type CreateSecretVersionParams (line 83) | type CreateSecretVersionParams struct
  function CreateSecretVersion (line 89) | func CreateSecretVersion(ctx context.Context, p CreateSecretVersionParam...
  type UpdateSecretGroupParams (line 105) | type UpdateSecretGroupParams struct
  function UpdateSecretGroup (line 116) | func UpdateSecretGroup(ctx context.Context, p UpdateSecretGroupParams) e...
  function mapSecretSelector (line 148) | func mapSecretSelector(selector []gql.SecretSelector) (envTypes, envIDs ...

FILE: cli/internal/telemetry/telemetry.go
  type telemetry (line 48) | type telemetry struct
    method sendOnce (line 68) | func (t *telemetry) sendOnce(event string, props ...map[string]any) {
    method send (line 87) | func (t *telemetry) send(event string, props ...map[string]any) error {
    method trySend (line 112) | func (t *telemetry) trySend(event string, props ...map[string]any) {
    method saveConfig (line 118) | func (t *telemetry) saveConfig() error {
  type telemetryCfg (line 54) | type telemetryCfg struct
  type TelemetryMessage (line 62) | type TelemetryMessage struct
  function IsEnabled (line 134) | func IsEnabled() bool {
  function SetEnabled (line 138) | func SetEnabled(enabled bool) bool {
  function SetDebug (line 142) | func SetDebug(debug bool) bool {
  function UpdateConfig (line 146) | func UpdateConfig(anonID string, enabled, debug bool) (changed bool) {
  function ShouldShowWarning (line 156) | func ShouldShowWarning() bool {
  function SetShownWarning (line 160) | func SetShownWarning() {
  function SaveConfig (line 167) | func SaveConfig() error {
  function SendOnce (line 171) | func SendOnce(event string, props ...map[string]any) {
  function Send (line 178) | func Send(event string, props ...map[string]any) {
  function SendSync (line 185) | func SendSync(event string, props ...map[string]any) {
  function configPath (line 192) | func configPath() (string, error) {
  function GetAnonID (line 200) | func GetAnonID() string {
  function IsDebug (line 204) | func IsDebug() bool {

FILE: cli/internal/update/update.go
  function Check (line 29) | func Check(ctx context.Context) (latestVersion *LatestVersion, err error) {
  type LatestVersion (line 90) | type LatestVersion struct
    method Version (line 117) | func (lv *LatestVersion) Version() string {
    method IsNewer (line 131) | func (lv *LatestVersion) IsNewer(current string) bool {
    method DoUpgrade (line 149) | func (lv *LatestVersion) DoUpgrade(stdout, stderr io.Writer) error {
  function nightlyToNumber (line 217) | func nightlyToNumber(version string) int64 {
  function wasInstalledViaHomebrew (line 232) | func wasInstalledViaHomebrew(shell string, arg string, channel version.R...
  function updateBrewTap (line 256) | func updateBrewTap(stdout, stderr io.Writer) {

FILE: e2e-tests/app_test.go
  type RunAppData (line 47) | type RunAppData struct
  function RunApp (line 58) | func RunApp(c testing.TB, appRoot string, logger RunLogger, env []string...
  function RunTests (line 164) | func RunTests(c testing.TB, appRoot string, stdout, stderr io.Writer, en...
  function getNodeJSPath (line 203) | func getNodeJSPath() option.Option[string] {
  type testRunLogger (line 212) | type testRunLogger struct
    method RunStdout (line 216) | func (l testRunLogger) RunStdout(r *Run, line []byte) {
    method RunStderr (line 221) | func (l testRunLogger) RunStderr(r *Run, line []byte) {
  function startProxy (line 226) | func startProxy(ctx context.Context, ln net.Listener, proxyHandler http....
  function testBuild (line 238) | func testBuild(t testing.TB, appRoot string, env []string) (*builder.Par...
  function runGoModTidy (line 331) | func runGoModTidy(dir string) error {

FILE: e2e-tests/echo_app_test.go
  type Data (line 35) | type Data struct
  type NonBasicRequest (line 40) | type NonBasicRequest struct
  type NonBasicResponse (line 52) | type NonBasicResponse struct
  function TestEndToEndWithApp (line 81) | func TestEndToEndWithApp(t *testing.T) {
  function doTestEndToEndWithApp (line 85) | func doTestEndToEndWithApp(t *testing.T, env []string) {
  function TestProcClosedOnCtxCancel (line 565) | func TestProcClosedOnCtxCancel(t *testing.T) {

FILE: e2e-tests/testdata/echo/cache/cache.go
  type IncrResponse (line 18) | type IncrResponse struct
  function Incr (line 23) | func Incr(ctx context.Context, key string) (*IncrResponse, error) {
  type StructKey (line 28) | type StructKey struct
  type StructVal (line 33) | type StructVal struct
  function PostStruct (line 42) | func PostStruct(ctx context.Context, key int, val string) error {
  function GetStruct (line 48) | func GetStruct(ctx context.Context, key int) (StructVal, error) {
  function PostList (line 63) | func PostList(ctx context.Context, key int, val string) error {
  type ListResponse (line 68) | type ListResponse struct
  function GetList (line 73) | func GetList(ctx context.Context, key int) (ListResponse, error) {

FILE: e2e-tests/testdata/echo/di/di.go
  type TwoResponse (line 14) | type TwoResponse struct
  type Service (line 25) | type Service struct
    method One (line 36) | func (s *Service) One(ctx context.Context) error {
    method Two (line 41) | func (s *Service) Two(ctx context.Context) (*TwoResponse, error) {
    method Three (line 46) | func (s *Service) Three(w http.ResponseWriter, req *http.Request) {
  function initService (line 50) | func initService() (*Service, error) {

FILE: e2e-tests/testdata/echo/echo/config.go
  type CfgType (line 9) | type CfgType struct
  type SubCfgType (line 29) | type SubCfgType struct
  type ConfigResponse (line 35) | type ConfigResponse struct
  function ConfigValues (line 43) | func ConfigValues(ctx context.Context) (ConfigResponse, error) {

FILE: e2e-tests/testdata/echo/echo/config_test.go
  function TestConfigValues (line 8) | func TestConfigValues(t *testing.T) {

FILE: e2e-tests/testdata/echo/echo/echo.go
  type Message (line 20) | type Message struct
  type Data (line 40) | type Data struct
  type NonBasicData (line 45) | type NonBasicData struct
  type EmptyData (line 79) | type EmptyData struct
  type BasicData (line 85) | type BasicData struct
  type HeadersData (line 98) | type HeadersData struct
  function Publish (line 106) | func Publish(ctx context.Context) error {
  function Consumer (line 120) | func Consumer(ctx context.Context, msg *Message) error {
  function Echo (line 136) | func Echo(ctx context.Context, params *Data[string, int]) (*Data[string,...
  function EmptyEcho (line 143) | func EmptyEcho(ctx context.Context, params EmptyData) (EmptyData, error) {
  function NonBasicEcho (line 150) | func NonBasicEcho(ctx context.Context, pathString string, pathInt int, p...
  function BasicEcho (line 163) | func BasicEcho(ctx context.Context, params *BasicData) (*BasicData, erro...
  function HeadersEcho (line 170) | func HeadersEcho(ctx context.Context, params *HeadersData) (*HeadersData...
  function Noop (line 177) | func Noop(ctx context.Context) error {
  function NilResponse (line 184) | func NilResponse(ctx context.Context) (*BasicData, error) {
  function MuteEcho (line 191) | func MuteEcho(ctx context.Context, params Data[string, string]) error {
  function Pong (line 199) | func Pong(ctx context.Context) (Data[string, string], error) {
  type HTTPStatusResponse (line 204) | type HTTPStatusResponse struct
  function CustomHTTPStatus (line 212) | func CustomHTTPStatus(ctx context.Context) (*HTTPStatusResponse, error) {
  type EnvResponse (line 219) | type EnvResponse struct
  function Env (line 226) | func Env(ctx context.Context) (*EnvResponse, error) {
  type AppMetadata (line 230) | type AppMetadata struct
  function AppMeta (line 240) | func AppMeta(ctx context.Context) (*AppMetadata, error) {
  type AuthParams (line 250) | type AuthParams struct
    method Validate (line 258) | func (p *AuthParams) Validate() error {
  function AuthHandler (line 266) | func AuthHandler(ctx context.Context, params *AuthParams) (auth.UID, *Au...

FILE: e2e-tests/testdata/echo/echo/echo_test.go
  function TestEnvsProvided (line 10) | func TestEnvsProvided(t *testing.T) {

FILE: e2e-tests/testdata/echo/empty_cfg/service.go
  type cfg (line 9) | type cfg struct
  function AnAPI (line 16) | func AnAPI(ctx context.Context) error {

FILE: e2e-tests/testdata/echo/endtoend/endtoend.go
  function GeneratedWrappersEndToEndTest (line 28) | func GeneratedWrappersEndToEndTest(ctx context.Context) (err error) {
  function assert (line 176) | func assert(got, want any, message string) {
  function assertNotNil (line 184) | func assertNotNil(got any, message string) {
  function assertStructuredError (line 191) | func assertStructuredError(err error, code errs.ErrCode, message string) {
  function newUUID (line 204) | func newUUID() uuid.UUID {

FILE: e2e-tests/testdata/echo/middleware/middleware.go
  function ErroringMiddleware (line 14) | func ErroringMiddleware(req middleware.Request, next middleware.Next) mi...
  function ResponseRewritingMiddleware (line 21) | func ResponseRewritingMiddleware(req middleware.Request, next middleware...
  function ResponseGeneratingMiddleware (line 32) | func ResponseGeneratingMiddleware(req middleware.Request, next middlewar...
  type Payload (line 41) | type Payload struct
  function Error (line 46) | func Error(ctx context.Context) error {
  function ResponseRewrite (line 51) | func ResponseRewrite(ctx context.Context, req *Payload) (*Payload, error) {
  function ResponseGen (line 56) | func ResponseGen(ctx context.Context, msg *Payload) (*Payload, error) {

FILE: e2e-tests/testdata/echo/middleware/middleware_test.go
  function TestMiddleware (line 11) | func TestMiddleware(t *testing.T) {

FILE: e2e-tests/testdata/echo/test/endpoints.go
  function Noop (line 21) | func Noop(ctx context.Context) error {
  function NoopWithError (line 28) | func NoopWithError(ctx context.Context) error {
  type BodyEcho (line 35) | type BodyEcho struct
  function SimpleBodyEcho (line 43) | func SimpleBodyEcho(ctx context.Context, body *BodyEcho) (*BodyEcho, err...
  function UpdateMessage (line 53) | func UpdateMessage(ctx context.Context, clientID string, message *BodyEc...
  function GetMessage (line 62) | func GetMessage(ctx context.Context, clientID string) (*BodyEcho, error) {
  type RestParams (line 68) | type RestParams struct
  function RestStyleAPI (line 84) | func RestStyleAPI(ctx context.Context, objType int, name string, params ...
  type MarshallerTest (line 101) | type MarshallerTest struct
  function MarshallerTestHandler (line 140) | func MarshallerTestHandler(ctx context.Context, params *MarshallerTest[i...
  function TestAuthHandler (line 147) | func TestAuthHandler(ctx context.Context) (*BodyEcho, error) {
  type response (line 155) | type response struct
  function RawEndpoint (line 166) | func RawEndpoint(w http.ResponseWriter, req *http.Request) {
  type MultiPathSegment (line 187) | type MultiPathSegment struct
  function PathMultiSegments (line 198) | func PathMultiSegments(ctx context.Context, bool bool, int int, string s...

FILE: e2e-tests/testdata/echo/validation/validation.go
  type Request (line 8) | type Request struct
    method Validate (line 12) | func (req *Request) Validate() error {
  function TestOne (line 20) | func TestOne(ctx context.Context, msg *Request) error {

FILE: e2e-tests/testdata/echo_client/golang/client/goclient.go
  type Client (line 21) | type Client struct
  type BaseURL (line 33) | type BaseURL
  constant Local (line 35) | Local BaseURL = "http://localhost:4000"
  function Environment (line 38) | func Environment(name string) BaseURL {
  function PreviewEnv (line 43) | func PreviewEnv(pr int) BaseURL {
  function New (line 52) | func New(target BaseURL, options ...Option) (*Client, error) {
  function WithHTTPClient (line 88) | func WithHTTPClient(client HTTPDoer) Option {
  function WithAuth (line 96) | func WithAuth(auth EchoAuthParams) Option {
  function WithAuthFunc (line 106) | func WithAuthFunc(authGenerator func(ctx context.Context) (EchoAuthParam...
  type CacheIncrResponse (line 113) | type CacheIncrResponse struct
  type CacheListResponse (line 117) | type CacheListResponse struct
  type CacheStructVal (line 121) | type CacheStructVal struct
  type CacheClient (line 127) | type CacheClient interface
  type cacheClient (line 135) | type cacheClient struct
    method GetList (line 141) | func (c *cacheClient) GetList(ctx context.Context, key int) (resp Cach...
    method GetStruct (line 151) | func (c *cacheClient) GetStruct(ctx context.Context, key int) (resp Ca...
    method Incr (line 161) | func (c *cacheClient) Incr(ctx context.Context, key string) (resp Cach...
    method PostList (line 171) | func (c *cacheClient) PostList(ctx context.Context, key int, val strin...
    method PostStruct (line 176) | func (c *cacheClient) PostStruct(ctx context.Context, key int, val str...
  type DiTwoResponse (line 181) | type DiTwoResponse struct
  type DiClient (line 187) | type DiClient interface
  type diClient (line 193) | type diClient struct
    method One (line 199) | func (c *diClient) One(ctx context.Context) error {
    method Three (line 204) | func (c *diClient) Three(ctx context.Context, request *http.Request) (...
    method Two (line 230) | func (c *diClient) Two(ctx context.Context) (resp DiTwoResponse, err e...
  type EchoAppMetadata (line 240) | type EchoAppMetadata struct
  type EchoAuthParams (line 247) | type EchoAuthParams struct
  type EchoBasicData (line 255) | type EchoBasicData struct
  type EchoConfigResponse (line 268) | type EchoConfigResponse struct
  type EchoData (line 275) | type EchoData struct
  type EchoEmptyData (line 280) | type EchoEmptyData struct
  type EchoEnvResponse (line 286) | type EchoEnvResponse struct
  type EchoHTTPStatusResponse (line 291) | type EchoHTTPStatusResponse struct
  type EchoHeadersData (line 295) | type EchoHeadersData struct
  type EchoNonBasicData (line 300) | type EchoNonBasicData struct
  type EchoClient (line 326) | type EchoClient interface
  type echoClient (line 368) | type echoClient struct
    method AppMeta (line 375) | func (c *echoClient) AppMeta(ctx context.Context) (resp EchoAppMetadat...
    method BasicEcho (line 386) | func (c *echoClient) BasicEcho(ctx context.Context, params EchoBasicDa...
    method ConfigValues (line 396) | func (c *echoClient) ConfigValues(ctx context.Context) (resp EchoConfi...
    method CustomHTTPStatus (line 407) | func (c *echoClient) CustomHTTPStatus(ctx context.Context) (resp EchoH...
    method Echo (line 418) | func (c *echoClient) Echo(ctx context.Context, params EchoData[string,...
    method EmptyEcho (line 429) | func (c *echoClient) EmptyEcho(ctx context.Context, params EchoEmptyDa...
    method Env (line 440) | func (c *echoClient) Env(ctx context.Context) (resp EchoEnvResponse, e...
    method HeadersEcho (line 451) | func (c *echoClient) HeadersEcho(ctx context.Context, params EchoHeade...
    method MuteEcho (line 487) | func (c *echoClient) MuteEcho(ctx context.Context, params EchoData[str...
    method NilResponse (line 505) | func (c *echoClient) NilResponse(ctx context.Context) (resp EchoBasicD...
    method NonBasicEcho (line 516) | func (c *echoClient) NonBasicEcho(ctx context.Context, pathString stri...
    method Noop (line 633) | func (c *echoClient) Noop(ctx context.Context) error {
    method Pong (line 639) | func (c *echoClient) Pong(ctx context.Context) (resp EchoData[string, ...
    method Publish (line 650) | func (c *echoClient) Publish(ctx context.Context) error {
  type EmptycfgClient (line 657) | type EmptycfgClient interface
  type emptycfgClient (line 661) | type emptycfgClient struct
    method AnAPI (line 667) | func (c *emptycfgClient) AnAPI(ctx context.Context) error {
  type EndtoendClient (line 674) | type EndtoendClient interface
  type endtoendClient (line 678) | type endtoendClient struct
    method GeneratedWrappersEndToEndTest (line 684) | func (c *endtoendClient) GeneratedWrappersEndToEndTest(ctx context.Con...
  type MiddlewarePayload (line 689) | type MiddlewarePayload struct
  type MiddlewareClient (line 695) | type MiddlewareClient interface
  type middlewareClient (line 701) | type middlewareClient struct
    method Error (line 707) | func (c *middlewareClient) Error(ctx context.Context) error {
    method ResponseGen (line 712) | func (c *middlewareClient) ResponseGen(ctx context.Context, params Mid...
    method ResponseRewrite (line 722) | func (c *middlewareClient) ResponseRewrite(ctx context.Context, params...
  type TestBodyEcho (line 732) | type TestBodyEcho struct
  type TestMarshallerTest (line 736) | type TestMarshallerTest struct
  type TestMultiPathSegment (line 771) | type TestMultiPathSegment struct
  type TestRestParams (line 779) | type TestRestParams struct
  type TestClient (line 792) | type TestClient interface
  type testClient (line 830) | type testClient struct
    method GetMessage (line 838) | func (c *testClient) GetMessage(ctx context.Context, clientID string) ...
    method MarshallerTestHandler (line 850) | func (c *testClient) MarshallerTestHandler(ctx context.Context, params...
    method Noop (line 993) | func (c *testClient) Noop(ctx context.Context) error {
    method NoopWithError (line 999) | func (c *testClient) NoopWithError(ctx context.Context) error {
    method PathMultiSegments (line 1005) | func (c *testClient) PathMultiSegments(ctx context.Context, _bool bool...
    method RawEndpoint (line 1017) | func (c *testClient) RawEndpoint(ctx context.Context, id []string, req...
    method RestStyleAPI (line 1045) | func (c *testClient) RestStyleAPI(ctx context.Context, objType int, na...
    method SimpleBodyEcho (line 1108) | func (c *testClient) SimpleBodyEcho(ctx context.Context, params TestBo...
    method TestAuthHandler (line 1119) | func (c *testClient) TestAuthHandler(ctx context.Context) (resp TestBo...
    method UpdateMessage (line 1131) | func (c *testClient) UpdateMessage(ctx context.Context, clientID strin...
  type ValidationRequest (line 1136) | type ValidationRequest struct
  type ValidationClient (line 1142) | type ValidationClient interface
  type validationClient (line 1146) | type validationClient struct
    method TestOne (line 1152) | func (c *validationClient) TestOne(ctx context.Context, params Validat...
  type HTTPDoer (line 1160) | type HTTPDoer interface
  type baseClient (line 1165) | type baseClient struct
    method Do (line 1173) | func (b *baseClient) Do(req *http.Request) (*http.Response, error) {
  function callAPI (line 1213) | func callAPI(ctx context.Context, client *baseClient, method, path strin...
  function pathEscapeSlice (line 1277) | func pathEscapeSlice(paths []string) string {
  type APIError (line 1289) | type APIError struct
    method Error (line 1295) | func (e *APIError) Error() string {
  type ErrCode (line 1299) | type ErrCode
    method String (line 1458) | func (c ErrCode) String() string {
    method MarshalJSON (line 1500) | func (c ErrCode) MarshalJSON() ([]byte, error) {
    method UnmarshalJSON (line 1505) | func (c *ErrCode) UnmarshalJSON(b []byte) error {
  constant ErrOK (line 1303) | ErrOK ErrCode = 0
  constant ErrCanceled (line 1308) | ErrCanceled ErrCode = 1
  constant ErrUnknown (line 1317) | ErrUnknown ErrCode = 2
  constant ErrInvalidArgument (line 1325) | ErrInvalidArgument ErrCode = 3
  constant ErrDeadlineExceeded (line 1335) | ErrDeadlineExceeded ErrCode = 4
  constant ErrNotFound (line 1341) | ErrNotFound ErrCode = 5
  constant ErrAlreadyExists (line 1347) | ErrAlreadyExists ErrCode = 6
  constant ErrPermissionDenied (line 1358) | ErrPermissionDenied ErrCode = 7
  constant ErrResourceExhausted (line 1366) | ErrResourceExhausted ErrCode = 8
  constant ErrFailedPrecondition (line 1390) | ErrFailedPrecondition ErrCode = 9
  constant ErrAborted (line 1398) | ErrAborted ErrCode = 10
  constant ErrOutOfRange (line 1414) | ErrOutOfRange ErrCode = 11
  constant ErrUnimplemented (line 1422) | ErrUnimplemented ErrCode = 12
  constant ErrInternal (line 1429) | ErrInternal ErrCode = 13
  constant ErrUnavailable (line 1437) | ErrUnavailable ErrCode = 14
  constant ErrDataLoss (line 1446) | ErrDataLoss ErrCode = 15
  constant ErrUnauthenticated (line 1454) | ErrUnauthenticated ErrCode = 16
  type serde (line 1548) | type serde struct
    method FromInt (line 1553) | func (e *serde) FromInt(s int) (v string) {
    method FromString (line 1558) | func (e *serde) FromString(s string) (v string) {
    method ToInt (line 1563) | func (e *serde) ToInt(field string, s string, required bool) (v int) {
    method ToString (line 1573) | func (e *serde) ToString(field string, s string, required bool) (v str...
    method FromBool (line 1581) | func (e *serde) FromBool(s bool) (v string) {
    method FromFloat64 (line 1586) | func (e *serde) FromFloat64(s float64) (v string) {
    method FromBytes (line 1591) | func (e *serde) FromBytes(s []byte) (v string) {
    method FromTime (line 1596) | func (e *serde) FromTime(s time.Time) (v string) {
    method FromJSON (line 1601) | func (e *serde) FromJSON(s json.RawMessage) (v string) {
    method FromStringOption (line 1606) | func (e *serde) FromStringOption(s *string) (v []string) {
    method FromIntList (line 1614) | func (e *serde) FromIntList(s []int) (v []string) {
    method ToBool (line 1622) | func (e *serde) ToBool(field string, s string, required bool) (v bool) {
    method ToFloat64 (line 1632) | func (e *serde) ToFloat64(field string, s string, required bool) (v fl...
    method ToBytes (line 1642) | func (e *serde) ToBytes(field string, s string, required bool) (v []by...
    method ToTime (line 1652) | func (e *serde) ToTime(field string, s string, required bool) (v time....
    method ToJSON (line 1662) | func (e *serde) ToJSON(field string, s string, required bool) (v json....
    method ToStringOption (line 1670) | func (e *serde) ToStringOption(field string, s string, required bool) ...
    method setErr (line 1680) | func (e *serde) setErr(msg, field string, err error) {

FILE: e2e-tests/testdata/echo_client/js/client.js
  function Environment (line 16) | function Environment(name) {
  function PreviewEnv (line 23) | function PreviewEnv(pr) {
  constant BROWSER (line 27) | const BROWSER = typeof globalThis === "object" && ("window" in globalThis);
  class Client (line 32) | class Client {
    method constructor (line 39) | constructor(target = "prod", options = undefined) {
  class CacheServiceClient (line 52) | class CacheServiceClient {
    method constructor (line 53) | constructor(baseClient) {
    method GetList (line 62) | async GetList(key) {
    method GetStruct (line 68) | async GetStruct(key) {
    method Incr (line 74) | async Incr(key) {
    method PostList (line 80) | async PostList(key, val) {
    method PostStruct (line 84) | async PostStruct(key, val) {
  class DiServiceClient (line 93) | class DiServiceClient {
    method constructor (line 94) | constructor(baseClient) {
    method One (line 101) | async One() {
    method Three (line 105) | async Three(method, body, options) {
    method Two (line 109) | async Two() {
  class EchoServiceClient (line 120) | class EchoServiceClient {
    method constructor (line 121) | constructor(baseClient) {
    method AppMeta (line 142) | async AppMeta() {
    method BasicEcho (line 151) | async BasicEcho(params) {
    method ConfigValues (line 157) | async ConfigValues() {
    method CustomHTTPStatus (line 166) | async CustomHTTPStatus() {
    method Echo (line 175) | async Echo(params) {
    method EmptyEcho (line 184) | async EmptyEcho(params) {
    method Env (line 193) | async Env() {
    method HeadersEcho (line 202) | async HeadersEcho(params) {
    method MuteEcho (line 222) | async MuteEcho(params) {
    method NilResponse (line 235) | async NilResponse() {
    method NonBasicEcho (line 244) | async NonBasicEcho(pathString, pathInt, pathWild, params) {
    method Noop (line 288) | async Noop() {
    method Pong (line 295) | async Pong() {
    method Publish (line 304) | async Publish() {
  class EmptycfgServiceClient (line 313) | class EmptycfgServiceClient {
    method constructor (line 314) | constructor(baseClient) {
    method AnAPI (line 319) | async AnAPI() {
  class EndtoendServiceClient (line 328) | class EndtoendServiceClient {
    method constructor (line 329) | constructor(baseClient) {
    method GeneratedWrappersEndToEndTest (line 334) | async GeneratedWrappersEndToEndTest() {
  class MiddlewareServiceClient (line 343) | class MiddlewareServiceClient {
    method constructor (line 344) | constructor(baseClient) {
    method Error (line 351) | async Error() {
    method ResponseGen (line 355) | async ResponseGen(params) {
    method ResponseRewrite (line 361) | async ResponseRewrite(params) {
  class TestServiceClient (line 372) | class TestServiceClient {
    method constructor (line 373) | constructor(baseClient) {
    method GetMessage (line 391) | async GetMessage(clientID) {
    method MarshallerTestHandler (line 401) | async MarshallerTestHandler(params) {
    method Noop (line 466) | async Noop() {
    method NoopWithError (line 473) | async NoopWithError() {
    method PathMultiSegments (line 480) | async PathMultiSegments(bool, _int, string, uuid, wildcard) {
    method RawEndpoint (line 490) | async RawEndpoint(method, id, body, options) {
    method RestStyleAPI (line 498) | async RestStyleAPI(objType, name, params) {
    method SimpleBodyEcho (line 527) | async SimpleBodyEcho(params) {
    method TestAuthHandler (line 536) | async TestAuthHandler() {
    method UpdateMessage (line 546) | async UpdateMessage(clientID, params) {
  class ValidationServiceClient (line 555) | class ValidationServiceClient {
    method constructor (line 556) | constructor(baseClient) {
    method TestOne (line 561) | async TestOne(params) {
  function encodeQuery (line 571) | function encodeQuery(parts) {
  function makeRecord (line 584) | function makeRecord(record) {
  function mustBeSet (line 594) | function mustBeSet(field, value) {
  function encodeWebSocketHeaders (line 608) | function encodeWebSocketHeaders(headers) {
  class WebSocketConnection (line 617) | class WebSocketConnection {
    method constructor (line 620) | constructor(url, headers) {
    method resolveHasUpdateHandlers (line 637) | resolveHasUpdateHandlers() {
    method hasUpdate (line 646) | async hasUpdate() {
    method on (line 653) | on(type, handler) {
    method off (line 657) | off(type, handler) {
    method close (line 661) | close() {
  class StreamInOut (line 666) | class StreamInOut {
    method constructor (line 669) | constructor(url, headers) {
    method close (line 677) | close() {
    method send (line 681) | async send(msg) {
    method next (line 692) | async next() {
  method [Symbol.asyncIterator] (line 696) | async *[Symbol.asyncIterator]() {
  class StreamIn (line 708) | class StreamIn {
    method constructor (line 711) | constructor(url, headers) {
    method close (line 719) | close() {
    method next (line 723) | async next() {
  method [Symbol.asyncIterator] (line 727) | async *[Symbol.asyncIterator]() {
  class StreamOut (line 739) | class StreamOut {
    method constructor (line 740) | constructor(url, headers) {
    method response (line 750) | async response() {
    method close (line 754) | close() {
    method send (line 758) | async send(msg) {
  class BaseClient (line 772) | class BaseClient {
    method constructor (line 773) | constructor(baseURL, options) {
    method getAuthData (line 804) | async getAuthData() {
    method createStreamInOut (line 837) | async createStreamInOut(path, params) {
    method createStreamIn (line 858) | async createStreamIn(path, params) {
    method createStreamOut (line 879) | async createStreamOut(path, params) {
    method callTypedAPI (line 901) | async callTypedAPI(method, path, body, params) {
    method callAPI (line 909) | async callAPI(method, path, body, params) {
  function isAPIErrorResponse (line 969) | function isAPIErrorResponse(err) {
  function isErrCode (line 978) | function isErrCode(code) {
  class APIError (line 985) | class APIError extends Error {
    method constructor (line 986) | constructor(status, response) {
  function isAPIError (line 1030) | function isAPIError(err) {

FILE: e2e-tests/testdata/echo_client/js/main.js
  function rInt (line 70) | function rInt() {
  function assertStructuredError (line 291) | async function assertStructuredError(promise, code, message) {

FILE: e2e-tests/testdata/echo_client/main.go
  function main (line 23) | func main() {
  function assert (line 295) | func assert(got, want any, message string) {
  function assertNotNil (line 304) | func assertNotNil(got any, message string) {
  function assertStructuredError (line 312) | func assertStructuredError(err error, code client.ErrCode, message strin...

FILE: e2e-tests/testdata/echo_client/ts/client.ts
  type BaseURL (line 11) | type BaseURL = string
  function Environment (line 18) | function Environment(name: string): BaseURL {
  function PreviewEnv (line 25) | function PreviewEnv(pr: number | string): BaseURL {
  constant BROWSER (line 29) | const BROWSER = typeof globalThis === "object" && ("window" in globalThis);
  class Client (line 34) | class Client {
    method constructor (line 53) | constructor(target: BaseURL, options?: ClientOptions) {
    method with (line 72) | public with(options: ClientOptions): Client {
  type ClientOptions (line 83) | interface ClientOptions {
  type IncrResponse (line 103) | interface IncrResponse {
  type ListResponse (line 107) | interface ListResponse {
  type StructVal (line 111) | interface StructVal {
  class ServiceClient (line 115) | class ServiceClient {
    method constructor (line 118) | constructor(baseClient: BaseClient) {
    method GetList (line 127) | public async GetList(key: number): Promise<ListResponse> {
    method GetStruct (line 133) | public async GetStruct(key: number): Promise<StructVal> {
    method Incr (line 139) | public async Incr(key: string): Promise<IncrResponse> {
    method PostList (line 145) | public async PostList(key: number, val: string): Promise<void> {
    method PostStruct (line 149) | public async PostStruct(key: number, val: string): Promise<void> {
    method constructor (line 163) | constructor(baseClient: BaseClient) {
    method One (line 170) | public async One(): Promise<void> {
    method Three (line 174) | public async Three(method: string, body?: RequestInit["body"], options...
    method Two (line 178) | public async Two(): Promise<TwoResponse> {
    method constructor (line 296) | constructor(baseClient: BaseClient) {
    method AppMeta (line 317) | public async AppMeta(): Promise<AppMetadata> {
    method BasicEcho (line 326) | public async BasicEcho(params: BasicData): Promise<BasicData> {
    method ConfigValues (line 332) | public async ConfigValues(): Promise<ConfigResponse> {
    method CustomHTTPStatus (line 341) | public async CustomHTTPStatus(): Promise<HTTPStatusResponse> {
    method Echo (line 350) | public async Echo(params: Data<string, number>): Promise<Data<string, ...
    method EmptyEcho (line 359) | public async EmptyEcho(params: EmptyData): Promise<EmptyData> {
    method Env (line 368) | public async Env(): Promise<EnvResponse> {
    method HeadersEcho (line 377) | public async HeadersEcho(params: HeadersData): Promise<HeadersData> {
    method MuteEcho (line 397) | public async MuteEcho(params: Data<string, string>): Promise<void> {
    method NilResponse (line 410) | public async NilResponse(): Promise<BasicData> {
    method NonBasicEcho (line 419) | public async NonBasicEcho(pathString: string, pathInt: number, pathWil...
    method Noop (line 463) | public async Noop(): Promise<void> {
    method Pong (line 470) | public async Pong(): Promise<Data<string, string>> {
    method Publish (line 479) | public async Publish(): Promise<void> {
    method constructor (line 490) | constructor(baseClient: BaseClient) {
    method AnAPI (line 495) | public async AnAPI(): Promise<void> {
    method constructor (line 506) | constructor(baseClient: BaseClient) {
    method GeneratedWrappersEndToEndTest (line 511) | public async GeneratedWrappersEndToEndTest(): Promise<void> {
    method constructor (line 525) | constructor(baseClient: BaseClient) {
    method Error (line 532) | public async Error(): Promise<void> {
    method ResponseGen (line 536) | public async ResponseGen(params: Payload): Promise<Payload> {
    method ResponseRewrite (line 542) | public async ResponseRewrite(params: Payload): Promise<Payload> {
    method constructor (line 612) | constructor(baseClient: BaseClient) {
    method GetMessage (line 630) | public async GetMessage(clientID: string): Promise<BodyEcho> {
    method MarshallerTestHandler (line 640) | public async MarshallerTestHandler(params: MarshallerTest<number>): Pr...
    method Noop (line 705) | public async Noop(): Promise<void> {
    method NoopWithError (line 712) | public async NoopWithError(): Promise<void> {
    method PathMultiSegments (line 719) | public async PathMultiSegments(bool: boolean, int: number, _string: st...
    method RawEndpoint (line 729) | public async RawEndpoint(method: "PUT" | "POST" | "DELETE" | "GET", id...
    method RestStyleAPI (line 737) | public async RestStyleAPI(objType: number, name: string, params: RestP...
    method SimpleBodyEcho (line 766) | public async SimpleBodyEcho(params: BodyEcho): Promise<BodyEcho> {
    method TestAuthHandler (line 775) | public async TestAuthHandler(): Promise<BodyEcho> {
    method UpdateMessage (line 785) | public async UpdateMessage(clientID: string, params: BodyEcho): Promis...
    method constructor (line 799) | constructor(baseClient: BaseClient) {
    method TestOne (line 804) | public async TestOne(params: Request): Promise<void> {
  type TwoResponse (line 156) | interface TwoResponse {
  class ServiceClient (line 160) | class ServiceClient {
    method constructor (line 118) | constructor(baseClient: BaseClient) {
    method GetList (line 127) | public async GetList(key: number): Promise<ListResponse> {
    method GetStruct (line 133) | public async GetStruct(key: number): Promise<StructVal> {
    method Incr (line 139) | public async Incr(key: string): Promise<IncrResponse> {
    method PostList (line 145) | public async PostList(key: number, val: string): Promise<void> {
    method PostStruct (line 149) | public async PostStruct(key: number, val: string): Promise<void> {
    method constructor (line 163) | constructor(baseClient: BaseClient) {
    method One (line 170) | public async One(): Promise<void> {
    method Three (line 174) | public async Three(method: string, body?: RequestInit["body"], options...
    method Two (line 178) | public async Two(): Promise<TwoResponse> {
    method constructor (line 296) | constructor(baseClient: BaseClient) {
    method AppMeta (line 317) | public async AppMeta(): Promise<AppMetadata> {
    method BasicEcho (line 326) | public async BasicEcho(params: BasicData): Promise<BasicData> {
    method ConfigValues (line 332) | public async ConfigValues(): Promise<ConfigResponse> {
    method CustomHTTPStatus (line 341) | public async CustomHTTPStatus(): Promise<HTTPStatusResponse> {
    method Echo (line 350) | public async Echo(params: Data<string, number>): Promise<Data<string, ...
    method EmptyEcho (line 359) | public async EmptyEcho(params: EmptyData): Promise<EmptyData> {
    method Env (line 368) | public async Env(): Promise<EnvResponse> {
    method HeadersEcho (line 377) | public async HeadersEcho(params: HeadersData): Promise<HeadersData> {
    method MuteEcho (line 397) | public async MuteEcho(params: Data<string, string>): Promise<void> {
    method NilResponse (line 410) | public async NilResponse(): Promise<BasicData> {
    method NonBasicEcho (line 419) | public async NonBasicEcho(pathString: string, pathInt: number, pathWil...
    method Noop (line 463) | public async Noop(): Promise<void> {
    method Pong (line 470) | public async Pong(): Promise<Data<string, string>> {
    method Publish (line 479) | public async Publish(): Promise<void> {
    method constructor (line 490) | constructor(baseClient: BaseClient) {
    method AnAPI (line 495) | public async AnAPI(): Promise<void> {
    method constructor (line 506) | constructor(baseClient: BaseClient) {
    method GeneratedWrappersEndToEndTest (line 511) | public async GeneratedWrappersEndToEndTest(): Promise<void> {
    method constructor (line 525) | constructor(baseClient: BaseClient) {
    method Error (line 532) | public async Error(): Promise<void> {
    method ResponseGen (line 536) | public async ResponseGen(params: Payload): Promise<Payload> {
    method ResponseRewrite (line 542) | public async ResponseRewrite(params: Payload): Promise<Payload> {
    method constructor (line 612) | constructor(baseClient: BaseClient) {
    method GetMessage (line 630) | public async GetMessage(clientID: string): Promise<BodyEcho> {
    method MarshallerTestHandler (line 640) | public async MarshallerTestHandler(params: MarshallerTest<number>): Pr...
    method Noop (line 705) | public async Noop(): Promise<void> {
    method NoopWithError (line 712) | public async NoopWithError(): Promise<void> {
    method PathMultiSegments (line 719) | public async PathMultiSegments(bool: boolean, int: number, _string: st...
    method RawEndpoint (line 729) | public async RawEndpoint(method: "PUT" | "POST" | "DELETE" | "GET", id...
    method RestStyleAPI (line 737) | public async RestStyleAPI(objType: number, name: string, params: RestP...
    method SimpleBodyEcho (line 766) | public async SimpleBodyEcho(params: BodyEcho): Promise<BodyEcho> {
    method TestAuthHandler (line 775) | public async TestAuthHandler(): Promise<BodyEcho> {
    method UpdateMessage (line 785) | public async UpdateMessage(clientID: string, params: BodyEcho): Promis...
    method constructor (line 799) | constructor(baseClient: BaseClient) {
    method TestOne (line 804) | public async TestOne(params: Request): Promise<void> {
  type AppMetadata (line 187) | interface AppMetadata {
  type AuthParams (line 194) | interface AuthParams {
  type BasicData (line 202) | interface BasicData {
  type ConfigResponse (line 215) | interface ConfigResponse {
  type Data (line 222) | interface Data<K, V> {
  type EmptyData (line 227) | interface EmptyData {
  type EnvResponse (line 233) | interface EnvResponse {
  type HTTPStatusResponse (line 240) | interface HTTPStatusResponse {
  type HeadersData (line 244) | interface HeadersData {
  type NonBasicData (line 249) | interface NonBasicData {
  class ServiceClient (line 293) | class ServiceClient {
    method constructor (line 118) | constructor(baseClient: BaseClient) {
    method GetList (line 127) | public async GetList(key: number): Promise<ListResponse> {
    method GetStruct (line 133) | public async GetStruct(key: number): Promise<StructVal> {
    method Incr (line 139) | public async Incr(key: string): Promise<IncrResponse> {
    method PostList (line 145) | public async PostList(key: number, val: string): Promise<void> {
    method PostStruct (line 149) | public async PostStruct(key: number, val: string): Promise<void> {
    method constructor (line 163) | constructor(baseClient: BaseClient) {
    method One (line 170) | public async One(): Promise<void> {
    method Three (line 174) | public async Three(method: string, body?: RequestInit["body"], options...
    method Two (line 178) | public async Two(): Promise<TwoResponse> {
    method constructor (line 296) | constructor(baseClient: BaseClient) {
    method AppMeta (line 317) | public async AppMeta(): Promise<AppMetadata> {
    method BasicEcho (line 326) | public async BasicEcho(params: BasicData): Promise<BasicData> {
    method ConfigValues (line 332) | public async ConfigValues(): Promise<ConfigResponse> {
    method CustomHTTPStatus (line 341) | public async CustomHTTPStatus(): Promise<HTTPStatusResponse> {
    method Echo (line 350) | public async Echo(params: Data<string, number>): Promise<Data<string, ...
    method EmptyEcho (line 359) | public async EmptyEcho(params: EmptyData): Promise<EmptyData> {
    method Env (line 368) | public async Env(): Promise<EnvResponse> {
    method HeadersEcho (line 377) | public async HeadersEcho(params: HeadersData): Promise<HeadersData> {
    method MuteEcho (line 397) | public async MuteEcho(params: Data<string, string>): Promise<void> {
    method NilResponse (line 410) | public async NilResponse(): Promise<BasicData> {
    method NonBasicEcho (line 419) | public async NonBasicEcho(pathString: string, pathInt: number, pathWil...
    method Noop (line 463) | public async Noop(): Promise<void> {
    method Pong (line 470) | public async Pong(): Promise<Data<string, string>> {
    method Publish (line 479) | public async Publish(): Promise<void> {
    method constructor (line 490) | constructor(baseClient: BaseClient) {
    method AnAPI (line 495) | public async AnAPI(): Promise<void> {
    method constructor (line 506) | constructor(baseClient: BaseClient) {
    method GeneratedWrappersEndToEndTest (line 511) | public async GeneratedWrappersEndToEndTest(): Promise<void> {
    method constructor (line 525) | constructor(baseClient: BaseClient) {
    method Error (line 532) | public async Error(): Promise<void> {
    method ResponseGen (line 536) | public async ResponseGen(params: Payload): Promise<Payload> {
    method ResponseRewrite (line 542) | public async ResponseRewrite(params: Payload): Promise<Payload> {
    method constructor (line 612) | constructor(baseClient: BaseClient) {
    method GetMessage (line 630) | public async GetMessage(clientID: string): Promise<BodyEcho> {
    method MarshallerTestHandler (line 640) | public async MarshallerTestHandler(params: MarshallerTest<number>): Pr...
    method Noop (line 705) | public async Noop(): Promise<void> {
    method NoopWithError (line 712) | public async NoopWithError(): Promise<void> {
    method PathMultiSegments (line 719) | public async PathMultiSegments(bool: boolean, int: number, _string: st...
    method RawEndpoint (line 729) | public async RawEndpoint(method: "PUT" | "POST" | "DELETE" | "GET", id...
    method RestStyleAPI (line 737) | public async RestStyleAPI(objType: number, name: string, params: RestP...
    method SimpleBodyEcho (line 766) | public async SimpleBodyEcho(params: BodyEcho): Promise<BodyEcho> {
    method TestAuthHandler (line 775) | public async TestAuthHandler(): Promise<BodyEcho> {
    method UpdateMessage (line 785) | public async UpdateMessage(clientID: string, params: BodyEcho): Promis...
    method constructor (line 799) | constructor(baseClient: BaseClient) {
    method TestOne (line 804) | public async TestOne(params: Request): Promise<void> {
  class ServiceClient (line 487) | class ServiceClient {
    method constructor (line 118) | constructor(baseClient: BaseClient) {
    method GetList (line 127) | public async GetList(key: number): Promise<ListResponse> {
    method GetStruct (line 133) | public async GetStruct(key: number): Promise<StructVal> {
    method Incr (line 139) | public async Incr(key: string): Promise<IncrResponse> {
    method PostList (line 145) | public async PostList(key: number, val: string): Promise<void> {
    method PostStruct (line 149) | public async PostStruct(key: number, val: string): Promise<void> {
    method constructor (line 163) | constructor(baseClient: BaseClient) {
    method One (line 170) | public async One(): Promise<void> {
    method Three (line 174) | public async Three(method: string, body?: RequestInit["body"], options...
    method Two (line 178) | public async Two(): Promise<TwoResponse> {
    method constructor (line 296) | constructor(baseClient: BaseClient) {
    method AppMeta (line 317) | public async AppMeta(): Promise<AppMetadata> {
    method BasicEcho (line 326) | public async BasicEcho(params: BasicData): Promise<BasicData> {
    method ConfigValues (line 332) | public async ConfigValues(): Promise<ConfigResponse> {
    method CustomHTTPStatus (line 341) | public async CustomHTTPStatus(): Promise<HTTPStatusResponse> {
    method Echo (line 350) | public async Echo(params: Data<string, number>): Promise<Data<string, ...
    method EmptyEcho (line 359) | public async EmptyEcho(params: EmptyData): Promise<EmptyData> {
    method Env (line 368) | public async Env(): Promise<EnvResponse> {
    method HeadersEcho (line 377) | public async HeadersEcho(params: HeadersData): Promise<HeadersData> {
    method MuteEcho (line 397) | public async MuteEcho(params: Data<string, string>): Promise<void> {
    method NilResponse (line 410) | public async NilResponse(): Promise<BasicData> {
    method NonBasicEcho (line 419) | public async NonBasicEcho(pathString: string, pathInt: number, pathWil...
    method Noop (line 463) | public async Noop(): Promise<void> {
    method Pong (line 470) | public async Pong(): Promise<Data<string, string>> {
    method Publish (line 479) | public async Publish(): Promise<void> {
    method constructor (line 490) | constructor(baseClient: BaseClient) {
    method AnAPI (line 495) | public async AnAPI(): Promise<void> {
    method constructor (line 506) | constructor(baseClient: BaseClient) {
    method GeneratedWrappersEndToEndTest (line 511) | public async GeneratedWrappersEndToEndTest(): Promise<void> {
    method constructor (line 525) | constructor(baseClient: BaseClient) {
    method Error (line 532) | public async Error(): Promise<void> {
    method ResponseGen (line 536) | public async ResponseGen(params: Payload): Promise<Payload> {
    method ResponseRewrite (line 542) | public async ResponseRewrite(params: Payload): Promise<Payload> {
    method constructor (line 612) | constructor(baseClient: BaseClient) {
    method GetMessage (line 630) | public async GetMessage(clientID: string): Promise<BodyEcho> {
    method MarshallerTestHandler (line 640) | public async MarshallerTestHandler(params: MarshallerTest<number>): Pr...
    method Noop (line 705) | public async Noop(): Promise<void> {
    method NoopWithError (line 712) | public async NoopWithError(): Promise<void> {
    method PathMultiSegments (line 719) | public async PathMultiSegments(bool: boolean, int: number, _string: st...
    method RawEndpoint (line 729) | public async RawEndpoint(method: "PUT" | "POST" | "DELETE" | "GET", id...
    method RestStyleAPI (line 737) | public async RestStyleAPI(objType: number, name: string, params: RestP...
    method SimpleBodyEcho (line 766) | public async SimpleBodyEcho(params: BodyEcho): Promise<BodyEcho> {
    method TestAuthHandler (line 775) | public async TestAuthHandler(): Promise<BodyEcho> {
    method UpdateMessage (line 785) | public async UpdateMessage(clientID: string, params: BodyEcho): Promis...
    method constructor (line 799) | constructor(baseClient: BaseClient) {
    method TestOne (line 804) | public async TestOne(params: Request): Promise<void> {
  class ServiceClient (line 503) | class ServiceClient {
    method constructor (line 118) | constructor(baseClient: BaseClient) {
    method GetList (line 127) | public async GetList(key: number): Promise<ListResponse> {
    method GetStruct (line 133) | public async GetStruct(key: number): Promise<StructVal> {
    method Incr (line 139) | public async Incr(key: string): Promise<IncrResponse> {
    method PostList (line 145) | public async PostList(key: number, val: string): Promise<void> {
    method PostStruct (line 149) | public async PostStruct(key: number, val: string): Promise<void> {
    method constructor (line 163) | constructor(baseClient: BaseClient) {
    method One (line 170) | public async One(): Promise<void> {
    method Three (line 174) | public async Three(method: string, body?: RequestInit["body"], options...
    method Two (line 178) | public async Two(): Promise<TwoResponse> {
    method constructor (line 296) | constructor(baseClient: BaseClient) {
    method AppMeta (line 317) | public async AppMeta(): Promise<AppMetadata> {
    method BasicEcho (line 326) | public async BasicEcho(params: BasicData): Promise<BasicData> {
    method ConfigValues (line 332) | public async ConfigValues(): Promise<ConfigResponse> {
    method CustomHTTPStatus (line 341) | public async CustomHTTPStatus(): Promise<HTTPStatusResponse> {
    method Echo (line 350) | public async Echo(params: Data<string, number>): Promise<Data<string, ...
    method EmptyEcho (line 359) | public async EmptyEcho(params: EmptyData): Promise<EmptyData> {
    method Env (line 368) | public async Env(): Promise<EnvResponse> {
    method HeadersEcho (line 377) | public async HeadersEcho(params: HeadersData): Promise<HeadersData> {
    method MuteEcho (line 397) | public async MuteEcho(params: Data<string, string>): Promise<void> {
    method NilResponse (line 410) | public async NilResponse(): Promise<BasicData> {
    method NonBasicEcho (line 419) | public async NonBasicEcho(pathString: string, pathInt: number, pathWil...
    method Noop (line 463) | public async Noop(): Promise<void> {
    method Pong (line 470) | public async Pong(): Promise<Data<string, string>> {
    method Publish (line 479) | public async Publish(): Promise<void> {
    method constructor (line 490) | constructor(baseClient: BaseClient) {
    method AnAPI (line 495) | public async AnAPI(): Promise<void> {
    method constructor (line 506) | constructor(baseClient: BaseClient) {
    method GeneratedWrappersEndToEndTest (line 511) | public async GeneratedWrappersEndToEndTest(): Promise<void> {
    method constructor (line 525) | constructor(baseClient: BaseClient) {
    method Error (line 532) | public async Error(): Promise<void> {
    method ResponseGen (line 536) | public async ResponseGen(params: Payload): Promise<Payload> {
    method ResponseRewrite (line 542) | public async ResponseRewrite(params: Payload): Promise<Payload> {
    method constructor (line 612) | constructor(baseClient: BaseClient) {
    method GetMessage (line 630) | public async GetMessage(clientID: string): Promise<BodyEcho> {
    method MarshallerTestHandler (line 640) | public async MarshallerTestHandler(params: MarshallerTest<number>): Pr...
    method Noop (line 705) | public async Noop(): Promise<void> {
    method NoopWithError (line 712) | public async NoopWithError(): Promise<void> {
    method PathMultiSegments (line 719) | public async PathMultiSegments(bool: boolean, int: number, _string: st...
    method RawEndpoint (line 729) | public async RawEndpoint(method: "PUT" | "POST" | "DELETE" | "GET", id...
    method RestStyleAPI (line 737) | public async RestStyleAPI(objType: number, name: string, params: RestP...
    method SimpleBodyEcho (line 766) | public async SimpleBodyEcho(params: BodyEcho): Promise<BodyEcho> {
    method TestAuthHandler (line 775) | public async TestAuthHandler(): Promise<BodyEcho> {
    method UpdateMessage (line 785) | public async UpdateMessage(clientID: string, params: BodyEcho): Promis...
    method constructor (line 799) | constructor(baseClient: BaseClient) {
    method TestOne (line 804) | public async TestOne(params: Request): Promise<void> {
  type Payload (line 518) | interface Payload {
  class ServiceClient (line 522) | class ServiceClient {
    method constructor (line 118) | constructor(baseClient: BaseClient) {
    method GetList (line 127) | public async GetList(key: number): Promise<ListResponse> {
    method GetStruct (line 133) | public async GetStruct(key: number): Promise<StructVal> {
    method Incr (line 139) | public async Incr(key: string): Promise<IncrResponse> {
    method PostList (line 145) | public async PostList(key: number, val: string): Promise<void> {
    method PostStruct (line 149) | public async PostStruct(key: number, val: string): Promise<void> {
    method constructor (line 163) | constructor(baseClient: BaseClient) {
    method One (line 170) | public async One(): Promise<void> {
    method Three (line 174) | public async Three(method: string, body?: RequestInit["body"], options...
    method Two (line 178) | public async Two(): Promise<TwoResponse> {
    method constructor (line 296) | constructor(baseClient: BaseClient) {
    method AppMeta (line 317) | public async AppMeta(): Promise<AppMetadata> {
    method BasicEcho (line 326) | public async BasicEcho(params: BasicData): Promise<BasicData> {
    method ConfigValues (line 332) | public async ConfigValues(): Promise<ConfigResponse> {
    method CustomHTTPStatus (line 341) | public async CustomHTTPStatus(): Promise<HTTPStatusResponse> {
    method Echo (line 350) | public async Echo(params: Data<string, number>): Promise<Data<string, ...
    method EmptyEcho (line 359) | public async EmptyEcho(params: EmptyData): Promise<EmptyData> {
    method Env (line 368) | public async Env(): Promise<EnvResponse> {
    method HeadersEcho (line 377) | public async HeadersEcho(params: HeadersData): Promise<HeadersData> {
    method MuteEcho (line 397) | public async MuteEcho(params: Data<string, string>): Promise<void> {
    method NilResponse (line 410) | public async NilResponse(): Promise<BasicData> {
    method NonBasicEcho (line 419) | public async NonBasicEcho(pathString: string, pathInt: number, pathWil...
    method Noop (line 463) | public async Noop(): Promise<void> {
    method Pong (line 470) | public async Pong(): Promise<Data<string, string>> {
    method Publish (line 479) | public async Publish(): Promise<void> {
    method constructor (line 490) | constructor(baseClient: BaseClient) {
    method AnAPI (line 495) | public async AnAPI(): Promise<void> {
    method constructor (line 506) | constructor(baseClient: BaseClient) {
    method GeneratedWrappersEndToEndTest (line 511) | public async GeneratedWrappersEndToEndTest(): Promise<void> {
    method constructor (line 525) | constructor(baseClient: BaseClient) {
    method Error (line 532) | public async Error(): Promise<void> {
    method ResponseGen (line 536) | public async ResponseGen(params: Payload): Promise<Payload> {
    method ResponseRewrite (line 542) | public async ResponseRewrite(params: Payload): Promise<Payload> {
    method constructor (line 612) | constructor(baseClient: BaseClient) {
    method GetMessage (line 630) | public async GetMessage(clientID: string): Promise<BodyEcho> {
    method MarshallerTestHandler (line 640) | public async MarshallerTestHandler(params: MarshallerTest<number>): Pr...
    method Noop (line 705) | public async Noop(): Promise<void> {
    method NoopWithError (line 712) | public async NoopWithError(): Promise<void> {
    method PathMultiSegments (line 719) | public async PathMultiSegments(bool: boolean, int: number, _string: st...
    method RawEndpoint (line 729) | public async RawEndpoint(method: "PUT" | "POST" | "DELETE" | "GET", id...
    method RestStyleAPI (line 737) | public async RestStyleAPI(objType: number, name: string, params: RestP...
    method SimpleBodyEcho (line 766) | public async SimpleBodyEcho(params: BodyEcho): Promise<BodyEcho> {
    method TestAuthHandler (line 775) | public async TestAuthHandler(): Promise<BodyEcho> {
    method UpdateMessage (line 785) | public async UpdateMessage(clientID: string, params: BodyEcho): Promis...
    method constructor (line 799) | constructor(baseClient: BaseClient) {
    method TestOne (line 804) | public async TestOne(params: Request): Promise<void> {
  type BodyEcho (line 551) | interface BodyEcho {
  type MarshallerTest (line 555) | interface MarshallerTest<A> {
  type MultiPathSegment (line 590) | interface MultiPathSegment {
  type RestParams (line 598) | interface RestParams {
  class ServiceClient (line 609) | class ServiceClient {
    method constructor (line 118) | constructor(baseClient: BaseClient) {
    method GetList (line 127) | public async GetList(key: number): Promise<ListResponse> {
    method GetStruct (line 133) | public async GetStruct(key: number): Promise<StructVal> {
    method Incr (line 139) | public async Incr(key: string): Promise<IncrResponse> {
    method PostList (line 145) | public async PostList(key: number, val: string): Promise<void> {
    method PostStruct (line 149) | public async PostStruct(key: number, val: string): Promise<void> {
    method constructor (line 163) | constructor(baseClient: BaseClient) {
    method One (line 170) | public async One(): Promise<void> {
    method Three (line 174) | public async Three(method: string, body?: RequestInit["body"], options...
    method Two (line 178) | public async Two(): Promise<TwoResponse> {
    method constructor (line 296) | constructor(baseClient: BaseClient) {
    method AppMeta (line 317) | public async AppMeta(): Promise<AppMetadata> {
    method BasicEcho (line 326) | public async BasicEcho(params: BasicData): Promise<BasicData> {
    method ConfigValues (line 332) | public async ConfigValues(): Promise<ConfigResponse> {
    method CustomHTTPStatus (line 341) | public async CustomHTTPStatus(): Promise<HTTPStatusResponse> {
    method Echo (line 350) | public async Echo(params: Data<string, number>): Promise<Data<string, ...
    method EmptyEcho (line 359) | public async EmptyEcho(params: EmptyData): Promise<EmptyData> {
    method Env (line 368) | public async Env(): Promise<EnvResponse> {
    method HeadersEcho (line 377) | public async HeadersEcho(params: HeadersData): Promise<HeadersData> {
    method MuteEcho (line 397) | public async MuteEcho(params: Data<string, string>): Promise<void> {
    method NilResponse (line 410) | public async NilResponse(): Promise<BasicData> {
    method NonBasicEcho (line 419) | public async NonBasicEcho(pathString: string, pathInt: number, pathWil...
    method Noop (line 463) | public async Noop(): Promise<void> {
    method Pong (line 470) | public async Pong(): Promise<Data<string, string>> {
    method Publish (line 479) | public async Publish(): Promise<void> {
    method constructor (line 490) | constructor(baseClient: BaseClient) {
    method AnAPI (line 495) | public async AnAPI(): Promise<void> {
    method constructor (line 506) | constructor(baseClient: BaseClient) {
    method GeneratedWrappersEndToEndTest (line 511) | public async GeneratedWrappersEndToEndTest(): Promise<void> {
    method constructor (line 525) | constructor(baseClient: BaseClient) {
    method Error (line 532) | public async Error(): Promise<void> {
    method ResponseGen (line 536) | public async ResponseGen(params: Payload): Promise<Payload> {
    method ResponseRewrite (line 542) | public async ResponseRewrite(params: Payload): Promise<Payload> {
    method constructor (line 612) | constructor(baseClient: BaseClient) {
    method GetMessage (line 630) | public async GetMessage(clientID: string): Promise<BodyEcho> {
    method MarshallerTestHandler (line 640) | public async MarshallerTestHandler(params: MarshallerTest<number>): Pr...
    method Noop (line 705) | public async Noop(): Promise<void> {
    method NoopWithError (line 712) | public async NoopWithError(): Promise<void> {
    method PathMultiSegments (line 719) | public async PathMultiSegments(bool: boolean, int: number, _string: st...
    method RawEndpoint (line 729) | public async RawEndpoint(method: "PUT" | "POST" | "DELETE" | "GET", id...
    method RestStyleAPI (line 737) | public async RestStyleAPI(objType: number, name: string, params: RestP...
    method SimpleBodyEcho (line 766) | public async SimpleBodyEcho(params: BodyEcho): Promise<BodyEcho> {
    method TestAuthHandler (line 775) | public async TestAuthHandler(): Promise<BodyEcho> {
    method UpdateMessage (line 785) | public async UpdateMessage(clientID: string, params: BodyEcho): Promis...
    method constructor (line 799) | constructor(baseClient: BaseClient) {
    method TestOne (line 804) | public async TestOne(params: Request): Promise<void> {
  type Request (line 792) | interface Request {
  class ServiceClient (line 796) | class ServiceClient {
    method constructor (line 118) | constructor(baseClient: BaseClient) {
    method GetList (line 127) | public async GetList(key: number): Promise<ListResponse> {
    method GetStruct (line 133) | public async GetStruct(key: number): Promise<StructVal> {
    method Incr (line 139) | public async Incr(key: string): Promise<IncrResponse> {
    method PostList (line 145) | public async PostList(key: number, val: string): Promise<void> {
    method PostStruct (line 149) | public async PostStruct(key: number, val: string): Promise<void> {
    method constructor (line 163) | constructor(baseClient: BaseClient) {
    method One (line 170) | public async One(): Promise<void> {
    method Three (line 174) | public async Three(method: string, body?: RequestInit["body"], options...
    method Two (line 178) | public async Two(): Promise<TwoResponse> {
    method constructor (line 296) | constructor(baseClient: BaseClient) {
    method AppMeta (line 317) | public async AppMeta(): Promise<AppMetadata> {
    method BasicEcho (line 326) | public async BasicEcho(params: BasicData): Promise<BasicData> {
    method ConfigValues (line 332) | public async ConfigValues(): Promise<ConfigResponse> {
    method CustomHTTPStatus (line 341) | public async CustomHTTPStatus(): Promise<HTTPStatusResponse> {
    method Echo (line 350) | public async Echo(params: Data<string, number>): Promise<Data<string, ...
    method EmptyEcho (line 359) | public async EmptyEcho(params: EmptyData): Promise<EmptyData> {
    method Env (line 368) | public async Env(): Promise<EnvResponse> {
    method HeadersEcho (line 377) | public async HeadersEcho(params: HeadersData): Promise<HeadersData> {
    method MuteEcho (line 397) | public async MuteEcho(params: Data<string, string>): Promise<void> {
    method NilResponse (line 410) | public async NilResponse(): Promise<BasicData> {
    method NonBasicEcho (line 419) | public async NonBasicEcho(pathString: string, pathInt: number, pathWil...
    method Noop (line 463) | public async Noop(): Promise<void> {
    method Pong (line 470) | public async Pong(): Promise<Data<string, string>> {
    method Publish (line 479) | public async Publish(): Promise<void> {
    method constructor (line 490) | constructor(baseClient: BaseClient) {
    method AnAPI (line 495) | public async AnAPI(): Promise<void> {
    method constructor (line 506) | constructor(baseClient: BaseClient) {
    method GeneratedWrappersEndToEndTest (line 511) | public async GeneratedWrappersEndToEndTest(): Promise<void> {
    method constructor (line 525) | constructor(baseClient: BaseClient) {
    method Error (line 532) | public async Error(): Promise<void> {
    method ResponseGen (line 536) | public async ResponseGen(params: Payload): Promise<Payload> {
    method ResponseRewrite (line 542) | public async ResponseRewrite(params: Payload): Promise<Payload> {
    method constructor (line 612) | constructor(baseClient: BaseClient) {
    method GetMessage (line 630) | public async GetMessage(clientID: string): Promise<BodyEcho> {
    method MarshallerTestHandler (line 640) | public async MarshallerTestHandler(params: MarshallerTest<number>): Pr...
    method Noop (line 705) | public async Noop(): Promise<void> {
    method NoopWithError (line 712) | public async NoopWithError(): Promise<void> {
    method PathMultiSegments (line 719) | public async PathMultiSegments(bool: boolean, int: number, _string: st...
    method RawEndpoint (line 729) | public async RawEndpoint(method: "PUT" | "POST" | "DELETE" | "GET", id...
    method RestStyleAPI (line 737) | public async RestStyleAPI(objType: number, name: string, params: RestP...
    method SimpleBodyEcho (line 766) | public async SimpleBodyEcho(params: BodyEcho): Promise<BodyEcho> {
    method TestAuthHandler (line 775) | public async TestAuthHandler(): Promise<BodyEcho> {
    method UpdateMessage (line 785) | public async UpdateMessage(clientID: string, params: BodyEcho): Promis...
    method constructor (line 799) | constructor(baseClient: BaseClient) {
    method TestOne (line 804) | public async TestOne(params: Request): Promise<void> {
  type JSONValue (line 811) | type JSONValue = string | number | boolean | null | JSONValue[] | {[key:...
  function encodeQuery (line 814) | function encodeQuery(parts: Record<string, string | string[]>): string {
  function makeRecord (line 828) | function makeRecord<K extends string | number | symbol, V>(record: Recor...
  function mustBeSet (line 839) | function mustBeSet<A>(field: string, value: A | null | undefined): A {
  function encodeWebSocketHeaders (line 852) | function encodeWebSocketHeaders(headers: Record<string, string>) {
  class WebSocketConnection (line 861) | class WebSocketConnection {
    method constructor (line 866) | constructor(url: string, headers?: Record<string, string>) {
    method resolveHasUpdateHandlers (line 883) | resolveHasUpdateHandlers() {
    method hasUpdate (line 892) | async hasUpdate() {
    method on (line 899) | on(type: "error" | "close" | "message" | "open", handler: (event: any)...
    method off (line 903) | off(type: "error" | "close" | "message" | "open", handler: (event: any...
    method close (line 907) | close() {
  class StreamInOut (line 912) | class StreamInOut<Request, Response> {
    method constructor (line 916) | constructor(url: string, headers?: Record<string, string>) {
    method close (line 924) | close() {
    method send (line 928) | async send(msg: Request) {
    method next (line 939) | async next(): Promise<Response | undefined> {
  method [Symbol.asyncIterator] (line 944) | async *[Symbol.asyncIterator](): AsyncGenerator<Response, undefined, voi...
  class StreamIn (line 956) | class StreamIn<Response> {
    method constructor (line 960) | constructor(url: str
Copy disabled (too large) Download .json
Condensed preview — 2021 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (12,829K chars).
[
  {
    "path": ".devcontainer/Dockerfile",
    "chars": 290,
    "preview": "FROM golang:1.24\n\nRUN apt-get update && apt-get install -y sudo\nRUN curl -fsSL https://deb.nodesource.com/setup_16.x | s"
  },
  {
    "path": ".devcontainer/devcontainer.json",
    "chars": 280,
    "preview": "{\n  \"build\": {\"dockerfile\": \"Dockerfile\"},\n  \"containerEnv\": {\n    \"ENCORE_DAEMON_DEV\": \"1\",\n    \"ENCORE_RUNTIMES_PATH\":"
  },
  {
    "path": ".devcontainer/scripts/godeps.sh",
    "chars": 582,
    "preview": "#!/usr/bin/env\nset -ex\n\ngo install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \ngo install github.com/ramya-rao-a/go-"
  },
  {
    "path": ".devcontainer/scripts/install.sh",
    "chars": 1077,
    "preview": "#!/usr/bin/env bash\nset -e\n\ntarget=\"$(go env GOOS)_$(go env GOARCH)\"\n\nencore_uri=$(curl -sSf -N \"https://encore.dev/api/"
  },
  {
    "path": ".devcontainer/scripts/prepare.sh",
    "chars": 52,
    "preview": "#!/usr/bin/env bash\n\nset -e\nset -x\n\ngo mod download\n"
  },
  {
    "path": ".github/DISCUSSION_TEMPLATE/help.yml",
    "chars": 1661,
    "preview": "body:\n  - type: markdown\n    attributes:\n      value: |\n        Before asking a question, please check our [documentatio"
  },
  {
    "path": ".github/DISCUSSION_TEMPLATE/suggestions.yml",
    "chars": 1806,
    "preview": "body:\n  - type: markdown\n    attributes:\n      value: |\n        Check out our [documentation](https://encore.dev/docs) t"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/Bug_report.yml",
    "chars": 3173,
    "preview": "name: \"\\U0001F41B Bug Report\"\ndescription: \"If something isn't working as expected\"\nlabels: [\"type: bug\"]\ntype: bug\nbody"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/config.yml",
    "chars": 494,
    "preview": "## To encourage contributors to use issue templates, we don't allow blank issues\nblank_issues_enabled: false\n\ncontact_li"
  },
  {
    "path": ".github/dockerimg/Dockerfile",
    "chars": 665,
    "preview": "# syntax=docker/dockerfile:1.4\nFROM --platform=$TARGETPLATFORM ubuntu:22.04 AS build\nARG TARGETPLATFORM\nARG RELEASE_VERS"
  },
  {
    "path": ".github/dockerimg/encore-entrypoint.bash",
    "chars": 289,
    "preview": "#!/usr/bin/env bash\nset -eo pipefail\n\n# If the ENCORE_AUTHKEY environment variable is set, log in with it.\nif [ -n \"$ENC"
  },
  {
    "path": ".github/dockerimg/rename-binary-if-needed.bash",
    "chars": 565,
    "preview": "#!/usr/bin/env bash\nset -eo pipefail\n\n# Check if `encore-nightly`, `encore-beta` or `encore-develop` are present, and if"
  },
  {
    "path": ".github/minimum-reproduction.md",
    "chars": 1793,
    "preview": "# Minimum Reproduction Repository\n\nA minimum reproduction repository is a git repository that can be shared publicly (do"
  },
  {
    "path": ".github/workflows/ci.yml",
    "chars": 10499,
    "preview": "name: CI\n\non:\n  push:\n    branches:\n      - main\n  pull_request:\n    branches:\n      - main\n  schedule:\n    - cron: \"30 "
  },
  {
    "path": ".github/workflows/makefile",
    "chars": 2449,
    "preview": "# This makefile is used inconjunction with the .reviewdog.yml file in the root of the repo\n.PHONY: list-modules go-vet s"
  },
  {
    "path": ".github/workflows/release-2.yml",
    "chars": 5193,
    "preview": "name: Release (2.0)\n\non:\n  workflow_dispatch:\n    inputs:\n      version:\n        description: 'Version to build (\"v1.2.3"
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 5389,
    "preview": "name: Release\n\non:\n  workflow_dispatch:\n    inputs:\n      version:\n        description: 'Version to build (\"1.2.3\")'\n   "
  },
  {
    "path": ".github/workflows/semgrep-to-rdjson.jq",
    "chars": 1349,
    "preview": "# See https://github.com/reviewdog/reviewdog/tree/master/proto/rdf\n{\n    source: {\n        name: \"semgrep\",\n        url:"
  },
  {
    "path": ".github/workflows/staticcheck-to-rdjsonl.jq",
    "chars": 475,
    "preview": "# See https://github.com/reviewdog/reviewdog/tree/master/proto/rdf\n{\n  source: {\n    name: \"staticcheck\",\n    url: \"http"
  },
  {
    "path": ".gitignore",
    "chars": 389,
    "preview": "# Prevent built binaries from being checked in accidentally.\n/dist\n/encore\n/git-remote-encore\n/target\n/__debug_*\n\n# Don'"
  },
  {
    "path": ".prettierrc.toml",
    "chars": 23,
    "preview": "trailingComma = \"none\"\n"
  },
  {
    "path": ".reviewdog.yml",
    "chars": 1154,
    "preview": "# Encore's reviewdog configuration file.\n#\n# This runs in our CI pipeline when you open a PR. To run this locally\n# and "
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 5244,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nWe as members, contributors, and leaders pledge to make participa"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 4237,
    "preview": "# Contributing to Encore\n\nWe're so excited that you are interested in contributing to Encore!\nAll contributions are welc"
  },
  {
    "path": "Cargo.toml",
    "chars": 1226,
    "preview": "[workspace]\nresolver = \"2\"\nmembers = [\n    \"runtimes/core\",\n    \"runtimes/js\",\n    \"tsparser\",\n    \"tsparser/wasm\",\n    "
  },
  {
    "path": "Cross.toml",
    "chars": 408,
    "preview": "[build]\npre-build = [\n    \"apt-get install unzip &&\",\n    \"curl -LO https://github.com/protocolbuffers/protobuf/releases"
  },
  {
    "path": "LICENSE",
    "chars": 15921,
    "preview": "Mozilla Public License, version 2.0\n\n1. Definitions\n\n1.1. \"Contributor\"\n\n     means each individual or legal entity that"
  },
  {
    "path": "README.md",
    "chars": 18137,
    "preview": "<p align=\"center\" dir=\"auto\">\n<a href=\"https://encore.dev\"><img src=\"https://user-images.githubusercontent.com/78424526/"
  },
  {
    "path": "check.bash",
    "chars": 8500,
    "preview": "#!/usr/bin/env bash\n#\n# This script will run the same checks as Encore's CI pipeline and report the same static analysis"
  },
  {
    "path": "cli/cmd/encore/app/app.go",
    "chars": 424,
    "preview": "package app\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/root\"\n)\n\n// These can be overwritten using\n//"
  },
  {
    "path": "cli/cmd/encore/app/clone.go",
    "chars": 1009,
    "preview": "package app\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/cmdutil\"\n)\n\nvar cloneAppCmd"
  },
  {
    "path": "cli/cmd/encore/app/create.go",
    "chars": 21509,
    "preview": "package app\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"strings\"\n"
  },
  {
    "path": "cli/cmd/encore/app/create_form.go",
    "chars": 18618,
    "preview": "package app\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"slices\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t"
  },
  {
    "path": "cli/cmd/encore/app/create_test.go",
    "chars": 1178,
    "preview": "package app\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n)\n\nfunc Test_setEncoreAppID(t *testing.T) {\n\ttests := []struct {\n\t\tdata         "
  },
  {
    "path": "cli/cmd/encore/app/initialize.go",
    "chars": 4029,
    "preview": "package app\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/briandowns/spinner\"\n\t\"github.com/fatih/col"
  },
  {
    "path": "cli/cmd/encore/app/link.go",
    "chars": 3618,
    "preview": "package app\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"time\"\n\n\t\"github.com/spf13/c"
  },
  {
    "path": "cli/cmd/encore/auth/auth.go",
    "chars": 2998,
    "preview": "package auth\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/cmdutil\"\n\t\"encr.dev/"
  },
  {
    "path": "cli/cmd/encore/bits/add.go",
    "chars": 1430,
    "preview": "package bits\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/c"
  },
  {
    "path": "cli/cmd/encore/bits/api.go",
    "chars": 1408,
    "preview": "package bits\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\n\t\"github.com/cockroachdb/errors\"\n)\n\ntyp"
  },
  {
    "path": "cli/cmd/encore/bits/bits.go",
    "chars": 270,
    "preview": "package bits\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/root\"\n)\n\nvar bitsCmd = &cobra.Command{\n\tUse:"
  },
  {
    "path": "cli/cmd/encore/bits/list.go",
    "chars": 758,
    "preview": "package bits\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"text/tabwriter\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/c"
  },
  {
    "path": "cli/cmd/encore/build.go",
    "chars": 4019,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/signal\"\n\t\"path/filepath\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/"
  },
  {
    "path": "cli/cmd/encore/check.go",
    "chars": 1351,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/signal\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/cmduti"
  },
  {
    "path": "cli/cmd/encore/cmdutil/autocompletes.go",
    "chars": 2359,
    "preview": "package cmdutil\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/internal/platform\"\n\t\"encr.dev/int"
  },
  {
    "path": "cli/cmd/encore/cmdutil/cmdutil.go",
    "chars": 4185,
    "preview": "package cmdutil\n\nimport (\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\n\t\"github.com/fat"
  },
  {
    "path": "cli/cmd/encore/cmdutil/daemon.go",
    "chars": 5471,
    "preview": "package cmdutil\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"time\"\n\n\t\"github.com/golang/protob"
  },
  {
    "path": "cli/cmd/encore/cmdutil/forms.go",
    "chars": 2084,
    "preview": "package cmdutil\n\nimport (\n\t\"strings\"\n\n\t\"github.com/charmbracelet/bubbles/list\"\n\ttea \"github.com/charmbracelet/bubbletea\""
  },
  {
    "path": "cli/cmd/encore/cmdutil/language.go",
    "chars": 602,
    "preview": "package cmdutil\n\ntype Language string\n\nconst (\n\tLanguageGo Language = \"go\"\n\tLanguageTS Language = \"ts\"\n)\n\nvar AllLanguag"
  },
  {
    "path": "cli/cmd/encore/cmdutil/output.go",
    "chars": 2237,
    "preview": "package cmdutil\n\nimport (\n\t\"errors\"\n\t\"slices\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n\t\"github.com/spf13/pflag\""
  },
  {
    "path": "cli/cmd/encore/cmdutil/stream.go",
    "chars": 4998,
    "preview": "package cmdutil\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\t\"sync\"\n\n\t\"github.com/logruso"
  },
  {
    "path": "cli/cmd/encore/config/config.go",
    "chars": 3230,
    "preview": "package config\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\n\t\"encr.dev/cli/cmd/encore/cmdutil\"\n\t\"encr.dev/cli/cmd/encore/root\"\n\t\"e"
  },
  {
    "path": "cli/cmd/encore/daemon/daemon.go",
    "chars": 18532,
    "preview": "package daemon\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"embed\"\n\t_ \"embed\" // for go:embed\n\t\"fmt\"\n\t\"io\"\n\t\"io/fs\"\n\t\"net\"\n\t\"n"
  },
  {
    "path": "cli/cmd/encore/daemon/migrations/1_initial_schema.up.sql",
    "chars": 1136,
    "preview": "CREATE TABLE IF NOT EXISTS app (\n    root TEXT PRIMARY KEY,\n    local_id TEXT NOT NULL,\n    platform_id TEXT NULL, -- NU"
  },
  {
    "path": "cli/cmd/encore/daemon/migrations/2_infra_namespaces.up.sql",
    "chars": 422,
    "preview": "CREATE TABLE IF NOT EXISTS namespace (\n    id TEXT PRIMARY KEY, -- uuid\n    app_id TEXT NOT NULL, -- platform_id or loca"
  },
  {
    "path": "cli/cmd/encore/daemon/migrations/3_test_tracing.up.sql",
    "chars": 209,
    "preview": "ALTER TABLE trace_span_index ADD COLUMN test_skipped BOOLEAN NOT NULL DEFAULT FALSE;\nALTER TABLE trace_span_index ADD CO"
  },
  {
    "path": "cli/cmd/encore/daemon/migrations/4_add_parent_span_id.up.sql",
    "chars": 66,
    "preview": "ALTER TABLE trace_span_index ADD COLUMN parent_span_id TEXT NULL;\n"
  },
  {
    "path": "cli/cmd/encore/daemon/migrations/5_add_caller_event_id.up.sql",
    "chars": 70,
    "preview": "ALTER TABLE trace_span_index ADD COLUMN caller_event_id INTEGER NULL;\n"
  },
  {
    "path": "cli/cmd/encore/daemon.go",
    "chars": 1135,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/cmdutil\"\n\tdaemonpkg"
  },
  {
    "path": "cli/cmd/encore/db.go",
    "chars": 11507,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"os/signal\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\n\t\"github."
  },
  {
    "path": "cli/cmd/encore/debug.go",
    "chars": 1780,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"os\"\n\t\"os/signal\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/cmdutil\"\n\tdae"
  },
  {
    "path": "cli/cmd/encore/deploy.go",
    "chars": 3229,
    "preview": "package main\n\nimport (\n\t\"encoding/hex\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"strings\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"github.com"
  },
  {
    "path": "cli/cmd/encore/exec.go",
    "chars": 3542,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"os\"\n\t\"os/exec\"\n\t\"os/signal\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd"
  },
  {
    "path": "cli/cmd/encore/gen.go",
    "chars": 7358,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"time\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/c"
  },
  {
    "path": "cli/cmd/encore/init_windows.go",
    "chars": 607,
    "preview": "//go:build windows\n// +build windows\n\npackage main\n\nimport (\n\t\"golang.org/x/sys/windows\"\n)\n\n// init activates virtual te"
  },
  {
    "path": "cli/cmd/encore/k8s/auth.go",
    "chars": 1628,
    "preview": "package k8s\n\nimport (\n\t\"encoding/json\"\n\t\"os\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/cmdutil\"\n\t\"encr.dev/c"
  },
  {
    "path": "cli/cmd/encore/k8s/config.go",
    "chars": 8081,
    "preview": "package k8s\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\t\"text/tabwriter\"\n\t\"time\"\n\n"
  },
  {
    "path": "cli/cmd/encore/k8s/kubernetes.go",
    "chars": 270,
    "preview": "package k8s\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/root\"\n)\n\nvar kubernetesCmd = &cobra.Command{\n"
  },
  {
    "path": "cli/cmd/encore/k8s/types/KUBERNETES_LICENSE.txt",
    "chars": 11358,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "cli/cmd/encore/k8s/types/README.md",
    "chars": 248,
    "preview": "# Kubernetes Types\n\nThis package contains types copied directly from the [Kubernetes](https://github.com/kubernetes/kube"
  },
  {
    "path": "cli/cmd/encore/k8s/types/clientauthentication_types.go",
    "chars": 5470,
    "preview": "/*\nCopyright 2021 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not u"
  },
  {
    "path": "cli/cmd/encore/k8s/types/homedir.go",
    "chars": 2930,
    "preview": "/*\nCopyright 2016 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not u"
  },
  {
    "path": "cli/cmd/encore/k8s/types/meta_types.go",
    "chars": 2967,
    "preview": "/*\nCopyright 2021 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not u"
  },
  {
    "path": "cli/cmd/encore/k8s/types/runtime_types.go",
    "chars": 2477,
    "preview": "/*\nCopyright 2014 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not u"
  },
  {
    "path": "cli/cmd/encore/llm_rules/init.go",
    "chars": 4244,
    "preview": "package llm_rules\n\nimport (\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"encr.dev/cli/cmd/encore/cmdutil\"\n\t\"encr.dev/internal/us"
  },
  {
    "path": "cli/cmd/encore/llm_rules/llm_rules.go",
    "chars": 247,
    "preview": "package llm_rules\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/root\"\n)\n\nvar llmRulesCmd = &cobra.Comma"
  },
  {
    "path": "cli/cmd/encore/llm_rules/tool.go",
    "chars": 8662,
    "preview": "package llm_rules\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"time\"\n\n\t\"encr.dev/cli/cmd"
  },
  {
    "path": "cli/cmd/encore/logs.go",
    "chars": 3698,
    "preview": "package main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/signal\"\n\t\"time\"\n\n\t\"github.com/go"
  },
  {
    "path": "cli/cmd/encore/main.go",
    "chars": 1851,
    "preview": "package main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/rs/zerolog\"\n\t\"github.com/rs/zerolog/log\"\n\t\"golang.org/x/tools/go/packa"
  },
  {
    "path": "cli/cmd/encore/mcp.go",
    "chars": 9509,
    "preview": "package main\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"maps\"\n\t\"net/http\"\n\t\"os\"\n\t\"strings\"\n\t"
  },
  {
    "path": "cli/cmd/encore/namespace/namespace.go",
    "chars": 5455,
    "preview": "package namespace\n\nimport (\n\t\"bytes\"\n\t\"cmp\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"slices\"\n\t\"text/tabwriter\"\n\t\"time\""
  },
  {
    "path": "cli/cmd/encore/rand.go",
    "chars": 4802,
    "preview": "package main\n\nimport (\n\tcryptorand \"crypto/rand\"\n\t\"encoding/base32\"\n\t\"encoding/base64\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"os\"\n\t\"st"
  },
  {
    "path": "cli/cmd/encore/root/rootcmd.go",
    "chars": 1495,
    "preview": "package root\n\nimport (\n\t\"github.com/rs/zerolog\"\n\t\"github.com/rs/zerolog/log\"\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/pkg/e"
  },
  {
    "path": "cli/cmd/encore/run.go",
    "chars": 5050,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n\t\"os/signal\"\n\t\"strconv\"\n\n\t\"github.com/logrusorgru/aurora/v3\"\n\t\"git"
  },
  {
    "path": "cli/cmd/encore/secrets/archive.go",
    "chars": 1322,
    "preview": "package secrets\n\nimport (\n\t\"strings\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/cmdutil\"\n)\n\nvar archiveSecret"
  },
  {
    "path": "cli/cmd/encore/secrets/delete.go",
    "chars": 1463,
    "preview": "package secrets\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/cmd"
  },
  {
    "path": "cli/cmd/encore/secrets/list.go",
    "chars": 4391,
    "preview": "package secrets\n\nimport (\n\t\"bytes\"\n\t\"cmp\"\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"slices\"\n\t\"strings\"\n\t\"text/tabwriter\"\n\t\"time\"\n\n\t\"gith"
  },
  {
    "path": "cli/cmd/encore/secrets/secrets.go",
    "chars": 262,
    "preview": "package secrets\n\nimport (\n\t\"github.com/spf13/cobra\"\n\n\t\"encr.dev/cli/cmd/encore/root\"\n)\n\nvar secretCmd = &cobra.Command{\n"
  },
  {
    "path": "cli/cmd/encore/secrets/set.go",
    "chars": 7657,
    "preview": "package secrets\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"slices\"\n\t\"sort\"\n\t\"strings\"\n\t\"syscall"
  },
  {
    "path": "cli/cmd/encore/sqlc.go",
    "chars": 4065,
    "preview": "package main\n\nimport (\n\t\"bufio\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/golang/protobuf/proto"
  },
  {
    "path": "cli/cmd/encore/telemetry.go",
    "chars": 3556,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/logrusorgru/aurora/v3\"\n\t\"github.com/rs"
  },
  {
    "path": "cli/cmd/encore/test.go",
    "chars": 6110,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"os/signal\"\n\t\"path/filepath\"\n\t\"sli"
  },
  {
    "path": "cli/cmd/encore/version.go",
    "chars": 2693,
    "preview": "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/logrusorgru/aurora/v3\"\n\t\"github.com/spf1"
  },
  {
    "path": "cli/cmd/git-remote-encore/main.go",
    "chars": 4047,
    "preview": "// Command git-remote-encore provides a gitremote helper for\n// interacting with Encore's git hosting without SSH keys,\n"
  },
  {
    "path": "cli/cmd/tsbundler-encore/main.go",
    "chars": 9560,
    "preview": "package main\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"github.com/evanw/esbuild/pkg/api\"\n"
  },
  {
    "path": "cli/daemon/apps/apps.go",
    "chars": 13898,
    "preview": "package apps\n\nimport (\n\t\"database/sql\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/cockroac"
  },
  {
    "path": "cli/daemon/check.go",
    "chars": 919,
    "preview": "package daemon\n\nimport (\n\t\"encr.dev/cli/daemon/run\"\n\tdaemonpb \"encr.dev/proto/encore/daemon\"\n)\n\n// Check checks the app "
  },
  {
    "path": "cli/daemon/common.go",
    "chars": 4310,
    "preview": "package daemon\n\nimport (\n\t\"io\"\n\t\"net\"\n\t\"os\"\n\t\"runtime\"\n\t\"strconv\"\n\t\"strings\"\n\t\"syscall\"\n\n\t\"github.com/logrusorgru/aurora"
  },
  {
    "path": "cli/daemon/create.go",
    "chars": 548,
    "preview": "package daemon\n\nimport (\n\t\"context\"\n\n\t\"encr.dev/cli/daemon/apps\"\n\tdaemonpb \"encr.dev/proto/encore/daemon\"\n)\n\n// CreateAp"
  },
  {
    "path": "cli/daemon/daemon.go",
    "chars": 9817,
    "preview": "// Package daemon implements the Encore daemon gRPC server.\npackage daemon\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"io\""
  },
  {
    "path": "cli/daemon/dash/ai/assembler.go",
    "chars": 6641,
    "preview": "package ai\n\nimport (\n\t\"context\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"encr.dev/pkg/fns\"\n\t\"encr.dev/pkg/idents\"\n\t\"encr.dev/v2/parser/ap"
  },
  {
    "path": "cli/daemon/dash/ai/client.go",
    "chars": 4142,
    "preview": "package ai\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"github.com/hasura/go-graphql-client\"\n"
  },
  {
    "path": "cli/daemon/dash/ai/codegen.go",
    "chars": 12166,
    "preview": "package ai\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"fmt\"\n\t\"go/ast\"\n\t\"go/parser\"\n\t\"go/token\"\n\t\"os\"\n\t\"path\"\n\t\"path/filepath\"\n\t\"runt"
  },
  {
    "path": "cli/daemon/dash/ai/conv.go",
    "chars": 3838,
    "preview": "package ai\n\nimport (\n\t\"slices\"\n\t\"strings\"\n\n\t\"encr.dev/pkg/clientgen\"\n\tmeta \"encr.dev/proto/encore/parser/meta/v1\"\n\tschem"
  },
  {
    "path": "cli/daemon/dash/ai/manager.go",
    "chars": 3590,
    "preview": "package ai\n\nimport (\n\t\"context\"\n\n\t\"encr.dev/cli/daemon/apps\"\n\t\"encr.dev/pkg/fns\"\n\t\"encr.dev/pkg/paths\"\n\tmeta \"encr.dev/p"
  },
  {
    "path": "cli/daemon/dash/ai/overlay.go",
    "chars": 8108,
    "preview": "package ai\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"go/token\"\n\t\"io\"\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n\n\t\"golang.org/x/exp/maps\"\n\n\t\"encr.dev/cl"
  },
  {
    "path": "cli/daemon/dash/ai/parser.go",
    "chars": 8418,
    "preview": "package ai\n\nimport (\n\t\"context\"\n\t\"go/ast\"\n\t\"go/token\"\n\t\"runtime\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/rs/zerolog\"\n\n\t\"encr."
  },
  {
    "path": "cli/daemon/dash/ai/sql.go",
    "chars": 704,
    "preview": "package ai\n\nimport (\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\n\t\"github.com/golang/protobuf/proto\"\n\n\t\"encr.dev/cli/daemon/apps\""
  },
  {
    "path": "cli/daemon/dash/ai/types.go",
    "chars": 6326,
    "preview": "package ai\n\nimport (\n\t\"encr.dev/v2/parser/apis/api/apienc\"\n)\n\ntype VisibilityType string\n\nconst (\n\tVisibilityTypePublic "
  },
  {
    "path": "cli/daemon/dash/ai/types_test.go",
    "chars": 1486,
    "preview": "package ai\n\nimport (\n\t\"fmt\"\n\t\"strings\"\n\t\"testing\"\n)\n\nfunc TestWrapDoc(t *testing.T) {\n\tvar wrapTests = []struct {\n\t\twidt"
  },
  {
    "path": "cli/daemon/dash/apiproxy/apiproxy.go",
    "chars": 1154,
    "preview": "package apiproxy\n\nimport (\n\t\"net/http\"\n\t\"net/http/httputil\"\n\t\"net/url\"\n\t\"runtime\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"go"
  },
  {
    "path": "cli/daemon/dash/dash.go",
    "chars": 25008,
    "preview": "// Package dash serves the Encore Developer Dashboard.\npackage dash\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fm"
  },
  {
    "path": "cli/daemon/dash/dash_test.go",
    "chars": 4211,
    "preview": "package dash\n\nimport (\n\t\"reflect\"\n\t\"testing\"\n\n\tmeta \"encr.dev/proto/encore/parser/meta/v1\"\n)\n\nfunc TestBuildMigrationHis"
  },
  {
    "path": "cli/daemon/dash/dashproxy/dashproxy.go",
    "chars": 2048,
    "preview": "// Package dashproxy proxies requests to the dash server,\n// caching them locally for offline access.\npackage dashproxy\n"
  },
  {
    "path": "cli/daemon/dash/dbbrowser.go",
    "chars": 4434,
    "preview": "package dash\n\nimport (\n\t\"context\"\n\n\t\"encr.dev/cli/daemon/sqldb\"\n\t\"encr.dev/pkg/fns\"\n\t\"github.com/cockroachdb/errors\"\n\t\"g"
  },
  {
    "path": "cli/daemon/dash/server.go",
    "chars": 4707,
    "preview": "package dash\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"net/http/httputil\"\n\t\"sync\"\n\n\t\"github.com/gorilla"
  },
  {
    "path": "cli/daemon/db.go",
    "chars": 10955,
    "preview": "package daemon\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/rs/zerolog/log\"\n\t\"google.go"
  },
  {
    "path": "cli/daemon/debug.go",
    "chars": 2615,
    "preview": "package daemon\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"runtime\"\n\n\t\"github.com/golang/protobuf/jsonpb\"\n\t\"google.golang.org/grpc/c"
  },
  {
    "path": "cli/daemon/engine/runtime.go",
    "chars": 2271,
    "preview": "package engine\n\nimport (\n\t\"bufio\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"strconv\"\n\n\t\"github.com/cockroachdb/errors\"\n\n\ttracemodel \"encore.d"
  },
  {
    "path": "cli/daemon/engine/trace/parse_test.go",
    "chars": 2679,
    "preview": "package trace\n\nimport (\n\t\"net/http\"\n\t\"testing\"\n\t\"time\"\n\n\t\"github.com/rs/zerolog\"\n\n\t\"encore.dev/appruntime/exported/model"
  },
  {
    "path": "cli/daemon/engine/trace/trace.go",
    "chars": 32743,
    "preview": "package trace\n\nimport (\n\t\"context\"\n\t\"encoding/binary\"\n\t\"errors\"\n\t\"fmt\"\n\t\"math\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"tim"
  },
  {
    "path": "cli/daemon/engine/trace2/recorder.go",
    "chars": 2223,
    "preview": "package trace2\n\nimport (\n\t\"bufio\"\n\t\"context\"\n\t\"io\"\n\t\"time\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"github.com/rs/zerolog/log"
  },
  {
    "path": "cli/daemon/engine/trace2/sqlite/read.go",
    "chars": 6639,
    "preview": "package sqlite\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"strconv\"\n\t\"time\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"github.com/rs"
  },
  {
    "path": "cli/daemon/engine/trace2/sqlite/write.go",
    "chars": 13543,
    "preview": "package sqlite\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"encoding/base32\"\n\t\"encoding/binary\"\n\t\"net/http\"\n\t\"strings\"\n\t\"time\""
  },
  {
    "path": "cli/daemon/engine/trace2/store.go",
    "chars": 2752,
    "preview": "package trace2\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"time\"\n\n\ttracepb2 \"encr.dev/proto/encore/engine/trace2\"\n)\n\ntype Meta stru"
  },
  {
    "path": "cli/daemon/exec_script.go",
    "chars": 6028,
    "preview": "package daemon\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime/debug\"\n\t\"strings\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"g"
  },
  {
    "path": "cli/daemon/export/download.go",
    "chars": 3815,
    "preview": "package export\n\nimport (\n\t\"crypto/sha256\"\n\t\"encoding/hex\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"runtime\"\n\n\t\""
  },
  {
    "path": "cli/daemon/export/export.go",
    "chars": 11159,
    "preview": "package export\n\nimport (\n\t\"context\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"time\"\n\n\t\"gi"
  },
  {
    "path": "cli/daemon/export/infra_config.go",
    "chars": 13341,
    "preview": "package export\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"slices\"\n\t\"strings\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"github.c"
  },
  {
    "path": "cli/daemon/export.go",
    "chars": 832,
    "preview": "package daemon\n\nimport (\n\t\"go/scanner\"\n\n\t\"encr.dev/cli/daemon/export\"\n\tdaemonpb \"encr.dev/proto/encore/daemon\"\n)\n\n// Exp"
  },
  {
    "path": "cli/daemon/internal/runlog/runlog.go",
    "chars": 318,
    "preview": "package runlog\n\nimport (\n\t\"io\"\n\t\"os\"\n)\n\ntype Log interface {\n\tStdout(buffered bool) io.Writer\n\tStderr(buffered bool) io."
  },
  {
    "path": "cli/daemon/internal/sym/sym.go",
    "chars": 329,
    "preview": "// Package sym parses symbol tables from Go binaries.\npackage sym\n\nimport (\n\t\"fmt\"\n\t\"io\"\n\n\t\"encr.dev/cli/internal/gosym\""
  },
  {
    "path": "cli/daemon/internal/sym/sym_darwin.go",
    "chars": 1005,
    "preview": "package sym\n\nimport (\n\t\"debug/macho\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"encr.dev/cli/internal/gosym\"\n)\n\nfunc load(r io.ReaderAt) (*Table, e"
  },
  {
    "path": "cli/daemon/internal/sym/sym_elf.go",
    "chars": 1052,
    "preview": "//go:build !windows && !darwin\n// +build !windows,!darwin\n\npackage sym\n\nimport (\n\t\"debug/elf\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"encr.dev/c"
  },
  {
    "path": "cli/daemon/internal/sym/sym_windows.go",
    "chars": 2072,
    "preview": "package sym\n\nimport (\n\t\"debug/pe\"\n\t\"fmt\"\n\t\"io\"\n\n\t\"encr.dev/cli/internal/gosym\"\n)\n\n// This code is a simplified version o"
  },
  {
    "path": "cli/daemon/mcp/api_tools.go",
    "chars": 23640,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"os\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.c"
  },
  {
    "path": "cli/daemon/mcp/bucket_tools.go",
    "chars": 5065,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/mark3labs/mcp-go/mcp\"\n\n\t\"encr.dev/pkg/emula"
  },
  {
    "path": "cli/daemon/mcp/cache_tools.go",
    "chars": 4990,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"sort\"\n\t\"strings\"\n\n\t\"github.com/mark3labs/mcp-go/mcp\"\n\t\"google"
  },
  {
    "path": "cli/daemon/mcp/cron_tools.go",
    "chars": 3148,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/mark3labs/mcp-go/mcp\"\n)\n\nfunc (m *Manager) regist"
  },
  {
    "path": "cli/daemon/mcp/db_tools.go",
    "chars": 8819,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\n\t\"github.com/lib/pq\"\n\t\"github.com/ma"
  },
  {
    "path": "cli/daemon/mcp/docs_tools.go",
    "chars": 10047,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"regexp\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/algolia/"
  },
  {
    "path": "cli/daemon/mcp/mcp.go",
    "chars": 2523,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\n\t\"github.com/mark3labs/mcp-go/server\"\n\n\t\"encr.dev/cli/daemon"
  },
  {
    "path": "cli/daemon/mcp/metrics_tools.go",
    "chars": 3790,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"sort\"\n\n\t\"github.com/mark3labs/mcp-go/mcp\"\n)\n\nfunc (m *Manager"
  },
  {
    "path": "cli/daemon/mcp/pubsub_tools.go",
    "chars": 5704,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\n\t\"github.com/mark3labs/mcp-go/mcp\"\n\t\"google.golang.org/protobu"
  },
  {
    "path": "cli/daemon/mcp/schema_json.go",
    "chars": 10297,
    "preview": "package mcp\n\nimport (\n\t\"bytes\"\n\t\"encoding/json\"\n\t\"net/url\"\n\t\"strconv\"\n\t\"strings\"\n\n\tschema \"encr.dev/proto/encore/parser/"
  },
  {
    "path": "cli/daemon/mcp/secret_tools.go",
    "chars": 2432,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"sort\"\n\n\t\"github.com/mark3labs/mcp-go/mcp\"\n)\n\nfunc (m *Manager"
  },
  {
    "path": "cli/daemon/mcp/src_tools.go",
    "chars": 2299,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"github.com/mark3labs/mcp-go/mcp\"\n\t\"go"
  },
  {
    "path": "cli/daemon/mcp/trace_tools.go",
    "chars": 6637,
    "preview": "package mcp\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/mark3labs/mcp-go/mcp"
  },
  {
    "path": "cli/daemon/mcp/util.go",
    "chars": 565,
    "preview": "package mcp\n\nimport (\n\t\"time\"\n\n\tmetav1 \"encr.dev/proto/encore/parser/meta/v1\"\n)\n\n// findServiceNameForPackage returns th"
  },
  {
    "path": "cli/daemon/namespace/namespace.go",
    "chars": 8606,
    "preview": "package namespace\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"time\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"github.com/rs/xid\"\n\n\t"
  },
  {
    "path": "cli/daemon/namespace.go",
    "chars": 1937,
    "preview": "package daemon\n\nimport (\n\t\"context\"\n\n\t\"github.com/golang/protobuf/ptypes/empty\"\n\n\t\"encr.dev/cli/daemon/apps\"\n\t\"encr.dev/"
  },
  {
    "path": "cli/daemon/objects/manager.go",
    "chars": 1467,
    "preview": "package objects\n\nimport (\n\t\"context\"\n\t\"os\"\n\t\"path/filepath\"\n\n\t\"encr.dev/cli/daemon/apps\"\n\t\"encr.dev/cli/daemon/namespace"
  },
  {
    "path": "cli/daemon/objects/objects.go",
    "chars": 2446,
    "preview": "package objects\n\nimport (\n\t// nosemgrep\n\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\n\t\"encr.dev/cli/daemon/namespace\"\n\t\"encr.dev/pkg/emul"
  },
  {
    "path": "cli/daemon/objects/public.go",
    "chars": 5946,
    "preview": "package objects\n\nimport (\n\t\"bytes\"\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"go"
  },
  {
    "path": "cli/daemon/pubsub/nsq.go",
    "chars": 3131,
    "preview": "package pubsub\n\nimport (\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"github.com/nsqio/go-nsq\"\n\t\"github.com/nsqi"
  },
  {
    "path": "cli/daemon/pubsub/utils.go",
    "chars": 204,
    "preview": "package pubsub\n\nimport (\n\tmeta \"encr.dev/proto/encore/parser/meta/v1\"\n)\n\n// IsUsed reports whether the application uses "
  },
  {
    "path": "cli/daemon/redis/redis.go",
    "chars": 2007,
    "preview": "package redis\n\nimport (\n\tmathrand \"math/rand\" // nosemgrep\n\t\"time\"\n\n\t\"github.com/alicebob/miniredis/v2\"\n\t\"github.com/coc"
  },
  {
    "path": "cli/daemon/run/call.go",
    "chars": 9381,
    "preview": "package run\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"net/http\"\n\t\"net/url\"\n\t\"strings\"\n\n\t\"github.com/"
  },
  {
    "path": "cli/daemon/run/check.go",
    "chars": 3037,
    "preview": "package run\n\nimport (\n\t\"context\"\n\t\"runtime\"\n\n\t\"github.com/cockroachdb/errors\"\n\n\t\"encr.dev/cli/daemon/apps\"\n\t\"encr.dev/in"
  },
  {
    "path": "cli/daemon/run/errors.go",
    "chars": 328,
    "preview": "package run\n\nimport (\n\t\"errors\"\n\n\t\"encr.dev/pkg/errlist\"\n\t\"encr.dev/v2/internals/perr\"\n)\n\nfunc AsErrorList(err error) *e"
  },
  {
    "path": "cli/daemon/run/exec_command.go",
    "chars": 5814,
    "preview": "package run\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"time\"\n\n\t\"github.com/cockroachdb/errors\"\n\n\t\"encr.de"
  },
  {
    "path": "cli/daemon/run/exec_script.go",
    "chars": 7267,
    "preview": "package run\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"slices\"\n\t\"time\"\n\n\t\"github.c"
  },
  {
    "path": "cli/daemon/run/http.go",
    "chars": 1001,
    "preview": "package run\n\nimport (\n\t\"crypto/hmac\"\n\t\"crypto/sha256\"\n\t\"encoding/base64\"\n\t\"encoding/binary\"\n\t\"fmt\"\n\t\"net/http\"\n\t\"time\"\n\n"
  },
  {
    "path": "cli/daemon/run/infra/encorecloudtesting.go",
    "chars": 1722,
    "preview": "package infra\n\nimport (\n\t\"encoding/base64\"\n\t\"strconv\"\n\n\t\"github.com/cockroachdb/errors\"\n\n\t\"go.encore.dev/platform-sdk/pk"
  },
  {
    "path": "cli/daemon/run/infra/infra.go",
    "chars": 13081,
    "preview": "package infra\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"strconv\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"github.com/rs/z"
  },
  {
    "path": "cli/daemon/run/manager.go",
    "chars": 6648,
    "preview": "package run\n\nimport (\n\t\"fmt\"\n\t\"sort\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"github.com/rs/xid\"\n\n\tencore \"en"
  },
  {
    "path": "cli/daemon/run/nsq_names.go",
    "chars": 892,
    "preview": "package run\n\nimport (\n\t\"encoding/hex\"\n\t\"regexp\"\n\n\t\"golang.org/x/crypto/sha3\"\n)\n\nvar nsqNameRegex = regexp.MustCompile(`^"
  },
  {
    "path": "cli/daemon/run/proc_groups.go",
    "chars": 14389,
    "preview": "package run\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"net\"\n\t\"net/http\"\n\t\"net/http/httputil\"\n\t\"net/netip\"\n\t\"net/url\"\n\t\"os\"\n\t\"os/exec\"\n"
  },
  {
    "path": "cli/daemon/run/run.go",
    "chars": 23130,
    "preview": "// Package run starts and tracks running Encore applications.\npackage run\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"crypto/rand\"\n\t"
  },
  {
    "path": "cli/daemon/run/runtime_config2.go",
    "chars": 30420,
    "preview": "package run\n\nimport (\n\t\"bytes\"\n\t\"compress/gzip\"\n\t\"encoding/base64\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/netip\"\n\t\"os\"\n\t\"s"
  },
  {
    "path": "cli/daemon/run/tests.go",
    "chars": 7116,
    "preview": "package run\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"io\"\n\t\"path/filepath\"\n\t\"runtime\"\n\t\"strings\"\n\n\t\"github.com/cockroachdb/errors\"\n\t"
  },
  {
    "path": "cli/daemon/run/watch.go",
    "chars": 1642,
    "preview": "package run\n\nimport (\n\t\"path/filepath\"\n\t\"strings\"\n\n\t\"encr.dev/cli/daemon/apps\"\n\t\"encr.dev/pkg/watcher\"\n)\n\n// watch watch"
  },
  {
    "path": "cli/daemon/run.go",
    "chars": 8412,
    "preview": "package daemon\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/url\"\n\t\"os\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/logrusorgru/au"
  },
  {
    "path": "cli/daemon/schema.go",
    "chars": 4117,
    "preview": "package daemon\n\nimport (\n\t\"fmt\"\n\t\"time\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\n\tmeta \"encr.dev/proto/encore/parser/me"
  },
  {
    "path": "cli/daemon/secret/secret.go",
    "chars": 8719,
    "preview": "// Package secret fetches and caches development secrets for Encore apps.\npackage secret\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t"
  },
  {
    "path": "cli/daemon/sqldb/cluster.go",
    "chars": 11994,
    "preview": "package sqldb\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"net\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n\t\"sync/atomic\"\n\t\"time\"\n\n\t\"github.com/cock"
  },
  {
    "path": "cli/daemon/sqldb/db.go",
    "chars": 16321,
    "preview": "package sqldb\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"\n\t\"io/fs\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/cockro"
  },
  {
    "path": "cli/daemon/sqldb/db_test.go",
    "chars": 1392,
    "preview": "package sqldb\n\nimport (\n\t\"io/fs\"\n\t\"testing\"\n\n\tqt \"github.com/frankban/quicktest\"\n\t_ \"github.com/golang-migrate/migrate/v"
  },
  {
    "path": "cli/daemon/sqldb/docker/docker.go",
    "chars": 12582,
    "preview": "package docker\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"os/exec\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github"
  },
  {
    "path": "cli/daemon/sqldb/driver.go",
    "chars": 3267,
    "preview": "package sqldb\n\nimport (\n\t\"context\"\n\t\"errors\"\n\n\t\"github.com/rs/zerolog\"\n\n\t\"encr.dev/cli/daemon/namespace\"\n\t\"encr.dev/inte"
  },
  {
    "path": "cli/daemon/sqldb/external/external.go",
    "chars": 1759,
    "preview": "// Package external implements a cluster driver for an external cluster.\npackage external\n\nimport (\n\t\"context\"\n\n\t\"github"
  },
  {
    "path": "cli/daemon/sqldb/manager.go",
    "chars": 5409,
    "preview": "package sqldb\n\nimport (\n\t\"context\"\n\t\"crypto/rand\"\n\t\"encoding/base64\"\n\t\"fmt\"\n\t\"sync\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\""
  },
  {
    "path": "cli/daemon/sqldb/migrate.go",
    "chars": 9953,
    "preview": "package sqldb\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"database/sql\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"slices\"\n\t\"strings\"\n\n\t\""
  },
  {
    "path": "cli/daemon/sqldb/proxy.go",
    "chars": 12299,
    "preview": "package sqldb\n\nimport (\n\t\"context\"\n\t\"crypto/tls\"\n\t\"fmt\"\n\t\"io\"\n\t\"net\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/jackc/pgproto3/v2\""
  },
  {
    "path": "cli/daemon/sqldb/remote.go",
    "chars": 3294,
    "preview": "package sqldb\n\nimport (\n\t\"context\"\n\t\"crypto/rand\"\n\t\"encoding/base64\"\n\t\"errors\"\n\t\"fmt\"\n\t\"net\"\n\t\"time\"\n\n\t\"github.com/goril"
  },
  {
    "path": "cli/daemon/sqldb/utils.go",
    "chars": 835,
    "preview": "package sqldb\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"time\"\n\n\t\"github.com/jackc/pgx/v5\"\n\n\tmeta \"encr.dev/proto/encore/parser/meta/"
  },
  {
    "path": "cli/daemon/telemetry.go",
    "chars": 366,
    "preview": "package daemon\n\nimport (\n\t\"context\"\n\n\t\"google.golang.org/protobuf/types/known/emptypb\"\n\n\t\"encr.dev/cli/internal/telemetr"
  },
  {
    "path": "cli/daemon/test.go",
    "chars": 3768,
    "preview": "package daemon\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"runtime/debug\"\n\n\t\"github.com/cockroachdb/errors\"\n\t\"github.com/rs/zerolog/lo"
  },
  {
    "path": "cli/daemon/tracing.go",
    "chars": 454,
    "preview": "package daemon\n\nimport (\n\t\"context\"\n\t\"path/filepath\"\n\n\t\"encr.dev/internal/etrace\"\n)\n\nfunc (s *Server) beginTracing(ctx c"
  },
  {
    "path": "cli/daemon/userfacing.go",
    "chars": 2274,
    "preview": "package daemon\n\nimport (\n\t\"context\"\n\t\"runtime\"\n\n\t\"github.com/cockroachdb/errors\"\n\n\t\"encr.dev/cli/daemon/apps\"\n\t\"encr.dev"
  },
  {
    "path": "cli/daemon/watch.go",
    "chars": 3434,
    "preview": "package daemon\n\nimport (\n\t\"bufio\"\n\t\"bytes\"\n\t\"context\"\n\t\"io/fs\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/bep/"
  },
  {
    "path": "cli/internal/browser/browser.go",
    "chars": 2090,
    "preview": "// This package is vendored from an internal package in the\n// Go standard library at cmd/internal/browser.\n\n// Copyrigh"
  },
  {
    "path": "cli/internal/bubbles/checklist/checklist.go",
    "chars": 8159,
    "preview": "package checklist\n\nimport (\n\t\"strconv\"\n\t\"strings\"\n\n\ttea \"github.com/charmbracelet/bubbletea\"\n\t\"github.com/mattn/go-runew"
  },
  {
    "path": "cli/internal/bubbles/selector/selector.go",
    "chars": 7623,
    "preview": "package selector\n\nimport (\n\t\"strconv\"\n\t\"strings\"\n\n\ttea \"github.com/charmbracelet/bubbletea\"\n\t\"github.com/mattn/go-runewi"
  },
  {
    "path": "cli/internal/dedent/dedent.go",
    "chars": 3562,
    "preview": "/*\nThe MIT License (MIT)\n\nCopyright (c) 2018 Peter Lithammer\n\nPermission is hereby granted, free of charge, to any perso"
  },
  {
    "path": "cli/internal/dedent/dedent_test.go",
    "chars": 4276,
    "preview": "package dedent\n\nimport (\n\t\"fmt\"\n\t\"testing\"\n)\n\nconst errorMsg = \"\\nexpected %q\\ngot %q\"\n\ntype dedentTest struct {\n\ttext, "
  },
  {
    "path": "cli/internal/gosym/pclntab.go",
    "chars": 15497,
    "preview": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "cli/internal/gosym/symtab.go",
    "chars": 16297,
    "preview": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "cli/internal/gosym/symtab_test.go",
    "chars": 2322,
    "preview": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license "
  },
  {
    "path": "cli/internal/gosym/testdata/main.go",
    "chars": 130,
    "preview": "package main\n\nfunc linefrompc()\nfunc pcfromline()\n\nfunc main() {\n\t// Prevent GC of our test symbols\n\tlinefrompc()\n\tpcfro"
  },
  {
    "path": "cli/internal/gosym/testdata/pclinetest.h",
    "chars": 74,
    "preview": "// +build ignore\n\n// Empty include file to generate z symbols\n\n\n\n\n\n// EOF\n"
  }
]

// ... and 1821 more files (download for full content)

About this extraction

This page contains the full source code of the encoredev/encore GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 2021 files (11.3 MB), approximately 3.1M tokens, and a symbol index with 19069 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!