tinybeeai 0.0.0-stage → 0.16.1
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/.railway/railway.ts +83 -0
- package/.railway/tsconfig.json +13 -0
- package/AGENTS.md +102 -0
- package/Dockerfile +108 -0
- package/LICENSE +21 -0
- package/README.md +275 -2
- package/bin/localdost.js +29 -0
- package/bin/tinybeeai.js +28 -0
- package/compose.yml +63 -0
- package/demo/payloads/ci_failure.json +46 -0
- package/demo/payloads/outage.json +18 -0
- package/demo/payloads/pr_comment_edited.json +50 -0
- package/demo/payloads/pr_merged.json +80 -0
- package/demo/payloads/pr_opened.json +69 -0
- package/demo/payloads/pr_synchronize.json +69 -0
- package/demo/payloads/ticket_created.json +138 -0
- package/demo/sample-app/playwright.config.ts +20 -0
- package/demo/sample-app/server.ts +163 -0
- package/demo/sample-app/tests/checkout.spec.ts +13 -0
- package/demo/sample-app/tests/smoke.spec.ts +8 -0
- package/dist/agent/approval-retries.js +59 -0
- package/dist/agent/approval-retries.js.map +1 -0
- package/dist/agent/approvals.js +390 -0
- package/dist/agent/approvals.js.map +1 -0
- package/dist/agent/chat-bridge.js +154 -0
- package/dist/agent/chat-bridge.js.map +1 -0
- package/dist/agent/chat-lead.js +475 -0
- package/dist/agent/chat-lead.js.map +1 -0
- package/dist/agent/chat-loop.js +106 -0
- package/dist/agent/chat-loop.js.map +1 -0
- package/dist/agent/chat-mcp.js +49 -0
- package/dist/agent/chat-mcp.js.map +1 -0
- package/dist/agent/chat-tool-blocks.js +453 -0
- package/dist/agent/chat-tool-blocks.js.map +1 -0
- package/dist/agent/chat-view.js +94 -0
- package/dist/agent/chat-view.js.map +1 -0
- package/dist/agent/chat-views.js +781 -0
- package/dist/agent/chat-views.js.map +1 -0
- package/dist/agent/chat.js +1703 -0
- package/dist/agent/chat.js.map +1 -0
- package/dist/agent/destinations.js +150 -0
- package/dist/agent/destinations.js.map +1 -0
- package/dist/agent/llm-cli.js +451 -0
- package/dist/agent/llm-cli.js.map +1 -0
- package/dist/agent/llm-codex.js +493 -0
- package/dist/agent/llm-codex.js.map +1 -0
- package/dist/agent/llm-openai.js +211 -0
- package/dist/agent/llm-openai.js.map +1 -0
- package/dist/agent/llm.js +1464 -0
- package/dist/agent/llm.js.map +1 -0
- package/dist/agent/memory.js +33 -0
- package/dist/agent/memory.js.map +1 -0
- package/dist/agent/mock-views.js +93 -0
- package/dist/agent/mock-views.js.map +1 -0
- package/dist/agent/model-availability.js +207 -0
- package/dist/agent/model-availability.js.map +1 -0
- package/dist/agent/model-errors.js +188 -0
- package/dist/agent/model-errors.js.map +1 -0
- package/dist/agent/model-guard.js +311 -0
- package/dist/agent/model-guard.js.map +1 -0
- package/dist/agent/prompts.js +374 -0
- package/dist/agent/prompts.js.map +1 -0
- package/dist/agent/qa-lenses/qa-auth.md +32 -0
- package/dist/agent/qa-lenses/qa-check-then-act.md +33 -0
- package/dist/agent/qa-lenses/qa-control-has-no-effect.md +32 -0
- package/dist/agent/qa-lenses/qa-dates.md +31 -0
- package/dist/agent/qa-lenses/qa-double-submit.md +34 -0
- package/dist/agent/qa-lenses/qa-feature-flag.md +29 -0
- package/dist/agent/qa-lenses/qa-migration.md +35 -0
- package/dist/agent/qa-lenses/qa-money.md +38 -0
- package/dist/agent/qa-lenses/qa-response-shape-break.md +33 -0
- package/dist/agent/qa-lenses/qa-validation.md +29 -0
- package/dist/agent/qa-prompts.js +660 -0
- package/dist/agent/qa-prompts.js.map +1 -0
- package/dist/agent/reasoning.js +55 -0
- package/dist/agent/reasoning.js.map +1 -0
- package/dist/agent/redact.js +48 -0
- package/dist/agent/redact.js.map +1 -0
- package/dist/agent/rules.js +927 -0
- package/dist/agent/rules.js.map +1 -0
- package/dist/agent/runs.js +440 -0
- package/dist/agent/runs.js.map +1 -0
- package/dist/agent/send-retry.js +62 -0
- package/dist/agent/send-retry.js.map +1 -0
- package/dist/agent/team-notes.js +288 -0
- package/dist/agent/team-notes.js.map +1 -0
- package/dist/agent/token-meter.js +31 -0
- package/dist/agent/token-meter.js.map +1 -0
- package/dist/agent/triage.js +506 -0
- package/dist/agent/triage.js.map +1 -0
- package/dist/api.js +1047 -0
- package/dist/api.js.map +1 -0
- package/dist/approval-targets.js +107 -0
- package/dist/approval-targets.js.map +1 -0
- package/dist/bee/cloudflared.js +108 -0
- package/dist/bee/cloudflared.js.map +1 -0
- package/dist/bee/health.js +99 -0
- package/dist/bee/health.js.map +1 -0
- package/dist/bee/hive-client.js +75 -0
- package/dist/bee/hive-client.js.map +1 -0
- package/dist/bee/identity.js +39 -0
- package/dist/bee/identity.js.map +1 -0
- package/dist/bee/models.js +510 -0
- package/dist/bee/models.js.map +1 -0
- package/dist/bee/pairing.js +351 -0
- package/dist/bee/pairing.js.map +1 -0
- package/dist/bee/relay-client.js +50 -0
- package/dist/bee/relay-client.js.map +1 -0
- package/dist/bee/routes.js +214 -0
- package/dist/bee/routes.js.map +1 -0
- package/dist/bee/setup-page.js +223 -0
- package/dist/bee/setup-page.js.map +1 -0
- package/dist/bee/state.js +41 -0
- package/dist/bee/state.js.map +1 -0
- package/dist/bee/status.js +117 -0
- package/dist/bee/status.js.map +1 -0
- package/dist/bee/tunnel-manager.js +245 -0
- package/dist/bee/tunnel-manager.js.map +1 -0
- package/dist/bee/updater.js +268 -0
- package/dist/bee/updater.js.map +1 -0
- package/dist/boot.js +41 -0
- package/dist/boot.js.map +1 -0
- package/dist/call/index.js +145 -0
- package/dist/call/index.js.map +1 -0
- package/dist/case-folders.js +294 -0
- package/dist/case-folders.js.map +1 -0
- package/dist/cases.js +554 -0
- package/dist/cases.js.map +1 -0
- package/dist/chat-blocks.js +709 -0
- package/dist/chat-blocks.js.map +1 -0
- package/dist/chat-parse-util.js +38 -0
- package/dist/chat-parse-util.js.map +1 -0
- package/dist/chat-results.js +96 -0
- package/dist/chat-results.js.map +1 -0
- package/dist/chat-stats.js +193 -0
- package/dist/chat-stats.js.map +1 -0
- package/dist/chat-view-specs.js +186 -0
- package/dist/chat-view-specs.js.map +1 -0
- package/dist/cli/doctor-ops.js +361 -0
- package/dist/cli/doctor-ops.js.map +1 -0
- package/dist/cli/doctor.js +289 -0
- package/dist/cli/doctor.js.map +1 -0
- package/dist/cli/dogfood.js +70 -0
- package/dist/cli/dogfood.js.map +1 -0
- package/dist/cli/env-file.js +34 -0
- package/dist/cli/env-file.js.map +1 -0
- package/dist/cli/eval-chat-cases.js +359 -0
- package/dist/cli/eval-chat-cases.js.map +1 -0
- package/dist/cli/eval-chat-results.js +85 -0
- package/dist/cli/eval-chat-results.js.map +1 -0
- package/dist/cli/eval-chat.js +508 -0
- package/dist/cli/eval-chat.js.map +1 -0
- package/dist/cli/eval-designer.js +67 -0
- package/dist/cli/eval-designer.js.map +1 -0
- package/dist/cli/eval-qa-review.js +284 -0
- package/dist/cli/eval-qa-review.js.map +1 -0
- package/dist/cli/golden-export.js +35 -0
- package/dist/cli/golden-export.js.map +1 -0
- package/dist/cli/index.js +90 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/init.js +746 -0
- package/dist/cli/init.js.map +1 -0
- package/dist/cli/scan-repo.js +199 -0
- package/dist/cli/scan-repo.js.map +1 -0
- package/dist/cli/seed.js +108 -0
- package/dist/cli/seed.js.map +1 -0
- package/dist/cli/tinybee.js +247 -0
- package/dist/cli/tinybee.js.map +1 -0
- package/dist/config.js +138 -0
- package/dist/config.js.map +1 -0
- package/dist/connect/aivision-local.js +833 -0
- package/dist/connect/aivision-local.js.map +1 -0
- package/dist/connect/aivision-token.js +84 -0
- package/dist/connect/aivision-token.js.map +1 -0
- package/dist/connect/crypto.js +65 -0
- package/dist/connect/crypto.js.map +1 -0
- package/dist/connect/deps.js +110 -0
- package/dist/connect/deps.js.map +1 -0
- package/dist/connect/engines.js +144 -0
- package/dist/connect/engines.js.map +1 -0
- package/dist/connect/github-access.js +74 -0
- package/dist/connect/github-access.js.map +1 -0
- package/dist/connect/github-app.js +129 -0
- package/dist/connect/github-app.js.map +1 -0
- package/dist/connect/index.js +9 -0
- package/dist/connect/index.js.map +1 -0
- package/dist/connect/model-choices.js +201 -0
- package/dist/connect/model-choices.js.map +1 -0
- package/dist/connect/providers.js +900 -0
- package/dist/connect/providers.js.map +1 -0
- package/dist/connect/readiness.js +232 -0
- package/dist/connect/readiness.js.map +1 -0
- package/dist/connect/redact.js +16 -0
- package/dist/connect/redact.js.map +1 -0
- package/dist/connect/registry.js +406 -0
- package/dist/connect/registry.js.map +1 -0
- package/dist/connect/store.js +283 -0
- package/dist/connect/store.js.map +1 -0
- package/dist/connect/tunnel.js +134 -0
- package/dist/connect/tunnel.js.map +1 -0
- package/dist/connect/types.js +8 -0
- package/dist/connect/types.js.map +1 -0
- package/dist/connections/index.js +5 -0
- package/dist/connections/index.js.map +1 -0
- package/dist/connections/manager.js +223 -0
- package/dist/connections/manager.js.map +1 -0
- package/dist/connections/presets.js +264 -0
- package/dist/connections/presets.js.map +1 -0
- package/dist/connections/store.js +132 -0
- package/dist/connections/store.js.map +1 -0
- package/dist/connections/tools.js +206 -0
- package/dist/connections/tools.js.map +1 -0
- package/dist/db-schema.js +355 -0
- package/dist/db-schema.js.map +1 -0
- package/dist/db.js +379 -0
- package/dist/db.js.map +1 -0
- package/dist/delivery.js +49 -0
- package/dist/delivery.js.map +1 -0
- package/dist/deploy-wait.js +701 -0
- package/dist/deploy-wait.js.map +1 -0
- package/dist/disk.js +243 -0
- package/dist/disk.js.map +1 -0
- package/dist/dot-health.js +966 -0
- package/dist/dot-health.js.map +1 -0
- package/dist/dot-remove.js +246 -0
- package/dist/dot-remove.js.map +1 -0
- package/dist/events.js +38 -0
- package/dist/events.js.map +1 -0
- package/dist/evidence-pack.js +423 -0
- package/dist/evidence-pack.js.map +1 -0
- package/dist/flows/answers.js +289 -0
- package/dist/flows/answers.js.map +1 -0
- package/dist/flows/change.js +811 -0
- package/dist/flows/change.js.map +1 -0
- package/dist/flows/checkStatus.js +524 -0
- package/dist/flows/checkStatus.js.map +1 -0
- package/dist/flows/ci.js +236 -0
- package/dist/flows/ci.js.map +1 -0
- package/dist/flows/ciFailure.js +76 -0
- package/dist/flows/ciFailure.js.map +1 -0
- package/dist/flows/common.js +522 -0
- package/dist/flows/common.js.map +1 -0
- package/dist/flows/default-branch.js +29 -0
- package/dist/flows/default-branch.js.map +1 -0
- package/dist/flows/defectDraft.js +447 -0
- package/dist/flows/defectDraft.js.map +1 -0
- package/dist/flows/defects.js +623 -0
- package/dist/flows/defects.js.map +1 -0
- package/dist/flows/digest.js +295 -0
- package/dist/flows/digest.js.map +1 -0
- package/dist/flows/impact.js +82 -0
- package/dist/flows/impact.js.map +1 -0
- package/dist/flows/index.js +23 -0
- package/dist/flows/index.js.map +1 -0
- package/dist/flows/intent-sources.js +72 -0
- package/dist/flows/intent-sources.js.map +1 -0
- package/dist/flows/mergeCases.js +169 -0
- package/dist/flows/mergeCases.js.map +1 -0
- package/dist/flows/nightlyRun.js +82 -0
- package/dist/flows/nightlyRun.js.map +1 -0
- package/dist/flows/outage.js +64 -0
- package/dist/flows/outage.js.map +1 -0
- package/dist/flows/postMerge.js +5 -0
- package/dist/flows/postMerge.js.map +1 -0
- package/dist/flows/prCheck.js +5 -0
- package/dist/flows/prCheck.js.map +1 -0
- package/dist/flows/prTarget.js +66 -0
- package/dist/flows/prTarget.js.map +1 -0
- package/dist/flows/qa.js +363 -0
- package/dist/flows/qa.js.map +1 -0
- package/dist/flows/questions.js +160 -0
- package/dist/flows/questions.js.map +1 -0
- package/dist/flows/recovery.js +64 -0
- package/dist/flows/recovery.js.map +1 -0
- package/dist/flows/rerun.js +50 -0
- package/dist/flows/rerun.js.map +1 -0
- package/dist/flows/testDesign.js +294 -0
- package/dist/flows/testDesign.js.map +1 -0
- package/dist/flows/testDesignJob.js +46 -0
- package/dist/flows/testDesignJob.js.map +1 -0
- package/dist/flows/testRepo.js +228 -0
- package/dist/flows/testRepo.js.map +1 -0
- package/dist/flows/testSavings.js +381 -0
- package/dist/flows/testSavings.js.map +1 -0
- package/dist/flows/testStatus.js +343 -0
- package/dist/flows/testStatus.js.map +1 -0
- package/dist/flows/ticketContext.js +425 -0
- package/dist/flows/ticketContext.js.map +1 -0
- package/dist/flows/ticketReview.js +249 -0
- package/dist/flows/ticketReview.js.map +1 -0
- package/dist/flows/ticks.js +73 -0
- package/dist/flows/ticks.js.map +1 -0
- package/dist/hive/admin.js +122 -0
- package/dist/hive/admin.js.map +1 -0
- package/dist/hive/auth.js +130 -0
- package/dist/hive/auth.js.map +1 -0
- package/dist/hive/billing.js +278 -0
- package/dist/hive/billing.js.map +1 -0
- package/dist/hive/config.js +63 -0
- package/dist/hive/config.js.map +1 -0
- package/dist/hive/db.js +186 -0
- package/dist/hive/db.js.map +1 -0
- package/dist/hive/embed.js +76 -0
- package/dist/hive/embed.js.map +1 -0
- package/dist/hive/errors.js +17 -0
- package/dist/hive/errors.js.map +1 -0
- package/dist/hive/google.js +75 -0
- package/dist/hive/google.js.map +1 -0
- package/dist/hive/index.js +25 -0
- package/dist/hive/index.js.map +1 -0
- package/dist/hive/jwt.js +57 -0
- package/dist/hive/jwt.js.map +1 -0
- package/dist/hive/keys.js +61 -0
- package/dist/hive/keys.js.map +1 -0
- package/dist/hive/mail.js +27 -0
- package/dist/hive/mail.js.map +1 -0
- package/dist/hive/native-push.js +255 -0
- package/dist/hive/native-push.js.map +1 -0
- package/dist/hive/pairing.js +342 -0
- package/dist/hive/pairing.js.map +1 -0
- package/dist/hive/presence.js +121 -0
- package/dist/hive/presence.js.map +1 -0
- package/dist/hive/push.js +185 -0
- package/dist/hive/push.js.map +1 -0
- package/dist/hive/relay.js +205 -0
- package/dist/hive/relay.js.map +1 -0
- package/dist/hive/routes.js +228 -0
- package/dist/hive/routes.js.map +1 -0
- package/dist/hive/server.js +12 -0
- package/dist/hive/server.js.map +1 -0
- package/dist/hive/session.js +28 -0
- package/dist/hive/session.js.map +1 -0
- package/dist/hive/tenants.js +287 -0
- package/dist/hive/tenants.js.map +1 -0
- package/dist/hive/tunnel/cloudflare.js +160 -0
- package/dist/hive/tunnel/cloudflare.js.map +1 -0
- package/dist/hive/tunnel/mock.js +52 -0
- package/dist/hive/tunnel/mock.js.map +1 -0
- package/dist/hive/tunnel/provider.js +19 -0
- package/dist/hive/tunnel/provider.js.map +1 -0
- package/dist/hive/updates.js +61 -0
- package/dist/hive/updates.js.map +1 -0
- package/dist/http-error.js +11 -0
- package/dist/http-error.js.map +1 -0
- package/dist/impact/classify.js +226 -0
- package/dist/impact/classify.js.map +1 -0
- package/dist/impact/find.js +259 -0
- package/dist/impact/find.js.map +1 -0
- package/dist/impact/pr.js +54 -0
- package/dist/impact/pr.js.map +1 -0
- package/dist/impact/store.js +365 -0
- package/dist/impact/store.js.map +1 -0
- package/dist/impact/text.js +158 -0
- package/dist/impact/text.js.map +1 -0
- package/dist/index.js +288 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/adf.js +397 -0
- package/dist/integrations/adf.js.map +1 -0
- package/dist/integrations/bot-marker.js +103 -0
- package/dist/integrations/bot-marker.js.map +1 -0
- package/dist/integrations/github-issues.js +705 -0
- package/dist/integrations/github-issues.js.map +1 -0
- package/dist/integrations/github.js +1284 -0
- package/dist/integrations/github.js.map +1 -0
- package/dist/integrations/issue-create.js +60 -0
- package/dist/integrations/issue-create.js.map +1 -0
- package/dist/integrations/jira.js +279 -0
- package/dist/integrations/jira.js.map +1 -0
- package/dist/integrations/linear.js +273 -0
- package/dist/integrations/linear.js.map +1 -0
- package/dist/integrations/own-identity-warm.js +47 -0
- package/dist/integrations/own-identity-warm.js.map +1 -0
- package/dist/integrations/own-identity.js +39 -0
- package/dist/integrations/own-identity.js.map +1 -0
- package/dist/integrations/status-change.js +42 -0
- package/dist/integrations/status-change.js.map +1 -0
- package/dist/lead-defects.js +202 -0
- package/dist/lead-defects.js.map +1 -0
- package/dist/lead-digest.js +333 -0
- package/dist/lead-digest.js.map +1 -0
- package/dist/lead-release.js +286 -0
- package/dist/lead-release.js.map +1 -0
- package/dist/lead.js +328 -0
- package/dist/lead.js.map +1 -0
- package/dist/legacy-names.js +51 -0
- package/dist/legacy-names.js.map +1 -0
- package/dist/limits.js +44 -0
- package/dist/limits.js.map +1 -0
- package/dist/link-trust.js +224 -0
- package/dist/link-trust.js.map +1 -0
- package/dist/links.js +219 -0
- package/dist/links.js.map +1 -0
- package/dist/loopback.js +35 -0
- package/dist/loopback.js.map +1 -0
- package/dist/model-cap.js +60 -0
- package/dist/model-cap.js.map +1 -0
- package/dist/model-usage.js +173 -0
- package/dist/model-usage.js.map +1 -0
- package/dist/monitor/backfill.js +39 -0
- package/dist/monitor/backfill.js.map +1 -0
- package/dist/monitor/browser-probe.js +198 -0
- package/dist/monitor/browser-probe.js.map +1 -0
- package/dist/monitor/catch-up.js +31 -0
- package/dist/monitor/catch-up.js.map +1 -0
- package/dist/monitor/pollers.js +1606 -0
- package/dist/monitor/pollers.js.map +1 -0
- package/dist/monitor/probes.js +178 -0
- package/dist/monitor/probes.js.map +1 -0
- package/dist/monitor/self-health.js +228 -0
- package/dist/monitor/self-health.js.map +1 -0
- package/dist/monitor/statuspage.js +105 -0
- package/dist/monitor/statuspage.js.map +1 -0
- package/dist/nightly-scheduler.js +127 -0
- package/dist/nightly-scheduler.js.map +1 -0
- package/dist/nightly.js +141 -0
- package/dist/nightly.js.map +1 -0
- package/dist/notify/headline.js +114 -0
- package/dist/notify/headline.js.map +1 -0
- package/dist/notify/push.js +174 -0
- package/dist/notify/push.js.map +1 -0
- package/dist/object-cards.js +585 -0
- package/dist/object-cards.js.map +1 -0
- package/dist/object-links.js +47 -0
- package/dist/object-links.js.map +1 -0
- package/dist/onboarding-checks.js +141 -0
- package/dist/onboarding-checks.js.map +1 -0
- package/dist/onboarding.js +401 -0
- package/dist/onboarding.js.map +1 -0
- package/dist/path-filters.js +62 -0
- package/dist/path-filters.js.map +1 -0
- package/dist/phone/alerts.js +67 -0
- package/dist/phone/alerts.js.map +1 -0
- package/dist/phone/auth.js +240 -0
- package/dist/phone/auth.js.map +1 -0
- package/dist/phone/pairing.js +442 -0
- package/dist/phone/pairing.js.map +1 -0
- package/dist/phone/prefs.js +27 -0
- package/dist/phone/prefs.js.map +1 -0
- package/dist/phone/tailscale.js +161 -0
- package/dist/phone/tailscale.js.map +1 -0
- package/dist/pr-scope.js +441 -0
- package/dist/pr-scope.js.map +1 -0
- package/dist/proc.js +156 -0
- package/dist/proc.js.map +1 -0
- package/dist/profile/cache.js +108 -0
- package/dist/profile/cache.js.map +1 -0
- package/dist/profile/ci.js +216 -0
- package/dist/profile/ci.js.map +1 -0
- package/dist/profile/index.js +8 -0
- package/dist/profile/index.js.map +1 -0
- package/dist/profile/job.js +135 -0
- package/dist/profile/job.js.map +1 -0
- package/dist/profile/queries/go-tags.scm +47 -0
- package/dist/profile/queries/java-tags.scm +25 -0
- package/dist/profile/queries/javascript-tags.scm +104 -0
- package/dist/profile/queries/python-tags.scm +19 -0
- package/dist/profile/queries/typescript-tags.scm +28 -0
- package/dist/profile/scan-thread.js +42 -0
- package/dist/profile/scan-thread.js.map +1 -0
- package/dist/profile/scan-worker.js +16 -0
- package/dist/profile/scan-worker.js.map +1 -0
- package/dist/profile/scan.js +351 -0
- package/dist/profile/scan.js.map +1 -0
- package/dist/profile/stack.js +528 -0
- package/dist/profile/stack.js.map +1 -0
- package/dist/profile/store.js +35 -0
- package/dist/profile/store.js.map +1 -0
- package/dist/profile/tests.js +399 -0
- package/dist/profile/tests.js.map +1 -0
- package/dist/queue.js +350 -0
- package/dist/queue.js.map +1 -0
- package/dist/refs.js +756 -0
- package/dist/refs.js.map +1 -0
- package/dist/release-notes.js +272 -0
- package/dist/release-notes.js.map +1 -0
- package/dist/reports/build.js +243 -0
- package/dist/reports/build.js.map +1 -0
- package/dist/reports/index.js +211 -0
- package/dist/reports/index.js.map +1 -0
- package/dist/reports/store.js +150 -0
- package/dist/reports/store.js.map +1 -0
- package/dist/reports/ticket-titles.js +124 -0
- package/dist/reports/ticket-titles.js.map +1 -0
- package/dist/reports/trace-map.js +1278 -0
- package/dist/reports/trace-map.js.map +1 -0
- package/dist/reports/traceability.js +422 -0
- package/dist/reports/traceability.js.map +1 -0
- package/dist/repos/mirror.js +356 -0
- package/dist/repos/mirror.js.map +1 -0
- package/dist/repos-github.js +108 -0
- package/dist/repos-github.js.map +1 -0
- package/dist/repos.js +891 -0
- package/dist/repos.js.map +1 -0
- package/dist/review/backend-anthropic.js +90 -0
- package/dist/review/backend-anthropic.js.map +1 -0
- package/dist/review/backend-cli.js +248 -0
- package/dist/review/backend-cli.js.map +1 -0
- package/dist/review/backend-codex.js +81 -0
- package/dist/review/backend-codex.js.map +1 -0
- package/dist/review/backend-mock.js +686 -0
- package/dist/review/backend-mock.js.map +1 -0
- package/dist/review/backend-only.js +168 -0
- package/dist/review/backend-only.js.map +1 -0
- package/dist/review/backend.js +105 -0
- package/dist/review/backend.js.map +1 -0
- package/dist/review/baseline/render-v1.js +483 -0
- package/dist/review/baseline/render-v1.js.map +1 -0
- package/dist/review/change-summary.js +197 -0
- package/dist/review/change-summary.js.map +1 -0
- package/dist/review/changelog.js +40 -0
- package/dist/review/changelog.js.map +1 -0
- package/dist/review/check.js +494 -0
- package/dist/review/check.js.map +1 -0
- package/dist/review/checkout.js +185 -0
- package/dist/review/checkout.js.map +1 -0
- package/dist/review/classify.js +178 -0
- package/dist/review/classify.js.map +1 -0
- package/dist/review/coverage.js +347 -0
- package/dist/review/coverage.js.map +1 -0
- package/dist/review/decision-eval.js +121 -0
- package/dist/review/decision-eval.js.map +1 -0
- package/dist/review/deliver.js +104 -0
- package/dist/review/deliver.js.map +1 -0
- package/dist/review/designer-eval.js +280 -0
- package/dist/review/designer-eval.js.map +1 -0
- package/dist/review/dogfood-digest.js +136 -0
- package/dist/review/dogfood-digest.js.map +1 -0
- package/dist/review/dogfood-eval.js +486 -0
- package/dist/review/dogfood-eval.js.map +1 -0
- package/dist/review/environment.js +109 -0
- package/dist/review/environment.js.map +1 -0
- package/dist/review/eval.js +405 -0
- package/dist/review/eval.js.map +1 -0
- package/dist/review/glob.js +110 -0
- package/dist/review/glob.js.map +1 -0
- package/dist/review/golden-export.js +219 -0
- package/dist/review/golden-export.js.map +1 -0
- package/dist/review/impact.js +406 -0
- package/dist/review/impact.js.map +1 -0
- package/dist/review/imports.js +542 -0
- package/dist/review/imports.js.map +1 -0
- package/dist/review/index.js +512 -0
- package/dist/review/index.js.map +1 -0
- package/dist/review/intent.js +128 -0
- package/dist/review/intent.js.map +1 -0
- package/dist/review/lenses.js +167 -0
- package/dist/review/lenses.js.map +1 -0
- package/dist/review/linked-tickets.js +293 -0
- package/dist/review/linked-tickets.js.map +1 -0
- package/dist/review/merge.js +370 -0
- package/dist/review/merge.js.map +1 -0
- package/dist/review/on-demand.js +218 -0
- package/dist/review/on-demand.js.map +1 -0
- package/dist/review/prompt-eval.js +299 -0
- package/dist/review/prompt-eval.js.map +1 -0
- package/dist/review/prompt-variants.js +37 -0
- package/dist/review/prompt-variants.js.map +1 -0
- package/dist/review/readability-eval.js +217 -0
- package/dist/review/readability-eval.js.map +1 -0
- package/dist/review/readability.js +295 -0
- package/dist/review/readability.js.map +1 -0
- package/dist/review/render.js +2409 -0
- package/dist/review/render.js.map +1 -0
- package/dist/review/repo.js +194 -0
- package/dist/review/repo.js.map +1 -0
- package/dist/review/report-plan.js +90 -0
- package/dist/review/report-plan.js.map +1 -0
- package/dist/review/routes.js +195 -0
- package/dist/review/routes.js.map +1 -0
- package/dist/review/run-summary.js +34 -0
- package/dist/review/run-summary.js.map +1 -0
- package/dist/review/run.js +245 -0
- package/dist/review/run.js.map +1 -0
- package/dist/review/scope.js +454 -0
- package/dist/review/scope.js.map +1 -0
- package/dist/review/security.js +432 -0
- package/dist/review/security.js.map +1 -0
- package/dist/review/signals.js +550 -0
- package/dist/review/signals.js.map +1 -0
- package/dist/review/specs.js +150 -0
- package/dist/review/specs.js.map +1 -0
- package/dist/review/ste.js +133 -0
- package/dist/review/ste.js.map +1 -0
- package/dist/review/test-repo-file.js +18 -0
- package/dist/review/test-repo-file.js.map +1 -0
- package/dist/review/test-repo-lines.js +53 -0
- package/dist/review/test-repo-lines.js.map +1 -0
- package/dist/review/ticket-on-demand.js +232 -0
- package/dist/review/ticket-on-demand.js.map +1 -0
- package/dist/review/yaml.js +298 -0
- package/dist/review/yaml.js.map +1 -0
- package/dist/room.js +361 -0
- package/dist/room.js.map +1 -0
- package/dist/routes/activity.js +219 -0
- package/dist/routes/activity.js.map +1 -0
- package/dist/routes/call.js +29 -0
- package/dist/routes/call.js.map +1 -0
- package/dist/routes/cards.js +40 -0
- package/dist/routes/cards.js.map +1 -0
- package/dist/routes/cases.js +133 -0
- package/dist/routes/cases.js.map +1 -0
- package/dist/routes/connect.js +268 -0
- package/dist/routes/connect.js.map +1 -0
- package/dist/routes/connection-presets.js +32 -0
- package/dist/routes/connection-presets.js.map +1 -0
- package/dist/routes/connections.js +177 -0
- package/dist/routes/connections.js.map +1 -0
- package/dist/routes/disk.js +19 -0
- package/dist/routes/disk.js.map +1 -0
- package/dist/routes/docs.js +71 -0
- package/dist/routes/docs.js.map +1 -0
- package/dist/routes/dot-suggest.js +1002 -0
- package/dist/routes/dot-suggest.js.map +1 -0
- package/dist/routes/evidence-pack.js +16 -0
- package/dist/routes/evidence-pack.js.map +1 -0
- package/dist/routes/health.js +121 -0
- package/dist/routes/health.js.map +1 -0
- package/dist/routes/impact.js +48 -0
- package/dist/routes/impact.js.map +1 -0
- package/dist/routes/lead.js +50 -0
- package/dist/routes/lead.js.map +1 -0
- package/dist/routes/links.js +13 -0
- package/dist/routes/links.js.map +1 -0
- package/dist/routes/markdown.js +62 -0
- package/dist/routes/markdown.js.map +1 -0
- package/dist/routes/onboarding.js +47 -0
- package/dist/routes/onboarding.js.map +1 -0
- package/dist/routes/phone.js +231 -0
- package/dist/routes/phone.js.map +1 -0
- package/dist/routes/release-notes.js +30 -0
- package/dist/routes/release-notes.js.map +1 -0
- package/dist/routes/reports.js +102 -0
- package/dist/routes/reports.js.map +1 -0
- package/dist/routes/repos.js +91 -0
- package/dist/routes/repos.js.map +1 -0
- package/dist/routes/review.js +283 -0
- package/dist/routes/review.js.map +1 -0
- package/dist/routes/roles.js +114 -0
- package/dist/routes/roles.js.map +1 -0
- package/dist/routes/room.js +21 -0
- package/dist/routes/room.js.map +1 -0
- package/dist/routes/runner.js +156 -0
- package/dist/routes/runner.js.map +1 -0
- package/dist/routes/runs.js +84 -0
- package/dist/routes/runs.js.map +1 -0
- package/dist/routes/setup.js +18 -0
- package/dist/routes/setup.js.map +1 -0
- package/dist/routes/test-runs.js +220 -0
- package/dist/routes/test-runs.js.map +1 -0
- package/dist/routes/ticket-status.js +17 -0
- package/dist/routes/ticket-status.js.map +1 -0
- package/dist/routes/traceability.js +143 -0
- package/dist/routes/traceability.js.map +1 -0
- package/dist/routes/true.js +142 -0
- package/dist/routes/true.js.map +1 -0
- package/dist/routes/updates.js +70 -0
- package/dist/routes/updates.js.map +1 -0
- package/dist/runner/adapters/index.js +12 -0
- package/dist/runner/adapters/index.js.map +1 -0
- package/dist/runner/adapters/playwright.js +68 -0
- package/dist/runner/adapters/playwright.js.map +1 -0
- package/dist/runner/aivision/cases.js +172 -0
- package/dist/runner/aivision/cases.js.map +1 -0
- package/dist/runner/aivision/cli.js +201 -0
- package/dist/runner/aivision/cli.js.map +1 -0
- package/dist/runner/aivision/index.js +281 -0
- package/dist/runner/aivision/index.js.map +1 -0
- package/dist/runner/aivision/server.js +394 -0
- package/dist/runner/aivision/server.js.map +1 -0
- package/dist/runner/aivision/shared.js +140 -0
- package/dist/runner/aivision/shared.js.map +1 -0
- package/dist/runner/artifact-cap.js +189 -0
- package/dist/runner/artifact-cap.js.map +1 -0
- package/dist/runner/artifacts.js +433 -0
- package/dist/runner/artifacts.js.map +1 -0
- package/dist/runner/command.js +564 -0
- package/dist/runner/command.js.map +1 -0
- package/dist/runner/copyfiles.js +221 -0
- package/dist/runner/copyfiles.js.map +1 -0
- package/dist/runner/engines.js +32 -0
- package/dist/runner/engines.js.map +1 -0
- package/dist/runner/evidence.js +114 -0
- package/dist/runner/evidence.js.map +1 -0
- package/dist/runner/host-env.js +160 -0
- package/dist/runner/host-env.js.map +1 -0
- package/dist/runner/index.js +1221 -0
- package/dist/runner/index.js.map +1 -0
- package/dist/runner/observe.js +603 -0
- package/dist/runner/observe.js.map +1 -0
- package/dist/runner/playwright-json.js +108 -0
- package/dist/runner/playwright-json.js.map +1 -0
- package/dist/runner/pwgen/exec.js +192 -0
- package/dist/runner/pwgen/exec.js.map +1 -0
- package/dist/runner/pwgen/explore.js +111 -0
- package/dist/runner/pwgen/explore.js.map +1 -0
- package/dist/runner/pwgen/index.js +423 -0
- package/dist/runner/pwgen/index.js.map +1 -0
- package/dist/runner/pwgen/propose.js +69 -0
- package/dist/runner/pwgen/propose.js.map +1 -0
- package/dist/runner/pwgen/source.js +632 -0
- package/dist/runner/pwgen/source.js.map +1 -0
- package/dist/runner/setup.js +222 -0
- package/dist/runner/setup.js.map +1 -0
- package/dist/runner/step-reporter.js +107 -0
- package/dist/runner/step-reporter.js.map +1 -0
- package/dist/runner/test-repo.js +326 -0
- package/dist/runner/test-repo.js.map +1 -0
- package/dist/runner/typed-value.js +46 -0
- package/dist/runner/typed-value.js.map +1 -0
- package/dist/runner/verify.js +133 -0
- package/dist/runner/verify.js.map +1 -0
- package/dist/runner/worktree.js +349 -0
- package/dist/runner/worktree.js.map +1 -0
- package/dist/sandbox.js +61 -0
- package/dist/sandbox.js.map +1 -0
- package/dist/server.js +262 -0
- package/dist/server.js.map +1 -0
- package/dist/shadow-week.js +126 -0
- package/dist/shadow-week.js.map +1 -0
- package/dist/shutdown.js +92 -0
- package/dist/shutdown.js.map +1 -0
- package/dist/slack/index.js +645 -0
- package/dist/slack/index.js.map +1 -0
- package/dist/stages/config.js +147 -0
- package/dist/stages/config.js.map +1 -0
- package/dist/stages/index.js +41 -0
- package/dist/stages/index.js.map +1 -0
- package/dist/suites.js +293 -0
- package/dist/suites.js.map +1 -0
- package/dist/target-url.js +116 -0
- package/dist/target-url.js.map +1 -0
- package/dist/test-runs.js +662 -0
- package/dist/test-runs.js.map +1 -0
- package/dist/ticket-keys.js +97 -0
- package/dist/ticket-keys.js.map +1 -0
- package/dist/ticket-supersede.js +105 -0
- package/dist/ticket-supersede.js.map +1 -0
- package/dist/tinybee/ed25519.js +99 -0
- package/dist/tinybee/ed25519.js.map +1 -0
- package/dist/tinybee/models-routes.js +19 -0
- package/dist/tinybee/models-routes.js.map +1 -0
- package/dist/tinybee/pair-payload.js +41 -0
- package/dist/tinybee/pair-payload.js.map +1 -0
- package/dist/tinybee/update-manifest.js +77 -0
- package/dist/tinybee/update-manifest.js.map +1 -0
- package/dist/tinybee/well-known.js +64 -0
- package/dist/tinybee/well-known.js.map +1 -0
- package/dist/tinybee/workflows/activity.js +23 -0
- package/dist/tinybee/workflows/activity.js.map +1 -0
- package/dist/tinybee/workflows/cron.js +210 -0
- package/dist/tinybee/workflows/cron.js.map +1 -0
- package/dist/tinybee/workflows/engine.js +371 -0
- package/dist/tinybee/workflows/engine.js.map +1 -0
- package/dist/tinybee/workflows/from-text.js +203 -0
- package/dist/tinybee/workflows/from-text.js.map +1 -0
- package/dist/tinybee/workflows/routes.js +189 -0
- package/dist/tinybee/workflows/routes.js.map +1 -0
- package/dist/tinybee/workflows/scheduler.js +100 -0
- package/dist/tinybee/workflows/scheduler.js.map +1 -0
- package/dist/tinybee/workflows/skills.js +227 -0
- package/dist/tinybee/workflows/skills.js.map +1 -0
- package/dist/tinybee/workflows/store.js +205 -0
- package/dist/tinybee/workflows/store.js.map +1 -0
- package/dist/tinybee/workflows/types.js +180 -0
- package/dist/tinybee/workflows/types.js.map +1 -0
- package/dist/tinybee/workflows/yaml.js +323 -0
- package/dist/tinybee/workflows/yaml.js.map +1 -0
- package/dist/true/api.js +495 -0
- package/dist/true/api.js.map +1 -0
- package/dist/true/client.js +292 -0
- package/dist/true/client.js.map +1 -0
- package/dist/true/clock.js +36 -0
- package/dist/true/clock.js.map +1 -0
- package/dist/true/events.js +125 -0
- package/dist/true/events.js.map +1 -0
- package/dist/true/hosts.js +98 -0
- package/dist/true/hosts.js.map +1 -0
- package/dist/true/index.js +29 -0
- package/dist/true/index.js.map +1 -0
- package/dist/true/key.js +54 -0
- package/dist/true/key.js.map +1 -0
- package/dist/true/line.js +69 -0
- package/dist/true/line.js.map +1 -0
- package/dist/true/mask.js +31 -0
- package/dist/true/mask.js.map +1 -0
- package/dist/true/names.js +114 -0
- package/dist/true/names.js.map +1 -0
- package/dist/true/outbox.js +233 -0
- package/dist/true/outbox.js.map +1 -0
- package/dist/true/replay.js +164 -0
- package/dist/true/replay.js.map +1 -0
- package/dist/true/settings.js +123 -0
- package/dist/true/settings.js.map +1 -0
- package/dist/true/status.js +189 -0
- package/dist/true/status.js.map +1 -0
- package/dist/true/sync-cases.js +222 -0
- package/dist/true/sync-cases.js.map +1 -0
- package/dist/true/sync-manual.js +295 -0
- package/dist/true/sync-manual.js.map +1 -0
- package/dist/true/sync-runs.js +109 -0
- package/dist/true/sync-runs.js.map +1 -0
- package/dist/true/worker.js +414 -0
- package/dist/true/worker.js.map +1 -0
- package/dist/types.js +32 -0
- package/dist/types.js.map +1 -0
- package/dist/updates/asks.js +38 -0
- package/dist/updates/asks.js.map +1 -0
- package/dist/updates/index.js +835 -0
- package/dist/updates/index.js.map +1 -0
- package/dist/updates/owner.js +24 -0
- package/dist/updates/owner.js.map +1 -0
- package/dist/updates/prefs.js +118 -0
- package/dist/updates/prefs.js.map +1 -0
- package/dist/updates/route.js +78 -0
- package/dist/updates/route.js.map +1 -0
- package/dist/updates/sources.js +345 -0
- package/dist/updates/sources.js.map +1 -0
- package/dist/updates/words.js +452 -0
- package/dist/updates/words.js.map +1 -0
- package/dist/version.js +53 -0
- package/dist/version.js.map +1 -0
- package/dist/view-compute.js +382 -0
- package/dist/view-compute.js.map +1 -0
- package/dist/view-spec.js +894 -0
- package/dist/view-spec.js.map +1 -0
- package/dist/web/apple-touch-icon.png +0 -0
- package/dist/web/assets/ApprovalCard-Br_z5z7G.css +1 -0
- package/dist/web/assets/ApprovalCard-CfGhGFo_.js +3 -0
- package/dist/web/assets/CardFromRef-BaTGmZ9c.js +2 -0
- package/dist/web/assets/CardFromRef-DO7i2uDd.css +1 -0
- package/dist/web/assets/Cases-8l_6UcLh.js +2 -0
- package/dist/web/assets/Cases-CpfED0uB.css +1 -0
- package/dist/web/assets/Chat-BKDiR0qt.js +3 -0
- package/dist/web/assets/Chat-DxjdyYUu.css +1 -0
- package/dist/web/assets/ConfirmDialog-CIMveD-b.js +2 -0
- package/dist/web/assets/ConnectSheet-Cm5vbZdR.js +4 -0
- package/dist/web/assets/Docs-HKGuY0WE.js +2 -0
- package/dist/web/assets/Docs-fodKx8S7.css +1 -0
- package/dist/web/assets/DotDetail-DskS3NWe.js +2 -0
- package/dist/web/assets/DotDetail-OWRSD_1x.css +1 -0
- package/dist/web/assets/DotStage-BZDclfzV.css +1 -0
- package/dist/web/assets/DotStage-CtMNzCN3.js +2 -0
- package/dist/web/assets/Dots-BqCsS34m.js +2 -0
- package/dist/web/assets/EvidencePack-DQ3kCJX4.js +2 -0
- package/dist/web/assets/EvidencePack-DV_9ETsA.css +1 -0
- package/dist/web/assets/FailedDeliveries-1F2kFcs9.js +2 -0
- package/dist/web/assets/FailedDeliveries-DXa2_VvI.css +1 -0
- package/dist/web/assets/Feed-5wiHRTFK.js +2 -0
- package/dist/web/assets/GfmView-C-NYaduC.js +4 -0
- package/dist/web/assets/ImpactList-C-RNuDB0.js +2 -0
- package/dist/web/assets/ImpactList-C612dFdw.css +1 -0
- package/dist/web/assets/Inbox-kc1bKVL_.js +2 -0
- package/dist/web/assets/JoinScreen-C3L4wmP3.js +2 -0
- package/dist/web/assets/JoinScreen-COeAUv5v.css +1 -0
- package/dist/web/assets/LeadDialog-N3Zul9Rw.js +8 -0
- package/dist/web/assets/LeadDialog-xyWjAuAS.css +1 -0
- package/dist/web/assets/ListeningLine-BRFNaczY.js +2 -0
- package/dist/web/assets/ListeningLine-pN8CgyiK.css +1 -0
- package/dist/web/assets/Mascots-pIyGpxtD.js +2 -0
- package/dist/web/assets/ModelChoices-BxO1zyyr.js +2 -0
- package/dist/web/assets/ModelChoices-DQJnVxfs.css +1 -0
- package/dist/web/assets/NewDotDialog-CDPUWmgN.js +2 -0
- package/dist/web/assets/NewDotDialog-DrPPqkSZ.css +1 -0
- package/dist/web/assets/NewTestRunDialog-BQBthVHE.js +2 -0
- package/dist/web/assets/NoBreakNames-Csxdqdt6.js +2 -0
- package/dist/web/assets/Pair-omex_K7H.js +2 -0
- package/dist/web/assets/PushSection-CmqHlE_2.js +2 -0
- package/dist/web/assets/ReleaseNotes-B6VqFewP.js +2 -0
- package/dist/web/assets/ReleaseNotes-DBJUL7Vm.css +1 -0
- package/dist/web/assets/ReportPage-BHS1xWEt.js +162 -0
- package/dist/web/assets/Reports-BEHnDIb1.js +2 -0
- package/dist/web/assets/ReviewChangeDialog-BVSt-cw-.js +2 -0
- package/dist/web/assets/ReviewChangeDialog-BbIlHRx0.css +1 -0
- package/dist/web/assets/Room-BoG_uge4.js +2 -0
- package/dist/web/assets/Room-evAfiW_e.css +1 -0
- package/dist/web/assets/RunActions-ZY7yf1AF.js +2 -0
- package/dist/web/assets/RunDetail-C8St20GQ.css +1 -0
- package/dist/web/assets/RunDetail-qADXjBvd.js +9 -0
- package/dist/web/assets/RunRow-BKEJv8ib.js +2 -0
- package/dist/web/assets/RunnerTry-Dgpp67-s.js +6 -0
- package/dist/web/assets/RunnerTry-DsweWOfO.css +1 -0
- package/dist/web/assets/Settings-fs-QJwNM.js +2 -0
- package/dist/web/assets/Setup-DI6hBEP-.js +2 -0
- package/dist/web/assets/TestRows-wh03T5Li.js +4 -0
- package/dist/web/assets/TestRun-DTOyF-Pv.js +2 -0
- package/dist/web/assets/TestRuns-ggDjm1Q8.js +2 -0
- package/dist/web/assets/TinyBeeAddLaptop-bc3pmh3T.js +2 -0
- package/dist/web/assets/TinyBeeAi-CkyOzhm5.js +2 -0
- package/dist/web/assets/TinyBeeConnections-B2K_P38u.js +2 -0
- package/dist/web/assets/TinyBeeHome-DSpxX5KS.js +3 -0
- package/dist/web/assets/TinyBeePlan-BamiLziu.js +2 -0
- package/dist/web/assets/TinyBeeSignup-vHcz0Wen.js +2 -0
- package/dist/web/assets/TinyBeeSkills-By9RLUse.js +2 -0
- package/dist/web/assets/TinyBeeWorkflow-DeNO7Jsh.js +2 -0
- package/dist/web/assets/TinyBeeWorkflowEditor-B6OGC2OT.js +2 -0
- package/dist/web/assets/TinyBeeWorkflows-BN4-h6lt.js +2 -0
- package/dist/web/assets/Trace-BBCI1aIB.css +1 -0
- package/dist/web/assets/Trace-aF92UWaH.js +2 -0
- package/dist/web/assets/UpdatesSection-CCWEbkue.js +2 -0
- package/dist/web/assets/Welcome-CCcy558Q.js +2 -0
- package/dist/web/assets/activity-C3qilrDm.css +1 -0
- package/dist/web/assets/activity-CBfTSxqw.js +2 -0
- package/dist/web/assets/authedMedia-BTYt_tyu.js +2 -0
- package/dist/web/assets/beeApi-BHW8Tx1s.js +2 -0
- package/dist/web/assets/data-CmXvx3Mj.js +2 -0
- package/dist/web/assets/engines-CfdJODFj.css +1 -0
- package/dist/web/assets/format-BBZ8vFyT.js +2 -0
- package/dist/web/assets/forms-Coc7p2UF.css +1 -0
- package/dist/web/assets/hivePush-DZJDokj7.js +2 -0
- package/dist/web/assets/impactModel-MY1OFuiP.js +2 -0
- package/dist/web/assets/index-B6qKm1NW.js +13 -0
- package/dist/web/assets/index-BvKyT1X7.css +1 -0
- package/dist/web/assets/inter-cyrillic-ext-wght-normal-BOeWTOD4.woff2 +0 -0
- package/dist/web/assets/inter-cyrillic-wght-normal-DqGufNeO.woff2 +0 -0
- package/dist/web/assets/inter-greek-ext-wght-normal-DlzME5K_.woff2 +0 -0
- package/dist/web/assets/inter-greek-wght-normal-CkhJZR-_.woff2 +0 -0
- package/dist/web/assets/inter-latin-ext-wght-normal-DO1Apj_S.woff2 +0 -0
- package/dist/web/assets/inter-latin-wght-normal-Dx4kXJAl.woff2 +0 -0
- package/dist/web/assets/inter-vietnamese-wght-normal-CBcvBZtf.woff2 +0 -0
- package/dist/web/assets/lead-BL_P_kri.css +1 -0
- package/dist/web/assets/model-BIQy5IVG.js +2 -0
- package/dist/web/assets/modelsApi-PUSySRQw.js +2 -0
- package/dist/web/assets/newDotModel-BaLLyw57.js +2 -0
- package/dist/web/assets/onboarding-bfKqnM4Z.css +1 -0
- package/dist/web/assets/phone-Rs7FoyG0.css +1 -0
- package/dist/web/assets/phoneApi-BG_1-M-D.js +3 -0
- package/dist/web/assets/releaseModel-EynYMVOC.js +2 -0
- package/dist/web/assets/releaseNotesModel-A1Rtv3cV.js +2 -0
- package/dist/web/assets/reports-BWaA1HhM.js +37 -0
- package/dist/web/assets/reports-DXwdWQsB.css +1 -0
- package/dist/web/assets/router-W6nZsQ33.js +2 -0
- package/dist/web/assets/runs-BY0Owv93.css +1 -0
- package/dist/web/assets/shadowWeekModel-BUUiww09.js +2 -0
- package/dist/web/assets/storage-yvL36AWt.js +2 -0
- package/dist/web/assets/store-IqrqHuFR.js +2 -0
- package/dist/web/assets/testruns-BzIZ0cR0.css +1 -0
- package/dist/web/assets/testruns-DyaqX4ji.js +2 -0
- package/dist/web/assets/true-9Q68cs5b.js +2 -0
- package/dist/web/assets/true-DPGBpoir.css +1 -0
- package/dist/web/assets/ui-DcmhYyYp.js +13 -0
- package/dist/web/assets/ui-DxEDgbIx.css +1 -0
- package/dist/web/assets/usePauseDot-BV60ZVy1.js +2 -0
- package/dist/web/assets/usePauseDot-NrSzMI1C.css +1 -0
- package/dist/web/assets/usePush-Dsm-TjlG.js +2 -0
- package/dist/web/assets/useRefChips-CbafNx59.js +68 -0
- package/dist/web/assets/useRestoreDot-D0B6W82H.js +2 -0
- package/dist/web/assets/view-worker-pyeVAhUT.js +2 -0
- package/dist/web/assets/workflowUi-QYsd3n9J.js +2 -0
- package/dist/web/favicon.png +0 -0
- package/dist/web/icon-192.png +0 -0
- package/dist/web/icon-512.png +0 -0
- package/dist/web/icon-maskable-512.png +0 -0
- package/dist/web/index.html +45 -0
- package/dist/web/manifest.webmanifest +23 -0
- package/dist/web/mascots/argus-attention.svg +7 -0
- package/dist/web/mascots/argus-ok.svg +7 -0
- package/dist/web/mascots/argus-outage.svg +7 -0
- package/dist/web/mascots/argus-running.svg +7 -0
- package/dist/web/mascots/bolt-attention.svg +7 -0
- package/dist/web/mascots/bolt-ok.svg +7 -0
- package/dist/web/mascots/bolt-outage.svg +7 -0
- package/dist/web/mascots/bolt-running.svg +7 -0
- package/dist/web/mascots/echo-attention.svg +7 -0
- package/dist/web/mascots/echo-ok.svg +7 -0
- package/dist/web/mascots/echo-outage.svg +7 -0
- package/dist/web/mascots/echo-running.svg +7 -0
- package/dist/web/mascots/lens-attention.svg +7 -0
- package/dist/web/mascots/lens-ok.svg +7 -0
- package/dist/web/mascots/lens-outage.svg +7 -0
- package/dist/web/mascots/lens-running.svg +7 -0
- package/dist/web/mascots/moss-attention.svg +7 -0
- package/dist/web/mascots/moss-ok.svg +7 -0
- package/dist/web/mascots/moss-outage.svg +7 -0
- package/dist/web/mascots/moss-running.svg +7 -0
- package/dist/web/mascots/nit-attention.svg +7 -0
- package/dist/web/mascots/nit-ok.svg +7 -0
- package/dist/web/mascots/nit-outage.svg +7 -0
- package/dist/web/mascots/nit-running.svg +7 -0
- package/dist/web/mascots/nova-attention.svg +7 -0
- package/dist/web/mascots/nova-ok.svg +7 -0
- package/dist/web/mascots/nova-outage.svg +7 -0
- package/dist/web/mascots/nova-running.svg +7 -0
- package/dist/web/mascots/penn-attention.svg +7 -0
- package/dist/web/mascots/penn-ok.svg +7 -0
- package/dist/web/mascots/penn-outage.svg +7 -0
- package/dist/web/mascots/penn-running.svg +7 -0
- package/dist/web/mascots/pip-attention.svg +7 -0
- package/dist/web/mascots/pip-ok.svg +7 -0
- package/dist/web/mascots/pip-outage.svg +7 -0
- package/dist/web/mascots/pip-running.svg +7 -0
- package/dist/web/mascots/ward-attention.svg +7 -0
- package/dist/web/mascots/ward-ok.svg +7 -0
- package/dist/web/mascots/ward-outage.svg +7 -0
- package/dist/web/mascots/ward-running.svg +7 -0
- package/dist/web/sw.js +98 -0
- package/dist/webhook-seen.js +53 -0
- package/dist/webhook-seen.js.map +1 -0
- package/dist/webhooks.js +625 -0
- package/dist/webhooks.js.map +1 -0
- package/dist/zip.js +63 -0
- package/dist/zip.js.map +1 -0
- package/docs/API-V2.md +532 -0
- package/docs/CHAT-EVAL.md +130 -0
- package/docs/CHAT-UI.md +416 -0
- package/docs/CONNECTIONS.md +89 -0
- package/docs/DATA-MODEL.md +518 -0
- package/docs/DEPLOY.md +577 -0
- package/docs/DOGFOOD-LEDGER.md +81 -0
- package/docs/GITHUB.md +148 -0
- package/docs/INTEGRATION-MODEL.md +200 -0
- package/docs/LEAD-DOT.md +553 -0
- package/docs/LIST-PATTERNS.md +52 -0
- package/docs/MULTI-REPO.md +766 -0
- package/docs/PARITY.md +276 -0
- package/docs/PR-REVIEW-QA.md +1266 -0
- package/docs/PR-REVIEW.md +357 -0
- package/docs/SANDBOX.md +320 -0
- package/docs/SETUP.md +776 -0
- package/docs/SLACK.md +80 -0
- package/docs/STAGES.md +619 -0
- package/docs/TRACE-MAP.md +89 -0
- package/docs/TRACKERS.md +225 -0
- package/docs/VOICE.md +36 -0
- package/docs/tinybee/00-README.md +45 -0
- package/docs/tinybee/01-PRD.md +216 -0
- package/docs/tinybee/02-architecture-pairing.md +199 -0
- package/docs/tinybee/03-local-agent.md +222 -0
- package/docs/tinybee/04-local-setup-ui.md +128 -0
- package/docs/tinybee/05-mobile-app-ux.md +199 -0
- package/docs/tinybee/06-environments-and-delivery.md +148 -0
- package/docs/tinybee/07-coding-agent-handoff.md +116 -0
- package/docs/tinybee/OPEN-QUESTIONS.md +26 -0
- package/docs/tinybee/PROGRESS.md +134 -0
- package/package.json +111 -4
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# TinyBeeAI — Product Requirements Document
|
|
2
|
+
|
|
3
|
+
**Version:** 0.1 (draft)
|
|
4
|
+
**Date:** 2026-10-24
|
|
5
|
+
**Status:** For review
|
|
6
|
+
**Related docs:** `02-architecture-pairing.md`, `03-local-agent.md`, `04-local-setup-ui.md`, `05-mobile-app-ux.md`
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1. One-line summary
|
|
11
|
+
|
|
12
|
+
TinyBeeAI turns any spare laptop into a personal AI agent that runs 24/7, watches the user's work accounts, and is controlled entirely from a mobile app — with a two-step setup: **install on the laptop, scan a QR code on the phone.**
|
|
13
|
+
|
|
14
|
+
## 2. Problem
|
|
15
|
+
|
|
16
|
+
Small business owners, freelancers and busy professionals have workflows spread across Gmail, Google Drive/Sheets, Zalo, Facebook pages, banking notifications and spreadsheets. Checking them is manual, repetitive and interrupt-driven. Cloud "AI assistant" products exist, but:
|
|
17
|
+
|
|
18
|
+
- They require handing all account access to a third-party cloud.
|
|
19
|
+
- They charge per seat per month for compute the user already owns (an idle laptop).
|
|
20
|
+
- Setting up a self-hosted alternative (n8n, Docker, tunnels, OAuth apps) takes a weekend and technical skill most people do not have.
|
|
21
|
+
|
|
22
|
+
## 3. Vision
|
|
23
|
+
|
|
24
|
+
> Your own AI employee, living on your own laptop, reachable from your pocket.
|
|
25
|
+
|
|
26
|
+
The user's data and credentials stay on hardware they own. TinyBeeAI provides only what the laptop cannot do alone: identity, a public address, pairing, push notifications and a polished mobile UI. Because we relay rather than compute, our marginal cost per user is low, which lets us offer a free first month and cheap plans.
|
|
27
|
+
|
|
28
|
+
## 4. Goals and non-goals
|
|
29
|
+
|
|
30
|
+
### Goals (v1)
|
|
31
|
+
1. Setup takes under 5 minutes for a non-technical user, with no router, DNS, Docker or terminal interaction.
|
|
32
|
+
2. Each user has an isolated **tenant**: their own subdomain, auth, agent, workflows and data. Nothing is shared between tenants.
|
|
33
|
+
3. The agent runs unattended 24/7 and survives reboots, power cuts and internet drops.
|
|
34
|
+
4. All workflow configuration, chat, logs and alerts are done from the mobile app.
|
|
35
|
+
5. Credentials to third-party services (Gmail, Drive, etc.) are stored **only on the user's laptop**, never persisted in our cloud.
|
|
36
|
+
6. Clear, honest status at all times: the user always knows if the agent is online, what it did, and what it costs.
|
|
37
|
+
|
|
38
|
+
### Non-goals (v1)
|
|
39
|
+
- Running a large local LLM. v1 uses cloud model APIs (via our relay or the user's own key). Local models (Ollama) are detected and offered as an optional provider but are not required or tuned for.
|
|
40
|
+
- Multi-user tenants / teams. One tenant = one person = one laptop. Team features are v2.
|
|
41
|
+
- Windows support. v1 targets **macOS 13 Ventura+ (Apple Silicon and Intel)** only. Windows is not supported and not on the roadmap until demand is proven. (Linux users can run the daemon manually.)
|
|
42
|
+
- A web dashboard. Mobile app only in v1; the laptop UI is setup-and-health only.
|
|
43
|
+
- Marketplace of third-party workflows (v2).
|
|
44
|
+
|
|
45
|
+
## 5. Target users and personas
|
|
46
|
+
|
|
47
|
+
### Persona A — "Ms. Lan", small business owner (primary)
|
|
48
|
+
- Runs a 2-location education centre, ~10 staff. Lives in Zalo, Gmail, Google Sheets, Facebook page inbox.
|
|
49
|
+
- Has an old Dell laptop in a drawer.
|
|
50
|
+
- Wants: "Tell me when a parent emails about tuition, when the monthly attendance sheet is missing rows, when the FB page gets a message after hours." Does not want to learn automation tools.
|
|
51
|
+
- Fear: giving a random cloud company her Gmail.
|
|
52
|
+
|
|
53
|
+
### Persona B — "Minh", freelancer / solo consultant
|
|
54
|
+
- Multiple client inboxes, invoices in Drive, deadlines in Calendar.
|
|
55
|
+
- Comfortable with tech but values time. Would happily bring his own OpenAI key.
|
|
56
|
+
- Wants: a daily digest, deadline nudges, "draft a reply to this" from his phone.
|
|
57
|
+
|
|
58
|
+
### Persona C — "Tuấn", tinkerer (secondary)
|
|
59
|
+
- Already runs Home Assistant. Wants the pairing/tunnel convenience and will write his own workflows in YAML.
|
|
60
|
+
- Will be loud on forums if the product is good or bad. Needs an "advanced mode" but must not dictate the default UX.
|
|
61
|
+
|
|
62
|
+
## 6. Core concepts and vocabulary
|
|
63
|
+
|
|
64
|
+
| Term | Meaning |
|
|
65
|
+
|---|---|
|
|
66
|
+
| **Bee** | The local agent/daemon installed on the laptop. One Bee per laptop. |
|
|
67
|
+
| **Hive** | Our cloud: identity, pairing, tunnel provisioning, relay, push. Stateless with respect to user content. |
|
|
68
|
+
| **Tenant** | One user's isolated space: `<slug>.tinybee.app` subdomain, auth realm, one or more Bees (v1: exactly one). |
|
|
69
|
+
| **Workflow** | A monitor + condition + action the Bee runs on a schedule or trigger. |
|
|
70
|
+
| **Skill** | A reusable workflow template (e.g. "Watch Gmail for keyword", "Daily Sheets summary"). |
|
|
71
|
+
| **Connection** | An authorized third-party account (Gmail, Drive, Zalo OA…). Tokens live on the Bee. |
|
|
72
|
+
| **Relay** | Hive forwarding mobile ↔ Bee traffic through the tunnel, and model API calls when the user has no own key. |
|
|
73
|
+
|
|
74
|
+
## 7. Tenancy model
|
|
75
|
+
|
|
76
|
+
- A tenant is created when a user signs up in the mobile app (email + OTP, Google, or Apple sign-in).
|
|
77
|
+
- Tenant gets a slug (`hong`, `hong-2` if taken), hence `https://hong.tinybee.app`.
|
|
78
|
+
- Tenant has exactly one active Bee in v1. Re-pairing a new laptop replaces the old Bee (old tunnel revoked).
|
|
79
|
+
- Tenant data in Hive is limited to: account identity, tenant slug, tunnel ID, device public key, plan/billing state, push tokens, aggregated usage counters. **No workflow definitions, no connection tokens, no message contents** are stored in Hive.
|
|
80
|
+
- Tenant deletion revokes the tunnel, deletes Hive records within 24h, and sends a wipe command to the Bee.
|
|
81
|
+
|
|
82
|
+
## 8. Pricing and the free month
|
|
83
|
+
|
|
84
|
+
Positioning: *"We only relay, so we can afford to be cheap."*
|
|
85
|
+
|
|
86
|
+
| Plan | Price (indicative) | Includes |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| **Trial** | Free, first 30 days | Everything in Standard, incl. 200k bundled model tokens. No card required. |
|
|
89
|
+
| **Standard** | ~99,000 VND / ~US$4 per month | Tenant subdomain, tunnel, push, mobile app, 5 workflows, bring-your-own-key for models **or** 500k bundled tokens/month. |
|
|
90
|
+
| **Pro** | ~249,000 VND / ~US$10 per month | Unlimited workflows, 3M bundled tokens, priority relay, 90-day log retention on device, early access to new skills. |
|
|
91
|
+
| **Bring-your-own-model add-on** | Free | User enters OpenAI/Anthropic/Gemini key or uses local Ollama; no bundled tokens consumed. |
|
|
92
|
+
|
|
93
|
+
Rules:
|
|
94
|
+
- Trial converts to Standard only on explicit opt-in; no silent charges. If the trial lapses, the Bee keeps running **locally** (workflows still execute) but the tunnel and push are suspended — the user loses remote access, not their agent. This is a deliberate trust signal.
|
|
95
|
+
- Bundled token overage: soft stop with a notification; user can top up or add own key.
|
|
96
|
+
- Payment: local methods first (MoMo, ZaloPay, bank transfer via gateway), then card (Stripe) for international.
|
|
97
|
+
|
|
98
|
+
## 9. User journeys
|
|
99
|
+
|
|
100
|
+
### 9.1 First-time setup (the "install + scan" promise)
|
|
101
|
+
1. User downloads the mobile app, signs up → tenant created, slug chosen (editable once).
|
|
102
|
+
2. App shows: "Now install TinyBee on the laptop you want to use." with a short URL and a 6-char install code.
|
|
103
|
+
3. On the laptop, user runs the installer. It installs the Bee as a launchd daemon, runs a health check, and shows a QR code.
|
|
104
|
+
4. User scans the QR with the app. App confirms the laptop name and health results. User taps **Connect**.
|
|
105
|
+
5. Hive provisions the tunnel and auth; Bee comes online. App shows "🟢 Your Bee is online at hong.tinybee.app".
|
|
106
|
+
6. App offers 3 starter skills based on sign-up answers (e.g. "I use Gmail", "I run a business"). User picks one, connects the account, done.
|
|
107
|
+
|
|
108
|
+
Target: ≤ 5 minutes, ≤ 8 taps on phone, 2 clicks on laptop.
|
|
109
|
+
|
|
110
|
+
### 9.2 Daily use
|
|
111
|
+
- Morning push: "Your Bee's overnight report: 3 new parent emails, 1 flagged urgent."
|
|
112
|
+
- User opens app, reads the summary, taps "Draft reply" → chat with the Bee, approves, Bee sends via Gmail connection.
|
|
113
|
+
- User adds a new workflow from a skill template in under 1 minute.
|
|
114
|
+
|
|
115
|
+
### 9.3 Something goes wrong
|
|
116
|
+
- Laptop lid closed → Bee offline → within 5 min push: "Your Bee has been offline for 5 minutes. Last seen 14:02. Is the laptop asleep?" with a link to the "keep awake" guide.
|
|
117
|
+
- Token exhausted → in-app banner, workflows pause, no surprise bill.
|
|
118
|
+
- Gmail token expired → push with one-tap "Reconnect Gmail".
|
|
119
|
+
|
|
120
|
+
### 9.4 Leaving
|
|
121
|
+
- Settings → Delete tenant → confirm → Bee wipes local data, tunnel revoked, account deleted. Export of workflow definitions (YAML) offered first.
|
|
122
|
+
|
|
123
|
+
## 10. Functional requirements
|
|
124
|
+
|
|
125
|
+
### 10.1 Hive (cloud)
|
|
126
|
+
- **FR-H1** Account sign-up/sign-in: email OTP, Google, Apple. 2FA optional.
|
|
127
|
+
- **FR-H2** Tenant lifecycle: create, rename slug (once), suspend (billing), delete.
|
|
128
|
+
- **FR-H3** Pairing service: issue install codes, verify QR pairing payloads, exchange device keys (see `02-architecture-pairing.md`).
|
|
129
|
+
- **FR-H4** Tunnel provisioning via Cloudflare API: create Tunnel, DNS CNAME `<slug>.tinybee.app`, issue tunnel token to Bee, revoke on unpair.
|
|
130
|
+
- **FR-H5** Auth gateway: every request to `<slug>.tinybee.app` must carry a valid tenant session token issued by Hive; enforced at the edge (Cloudflare Access service token or Worker) **and** re-verified by the Bee.
|
|
131
|
+
- **FR-H6** Model relay: proxy chat/completion requests from Bee to model providers using Hive's keys, metered per tenant. Bee-side BYOK requests bypass the relay entirely.
|
|
132
|
+
- **FR-H7** Push notification service (FCM/APNs) triggered by the Bee through an authenticated Hive endpoint. Payloads are titles/summaries only; full content is fetched from the Bee.
|
|
133
|
+
- **FR-H8** Presence: Bee heartbeats every 60s; Hive flags offline after 5 min and notifies.
|
|
134
|
+
- **FR-H9** Billing: plan state, trial countdown, token metering, payment gateways, invoices.
|
|
135
|
+
- **FR-H10** Admin console (internal): tenant list, tunnel health, relay usage, abuse flags. No access to user content.
|
|
136
|
+
|
|
137
|
+
### 10.2 Bee (local agent) — summarized; full spec in `03-local-agent.md`
|
|
138
|
+
- **FR-B1** One-click macOS installer (signed + notarized `.pkg`); runs as a service; auto-start; auto-update with rollback.
|
|
139
|
+
- **FR-B2** Health check: runtime, internet, disk, RAM, power settings, model providers reachable, local Ollama detection.
|
|
140
|
+
- **FR-B3** Pairing UI (QR) and menu bar app.
|
|
141
|
+
- **FR-B4** Tunnel client (bundled `cloudflared`) managed by the Bee.
|
|
142
|
+
- **FR-B5** Workflow engine: scheduled and event-triggered workflows, retries, backoff, concurrency limits.
|
|
143
|
+
- **FR-B6** Connections: OAuth token storage encrypted at rest (macOS Keychain-wrapped key), refresh handling, scoped permissions.
|
|
144
|
+
- **FR-B7** Agent runtime: tool-calling LLM loop with a fixed tool set (read mail, search Drive, read/write Sheets, send message, web fetch, etc.) under per-workflow permission scopes.
|
|
145
|
+
- **FR-B8** Local API served to the mobile app over the tunnel (REST + WebSocket/SSE for chat and live logs).
|
|
146
|
+
- **FR-B9** Local storage: SQLite for workflows, runs, logs, chat history; configurable retention.
|
|
147
|
+
- **FR-B10** Safety: action approval gates ("ask me before sending"), rate limits on outbound actions, kill switch from mobile.
|
|
148
|
+
|
|
149
|
+
### 10.3 Mobile app — summarized; full spec in `05-mobile-app-ux.md`
|
|
150
|
+
- **FR-M1** Onboarding, sign-up, slug selection, QR scanning.
|
|
151
|
+
- **FR-M2** Home: Bee status, today's digest, pending approvals.
|
|
152
|
+
- **FR-M3** Chat with the Bee (streaming), with attachments and quick actions.
|
|
153
|
+
- **FR-M4** Workflows: list, create from skill, edit (natural-language + guided form), enable/disable, run now, run history.
|
|
154
|
+
- **FR-M5** Connections: add/remove third-party accounts via OAuth, with scope display.
|
|
155
|
+
- **FR-M6** Activity log and run details with inputs/outputs.
|
|
156
|
+
- **FR-M7** Notifications settings: quiet hours, per-workflow channels.
|
|
157
|
+
- **FR-M8** Account & billing: plan, usage meter, payment, delete tenant.
|
|
158
|
+
- **FR-M9** Offline/degraded states: last-seen, troubleshooting, re-pair.
|
|
159
|
+
- **FR-M10** Localization: Vietnamese and English at launch.
|
|
160
|
+
|
|
161
|
+
## 11. Non-functional requirements
|
|
162
|
+
|
|
163
|
+
| Area | Requirement |
|
|
164
|
+
|---|---|
|
|
165
|
+
| Setup time | P50 ≤ 5 min, P90 ≤ 10 min from app download to first workflow. |
|
|
166
|
+
| Availability (Hive) | 99.9% monthly for pairing, auth, relay, push. |
|
|
167
|
+
| Latency | Mobile → Bee round-trip P50 ≤ 400 ms within VN; chat first token ≤ 2 s. |
|
|
168
|
+
| Offline resilience | Bee continues executing workflows without Hive; queues pushes; reconnects tunnel with exponential backoff. |
|
|
169
|
+
| Security | TLS everywhere; device-bound keys (Ed25519); tokens encrypted at rest; least-privilege OAuth scopes; signed updates. |
|
|
170
|
+
| Privacy | No user content stored in Hive. Relay logs contain metadata only (tenant, tokens used, timestamps), retained 30 days. |
|
|
171
|
+
| Resource footprint | Bee idle ≤ 300 MB RAM, ≤ 2% CPU; installer ≤ 150 MB. |
|
|
172
|
+
| Compatibility | macOS 13+ on Apple Silicon or Intel, 8 GB RAM recommended, 4 GB minimum. No Windows support. |
|
|
173
|
+
| Accessibility | Mobile app meets WCAG 2.1 AA contrast and dynamic type. |
|
|
174
|
+
| Localization | vi-VN and en-US strings; dates/currency localized. |
|
|
175
|
+
|
|
176
|
+
## 12. Success metrics
|
|
177
|
+
|
|
178
|
+
| Metric | Target (6 months post-launch) |
|
|
179
|
+
|---|---|
|
|
180
|
+
| Install → paired conversion | ≥ 70% |
|
|
181
|
+
| Paired → first workflow within 24 h | ≥ 60% |
|
|
182
|
+
| Trial → paid conversion | ≥ 15% |
|
|
183
|
+
| 30-day Bee uptime (median tenant) | ≥ 95% |
|
|
184
|
+
| Weekly active tenants / paired tenants | ≥ 55% |
|
|
185
|
+
| Support tickets per 100 tenants per month | ≤ 8 |
|
|
186
|
+
| NPS | ≥ 40 |
|
|
187
|
+
|
|
188
|
+
## 13. Risks and mitigations
|
|
189
|
+
|
|
190
|
+
| Risk | Impact | Mitigation |
|
|
191
|
+
|---|---|---|
|
|
192
|
+
| Laptop sleeps / is closed | Agent offline; user blames product | Installer sets `pmset` (no sleep on AC, wake on lid open) and offers `caffeinate`-style keep-awake; menu bar app warns; offline push with fix guide; "nightly reboot check". |
|
|
193
|
+
| Desktop packaging complexity (Docker dependency, notarization) | Install failures | Ship the Bee as a single native binary (Go/Rust) with embedded runtime; **no Docker requirement** for end users. |
|
|
194
|
+
| Cloudflare ToS / limits | Service disruption | HTTP-only traffic; monitor account limits; abstract tunnel provider behind an interface so Tailscale/own relay can replace it. |
|
|
195
|
+
| Model cost blowout on bundled plans | Negative margin | Hard token caps, cheap-model default for monitoring, expensive model only on user request. |
|
|
196
|
+
| OAuth app verification (Google) | Delayed launch | Start Google verification early; restrict scopes; ship Gmail read-only first. |
|
|
197
|
+
| Abuse (spam sending via Bee) | Reputation, provider bans | Outbound rate limits, approval gates default-on for send actions, abuse reporting. |
|
|
198
|
+
| Users expect it to "do anything" | Churn | Clear skill library, honest capability copy, examples in onboarding. |
|
|
199
|
+
|
|
200
|
+
## 14. Release plan
|
|
201
|
+
|
|
202
|
+
| Phase | Scope | Exit criteria |
|
|
203
|
+
|---|---|---|
|
|
204
|
+
| **Alpha** (internal, 10 users) | macOS Bee, pairing, tunnel, Gmail read-only skill, chat, iOS/Android TestFlight builds | Setup ≤ 10 min for 8/10 testers |
|
|
205
|
+
| **Beta** (invite, 200 users, VN) | + Drive/Sheets, Zalo OA, approvals, billing in test mode, vi/en | Trial→paid ≥ 10%; uptime ≥ 90% |
|
|
206
|
+
| **v1 Launch** | + payments live, Facebook Page inbox, auto-update, support site | Metrics in §12 trending to target |
|
|
207
|
+
| **v1.5** | Calendar, scheduled reports as PDF | — |
|
|
208
|
+
| **v2** | Windows Bee (if demand), team tenants, skill marketplace, local-model tuning, web dashboard | — |
|
|
209
|
+
|
|
210
|
+
## 15. Open questions
|
|
211
|
+
|
|
212
|
+
1. Slug domain: `tinybee.app` vs a `.vn` domain for local trust? (Can do both with a redirect.)
|
|
213
|
+
2. Should the Bee *ever* run without pairing (offline-only mode) as a free tier? It costs us nothing and builds a funnel.
|
|
214
|
+
3. Zalo API access terms for OA vs personal accounts — personal Zalo has no official API; scope to Zalo OA only?
|
|
215
|
+
4. Default model for monitoring tasks: cheapest capable tier from one provider, or auto-select by task?
|
|
216
|
+
5. Do we need a desktop-browser fallback UI at `<slug>.tinybee.app` for users without their phone? (Leaning yes for v1.5, read-only.)
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# TinyBeeAI — System Architecture & Pairing Flow
|
|
2
|
+
|
|
3
|
+
**Version:** 0.1 (draft) · **Date:** 2026-10-24
|
|
4
|
+
**Companion to:** `01-PRD.md`
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. Components
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
┌──────────────────┐ HTTPS ┌──────────────────────────────┐
|
|
12
|
+
│ Mobile App │◄────────────────────►│ HIVE (cloud) │
|
|
13
|
+
│ iOS / Android │ sign-in, pairing, │ • Identity & tenants │
|
|
14
|
+
│ │ billing, push reg. │ • Pairing service │
|
|
15
|
+
└────────┬─────────┘ │ • Tunnel provisioner (CF) │
|
|
16
|
+
│ │ • Auth gateway (edge) │
|
|
17
|
+
│ HTTPS / WSS │ • Model relay (metered) │
|
|
18
|
+
│ https://<slug>.tinybee.app │ • Push (FCM/APNs) │
|
|
19
|
+
▼ │ • Presence │
|
|
20
|
+
┌──────────────────┐ └──────────────┬───────────────┘
|
|
21
|
+
│ Cloudflare edge │ Access check (tenant token) │ control plane
|
|
22
|
+
│ <slug>.tinybee │─────────────────────────────────────┘ (heartbeat, push,
|
|
23
|
+
└────────┬─────────┘ relay, updates)
|
|
24
|
+
│ Cloudflare Tunnel (outbound from laptop)
|
|
25
|
+
▼
|
|
26
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
27
|
+
│ BEE (user's laptop, launchd daemon on macOS) │
|
|
28
|
+
│ • cloudflared (bundled) • Local API (REST + WS) │
|
|
29
|
+
│ • Workflow engine • Agent runtime (LLM tool loop) │
|
|
30
|
+
│ • Connections (OAuth tokens, Keychain-wrapped encryption) │
|
|
31
|
+
│ • SQLite (workflows, runs, logs, chat) │
|
|
32
|
+
│ • Menu bar app + local setup page (http://localhost:7331) │
|
|
33
|
+
└──────────────────────────────────────────────────────────────────┘
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Ownership matrix
|
|
37
|
+
|
|
38
|
+
| Concern | Mobile | Hive | Bee |
|
|
39
|
+
|---|---|---|---|
|
|
40
|
+
| User identity | sign-in UI | **owner** | verifies Hive-issued tokens |
|
|
41
|
+
| Tenant slug, plan, billing | UI | **owner** | reads plan state |
|
|
42
|
+
| Pairing | scans QR | **broker** | shows QR, holds device key |
|
|
43
|
+
| Tunnel | — | **provisions** | **runs** `cloudflared` |
|
|
44
|
+
| Workflow definitions | edit UI | — | **owner (SQLite)** |
|
|
45
|
+
| Third-party tokens | starts OAuth | transient callback only | **owner (encrypted)** |
|
|
46
|
+
| Chat history, logs, run data | view | — | **owner** |
|
|
47
|
+
| Model calls | — | relay (bundled) | direct (BYOK / Ollama) |
|
|
48
|
+
| Push | receives | **sends** | requests |
|
|
49
|
+
| Presence | displays | **derives** | heartbeats |
|
|
50
|
+
|
|
51
|
+
Design rule: **Hive is a control plane, never a data plane for user content.** Everything that would embarrass us in a breach lives on the laptop.
|
|
52
|
+
|
|
53
|
+
## 2. Data flow paths
|
|
54
|
+
|
|
55
|
+
1. **Mobile ↔ Bee (data path)** — `https://<slug>.tinybee.app` → Cloudflare edge → Tunnel → Bee local API. Hive is not in this path except for edge auth validation (JWT signature check, no round trip).
|
|
56
|
+
2. **Bee → Hive (control path)** — heartbeat, push requests, plan check, update manifest, pairing completion, relay model calls (only when bundled tokens are used).
|
|
57
|
+
3. **Mobile → Hive** — sign-in, tenant management, billing, push token registration, pairing initiation.
|
|
58
|
+
|
|
59
|
+
## 3. Identity and keys
|
|
60
|
+
|
|
61
|
+
| Key | Where created | Purpose |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| **Tenant session JWT** (user) | Hive, on sign-in; RS256; 7-day refresh | Sent by mobile on every Bee request; validated at edge and by Bee against Hive's public JWKS. Contains `tenant_id`, `user_id`, `scopes`. |
|
|
64
|
+
| **Device key pair** (Ed25519) | Bee, first run | Bee identity. Public key registered to tenant during pairing. Bee signs heartbeats and push requests. |
|
|
65
|
+
| **Pairing code** | Hive | 6-char code (install flow) and/or one-time QR nonce; 10-min TTL, single use. |
|
|
66
|
+
| **Tunnel token** | Cloudflare, via Hive | Lets `cloudflared` connect the tunnel. Delivered to Bee once, stored encrypted (Keychain-wrapped key). Rotatable. |
|
|
67
|
+
| **Relay token** | Hive | Bee-to-Hive auth for metered model calls; short-lived (1 h), refreshed with device signature. |
|
|
68
|
+
| **Third-party OAuth tokens** | Provider | Stored only on Bee. Hive sees them once in the callback and forwards; never persisted. |
|
|
69
|
+
|
|
70
|
+
Edge auth: a Cloudflare Worker (or Access with a custom IdP) in front of every `*.tinybee.app` hostname validates the tenant JWT and checks `tenant_id` matches the hostname's slug. Unauthenticated requests never reach the laptop.
|
|
71
|
+
|
|
72
|
+
## 4. Pairing flow (detailed)
|
|
73
|
+
|
|
74
|
+
### 4.1 Pre-conditions
|
|
75
|
+
- User signed up in mobile app → tenant `T` exists with slug `hong`.
|
|
76
|
+
- App shows the install page URL (`tinybee.app/get`) and a 6-char install code `K7M2PQ` (10-min TTL, refreshable).
|
|
77
|
+
|
|
78
|
+
### 4.2 Sequence
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
Mobile App Hive Bee (laptop) Cloudflare
|
|
82
|
+
| | | |
|
|
83
|
+
|-- POST /pair/init (tenant T) --------------->| |
|
|
84
|
+
|<-- install_code K7M2PQ, expires 10m ---------| |
|
|
85
|
+
| | | |
|
|
86
|
+
| (user runs installer on laptop) | |
|
|
87
|
+
| | |-- generate device keypair |
|
|
88
|
+
| | |-- run health check |
|
|
89
|
+
| | |-- show QR {v,nonce,pub,host,hc}
|
|
90
|
+
| | | + "or enter code" box |
|
|
91
|
+
| | | |
|
|
92
|
+
|-- scan QR ----->| | |
|
|
93
|
+
|-- POST /pair/complete {nonce, pub, hostname, health, install_code?} ----->|
|
|
94
|
+
| |-- verify nonce/code, bind pub to T |
|
|
95
|
+
| |-- CF API: create tunnel "bee-<tenant>" ---------------------------->|
|
|
96
|
+
| |<-- tunnel_id, tunnel_token ---------------------------------------- |
|
|
97
|
+
| |-- CF API: DNS CNAME hong.tinybee.app → <tunnel>.cfargotunnel.com -->|
|
|
98
|
+
| |-- CF API: ensure edge auth rule for hostname ---------------------->|
|
|
99
|
+
|<-- 200 {bee_name, slug, status: provisioning} | |
|
|
100
|
+
| | | |
|
|
101
|
+
| |<-- Bee polls GET /pair/status?nonce (every 2s, signed) --|
|
|
102
|
+
| |-- 200 {tunnel_token, relay_token, tenant_id, slug} ----->|
|
|
103
|
+
| | |-- store tokens (encrypted) |
|
|
104
|
+
| | |-- start cloudflared -------------------->|
|
|
105
|
+
| | |-- POST /presence/heartbeat (signed) ---->|
|
|
106
|
+
|<-- push "Your Bee is online" -----------------| |
|
|
107
|
+
|-- GET https://hong.tinybee.app/api/health (tenant JWT) --------------------------------->Bee
|
|
108
|
+
|<-- 200 {bee_name, version, uptime, providers} -------------------------------------------|
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 4.3 QR payload
|
|
112
|
+
|
|
113
|
+
```json
|
|
114
|
+
{
|
|
115
|
+
"v": 1,
|
|
116
|
+
"nonce": "b4f2…(32 bytes, base64url)",
|
|
117
|
+
"pub": "ed25519:…",
|
|
118
|
+
"host": "DESKTOP-LAN-01",
|
|
119
|
+
"hc": { "ok": true, "ram_gb": 8, "disk_free_gb": 112, "power_ok": false, "providers": ["ollama"] },
|
|
120
|
+
"lan": "http://192.168.1.23:7331"
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
- Encoded as a `tinybee://pair?d=<base64url(json)>` deep link so a non-app QR scanner still opens the app (or the store).
|
|
124
|
+
- Signed by the device key over `nonce|pub|host` to prevent QR substitution.
|
|
125
|
+
- `lan` lets the app verify same-network presence optionally (not required; many users will pair over mobile data).
|
|
126
|
+
|
|
127
|
+
### 4.4 Fallback: install code instead of QR
|
|
128
|
+
If the camera is unavailable, the laptop UI shows the same 6-char code the app displayed. Bee calls `POST /pair/claim {install_code, pub, host, hc}`; Hive binds it to the tenant that generated the code. The app then shows "Found DESKTOP-LAN-01 — Connect?".
|
|
129
|
+
|
|
130
|
+
### 4.5 Failure handling
|
|
131
|
+
|
|
132
|
+
| Failure | Behaviour |
|
|
133
|
+
|---|---|
|
|
134
|
+
| Nonce expired | Laptop UI regenerates QR automatically every 10 min; app shows "QR expired, scan the new one". |
|
|
135
|
+
| Tenant already has a Bee | App asks "Replace existing Bee `OLD-NAME`? It will be disconnected." Old tunnel revoked on confirm. |
|
|
136
|
+
| Cloudflare API error | Hive retries 3× with backoff; app shows "Setting up your address…" up to 60 s, then "We hit a snag — retry" (no partial state left: tunnel create and DNS are idempotent by name). |
|
|
137
|
+
| Bee cannot reach Hive after scan | Laptop UI shows "Waiting for connection… check internet"; app shows "Laptop not responding — is it online?". |
|
|
138
|
+
| Health check red (e.g. no internet) | Pairing still allowed except for hard blockers (no internet, unsupported OS); app shows warnings with fix links. |
|
|
139
|
+
|
|
140
|
+
## 5. Tunnel provisioning details
|
|
141
|
+
|
|
142
|
+
- One Cloudflare account, one zone (`tinybee.app`), wildcard-ready.
|
|
143
|
+
- Per tenant: `POST /accounts/{acct}/cfd_tunnel` named `bee-{tenant_id}`; `PUT …/configurations` with ingress `hong.tinybee.app → http://localhost:7331` (Bee local API) and catch-all 404; DNS CNAME record proxied.
|
|
144
|
+
- Hostname-level auth enforced by a Worker route `*.tinybee.app/*` validating JWT and slug ↔ tenant mapping (KV cache).
|
|
145
|
+
- Revocation: delete tunnel + DNS record; Bee receives `unpaired` on next heartbeat and wipes tunnel token.
|
|
146
|
+
- Rotation: tunnel token rotated on re-pair and on demand from admin console.
|
|
147
|
+
- Provider abstraction: `TunnelProvider` interface (`Provision`, `Revoke`, `Rotate`, `Status`) so a Tailscale-based or self-hosted relay implementation can be swapped in.
|
|
148
|
+
|
|
149
|
+
## 6. Connections (third-party OAuth) flow
|
|
150
|
+
|
|
151
|
+
```
|
|
152
|
+
Mobile: tap "Connect Gmail"
|
|
153
|
+
→ GET https://hong.tinybee.app/api/connections/gmail/start (Bee builds auth URL with PKCE, state bound to tenant)
|
|
154
|
+
→ opens provider consent in system browser
|
|
155
|
+
Provider → redirect to https://auth.tinybee.app/cb?code&state (Hive, because providers need a stable registered redirect)
|
|
156
|
+
Hive → verifies state → forwards {code, verifier_ref} to Bee via Bee's outbound long-poll channel (no storage)
|
|
157
|
+
Bee → exchanges code for tokens directly with provider → stores encrypted (Keychain-wrapped key)
|
|
158
|
+
Bee → notifies mobile via WS: connection ready, scopes granted
|
|
159
|
+
```
|
|
160
|
+
Hive never holds the refresh token; the code is single-use and expires in minutes.
|
|
161
|
+
|
|
162
|
+
## 7. Model access paths
|
|
163
|
+
|
|
164
|
+
Dots provides no AI for host work. Everything a workflow reads or writes on the laptop runs on a backend the user set up there; the phone only picks among what the Bee found. The Bee never sends host content through the Hive (Phase A, 2026-10-25).
|
|
165
|
+
|
|
166
|
+
| Backend | Path | Metering |
|
|
167
|
+
|---|---|---|
|
|
168
|
+
| Claude subscription (`claude` CLI, signed in) | Bee → CLI on the laptop | The user's subscription |
|
|
169
|
+
| Codex subscription (`codex` CLI, ChatGPT login) | Bee → CLI on the laptop | The user's subscription |
|
|
170
|
+
| Anthropic / OpenAI / Gemini API key | Bee → provider directly | The user's own bill |
|
|
171
|
+
| Ollama, LM Studio | Bee → `127.0.0.1:11434` / `127.0.0.1:1234` | None |
|
|
172
|
+
| Custom OpenAI-compatible endpoint | Bee → the saved base URL | Whatever the endpoint bills |
|
|
173
|
+
|
|
174
|
+
The Bee scans the laptop for these (`GET /api/v1/models`, `src/bee/models.ts`) and the phone's AI screen shows what is found, what each needs (install, sign in, key, server, model) and which one is in use. Keys and endpoints typed on the phone go through the tunnel into the laptop's encrypted store, are never returned, and never reach the Hive. The Hive's own bundled model (Phase 6 relay) serves app-side features only, never a workflow on the host; a laptop with no backend set up runs nothing until one is picked.
|
|
175
|
+
|
|
176
|
+
The tier map (`TINYBEE_MODEL_TIERS`) routes `cheap` / `strong` / `local` to a backend each; an unmapped tier uses the active backend. `LOCALDOST_LLM` set in the laptop's environment overrides the pick and the screen says so.
|
|
177
|
+
|
|
178
|
+
## 8. Presence and push
|
|
179
|
+
|
|
180
|
+
- Heartbeat every 60 s: `{device_sig, version, uptime, queue_depth, last_run_at}`.
|
|
181
|
+
- Hive marks `offline` after 5 missed heartbeats, sends one push, then a daily reminder while offline; marks `online` on return and sends "back online" push.
|
|
182
|
+
- Push requests from Bee are title + short body + deep link; the app fetches full content from the Bee.
|
|
183
|
+
|
|
184
|
+
## 9. Updates
|
|
185
|
+
|
|
186
|
+
- Bee checks a signed update manifest every 6 h; downloads delta, verifies signature, installs on next idle window (no running workflow), keeps previous version for one-click rollback from the menu bar app and from mobile.
|
|
187
|
+
- Mobile app updates via stores; API versioned (`/api/v1`), Bee advertises supported versions in `/health`.
|
|
188
|
+
|
|
189
|
+
## 10. Security checklist (v1)
|
|
190
|
+
|
|
191
|
+
- [ ] TLS 1.2+ everywhere; HSTS on `*.tinybee.app`.
|
|
192
|
+
- [ ] Edge rejects any request without valid tenant JWT; Bee independently re-validates.
|
|
193
|
+
- [ ] Device-bound Ed25519 identity; private key never leaves machine.
|
|
194
|
+
- [ ] All secrets on Bee encrypted with an app key stored in macOS Keychain; secret store abstracted per OS for the future.
|
|
195
|
+
- [ ] Outbound action rate limits (send mail ≤ 30/h default) and approval gates.
|
|
196
|
+
- [ ] Signed, reproducible Bee builds; update manifest signed with offline key.
|
|
197
|
+
- [ ] Hive stores no prompt content, no third-party tokens, no workflow bodies.
|
|
198
|
+
- [ ] Tenant deletion = tunnel revoke + Hive purge + Bee wipe command.
|
|
199
|
+
- [ ] Abuse hooks: relay anomaly detection (sudden token spikes), hostname takedown.
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# TinyBeeAI — Local Agent ("Bee") Design
|
|
2
|
+
|
|
3
|
+
**Version:** 0.1 (draft) · **Date:** 2026-10-24
|
|
4
|
+
**Companion to:** `01-PRD.md`, `02-architecture-pairing.md`
|
|
5
|
+
|
|
6
|
+
> In this repo, the Bee is localdost itself (one Node process + SQLite). Sections below describe the target design; where localdost already has the piece (rule gate, Inbox approvals, dots/Watches, SQLite, demo mode) treat this as the integration contract, not a rewrite.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## 1. Design principles
|
|
11
|
+
|
|
12
|
+
1. **Single binary, zero dependencies.** No Docker, no Python, no Node for the end user. Ship a native executable (recommended: Go — universal macOS binaries, static linking, easy launchd support, strong HTTP/SQLite ecosystem; Rust is the alternative). `cloudflared` is bundled as a managed child process. *(localdost note: a Node runtime can be bundled into a single executable via pkg/SEA; evaluate before rewriting.)*
|
|
13
|
+
2. **Boring and durable.** Runs as a launchd daemon, restarts on crash, resumes work after reboot, tolerates offline Hive for days.
|
|
14
|
+
3. **Local-first data.** Everything the user cares about lives in one folder they can back up or delete.
|
|
15
|
+
4. **Safe by default.** Reads are free; writes/sends go through permission scopes and, by default, user approval.
|
|
16
|
+
5. **Observable.** Every workflow run is logged with inputs, decisions, tool calls, outputs and cost, viewable from the phone.
|
|
17
|
+
|
|
18
|
+
## 2. Process model
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
LaunchDaemon: ai.tinybee.bee (runs as a dedicated `_tinybee` system user; no GUI session needed)
|
|
22
|
+
├── supervisor
|
|
23
|
+
│ ├── api-server (localhost:7331; REST + WebSocket)
|
|
24
|
+
│ ├── scheduler (cron + event triggers → job queue)
|
|
25
|
+
│ ├── worker pool (N=2 default; executes workflow runs)
|
|
26
|
+
│ ├── connections mgr (token refresh, provider clients, webhooks poller)
|
|
27
|
+
│ ├── tunnel mgr (spawns/monitors bundled cloudflared)
|
|
28
|
+
│ ├── hive client (heartbeat, push, relay, updates, long-poll channel)
|
|
29
|
+
│ └── updater
|
|
30
|
+
└── Menu bar app (LaunchAgent, per-user, auto-start): status icon, menu, opens local setup page
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
- Daemon and menu bar app communicate over a Unix domain socket in `/var/run/tinybee/`; the menu bar app is optional (daemon runs headless if no user is logged in — important for Macs left at the login screen).
|
|
34
|
+
- `KeepAlive` + `RunAtLoad` in the LaunchDaemon plist so launchd restarts the daemon on crash and after reboot.
|
|
35
|
+
- Supervisor restarts any crashed subsystem with backoff; writes crash reports locally; uploads only an anonymized stack trace if the user opted in.
|
|
36
|
+
|
|
37
|
+
## 3. Installation
|
|
38
|
+
|
|
39
|
+
### 3.1 Installer (macOS, signed + notarized `.pkg`, universal binary)
|
|
40
|
+
Steps performed silently with progress:
|
|
41
|
+
1. Install binaries to `/Library/TinyBeeAI/` (daemon, bundled `cloudflared`) and `/Applications/TinyBee.app` (menu bar app).
|
|
42
|
+
2. Create data dir `/Library/Application Support/TinyBeeAI/` owned by `_tinybee` (SQLite, logs, secrets); create the `_tinybee` system user.
|
|
43
|
+
3. Install `/Library/LaunchDaemons/ai.tinybee.bee.plist` (`RunAtLoad`, `KeepAlive`) and `launchctl bootstrap` it.
|
|
44
|
+
4. Install `/Library/LaunchAgents/ai.tinybee.menubar.plist` so the menu bar app starts at login for every user.
|
|
45
|
+
5. Bind the API to `127.0.0.1` only (no inbound from LAN by default; no firewall rule needed).
|
|
46
|
+
6. Power settings **with user consent** (checkbox, default on): `pmset -c sleep 0 disksleep 0` (never sleep on AC), `pmset -c womp 1`; lid-closed-on-AC works via clamshell mode only with an external display, so the health check also recommends an external display or a "lid open, screen dimmed" setup (`pmset -c displaysleep 10`). Battery settings untouched. Requires admin password once (installer already has it).
|
|
47
|
+
7. Launch menu bar app → opens `http://localhost:7331/setup`.
|
|
48
|
+
|
|
49
|
+
Uninstaller (`/Library/TinyBeeAI/uninstall.sh`, also from menu bar "Advanced"): `launchctl bootout`, removes plists and binaries, offers "Keep my data" vs "Delete everything (secure wipe)".
|
|
50
|
+
|
|
51
|
+
Code signing: Developer ID Application + Installer certificates, notarized via `notarytool` in CI; Gatekeeper must not prompt.
|
|
52
|
+
|
|
53
|
+
### 3.2 First run
|
|
54
|
+
- Generate Ed25519 device key → encrypt with Keychain-held app key → `secrets.db`.
|
|
55
|
+
- Generate 8-char Bee name suggestion from hostname.
|
|
56
|
+
- Run health check (§4), serve setup page with QR (see `04-local-setup-ui.md`).
|
|
57
|
+
|
|
58
|
+
## 4. Health check module
|
|
59
|
+
|
|
60
|
+
Runs at first start, every 6 h, on demand from mobile, and before pairing. Each check returns `ok | warn | fail` + message + fix hint + fix action id (if auto-fixable).
|
|
61
|
+
|
|
62
|
+
| Check | Pass | Warn | Fail | Auto-fix |
|
|
63
|
+
|---|---|---|---|---|
|
|
64
|
+
| OS version | macOS 13+ | — | older | — |
|
|
65
|
+
| CPU/RAM | ≥ 8 GB | 4–8 GB | < 4 GB | — |
|
|
66
|
+
| Free disk | ≥ 10 GB | 3–10 GB | < 3 GB | — |
|
|
67
|
+
| Internet | reachable, latency < 300 ms | high latency | none | — |
|
|
68
|
+
| Hive reachable | 200 from `/ping` | — | blocked | — |
|
|
69
|
+
| Cloudflare edge reachable | QUIC/HTTP2 handshake OK | fallback to HTTP2 only | blocked | switch protocol |
|
|
70
|
+
| Power settings | `pmset` sleep on AC = 0, lid-closed on AC keeps running (clamshell with power) | not set | — | apply pmset |
|
|
71
|
+
| On AC power | yes | on battery | — | — |
|
|
72
|
+
| Clock skew | < 60 s | 60–300 s | > 300 s (breaks JWT) | trigger time sync |
|
|
73
|
+
| Antivirus interference | binaries not quarantined | — | blocked | show exclusion guide |
|
|
74
|
+
| Model providers | Hive relay OK | — | — | — |
|
|
75
|
+
| BYOK keys (if any) | valid | rate-limited | invalid | — |
|
|
76
|
+
| Local Ollama | detected at :11434, models listed | detected, no models | not present (info only) | — |
|
|
77
|
+
| Daemon running as expected | yes | — | menu bar app cannot reach daemon | restart daemon |
|
|
78
|
+
|
|
79
|
+
Results are included in the QR payload (summary) and available at `GET /api/v1/health`.
|
|
80
|
+
|
|
81
|
+
## 5. Storage layout
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
~/Library/Application Support/TinyBeeAI/
|
|
85
|
+
bee.db SQLite: tenants, workflows, runs, run_steps, chat_threads, chat_messages, approvals, connections (metadata), settings
|
|
86
|
+
secrets.db SQLite, every value encrypted with the Keychain-held app key: device_key, tunnel_token, relay_token, oauth tokens, byok keys
|
|
87
|
+
logs\ rolling JSONL (app.log, cloudflared.log), 14 days
|
|
88
|
+
cache\ downloaded attachments / fetched pages, LRU 2 GB
|
|
89
|
+
updates\ staged + previous version
|
|
90
|
+
exports\ user-requested YAML/CSV exports
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Retention defaults: runs & logs 30 days (Standard), 90 days (Pro), chat forever until deleted. All configurable from mobile. "Delete everything" overwrites secrets before unlinking.
|
|
94
|
+
|
|
95
|
+
## 6. Workflow engine
|
|
96
|
+
|
|
97
|
+
### 6.1 Workflow definition (stored as JSON/YAML in `bee.db`)
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
id: wf_8f21
|
|
101
|
+
name: Parent tuition emails
|
|
102
|
+
enabled: true
|
|
103
|
+
trigger:
|
|
104
|
+
type: schedule # schedule | event | manual
|
|
105
|
+
cron: "*/10 7-21 * * *" # every 10 min, 07:00–21:00
|
|
106
|
+
timezone: Asia/Ho_Chi_Minh
|
|
107
|
+
inputs:
|
|
108
|
+
- connection: gmail_main
|
|
109
|
+
query: "newer_than:15m (học phí OR tuition OR fee)"
|
|
110
|
+
agent:
|
|
111
|
+
model_tier: cheap # cheap | strong | local
|
|
112
|
+
instructions: >
|
|
113
|
+
You monitor incoming parent emails about tuition. For each new email,
|
|
114
|
+
classify urgency (low/normal/urgent), extract student name and amount if present,
|
|
115
|
+
and summarise in one line in Vietnamese.
|
|
116
|
+
tools: [gmail.read, gmail.label, notify.push]
|
|
117
|
+
permissions:
|
|
118
|
+
gmail.label: auto
|
|
119
|
+
notify.push: auto
|
|
120
|
+
gmail.send: ask # not granted here anyway
|
|
121
|
+
outputs:
|
|
122
|
+
- on: urgent
|
|
123
|
+
action: notify.push
|
|
124
|
+
template: "🔴 Urgent tuition email from {{sender}}: {{summary}}"
|
|
125
|
+
- on: any
|
|
126
|
+
action: digest.append # goes into the morning digest
|
|
127
|
+
limits:
|
|
128
|
+
max_runtime_s: 120
|
|
129
|
+
max_tokens: 4000
|
|
130
|
+
max_actions: 10
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### 6.2 Trigger types
|
|
134
|
+
- **schedule** — cron with timezone, jitter ±30 s to avoid provider bursts.
|
|
135
|
+
- **event** — provider push where available (Gmail Pub/Sub via Hive relay webhook → long-poll to Bee; Sheets change via Drive push), otherwise polling with ETag/historyId.
|
|
136
|
+
- **manual** — from mobile "Run now" or chat ("run the tuition check").
|
|
137
|
+
- **chain** — on completion of another workflow.
|
|
138
|
+
|
|
139
|
+
### 6.3 Execution
|
|
140
|
+
- Scheduler enqueues `run` rows; worker pool pulls with per-connection concurrency = 1 (avoid provider rate limits).
|
|
141
|
+
- Each run: snapshot inputs → build context → agent loop (max N tool calls) → outputs → persist steps with token/cost.
|
|
142
|
+
- Retries: transient errors 3× exponential backoff; auth errors → mark connection `needs_reauth` and push once.
|
|
143
|
+
- Idempotency: inputs carry provider IDs; `seen_items` table prevents re-processing the same email/row.
|
|
144
|
+
- Missed schedules while asleep/offline: run **once** on wake with a "catch-up" flag (not once per missed slot).
|
|
145
|
+
|
|
146
|
+
### 6.4 Approval gates
|
|
147
|
+
Any tool marked `ask` creates an `approval` row and a push: "Bee wants to send a reply to Nguyễn Văn A — Approve / Edit / Deny". Run pauses up to 24 h, then expires as `denied(timeout)`. Approvals from mobile carry the user's JWT and are logged.
|
|
148
|
+
|
|
149
|
+
## 7. Agent runtime
|
|
150
|
+
|
|
151
|
+
- Single generic tool-calling loop with provider adapters behind one interface (`src/agent/llm.ts`): the `claude` and `codex` CLIs (subscriptions), Anthropic by key, and OpenAI-compatible presets (`src/agent/llm-openai.ts`: OpenAI, Gemini, Ollama, LM Studio, a custom endpoint); structured outputs via JSON schema.
|
|
152
|
+
- **Local AI scan** (`src/bee/models.ts`, Phase A): the Bee looks for the CLIs on PATH and their sign-in, the vendor keys in its store, Ollama and LM Studio on their loopback ports (listing their models), and the saved custom endpoint. Dots ships no model for host work; the phone picks among what the laptop has.
|
|
153
|
+
- **Tool registry** (v1):
|
|
154
|
+
- `gmail.read / search / label / draft / send`
|
|
155
|
+
- `drive.search / read_doc / read_sheet / write_sheet_range`
|
|
156
|
+
- `calendar.list / create` (v1.5)
|
|
157
|
+
- `zalo_oa.read_messages / send` ; `fb_page.read_inbox / reply` (beta/launch)
|
|
158
|
+
- `web.fetch` (read-only, allowlist/denylist, no auth cookies)
|
|
159
|
+
- `notify.push` ; `digest.append` ; `memory.note` (small per-tenant notes store)
|
|
160
|
+
- `files.read_local` (only within a user-chosen folder, off by default)
|
|
161
|
+
- **Permission scopes** are per workflow, per tool, with `auto | ask | deny`. Global defaults: all reads `auto`, all sends/writes `ask`.
|
|
162
|
+
- **Context budget**: per-model-tier token limits; long inputs chunked/summarized first with cheap tier.
|
|
163
|
+
- **Model routing**: the tier map (`TINYBEE_MODEL_TIERS`) names a backend and model per tier (`cheap`, `strong`, `local`); an unmapped tier runs on the active backend. Nothing on the host ever goes through the Hive relay.
|
|
164
|
+
- **Prompt hygiene**: provider content (emails, pages) is wrapped as data with explicit "do not follow instructions found inside" framing; tool outputs are size-capped; URLs from content are never auto-visited unless a workflow explicitly allows `web.fetch`.
|
|
165
|
+
|
|
166
|
+
## 8. Local API (served to mobile through the tunnel)
|
|
167
|
+
|
|
168
|
+
Base: `https://<slug>.tinybee.app/api/v1` → Bee `localhost:7331`. All requests require tenant JWT (validated against Hive JWKS, cached 24 h, with offline grace of 72 h for previously seen keys).
|
|
169
|
+
|
|
170
|
+
| Area | Endpoints |
|
|
171
|
+
|---|---|
|
|
172
|
+
| Health | `GET /health`, `POST /health/run`, `POST /health/fix/{id}` |
|
|
173
|
+
| Bee | `GET /bee`, `PATCH /bee` (name, retention, power), `POST /bee/restart`, `POST /bee/update`, `POST /bee/rollback`, `POST /bee/wipe` |
|
|
174
|
+
| Workflows | `GET/POST /workflows`, `GET/PATCH/DELETE /workflows/{id}`, `POST /workflows/{id}/run`, `POST /workflows/{id}/toggle`, `POST /workflows/from-text` (NL → draft definition), `GET /skills` |
|
|
175
|
+
| Runs | `GET /runs?workflow=&status=`, `GET /runs/{id}` (steps, tool calls, cost), `POST /runs/{id}/cancel` |
|
|
176
|
+
| Approvals | `GET /approvals`, `POST /approvals/{id}` `{decision, edited_payload?}` |
|
|
177
|
+
| Chat | `GET /chats`, `POST /chats`, `GET /chats/{id}/messages`, `WS /chats/{id}/stream` |
|
|
178
|
+
| Connections | `GET /connections`, `GET /connections/{provider}/start`, `DELETE /connections/{id}`, `POST /connections/{id}/test` |
|
|
179
|
+
| Digest | `GET /digest/today`, `PATCH /digest/settings` |
|
|
180
|
+
| Settings | `GET/PATCH /settings` (quiet hours, locale) |
|
|
181
|
+
| Models | `GET /models` (the scan: backends with `found`, `ready`, `needs`, `models`, the active one, the tier map, an env override), `PUT /models` `{active?, model?, tiers?, custom?, servers?, keys?}` (keys write-only; a pick of a backend that is not ready answers 409 and is rolled back). Settings: `LOCALDOST_LLM`, `TINYBEE_MODEL_BACKEND`, `TINYBEE_MODEL_TIERS`, `TINYBEE_MODEL_<PRESET>`, `OLLAMA_HOST`, `LMSTUDIO_URL`, `TINYBEE_CUSTOM_BASE_URL` / `_API_KEY` / `_EXTRA_BODY`, the vendor `*_API_KEY`s |
|
|
182
|
+
| Logs | `GET /logs?level=&since=` (tail), `GET /export/workflows.yaml` |
|
|
183
|
+
| Events | `WS /events` (bee status, run updates, approvals, connection changes) |
|
|
184
|
+
|
|
185
|
+
Rate limit: 60 req/min per tenant at edge; WS max 3 concurrent.
|
|
186
|
+
|
|
187
|
+
## 9. Tunnel manager
|
|
188
|
+
|
|
189
|
+
- Spawns bundled `cloudflared tunnel run --token <t>` with `--protocol quic`, falls back to `http2` on repeated failure.
|
|
190
|
+
- Monitors stdout for connection state; exposes `tunnel.status` to health and events.
|
|
191
|
+
- Backoff on disconnect: 2 s → 4 s → … → 5 min cap, forever.
|
|
192
|
+
- If Hive reports `unpaired` or `suspended` (billing): stop tunnel, keep executing local workflows, show banner in menu bar app/setup page, keep heartbeat (so re-activation is instant).
|
|
193
|
+
|
|
194
|
+
## 10. Hive client
|
|
195
|
+
|
|
196
|
+
- Heartbeat 60 s (signed). Includes version, uptime, pending approvals count, last run time, queue depth, bundled tokens used since last ack.
|
|
197
|
+
- Long-poll channel `GET /bee/channel` (30 s) for: OAuth callbacks, pairing status, remote commands (`restart`, `update`, `wipe`, `run_health`, `kill_switch`), plan changes.
|
|
198
|
+
- Push: `POST /push {tenant, title, body, deeplink, collapse_key}`; queued locally up to 24 h if Hive is unreachable, then dropped with a local log entry.
|
|
199
|
+
- Relay: `POST /relay/chat` with provider-agnostic payload; Hive adds its provider key, returns stream; Bee records usage; Hive meters.
|
|
200
|
+
|
|
201
|
+
## 11. Menu bar app
|
|
202
|
+
|
|
203
|
+
Menu: status line (🟢 Online · hong.tinybee.app / 🟡 Local only / 🔴 Offline), "Open setup page", "Pause all workflows", "Run health check", "Check for updates", "View logs folder", "Quit menu bar app (daemon keeps running)".
|
|
204
|
+
macOS notifications: paired, offline > 5 min (local), update installed, approval waiting (optional mirror of push).
|
|
205
|
+
|
|
206
|
+
## 12. Updates
|
|
207
|
+
|
|
208
|
+
- Manifest at `https://updates.tinybee.app/bee/stable.json` (signed, Ed25519 offline key); channels `stable | beta`.
|
|
209
|
+
- Download delta → verify → stage → apply when idle (no running runs for ≥ 2 min, or at 03:00 local) → restart service → self-test (`/health`) → if failing twice, auto-rollback and notify.
|
|
210
|
+
|
|
211
|
+
## 13. Telemetry (opt-in, default **off**)
|
|
212
|
+
|
|
213
|
+
Anonymized counters only: version, OS build, health check pass/fail by type, crash signature. Never: hostnames, email addresses, workflow names, prompts, outputs.
|
|
214
|
+
|
|
215
|
+
## 14. Edge cases & decisions
|
|
216
|
+
|
|
217
|
+
- **Mac at login screen (no user session)**: the daemon runs as a system LaunchDaemon; the app key lives in the System keychain (not the login keychain) so secrets decrypt without a logged-in user. Menu bar app simply isn't shown. FileVault: the disk is locked before first login after a cold boot, so the Bee only resumes once someone logs in — health check warns if FileVault is on and auto-login is off.
|
|
218
|
+
- **Two laptops**: v1 rejects second pairing unless user replaces. v2: multiple Bees per tenant with role routing.
|
|
219
|
+
- **Changing Wi-Fi / mobile hotspot**: tunnel reconnects automatically; nothing for the user to do.
|
|
220
|
+
- **Corporate laptop with proxy**: honour system proxy; health check reports blocked QUIC and switches to HTTP2.
|
|
221
|
+
- **Clock wrong**: fail-closed on JWT validation but keep local workflows running; show fix.
|
|
222
|
+
- **User deletes app data manually**: Bee restarts in unpaired mode, generates new key, shows QR; Hive detects new key for same tenant → prompts user to confirm replacement.
|