happy2 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -0
- package/package.json +74 -0
- package/packages/happy2-server/Dockerfile +18 -0
- package/packages/happy2-server/README.md +418 -0
- package/packages/happy2-server/bin/happy2.js +3 -0
- package/packages/happy2-server/dist/cli.d.ts +3 -0
- package/packages/happy2-server/dist/cli.d.ts.map +1 -0
- package/packages/happy2-server/dist/cli.js +44 -0
- package/packages/happy2-server/dist/cli.js.map +1 -0
- package/packages/happy2-server/dist/index.d.ts +24 -0
- package/packages/happy2-server/dist/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/index.js +22 -0
- package/packages/happy2-server/dist/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/builtin-images.d.ts +8 -0
- package/packages/happy2-server/dist/modules/agents/builtin-images.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/builtin-images.js +283 -0
- package/packages/happy2-server/dist/modules/agents/builtin-images.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/command.d.ts +3 -0
- package/packages/happy2-server/dist/modules/agents/command.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/command.js +7 -0
- package/packages/happy2-server/dist/modules/agents/command.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/daemon.d.ts +106 -0
- package/packages/happy2-server/dist/modules/agents/daemon.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/daemon.js +522 -0
- package/packages/happy2-server/dist/modules/agents/daemon.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/docker.d.ts +51 -0
- package/packages/happy2-server/dist/modules/agents/docker.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/docker.js +256 -0
- package/packages/happy2-server/dist/modules/agents/docker.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/docker.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/agents/docker.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/docker.test.js +155 -0
- package/packages/happy2-server/dist/modules/agents/docker.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/index.d.ts +5 -0
- package/packages/happy2-server/dist/modules/agents/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/index.js +4 -0
- package/packages/happy2-server/dist/modules/agents/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/service.d.ts +140 -0
- package/packages/happy2-server/dist/modules/agents/service.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/service.js +1283 -0
- package/packages/happy2-server/dist/modules/agents/service.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/cloudflare-access.d.ts +15 -0
- package/packages/happy2-server/dist/modules/auth/cloudflare-access.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/cloudflare-access.js +49 -0
- package/packages/happy2-server/dist/modules/auth/cloudflare-access.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/crypto.d.ts +4 -0
- package/packages/happy2-server/dist/modules/auth/crypto.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/crypto.js +31 -0
- package/packages/happy2-server/dist/modules/auth/crypto.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/crypto.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/auth/crypto.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/crypto.test.js +11 -0
- package/packages/happy2-server/dist/modules/auth/crypto.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/email.d.ts +3 -0
- package/packages/happy2-server/dist/modules/auth/email.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/email.js +22 -0
- package/packages/happy2-server/dist/modules/auth/email.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/metadata.d.ts +5 -0
- package/packages/happy2-server/dist/modules/auth/metadata.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/metadata.js +28 -0
- package/packages/happy2-server/dist/modules/auth/metadata.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/metadata.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/auth/metadata.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/metadata.test.js +10 -0
- package/packages/happy2-server/dist/modules/auth/metadata.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/methods.d.ts +10 -0
- package/packages/happy2-server/dist/modules/auth/methods.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/methods.js +21 -0
- package/packages/happy2-server/dist/modules/auth/methods.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/methods.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/auth/methods.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/methods.test.js +16 -0
- package/packages/happy2-server/dist/modules/auth/methods.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/oidc.d.ts +9 -0
- package/packages/happy2-server/dist/modules/auth/oidc.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/oidc.js +68 -0
- package/packages/happy2-server/dist/modules/auth/oidc.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/service.d.ts +44 -0
- package/packages/happy2-server/dist/modules/auth/service.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/service.js +208 -0
- package/packages/happy2-server/dist/modules/auth/service.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/tokens.d.ts +21 -0
- package/packages/happy2-server/dist/modules/auth/tokens.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/tokens.js +79 -0
- package/packages/happy2-server/dist/modules/auth/tokens.js.map +1 -0
- package/packages/happy2-server/dist/modules/automation/repository.d.ts +127 -0
- package/packages/happy2-server/dist/modules/automation/repository.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/automation/repository.js +821 -0
- package/packages/happy2-server/dist/modules/automation/repository.js.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.d.ts +839 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.js +5795 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.js.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.test.js +620 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/types.d.ts +243 -0
- package/packages/happy2-server/dist/modules/collaboration/types.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/types.js +8 -0
- package/packages/happy2-server/dist/modules/collaboration/types.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/defaults.d.ts +8 -0
- package/packages/happy2-server/dist/modules/config/defaults.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/defaults.js +70 -0
- package/packages/happy2-server/dist/modules/config/defaults.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/defaults.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/config/defaults.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/defaults.test.js +27 -0
- package/packages/happy2-server/dist/modules/config/defaults.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/environment.d.ts +4 -0
- package/packages/happy2-server/dist/modules/config/environment.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/environment.js +92 -0
- package/packages/happy2-server/dist/modules/config/environment.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/loader.d.ts +5 -0
- package/packages/happy2-server/dist/modules/config/loader.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/loader.js +251 -0
- package/packages/happy2-server/dist/modules/config/loader.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/loader.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/config/loader.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/loader.test.js +108 -0
- package/packages/happy2-server/dist/modules/config/loader.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/paths.d.ts +7 -0
- package/packages/happy2-server/dist/modules/config/paths.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/paths.js +15 -0
- package/packages/happy2-server/dist/modules/config/paths.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/paths.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/config/paths.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/paths.test.js +22 -0
- package/packages/happy2-server/dist/modules/config/paths.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/runtime.d.ts +6 -0
- package/packages/happy2-server/dist/modules/config/runtime.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/runtime.js +14 -0
- package/packages/happy2-server/dist/modules/config/runtime.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/type.d.ts +88 -0
- package/packages/happy2-server/dist/modules/config/type.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/type.js +2 -0
- package/packages/happy2-server/dist/modules/config/type.js.map +1 -0
- package/packages/happy2-server/dist/modules/database.d.ts +105 -0
- package/packages/happy2-server/dist/modules/database.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/database.js +583 -0
- package/packages/happy2-server/dist/modules/database.js.map +1 -0
- package/packages/happy2-server/dist/modules/drizzle.d.ts +11 -0
- package/packages/happy2-server/dist/modules/drizzle.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/drizzle.js +31 -0
- package/packages/happy2-server/dist/modules/drizzle.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/lock.d.ts +3 -0
- package/packages/happy2-server/dist/modules/files/lock.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/lock.js +83 -0
- package/packages/happy2-server/dist/modules/files/lock.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/media.d.ts +18 -0
- package/packages/happy2-server/dist/modules/files/media.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/media.js +352 -0
- package/packages/happy2-server/dist/modules/files/media.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/provider.d.ts +130 -0
- package/packages/happy2-server/dist/modules/files/provider.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/provider.js +448 -0
- package/packages/happy2-server/dist/modules/files/provider.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/quota.d.ts +58 -0
- package/packages/happy2-server/dist/modules/files/quota.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/quota.js +180 -0
- package/packages/happy2-server/dist/modules/files/quota.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/routes.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/files/routes.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/routes.test.js +163 -0
- package/packages/happy2-server/dist/modules/files/routes.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/scanner.d.ts +27 -0
- package/packages/happy2-server/dist/modules/files/scanner.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/scanner.js +66 -0
- package/packages/happy2-server/dist/modules/files/scanner.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/storage.d.ts +95 -0
- package/packages/happy2-server/dist/modules/files/storage.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/storage.js +855 -0
- package/packages/happy2-server/dist/modules/files/storage.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/storage.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/files/storage.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/storage.test.js +170 -0
- package/packages/happy2-server/dist/modules/files/storage.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/index.d.ts +6 -0
- package/packages/happy2-server/dist/modules/integrations/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/index.js +6 -0
- package/packages/happy2-server/dist/modules/integrations/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/repository.d.ts +136 -0
- package/packages/happy2-server/dist/modules/integrations/repository.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/repository.js +1229 -0
- package/packages/happy2-server/dist/modules/integrations/repository.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/repository.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/integrations/repository.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/repository.test.js +345 -0
- package/packages/happy2-server/dist/modules/integrations/repository.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/routes.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/integrations/routes.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/routes.test.js +161 -0
- package/packages/happy2-server/dist/modules/integrations/routes.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/secrets.d.ts +19 -0
- package/packages/happy2-server/dist/modules/integrations/secrets.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/secrets.js +69 -0
- package/packages/happy2-server/dist/modules/integrations/secrets.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.d.ts +32 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.js +185 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.test.js +56 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/transport.d.ts +21 -0
- package/packages/happy2-server/dist/modules/integrations/transport.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/transport.js +108 -0
- package/packages/happy2-server/dist/modules/integrations/transport.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/transport.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/integrations/transport.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/transport.test.js +66 -0
- package/packages/happy2-server/dist/modules/integrations/transport.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/types.d.ts +155 -0
- package/packages/happy2-server/dist/modules/integrations/types.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/types.js +26 -0
- package/packages/happy2-server/dist/modules/integrations/types.js.map +1 -0
- package/packages/happy2-server/dist/modules/operations/export-worker.d.ts +16 -0
- package/packages/happy2-server/dist/modules/operations/export-worker.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/operations/export-worker.js +56 -0
- package/packages/happy2-server/dist/modules/operations/export-worker.js.map +1 -0
- package/packages/happy2-server/dist/modules/operations/repository.d.ts +215 -0
- package/packages/happy2-server/dist/modules/operations/repository.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/operations/repository.js +2011 -0
- package/packages/happy2-server/dist/modules/operations/repository.js.map +1 -0
- package/packages/happy2-server/dist/modules/operations/repository.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/operations/repository.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/operations/repository.test.js +610 -0
- package/packages/happy2-server/dist/modules/operations/repository.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/operations/types.d.ts +144 -0
- package/packages/happy2-server/dist/modules/operations/types.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/operations/types.js +9 -0
- package/packages/happy2-server/dist/modules/operations/types.js.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/events.d.ts +99 -0
- package/packages/happy2-server/dist/modules/realtime/events.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/events.js +173 -0
- package/packages/happy2-server/dist/modules/realtime/events.js.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/index.d.ts +4 -0
- package/packages/happy2-server/dist/modules/realtime/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/index.js +4 -0
- package/packages/happy2-server/dist/modules/realtime/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/local.d.ts +37 -0
- package/packages/happy2-server/dist/modules/realtime/local.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/local.js +181 -0
- package/packages/happy2-server/dist/modules/realtime/local.js.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/local.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/realtime/local.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/local.test.js +186 -0
- package/packages/happy2-server/dist/modules/realtime/local.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/pubsub.d.ts +26 -0
- package/packages/happy2-server/dist/modules/realtime/pubsub.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/pubsub.js +7 -0
- package/packages/happy2-server/dist/modules/realtime/pubsub.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/database-idempotency.d.ts +15 -0
- package/packages/happy2-server/dist/modules/request/database-idempotency.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/database-idempotency.js +141 -0
- package/packages/happy2-server/dist/modules/request/database-idempotency.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency-hook.d.ts +12 -0
- package/packages/happy2-server/dist/modules/request/idempotency-hook.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency-hook.js +98 -0
- package/packages/happy2-server/dist/modules/request/idempotency-hook.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency.d.ts +146 -0
- package/packages/happy2-server/dist/modules/request/idempotency.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency.js +312 -0
- package/packages/happy2-server/dist/modules/request/idempotency.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/request/idempotency.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency.test.js +191 -0
- package/packages/happy2-server/dist/modules/request/idempotency.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/index.d.ts +5 -0
- package/packages/happy2-server/dist/modules/request/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/index.js +5 -0
- package/packages/happy2-server/dist/modules/request/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.d.ts +100 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.js +239 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.test.js +123 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/schema.d.ts +31454 -0
- package/packages/happy2-server/dist/modules/schema.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/schema.js +1081 -0
- package/packages/happy2-server/dist/modules/schema.js.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/index.d.ts +3 -0
- package/packages/happy2-server/dist/modules/workspace/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/index.js +3 -0
- package/packages/happy2-server/dist/modules/workspace/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/service.d.ts +54 -0
- package/packages/happy2-server/dist/modules/workspace/service.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/service.js +997 -0
- package/packages/happy2-server/dist/modules/workspace/service.js.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/types.d.ts +58 -0
- package/packages/happy2-server/dist/modules/workspace/types.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/types.js +11 -0
- package/packages/happy2-server/dist/modules/workspace/types.js.map +1 -0
- package/packages/happy2-server/dist/routes/agents.d.ts +5 -0
- package/packages/happy2-server/dist/routes/agents.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/agents.js +225 -0
- package/packages/happy2-server/dist/routes/agents.js.map +1 -0
- package/packages/happy2-server/dist/routes/auth.d.ts +5 -0
- package/packages/happy2-server/dist/routes/auth.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/auth.js +128 -0
- package/packages/happy2-server/dist/routes/auth.js.map +1 -0
- package/packages/happy2-server/dist/routes/automation.d.ts +6 -0
- package/packages/happy2-server/dist/routes/automation.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/automation.js +315 -0
- package/packages/happy2-server/dist/routes/automation.js.map +1 -0
- package/packages/happy2-server/dist/routes/basic.d.ts +3 -0
- package/packages/happy2-server/dist/routes/basic.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/basic.js +5 -0
- package/packages/happy2-server/dist/routes/basic.js.map +1 -0
- package/packages/happy2-server/dist/routes/collaboration.d.ts +7 -0
- package/packages/happy2-server/dist/routes/collaboration.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/collaboration.js +1285 -0
- package/packages/happy2-server/dist/routes/collaboration.js.map +1 -0
- package/packages/happy2-server/dist/routes/files.d.ts +9 -0
- package/packages/happy2-server/dist/routes/files.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/files.js +397 -0
- package/packages/happy2-server/dist/routes/files.js.map +1 -0
- package/packages/happy2-server/dist/routes/integrations.d.ts +6 -0
- package/packages/happy2-server/dist/routes/integrations.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/integrations.js +486 -0
- package/packages/happy2-server/dist/routes/integrations.js.map +1 -0
- package/packages/happy2-server/dist/routes/operations.d.ts +5 -0
- package/packages/happy2-server/dist/routes/operations.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/operations.js +588 -0
- package/packages/happy2-server/dist/routes/operations.js.map +1 -0
- package/packages/happy2-server/dist/routes/operations.test.d.ts +2 -0
- package/packages/happy2-server/dist/routes/operations.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/operations.test.js +106 -0
- package/packages/happy2-server/dist/routes/operations.test.js.map +1 -0
- package/packages/happy2-server/dist/routes/sync.d.ts +6 -0
- package/packages/happy2-server/dist/routes/sync.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/sync.js +549 -0
- package/packages/happy2-server/dist/routes/sync.js.map +1 -0
- package/packages/happy2-server/dist/routes/workspace.d.ts +5 -0
- package/packages/happy2-server/dist/routes/workspace.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/workspace.js +240 -0
- package/packages/happy2-server/dist/routes/workspace.js.map +1 -0
- package/packages/happy2-server/dist/runner.d.ts +3 -0
- package/packages/happy2-server/dist/runner.d.ts.map +1 -0
- package/packages/happy2-server/dist/runner.js +30 -0
- package/packages/happy2-server/dist/runner.js.map +1 -0
- package/packages/happy2-server/dist/server.d.ts +32 -0
- package/packages/happy2-server/dist/server.d.ts.map +1 -0
- package/packages/happy2-server/dist/server.js +284 -0
- package/packages/happy2-server/dist/server.js.map +1 -0
- package/packages/happy2-server/dist/standalone.d.ts +13 -0
- package/packages/happy2-server/dist/standalone.d.ts.map +1 -0
- package/packages/happy2-server/dist/standalone.js +99 -0
- package/packages/happy2-server/dist/standalone.js.map +1 -0
- package/packages/happy2-server/dist/web/assets/figtree-latin-wght-normal-D_ZTVpCC.woff2 +0 -0
- package/packages/happy2-server/dist/web/assets/happy-otter-Q2O_g-DT.png +0 -0
- package/packages/happy2-server/dist/web/assets/index-COvbX8JP.css +2 -0
- package/packages/happy2-server/dist/web/assets/index-DdpugxMO.js +57 -0
- package/packages/happy2-server/dist/web/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/packages/happy2-server/dist/web/assets/onboarding-CRUpq9xl.png +0 -0
- package/packages/happy2-server/dist/web/index.html +13 -0
- package/packages/happy2-server/drizzle/0000_initial.sql +13 -0
- package/packages/happy2-server/drizzle/0001_accounts_profiles_files.sql +42 -0
- package/packages/happy2-server/drizzle/0002_file_visibility_and_uploader.sql +5 -0
- package/packages/happy2-server/drizzle/0003_collaboration.sql +565 -0
- package/packages/happy2-server/drizzle/0004_collaboration_expansion.sql +1099 -0
- package/packages/happy2-server/drizzle/0005_ai_agents.sql +85 -0
- package/packages/happy2-server/drizzle/0006_rig_global_event_queue.sql +10 -0
- package/packages/happy2-server/drizzle/0007_rename_server_identity.sql +3 -0
- package/packages/happy2-server/drizzle/0008_agent_message_streaming.sql +47 -0
- package/packages/happy2-server/drizzle/0009_chat_workspace_binding_lookup.sql +2 -0
- package/packages/happy2-server/drizzle/0010_rig_secret_assignments.sql +21 -0
- package/packages/happy2-server/drizzle/meta/_journal.json +83 -0
- package/packages/happy2-server/happy2.example.toml +104 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
CREATE TABLE `agent_images` (
|
|
2
|
+
`id` TEXT PRIMARY KEY NOT NULL,
|
|
3
|
+
`name` TEXT NOT NULL,
|
|
4
|
+
`dockerfile` TEXT NOT NULL,
|
|
5
|
+
`definition_hash` TEXT NOT NULL UNIQUE,
|
|
6
|
+
`docker_tag` TEXT NOT NULL UNIQUE,
|
|
7
|
+
`build_context` TEXT,
|
|
8
|
+
`builtin_key` TEXT,
|
|
9
|
+
`status` TEXT NOT NULL DEFAULT 'pending' CHECK (`status` IN ('pending', 'building', 'ready', 'failed')),
|
|
10
|
+
`build_attempt` INTEGER NOT NULL DEFAULT 0 CHECK (`build_attempt` >= 0),
|
|
11
|
+
`build_progress` INTEGER NOT NULL DEFAULT 0 CHECK (`build_progress` BETWEEN 0 AND 100),
|
|
12
|
+
`build_log` TEXT NOT NULL DEFAULT '',
|
|
13
|
+
`build_log_truncated` INTEGER NOT NULL DEFAULT 0 CHECK (`build_log_truncated` IN (0, 1)),
|
|
14
|
+
`last_build_log_line` TEXT,
|
|
15
|
+
`build_log_updated_at` TEXT,
|
|
16
|
+
`docker_image_id` TEXT,
|
|
17
|
+
`last_error` TEXT,
|
|
18
|
+
`build_requested_at` TEXT,
|
|
19
|
+
`build_started_at` TEXT,
|
|
20
|
+
`ready_at` TEXT,
|
|
21
|
+
`worker_id` TEXT,
|
|
22
|
+
`lease_expires_at` TEXT,
|
|
23
|
+
`created_by_user_id` TEXT REFERENCES `users`(`id`) ON DELETE SET NULL,
|
|
24
|
+
`created_at` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
25
|
+
`updated_at` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
26
|
+
CHECK (
|
|
27
|
+
(`status` = 'ready' AND `docker_image_id` IS NOT NULL AND `ready_at` IS NOT NULL)
|
|
28
|
+
OR (`status` != 'ready' AND `ready_at` IS NULL)
|
|
29
|
+
)
|
|
30
|
+
);
|
|
31
|
+
--> statement-breakpoint
|
|
32
|
+
CREATE INDEX `agent_images_status_requested_idx`
|
|
33
|
+
ON `agent_images` (`status`, `build_requested_at`, `created_at`);
|
|
34
|
+
--> statement-breakpoint
|
|
35
|
+
CREATE TABLE `agent_image_settings` (
|
|
36
|
+
`id` INTEGER PRIMARY KEY NOT NULL CHECK (`id` = 1),
|
|
37
|
+
`default_image_id` TEXT REFERENCES `agent_images`(`id`) ON DELETE RESTRICT,
|
|
38
|
+
`updated_by_user_id` TEXT REFERENCES `users`(`id`) ON DELETE SET NULL,
|
|
39
|
+
`updated_at` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
40
|
+
);
|
|
41
|
+
--> statement-breakpoint
|
|
42
|
+
INSERT INTO `agent_image_settings` (`id`) VALUES (1);
|
|
43
|
+
--> statement-breakpoint
|
|
44
|
+
CREATE TABLE `agent_rig_bindings` (
|
|
45
|
+
`user_id` TEXT NOT NULL REFERENCES `users`(`id`) ON DELETE CASCADE,
|
|
46
|
+
`chat_id` TEXT NOT NULL REFERENCES `chats`(`id`) ON DELETE CASCADE,
|
|
47
|
+
`image_id` TEXT NOT NULL REFERENCES `agent_images`(`id`) ON DELETE RESTRICT,
|
|
48
|
+
`session_id` TEXT NOT NULL,
|
|
49
|
+
`container_name` TEXT NOT NULL UNIQUE,
|
|
50
|
+
`cwd` TEXT NOT NULL,
|
|
51
|
+
`created_at` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
52
|
+
`updated_at` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
53
|
+
PRIMARY KEY (`user_id`, `chat_id`)
|
|
54
|
+
);
|
|
55
|
+
--> statement-breakpoint
|
|
56
|
+
CREATE UNIQUE INDEX `agent_rig_bindings_session_unique_idx` ON `agent_rig_bindings` (`session_id`);
|
|
57
|
+
--> statement-breakpoint
|
|
58
|
+
CREATE TABLE `agent_turns` (
|
|
59
|
+
`user_message_id` TEXT NOT NULL REFERENCES `messages`(`id`) ON DELETE CASCADE,
|
|
60
|
+
`agent_user_id` TEXT NOT NULL REFERENCES `users`(`id`) ON DELETE CASCADE,
|
|
61
|
+
`chat_id` TEXT NOT NULL REFERENCES `chats`(`id`) ON DELETE CASCADE,
|
|
62
|
+
`session_id` TEXT NOT NULL REFERENCES `agent_rig_bindings`(`session_id`) ON DELETE CASCADE,
|
|
63
|
+
`run_id` TEXT,
|
|
64
|
+
`baseline_message_count` INTEGER CHECK (`baseline_message_count` IS NULL OR `baseline_message_count` >= 0),
|
|
65
|
+
`status` TEXT NOT NULL DEFAULT 'pending' CHECK (`status` IN ('pending', 'running', 'complete', 'failed')),
|
|
66
|
+
`assistant_message_id` TEXT REFERENCES `messages`(`id`) ON DELETE SET NULL,
|
|
67
|
+
`last_error` TEXT,
|
|
68
|
+
`worker_id` TEXT,
|
|
69
|
+
`lease_expires_at` TEXT,
|
|
70
|
+
`created_at` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
71
|
+
`updated_at` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
72
|
+
`completed_at` TEXT,
|
|
73
|
+
PRIMARY KEY (`user_message_id`, `agent_user_id`)
|
|
74
|
+
);
|
|
75
|
+
--> statement-breakpoint
|
|
76
|
+
CREATE INDEX `agent_turns_status_created_idx`
|
|
77
|
+
ON `agent_turns` (`status`, `created_at`, `user_message_id`);
|
|
78
|
+
--> statement-breakpoint
|
|
79
|
+
CREATE UNIQUE INDEX `agent_turns_one_running_per_chat_idx`
|
|
80
|
+
ON `agent_turns` (`chat_id`, `agent_user_id`)
|
|
81
|
+
WHERE `status` = 'running';
|
|
82
|
+
--> statement-breakpoint
|
|
83
|
+
CREATE UNIQUE INDEX `agent_turns_session_run_unique_idx`
|
|
84
|
+
ON `agent_turns` (`session_id`, `run_id`)
|
|
85
|
+
WHERE `run_id` IS NOT NULL;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
CREATE TABLE `rig_event_sync_state` (
|
|
2
|
+
`id` INTEGER PRIMARY KEY NOT NULL CHECK (`id` = 1),
|
|
3
|
+
`cursor` INTEGER,
|
|
4
|
+
`trimmed_through` INTEGER,
|
|
5
|
+
`events_since_trim` INTEGER NOT NULL DEFAULT 0,
|
|
6
|
+
`last_trimmed_at` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
7
|
+
`updated_at` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
|
|
8
|
+
);
|
|
9
|
+
--> statement-breakpoint
|
|
10
|
+
INSERT INTO `rig_event_sync_state` (`id`) VALUES (1);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
ALTER TABLE `agent_turns` ADD `last_session_event_id` TEXT;
|
|
2
|
+
--> statement-breakpoint
|
|
3
|
+
ALTER TABLE `agent_turns` ADD `stream_committed_text` TEXT NOT NULL DEFAULT '';
|
|
4
|
+
--> statement-breakpoint
|
|
5
|
+
CREATE UNIQUE INDEX `agent_turns_assistant_message_unique_idx`
|
|
6
|
+
ON `agent_turns` (`assistant_message_id`)
|
|
7
|
+
WHERE `assistant_message_id` IS NOT NULL;
|
|
8
|
+
--> statement-breakpoint
|
|
9
|
+
DROP TRIGGER `messages_fts_ai`;
|
|
10
|
+
--> statement-breakpoint
|
|
11
|
+
DROP TRIGGER `messages_fts_ad`;
|
|
12
|
+
--> statement-breakpoint
|
|
13
|
+
DROP TRIGGER `messages_fts_au_delete`;
|
|
14
|
+
--> statement-breakpoint
|
|
15
|
+
DROP TRIGGER `messages_fts_au_insert`;
|
|
16
|
+
--> statement-breakpoint
|
|
17
|
+
CREATE TRIGGER `messages_fts_ai`
|
|
18
|
+
AFTER INSERT ON `messages`
|
|
19
|
+
WHEN `new`.`deleted_at` IS NULL AND `new`.`published_at` IS NOT NULL
|
|
20
|
+
BEGIN
|
|
21
|
+
INSERT INTO `messages_fts` (`rowid`, `text`)
|
|
22
|
+
VALUES (`new`.`rowid`, COALESCE(`new`.`text`, ''));
|
|
23
|
+
END;
|
|
24
|
+
--> statement-breakpoint
|
|
25
|
+
CREATE TRIGGER `messages_fts_ad`
|
|
26
|
+
AFTER DELETE ON `messages`
|
|
27
|
+
WHEN `old`.`deleted_at` IS NULL AND `old`.`published_at` IS NOT NULL
|
|
28
|
+
BEGIN
|
|
29
|
+
INSERT INTO `messages_fts` (`messages_fts`, `rowid`, `text`)
|
|
30
|
+
VALUES ('delete', `old`.`rowid`, COALESCE(`old`.`text`, ''));
|
|
31
|
+
END;
|
|
32
|
+
--> statement-breakpoint
|
|
33
|
+
CREATE TRIGGER `messages_fts_au_delete`
|
|
34
|
+
AFTER UPDATE OF `text`, `deleted_at`, `published_at` ON `messages`
|
|
35
|
+
WHEN `old`.`deleted_at` IS NULL AND `old`.`published_at` IS NOT NULL
|
|
36
|
+
BEGIN
|
|
37
|
+
INSERT INTO `messages_fts` (`messages_fts`, `rowid`, `text`)
|
|
38
|
+
VALUES ('delete', `old`.`rowid`, COALESCE(`old`.`text`, ''));
|
|
39
|
+
END;
|
|
40
|
+
--> statement-breakpoint
|
|
41
|
+
CREATE TRIGGER `messages_fts_au_insert`
|
|
42
|
+
AFTER UPDATE OF `text`, `deleted_at`, `published_at` ON `messages`
|
|
43
|
+
WHEN `new`.`deleted_at` IS NULL AND `new`.`published_at` IS NOT NULL
|
|
44
|
+
BEGIN
|
|
45
|
+
INSERT INTO `messages_fts` (`rowid`, `text`)
|
|
46
|
+
VALUES (`new`.`rowid`, COALESCE(`new`.`text`, ''));
|
|
47
|
+
END;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
CREATE TABLE `agent_secret_agent_assignments` (
|
|
2
|
+
`secret_id` TEXT NOT NULL,
|
|
3
|
+
`agent_user_id` TEXT NOT NULL REFERENCES `users`(`id`) ON DELETE CASCADE,
|
|
4
|
+
`created_by_user_id` TEXT REFERENCES `users`(`id`) ON DELETE SET NULL,
|
|
5
|
+
`created_at` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
6
|
+
PRIMARY KEY (`secret_id`, `agent_user_id`)
|
|
7
|
+
);
|
|
8
|
+
--> statement-breakpoint
|
|
9
|
+
CREATE INDEX `agent_secret_agent_assignments_agent_idx`
|
|
10
|
+
ON `agent_secret_agent_assignments` (`agent_user_id`, `secret_id`);
|
|
11
|
+
--> statement-breakpoint
|
|
12
|
+
CREATE TABLE `agent_secret_channel_assignments` (
|
|
13
|
+
`secret_id` TEXT NOT NULL,
|
|
14
|
+
`chat_id` TEXT NOT NULL REFERENCES `chats`(`id`) ON DELETE CASCADE,
|
|
15
|
+
`created_by_user_id` TEXT REFERENCES `users`(`id`) ON DELETE SET NULL,
|
|
16
|
+
`created_at` TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
17
|
+
PRIMARY KEY (`secret_id`, `chat_id`)
|
|
18
|
+
);
|
|
19
|
+
--> statement-breakpoint
|
|
20
|
+
CREATE INDEX `agent_secret_channel_assignments_chat_idx`
|
|
21
|
+
ON `agent_secret_channel_assignments` (`chat_id`, `secret_id`);
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": "7",
|
|
3
|
+
"dialect": "sqlite",
|
|
4
|
+
"entries": [
|
|
5
|
+
{
|
|
6
|
+
"idx": 0,
|
|
7
|
+
"version": "6",
|
|
8
|
+
"when": 1783770000000,
|
|
9
|
+
"tag": "0000_initial",
|
|
10
|
+
"breakpoints": true
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"idx": 1,
|
|
14
|
+
"version": "6",
|
|
15
|
+
"when": 1783810000000,
|
|
16
|
+
"tag": "0001_accounts_profiles_files",
|
|
17
|
+
"breakpoints": true
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"idx": 2,
|
|
21
|
+
"version": "6",
|
|
22
|
+
"when": 1783820000000,
|
|
23
|
+
"tag": "0002_file_visibility_and_uploader",
|
|
24
|
+
"breakpoints": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"idx": 3,
|
|
28
|
+
"version": "6",
|
|
29
|
+
"when": 1783851113088,
|
|
30
|
+
"tag": "0003_collaboration",
|
|
31
|
+
"breakpoints": true
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"idx": 4,
|
|
35
|
+
"version": "6",
|
|
36
|
+
"when": 1783877025268,
|
|
37
|
+
"tag": "0004_collaboration_expansion",
|
|
38
|
+
"breakpoints": true
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"idx": 5,
|
|
42
|
+
"version": "6",
|
|
43
|
+
"when": 1783900000000,
|
|
44
|
+
"tag": "0005_ai_agents",
|
|
45
|
+
"breakpoints": true
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"idx": 6,
|
|
49
|
+
"version": "6",
|
|
50
|
+
"when": 1784000000000,
|
|
51
|
+
"tag": "0006_rig_global_event_queue",
|
|
52
|
+
"breakpoints": true
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"idx": 7,
|
|
56
|
+
"version": "6",
|
|
57
|
+
"when": 1784050000000,
|
|
58
|
+
"tag": "0007_rename_server_identity",
|
|
59
|
+
"breakpoints": true
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"idx": 8,
|
|
63
|
+
"version": "6",
|
|
64
|
+
"when": 1784080000000,
|
|
65
|
+
"tag": "0008_agent_message_streaming",
|
|
66
|
+
"breakpoints": true
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"idx": 9,
|
|
70
|
+
"version": "6",
|
|
71
|
+
"when": 1784167000000,
|
|
72
|
+
"tag": "0009_chat_workspace_binding_lookup",
|
|
73
|
+
"breakpoints": true
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"idx": 10,
|
|
77
|
+
"version": "6",
|
|
78
|
+
"when": 1784170000000,
|
|
79
|
+
"tag": "0010_rig_secret_assignments",
|
|
80
|
+
"breakpoints": true
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
[server]
|
|
2
|
+
# "all" serves auth and API validation; "auth" only issues tokens; "api" only
|
|
3
|
+
# validates them against the shared database.
|
|
4
|
+
role = "all"
|
|
5
|
+
host = "127.0.0.1"
|
|
6
|
+
port = 3000
|
|
7
|
+
public_url = "http://127.0.0.1:3000"
|
|
8
|
+
# Keep 0 unless every request passes through exactly this many trusted proxies.
|
|
9
|
+
# A wrong nonzero value lets clients spoof rate-limit and access telemetry IPs.
|
|
10
|
+
trusted_proxy_hops = 0
|
|
11
|
+
|
|
12
|
+
[database]
|
|
13
|
+
# A local file works for one host. Use a shared libSQL endpoint when auth and
|
|
14
|
+
# API are independently deployed, so every instance sees the same sessions.
|
|
15
|
+
url = "file:happy2.db"
|
|
16
|
+
# auth_token_env = "HAPPY2_DATABASE_AUTH_TOKEN"
|
|
17
|
+
|
|
18
|
+
[agents]
|
|
19
|
+
# The product server owns Rig sessions. Clients never access this socket or token.
|
|
20
|
+
# By default, Server-started Rig keeps its configuration, durable state, socket,
|
|
21
|
+
# and token under .happy2/rig instead of reusing the user's global Rig daemon.
|
|
22
|
+
# Set the standard RIG_HOME environment variable to an absolute path to move
|
|
23
|
+
# that private Rig home.
|
|
24
|
+
enabled = true
|
|
25
|
+
# The bundled @slopus/rig executable is used unless command is explicitly set.
|
|
26
|
+
# Root for server-owned agent/user and agent/chat sandboxes. Clients cannot override it.
|
|
27
|
+
default_cwd = "/srv/happy2/workspace"
|
|
28
|
+
|
|
29
|
+
[files]
|
|
30
|
+
# Keep this outside the published package/image in production.
|
|
31
|
+
provider = "local"
|
|
32
|
+
directory = "files"
|
|
33
|
+
signed_url_expiry_seconds = 300
|
|
34
|
+
# Generic chat attachments are streamed to disk. Keep this aligned with proxy limits.
|
|
35
|
+
max_upload_bytes = 536870912
|
|
36
|
+
# Resumable uploads persist their offset across reconnects and restarts.
|
|
37
|
+
resumable_chunk_bytes = 8388608
|
|
38
|
+
# Zero disables a quota. Values include generated previews and thumbnails.
|
|
39
|
+
per_user_quota_bytes = 5368709120
|
|
40
|
+
server_quota_bytes = 107374182400
|
|
41
|
+
incomplete_upload_expiry_seconds = 86400
|
|
42
|
+
quarantine_retention_seconds = 2592000
|
|
43
|
+
# Optional scanner executable. It runs without a shell; {path} is replaced in
|
|
44
|
+
# each argument, or appended when no argument contains the placeholder.
|
|
45
|
+
# malware_scanner_command = "/usr/local/bin/clamscan"
|
|
46
|
+
# malware_scanner_arguments = ["--no-summary", "{path}"]
|
|
47
|
+
malware_scan_timeout_seconds = 120
|
|
48
|
+
# "deny" quarantines files when the scanner is unavailable; "allow" fails open.
|
|
49
|
+
malware_scan_failure_mode = "deny"
|
|
50
|
+
|
|
51
|
+
[security]
|
|
52
|
+
integration_secret_env = "HAPPY2_INTEGRATION_SECRET"
|
|
53
|
+
|
|
54
|
+
[security.rate_limit]
|
|
55
|
+
enabled = true
|
|
56
|
+
reads_per_minute = 1200
|
|
57
|
+
writes_per_minute = 300
|
|
58
|
+
auth_per_minute = 30
|
|
59
|
+
|
|
60
|
+
[security.idempotency]
|
|
61
|
+
enabled = true
|
|
62
|
+
lease_seconds = 30
|
|
63
|
+
retention_seconds = 86400
|
|
64
|
+
|
|
65
|
+
[jwt]
|
|
66
|
+
issuer = "https://happy2.example.com"
|
|
67
|
+
audience = "happy2-desktop"
|
|
68
|
+
key_id = "2026-01"
|
|
69
|
+
# Set paths to use mounted PEM key files. Otherwise the auth/all server
|
|
70
|
+
# generates an RS256 key pair on first start and persists it in its .env file.
|
|
71
|
+
# The API-only role needs the matching public key in HAPPY2_JWT_PUBLIC_KEY_B64
|
|
72
|
+
# or public_key_path.
|
|
73
|
+
# private_key_path = "/run/secrets/happy2-jwt-private.pem"
|
|
74
|
+
# public_key_path = "/run/secrets/happy2-jwt-public.pem"
|
|
75
|
+
expiry_days = 30
|
|
76
|
+
|
|
77
|
+
[auth.password]
|
|
78
|
+
enabled = true
|
|
79
|
+
# Enable only when self-service account creation is intended.
|
|
80
|
+
signup_enabled = false
|
|
81
|
+
|
|
82
|
+
[auth.magic_link]
|
|
83
|
+
enabled = false
|
|
84
|
+
from = "Happy (2) <noreply@happy2.example.com>"
|
|
85
|
+
redirect_url = "happy2://auth/magic-link"
|
|
86
|
+
# SMTP settings are only read from EMAIL_SMTP_HOST, EMAIL_SMTP_PORT,
|
|
87
|
+
# EMAIL_SMTP_USER, EMAIL_SMTP_PASSWORD, and EMAIL_FROM.
|
|
88
|
+
|
|
89
|
+
[auth.oidc.google]
|
|
90
|
+
enabled = false
|
|
91
|
+
discovery_url = "https://accounts.google.com/.well-known/openid-configuration"
|
|
92
|
+
client_id = "replace-me"
|
|
93
|
+
# Name of the environment variable holding this provider's client secret.
|
|
94
|
+
client_secret_env = "HAPPY2_OIDC_GOOGLE_CLIENT_SECRET"
|
|
95
|
+
scopes = ["openid", "email", "profile"]
|
|
96
|
+
redirect_path = "/v0/auth/oidc/google/callback"
|
|
97
|
+
|
|
98
|
+
# Cloudflare Access authenticates the request at the proxy and forwards a signed
|
|
99
|
+
# Cf-Access-Jwt-Assertion header. See README for the required Tunnel/origin setup.
|
|
100
|
+
[auth.cloudflare_access]
|
|
101
|
+
enabled = false
|
|
102
|
+
team_domain = "https://replace-me.cloudflareaccess.com"
|
|
103
|
+
# Copy the Application Audience (AUD) Tag from Cloudflare Zero Trust.
|
|
104
|
+
audience = "replace-me"
|