botrun-horse 2.30.0 → 2.34.0
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/bin/bh.mjs +37 -170
- package/bin/commands/help.mjs +30 -30
- package/{lib/flows → modules/_core}/draft-writing.mjs +1 -1
- package/{lib/flows → modules/_core}/gemini-ask.mjs +1 -1
- package/{lib/flows → modules/_core}/legal-ask.mjs +4 -4
- package/{lib/flows → modules/_core}/openai-agent.mjs +2 -2
- package/{lib/flows → modules/_core}/openrouter-ask.mjs +1 -1
- package/{bin/commands/dag-cmd.mjs → modules/dag/command.mjs} +2 -2
- package/modules/dag/index.mjs +30 -0
- package/{bin/commands/db-cmd.mjs → modules/db/command.mjs} +3 -3
- package/modules/db/index.mjs +26 -0
- package/modules/discover.mjs +43 -0
- package/{bin/commands/doc.mjs → modules/doc/command.mjs} +5 -5
- package/modules/doc/index.mjs +55 -0
- package/{lib/doc/index.mjs → modules/doc/ingest.mjs} +1 -1
- package/{lib → modules}/doc/office2text.mjs +1 -1
- package/{lib → modules}/doc/pdf2text.mjs +1 -1
- package/{lib → modules}/doc/split.mjs +1 -1
- package/{bin/commands/gemini.mjs → modules/gemini/command.mjs} +3 -3
- package/modules/gemini/index.mjs +41 -0
- package/modules/imagen/command.mjs +117 -0
- package/modules/imagen/imagen-client.mjs +239 -0
- package/modules/imagen/index.mjs +60 -0
- package/modules/imagen/server.mjs +133 -0
- package/{bin/commands/legal.mjs → modules/legal/command.mjs} +5 -5
- package/modules/legal/index.mjs +56 -0
- package/{bin/commands/nchc.mjs → modules/nchc/command.mjs} +4 -4
- package/modules/nchc/index.mjs +48 -0
- package/modules/ocr/index.mjs +17 -0
- package/{bin/commands/openrouter.mjs → modules/openrouter/command.mjs} +5 -5
- package/modules/openrouter/index.mjs +49 -0
- package/modules/portal/index.mjs +17 -0
- package/{bin/commands/search.mjs → modules/search/command.mjs} +3 -3
- package/modules/search/index.mjs +23 -0
- package/{lib/search/index.mjs → modules/search/search-lib.mjs} +1 -1
- package/{bin/commands/skill.mjs → modules/skill/command.mjs} +46 -9
- package/modules/skill/index.mjs +35 -0
- package/{lib/prompt → modules/skill}/prompt-search.mjs +1 -1
- package/{lib/prompt → modules/skill}/prompt-store.mjs +28 -11
- package/modules/skill/prompts/zero-framework/address-matching.md +22 -0
- package/modules/skill/prompts/zero-framework/data-integrity.md +15 -0
- package/modules/skill/prompts/zero-framework/data-reasonability.md +17 -0
- package/modules/skill/prompts/zero-framework/gemini-image-gen.md +20 -0
- package/modules/skill/prompts/zero-framework/gemini-search-cli.md +10 -0
- package/modules/skill/prompts/zero-framework/html-report.md +15 -0
- package/modules/skill/prompts/zero-framework/smart-cache.md +10 -0
- package/modules/skill/prompts/zero-framework/trigram-search.md +12 -0
- package/modules/skill/prompts/zero-framework/tts-format.md +6 -0
- package/modules/skill/prompts/zero-framework/watermelon-sqlite.md +8 -0
- package/{bin/commands/writing.mjs → modules/writing/command.mjs} +3 -3
- package/{lib → modules}/writing/generate.mjs +2 -2
- package/modules/writing/index.mjs +38 -0
- package/package.json +3 -1
- package/parallel-dag-todo-list/imagen-module.md +51 -0
- package/bin/commands/schema.mjs +0 -254
- package/botrun-c/.claude/skills/DOCX/351/226/261/350/256/200/346/212/200/350/203/275/SKILL.md +0 -103
- package/botrun-c/.claude/skills/DOCX/351/226/261/350/256/200/346/212/200/350/203/275/scripts/docx-to-markdown.mjs +0 -206
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/SKILL.md +0 -1093
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-branch.mjs +0 -73
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-branches.mjs +0 -77
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-checkout.mjs +0 -72
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-clone.mjs +0 -72
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-commit.mjs +0 -75
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-delete-branch.mjs +0 -75
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-delete-file.mjs +0 -72
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-diff.mjs +0 -80
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-list-tree.mjs +0 -336
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-list.mjs +0 -199
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-merge.mjs +0 -86
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-move.mjs +0 -75
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-pr-create.mjs +0 -81
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-pr-list.mjs +0 -74
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-pr-merge.mjs +0 -83
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-pr-view.mjs +0 -71
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-push.mjs +0 -71
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-read.mjs +0 -277
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-search.mjs +0 -370
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-stash.mjs +0 -116
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-sync.mjs +0 -71
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-write.mjs +0 -74
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/lib/path-validator.mjs +0 -167
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/SKILL.md +0 -605
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-create.mjs +0 -127
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-delete.mjs +0 -77
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-diff.mjs +0 -87
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-history.mjs +0 -99
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-list.mjs +0 -174
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-read.mjs +0 -214
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-restore.mjs +0 -75
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-search.mjs +0 -270
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-sync-back.mjs +0 -155
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-update.mjs +0 -100
- package/botrun-c/.claude/skills/HTML/347/224/237/346/210/220/346/212/200/350/203/275/SKILL.md +0 -414
- package/botrun-c/.claude/skills/HTML/347/224/237/346/210/220/346/212/200/350/203/275/scripts/create-project.mjs +0 -91
- package/botrun-c/.claude/skills/HTML/347/224/237/346/210/220/346/212/200/350/203/275/scripts/finalize-project.mjs +0 -162
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/SKILL.md +0 -206
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/package.json +0 -19
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/pdf-analyze.mjs +0 -309
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/pdf-compress.mjs +0 -315
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/pdf-split.mjs +0 -275
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/pdf-to-text.mjs +0 -336
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/test-pdf-scripts.mjs +0 -491
- package/botrun-c/.claude/skills/docx-to-markdown/SKILL.md +0 -76
- package/botrun-c/.claude/skills/docx-to-markdown/scripts/convert_docx.py +0 -183
- package/botrun-c/.claude/skills/gcp-coord-ml-ocr/SKILL.md +0 -133
- package/botrun-c/.claude/skills/gcp-coord-ml-ocr/scripts/ocr_processor.py +0 -381
- package/botrun-c/.claude/skills/gemini-transcribe/SKILL.md +0 -115
- package/botrun-c/.claude/skills/gemini-transcribe/scripts/transcribe.py +0 -499
- package/botrun-c/.claude/skills/nchc-transcribe/SKILL.md +0 -131
- package/botrun-c/.claude/skills/nchc-transcribe/scripts/transcribe.py +0 -522
- package/botrun-c/.claude/skills/p320-moj-review/SKILL.md +0 -200
- package/botrun-c/.claude/skills/p320-moj-review/references/guideline.md +0 -118
- package/botrun-c/.claude/skills/pdf-multimodal-processor/SKILL.md +0 -186
- package/botrun-c/.claude/skills/pdf-multimodal-processor/scripts/process_pdf.py +0 -515
- package/botrun-c/.claude/skills/ripgrep/346/220/234/345/260/213/346/212/200/350/203/275/SKILL.md +0 -81
- package/botrun-c/.claude/skills/ripgrep/346/220/234/345/260/213/346/212/200/350/203/275/scripts/package.json +0 -13
- package/botrun-c/.claude/skills/ripgrep/346/220/234/345/260/213/346/212/200/350/203/275/scripts/secure-search.mjs +0 -232
- package/botrun-c/.claude/skills/top100/351/240/230/350/242/226/351/240/220/346/270/254/346/212/200/350/203/275/SKILL.md +0 -518
- package/botrun-c/.claude/skills//345/216/273/350/255/230/345/210/245/346/212/200/350/203/275/SKILL.md +0 -125
- package/botrun-c/.claude/skills//345/233/236/346/206/266/346/212/200/350/203/275/SKILL.md +0 -123
- package/botrun-c/.claude/skills//345/233/236/346/206/266/346/212/200/350/203/275/scripts/recall.mjs +0 -339
- package/botrun-c/.claude/skills//345/234/226/347/211/207/347/224/237/346/210/220/346/212/200/350/203/275/SKILL.md +0 -156
- package/botrun-c/.claude/skills//345/234/226/347/211/207/347/224/237/346/210/220/346/212/200/350/203/275/scripts/__tests__/utils.test.mjs +0 -139
- package/botrun-c/.claude/skills//345/234/226/347/211/207/347/224/237/346/210/220/346/212/200/350/203/275/scripts/constants.mjs +0 -40
- package/botrun-c/.claude/skills//345/234/226/347/211/207/347/224/237/346/210/220/346/212/200/350/203/275/scripts/gcs-uploader.mjs +0 -195
- package/botrun-c/.claude/skills//345/234/226/347/211/207/347/224/237/346/210/220/346/212/200/350/203/275/scripts/gemini-image-client.mjs +0 -307
- package/botrun-c/.claude/skills//345/234/226/347/211/207/347/224/237/346/210/220/346/212/200/350/203/275/scripts/generate-image.mjs +0 -103
- package/botrun-c/.claude/skills//345/234/226/347/211/207/347/224/237/346/210/220/346/212/200/350/203/275/scripts/image-session-manager.mjs +0 -219
- package/botrun-c/.claude/skills//345/234/226/347/211/207/347/224/237/346/210/220/346/212/200/350/203/275/scripts/output-formatter.mjs +0 -209
- package/botrun-c/.claude/skills//345/234/226/347/211/207/347/224/237/346/210/220/346/212/200/350/203/275/scripts/package.json +0 -20
- package/botrun-c/.claude/skills//345/234/226/347/211/207/347/224/237/346/210/220/346/212/200/350/203/275/scripts/utils.mjs +0 -115
- package/botrun-c/.claude/skills//345/244/232/346/250/241/346/205/213/351/226/261/350/256/200/346/212/200/350/203/275/SKILL.md +0 -86
- package/botrun-c/.claude/skills//345/244/232/346/250/241/346/205/213/351/226/261/350/256/200/346/212/200/350/203/275/scripts/multimodal-read.mjs +0 -304
- package/botrun-c/.claude/skills//345/244/232/346/250/241/346/205/213/351/226/261/350/256/200/346/212/200/350/203/275/scripts/package.json +0 -17
- package/botrun-c/.claude/skills//345/255/265/345/214/226/346/212/200/350/203/275/SKILL.md +0 -131
- package/botrun-c/.claude/skills//345/255/265/345/214/226/346/212/200/350/203/275/scripts/skill-manager.mjs +0 -542
- package/botrun-c/.claude/skills//346/234/203/350/255/260/350/250/230/351/214/204/346/212/200/350/203/275/SKILL.md +0 -127
- package/botrun-c/.claude/skills//347/233/256/351/214/204/345/210/227/350/241/250/346/212/200/350/203/275/SKILL.md +0 -53
- package/botrun-c/.claude/skills//347/233/256/351/214/204/345/210/227/350/241/250/346/212/200/350/203/275/scripts/package.json +0 -13
- package/botrun-c/.claude/skills//347/233/256/351/214/204/345/210/227/350/241/250/346/212/200/350/203/275/scripts/tree-view.mjs +0 -149
- package/botrun-c/.claude/skills//347/264/224/346/226/207/345/255/227/345/244/232/346/252/224/346/241/210/350/256/200/345/217/226/346/212/200/350/203/275/SKILL.md +0 -82
- package/botrun-c/.claude/skills//347/264/224/346/226/207/345/255/227/345/244/232/346/252/224/346/241/210/350/256/200/345/217/226/346/212/200/350/203/275/scripts/package.json +0 -16
- package/botrun-c/.claude/skills//347/264/224/346/226/207/345/255/227/345/244/232/346/252/224/346/241/210/350/256/200/345/217/226/346/212/200/350/203/275/scripts/secure-read.mjs +0 -260
- package/botrun-c/.claude/skills//347/266/262/350/267/257/346/220/234/345/260/213/346/212/200/350/203/275/SKILL.md +0 -156
- package/botrun-c/.claude/skills//347/266/262/350/267/257/346/220/234/345/260/213/346/212/200/350/203/275/scripts/package.json +0 -16
- package/botrun-c/.claude/skills//347/266/262/350/267/257/346/220/234/345/260/213/346/212/200/350/203/275/scripts/search.js +0 -139
- package/botrun-c/.claude/skills//347/266/262/350/267/257/346/220/234/345/260/213/346/212/200/350/203/275/scripts/search.mjs +0 -272
- package/botrun-c/.claude/skills//347/266/262/350/267/257/346/220/234/345/260/213/346/212/200/350/203/275/scripts/search.ts +0 -166
- package/botrun-c/.claude/skills//350/250/230/346/206/266/346/212/200/350/203/275/SKILL.md +0 -114
- package/botrun-c/.claude/skills//350/250/230/346/206/266/346/212/200/350/203/275/scripts/remember.mjs +0 -159
- package/botrun-c/.claude/skills//350/250/230/346/206/266/346/212/200/350/203/275/scripts/test-advanced.mjs +0 -342
- package/botrun-c/.claude/skills//350/250/230/346/206/266/346/212/200/350/203/275/scripts/test.mjs +0 -430
- package/botrun-c/.claude/skills//350/252/236/351/237/263/350/275/211/346/226/207/345/255/227/346/212/200/350/203/275/SKILL.md +0 -30
- package/botrun-c/.claude/skills//350/252/236/351/237/263/350/275/211/346/226/207/345/255/227/346/212/200/350/203/275/scripts/package.json +0 -13
- package/botrun-c/.claude/skills//350/252/236/351/237/263/350/275/211/346/226/207/345/255/227/346/212/200/350/203/275/scripts/transcribe.mjs +0 -294
- package/botrun-c/.claude/skills//351/233/266/345/271/273/350/246/272/350/255/211/346/230/216/346/212/200/350/203/275/SKILL.md +0 -338
- package/botrun-c/.dockerignore +0 -131
- package/botrun-c/.dockeroptimize +0 -13
- package/botrun-c/.firebase/hosting.b3V0.cache +0 -30
- package/botrun-c/.firebaserc +0 -5
- package/botrun-c/.gcloudignore +0 -56
- package/botrun-c/.ruby-version +0 -1
- package/botrun-c/CHANGELOG.md +0 -224
- package/botrun-c/Dockerfile.gcp +0 -365
- package/botrun-c/Dockerfile.slim +0 -195
- package/botrun-c/Gemfile +0 -8
- package/botrun-c/Gemfile.lock +0 -233
- package/botrun-c/LOCAL-DEVELOPMENT-GUIDE.md +0 -393
- package/botrun-c/PLAN.md +0 -131
- package/botrun-c/README.md +0 -129
- package/botrun-c/TODO-CAPACITOR-INTEGRATION.md +0 -482
- package/botrun-c/VERIFICATION.md +0 -121
- package/botrun-c/admin/RATE_LIMIT_MANAGEMENT.md +0 -312
- package/botrun-c/admin/README.md +0 -338
- package/botrun-c/admin/botrun-billing-report-1765235244038.csv +0 -22
- package/botrun-c/admin/botrun-billing-report-1765235323089.csv +0 -22
- package/botrun-c/admin/botrun-dashboard-1765235244039.html +0 -278
- package/botrun-c/admin/botrun-dashboard-1765235323089.html +0 -278
- package/botrun-c/admin/botrun-timeseries-074xGzIKWyfKTBt1NMIj9lxi5mO2-1765235244039.html +0 -161
- package/botrun-c/admin/botrun-timeseries-074xGzIKWyfKTBt1NMIj9lxi5mO2-1765235323090.html +0 -161
- package/botrun-c/admin/check-billing.ts +0 -48
- package/botrun-c/admin/count-all-users.ts +0 -65
- package/botrun-c/admin/generate-analytics-report.ts +0 -188
- package/botrun-c/admin/jest.config.ts +0 -43
- package/botrun-c/admin/lib/__tests__/formatters.test.ts +0 -264
- package/botrun-c/admin/lib/__tests__/mocks/firebase.mock.ts +0 -112
- package/botrun-c/admin/lib/__tests__/services/UserService.test.ts +0 -83
- package/botrun-c/admin/lib/__tests__/user-resolver.test.ts +0 -439
- package/botrun-c/admin/lib/analyzers/BillingAnalyticsService.ts +0 -242
- package/botrun-c/admin/lib/analyzers/CsvExporter.ts +0 -263
- package/botrun-c/admin/lib/analyzers/HtmlChartGenerator.ts +0 -530
- package/botrun-c/admin/lib/analyzers/SpikeAnalyzer.ts +0 -608
- package/botrun-c/admin/lib/analyzers/TimeSeriesAnalyzer.ts +0 -344
- package/botrun-c/admin/lib/cli/CLIBootstrapper.ts +0 -40
- package/botrun-c/admin/lib/commands/AbstractCommand.ts +0 -69
- package/botrun-c/admin/lib/commands/AnalyticsCommand.ts +0 -215
- package/botrun-c/admin/lib/commands/ListCommand.ts +0 -85
- package/botrun-c/admin/lib/commands/QueryCommand.ts +0 -81
- package/botrun-c/admin/lib/commands/SpikeCommand.ts +0 -83
- package/botrun-c/admin/lib/domain/User.ts +0 -38
- package/botrun-c/admin/lib/firebase.ts +0 -92
- package/botrun-c/admin/lib/firestore-safe.ts +0 -105
- package/botrun-c/admin/lib/formatters.ts +0 -154
- package/botrun-c/admin/lib/rate-limit-detailed.ts +0 -355
- package/botrun-c/admin/lib/rate-limit.ts +0 -286
- package/botrun-c/admin/lib/repositories/UserRepository.ts +0 -104
- package/botrun-c/admin/lib/services/UserService.ts +0 -108
- package/botrun-c/admin/lib/types.ts +0 -56
- package/botrun-c/admin/lib/user-resolver.ts +0 -275
- package/botrun-c/admin/manage-auth-domains.js +0 -178
- package/botrun-c/admin/migrate-plan-free.sh +0 -64
- package/botrun-c/admin/package-lock.json +0 -5656
- package/botrun-c/admin/package.json +0 -28
- package/botrun-c/admin/rate-limit.sh +0 -55
- package/botrun-c/admin/remove-custom-limits.ts +0 -75
- package/botrun-c/admin/reset-rate.sh +0 -70
- package/botrun-c/admin/reset-trial.sh +0 -68
- package/botrun-c/admin/seed-trial-data.sh +0 -38
- package/botrun-c/admin/trial.sh +0 -55
- package/botrun-c/admin/tsconfig.json +0 -20
- package/botrun-c/admin/users-cli.py +0 -298
- package/botrun-c/admin/users.sh +0 -12
- package/botrun-c/admin/users.ts +0 -1321
- package/botrun-c/api/admin-tools/check-whitelist.mjs.migration-bak +0 -74
- package/botrun-c/api/admin-tools/create-user.mjs +0 -92
- package/botrun-c/api/admin-tools/create-user.mjs.migration-bak +0 -92
- package/botrun-c/api/admin-tools/firebase-auth-domains-v2.py +0 -287
- package/botrun-c/api/admin-tools/firebase-auth-domains-v2.py.migration-bak +0 -287
- package/botrun-c/api/admin-tools/init-firestore.mjs +0 -75
- package/botrun-c/api/admin-tools/init-firestore.mjs.migration-bak +0 -101
- package/botrun-c/api/admin-tools/list-users.mjs +0 -43
- package/botrun-c/api/admin-tools/list-users.mjs.migration-bak +0 -43
- package/botrun-c/api/admin-tools/manage-authorized-domains.ts +0 -255
- package/botrun-c/api/admin-tools/manage-authorized-domains.ts.migration-bak +0 -255
- package/botrun-c/api/admin-tools/setup-custom-claims.ts.migration-bak +0 -155
- package/botrun-c/api/admin-tools/test-claims.mjs +0 -69
- package/botrun-c/api/admin-tools/test-claims.mjs.migration-bak +0 -69
- package/botrun-c/api/admin-tools/update-service-urls-gcloud.mjs +0 -72
- package/botrun-c/api/admin-tools/update-service-urls-gcloud.mjs.migration-bak +0 -72
- package/botrun-c/api/admin-tools/update-service-urls-to-lb.mjs +0 -159
- package/botrun-c/api/admin-tools/update-service-urls-to-lb.mjs.migration-bak +0 -159
- package/botrun-c/api/admin-tools/update-service-urls.mjs +0 -82
- package/botrun-c/api/admin-tools/update-service-urls.mjs.migration-bak +0 -82
- package/botrun-c/api/package-lock.json +0 -5031
- package/botrun-c/api/package.json +0 -63
- package/botrun-c/api/pnpm-lock.yaml +0 -4157
- package/botrun-c/api/rate-limit-export-1763620678737.csv +0 -79
- package/botrun-c/api/scripts/README-migrate-plan-free.md +0 -197
- package/botrun-c/api/scripts/check-users.ts +0 -45
- package/botrun-c/api/scripts/delete-firestore-docs.js +0 -43
- package/botrun-c/api/scripts/dump-subscriptions.ts +0 -395
- package/botrun-c/api/scripts/list-all-users.ts +0 -65
- package/botrun-c/api/scripts/migrate-plan-free-rpd-16to32.ts +0 -262
- package/botrun-c/api/scripts/migrate-plan-names-to-lite-max.ts +0 -269
- package/botrun-c/api/scripts/query-user-info.ts +0 -304
- package/botrun-c/api/scripts/reset-rate-limit.ts +0 -206
- package/botrun-c/api/scripts/reset-trial-subscription.ts +0 -166
- package/botrun-c/api/scripts/rollback-plan-names-from-lite-max.ts +0 -139
- package/botrun-c/api/scripts/seed-rate-limit-test-data.ts +0 -114
- package/botrun-c/api/scripts/seed-subscription-test-data.ts +0 -173
- package/botrun-c/api/scripts/test-rate-limit-message.ts +0 -108
- package/botrun-c/api/test-billing-write.ts +0 -103
- package/botrun-c/api/test-billing.ts +0 -81
- package/botrun-c/api/test-chat-upload.sh +0 -162
- package/botrun-c/api/test-nchc-whisper.ts +0 -87
- package/botrun-c/api/test-skills-loading.js +0 -77
- package/botrun-c/api/test-skills-symlink.js +0 -118
- package/botrun-c/api/test-upload-multimodal.sh +0 -167
- package/botrun-c/api/tsconfig.json +0 -27
- package/botrun-c/api/verify-form-2-1.mjs +0 -229
- package/botrun-c/api/vitest.config.ts +0 -9
- package/botrun-c/appium-capabilities.json +0 -20
- package/botrun-c/cors.json +0 -26
- package/botrun-c/delete-old.sh +0 -44
- package/botrun-c/design/google-drive/01-architecture.md +0 -186
- package/botrun-c/design/google-drive/02-api-design.md +0 -314
- package/botrun-c/design/google-drive/03-frontend-design.md +0 -278
- package/botrun-c/design/google-drive/04-skill-design.md +0 -384
- package/botrun-c/design/google-drive/05-test-plan.md +0 -507
- package/botrun-c/design/google-drive/README.md +0 -32
- package/botrun-c/dev/mcp-token-calculator/README.md +0 -92
- package/botrun-c/dev/mcp-token-calculator/RESULTS.md +0 -188
- package/botrun-c/dev/mcp-token-calculator/calculate-current-tokens.ts +0 -369
- package/botrun-c/dev/mcp-token-calculator/calculate-mcp-tokens.ts +0 -464
- package/botrun-c/dev/mcp-token-calculator/optimization-proposals.ts +0 -316
- package/botrun-c/dev/mcp-token-calculator/package-lock.json +0 -599
- package/botrun-c/dev/mcp-token-calculator/package.json +0 -22
- package/botrun-c/dev/mcp-token-calculator/test-all-schemas.ts +0 -314
- package/botrun-c/dev/mcp-token-calculator/test-schema-correctness.ts +0 -221
- package/botrun-c/dev/mcp-token-calculator/verify-optimization.ts +0 -159
- package/botrun-c/fastlane/ANDROID-DEPLOYMENT-SETUP.md +0 -825
- package/botrun-c/fastlane/IOS-DEPLOYMENT-SETUP.md +0 -431
- package/botrun-c/fastlane/Pluginfile +0 -5
- package/botrun-c/fastlane/QUICK-START.md +0 -133
- package/botrun-c/fastlane/README.md +0 -424
- package/botrun-c/fastlane/RUBY-SETUP.md +0 -449
- package/botrun-c/fastlane/android/Appfile +0 -11
- package/botrun-c/fastlane/android/Fastfile +0 -240
- package/botrun-c/firebase.json +0 -46
- package/botrun-c/firestore-init-data.json +0 -40
- package/botrun-c/firestore.indexes.json +0 -55
- package/botrun-c/firestore.rules +0 -53
- package/botrun-c/fix-codex-permissions.sh +0 -56
- package/botrun-c/gcs-lifecycle-30day-retention.json +0 -12
- package/botrun-c/html-architecture/architecture/deployment.html +0 -664
- package/botrun-c/html-architecture/architecture/index.html +0 -309
- package/botrun-c/html-architecture/architecture/styles.css +0 -500
- package/botrun-c/html-architecture/architecture/system-components.html +0 -538
- package/botrun-c/html-architecture/architecture/user-flow.html +0 -370
- package/botrun-c/mobile-android/FIREBASE-AUTH-SETUP.md +0 -302
- package/botrun-c/mobile-android/WSL-ANDROID-SETUP.md +0 -252
- package/botrun-c/mobile-android/android/app/build.gradle +0 -75
- package/botrun-c/mobile-android/android/app/capacitor.build.gradle +0 -31
- package/botrun-c/mobile-android/android/app/proguard-rules.pro +0 -21
- package/botrun-c/mobile-android/android/build.gradle +0 -29
- package/botrun-c/mobile-android/android/capacitor.settings.gradle +0 -42
- package/botrun-c/mobile-android/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/botrun-c/mobile-android/android/gradle/wrapper/gradle-wrapper.properties +0 -7
- package/botrun-c/mobile-android/android/gradle.properties +0 -22
- package/botrun-c/mobile-android/android/gradlew +0 -252
- package/botrun-c/mobile-android/android/gradlew.bat +0 -94
- package/botrun-c/mobile-android/android/settings.gradle +0 -5
- package/botrun-c/mobile-android/android/variables.gradle +0 -16
- package/botrun-c/mobile-android/capacitor.config.ts +0 -44
- package/botrun-c/mobile-android/fastlane/Appfile +0 -11
- package/botrun-c/mobile-android/fastlane/Fastfile +0 -202
- package/botrun-c/mobile-android/fastlane/README.md +0 -96
- package/botrun-c/mobile-android/google-services.json.template +0 -39
- package/botrun-c/mobile-android/package.json +0 -32
- package/botrun-c/mobile-android/resources/icon.png +0 -0
- package/botrun-c/mobile-android/tsconfig.json +0 -15
- package/botrun-c/mobile-ios/.ruby-version +0 -1
- package/botrun-c/mobile-ios/BUILD-LOG.md +0 -82
- package/botrun-c/mobile-ios/Gemfile +0 -4
- package/botrun-c/mobile-ios/Gemfile.lock +0 -299
- package/botrun-c/mobile-ios/GoogleService-Info.plist.template +0 -34
- package/botrun-c/mobile-ios/IOS-PERMISSIONS.md +0 -80
- package/botrun-c/mobile-ios/QUICK-START.md +0 -189
- package/botrun-c/mobile-ios/README.md +0 -231
- package/botrun-c/mobile-ios/capacitor.config.ts +0 -46
- package/botrun-c/mobile-ios/fastlane/Fastfile +0 -326
- package/botrun-c/mobile-ios/fastlane/README.md +0 -88
- package/botrun-c/mobile-ios/ios/App/App/App.entitlements +0 -10
- package/botrun-c/mobile-ios/ios/App/App/AppDelegate.swift +0 -49
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png +0 -0
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/AppIcon.appiconset/Contents.json +0 -14
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Contents.json +0 -6
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +0 -56
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Splash.imageset/Default@1x~universal~anyany-dark.png +0 -0
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Splash.imageset/Default@1x~universal~anyany.png +0 -0
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Splash.imageset/Default@2x~universal~anyany-dark.png +0 -0
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Splash.imageset/Default@2x~universal~anyany.png +0 -0
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Splash.imageset/Default@3x~universal~anyany-dark.png +0 -0
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Splash.imageset/Default@3x~universal~anyany.png +0 -0
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-1.png +0 -0
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732-2.png +0 -0
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Splash.imageset/splash-2732x2732.png +0 -0
- package/botrun-c/mobile-ios/ios/App/App/Base.lproj/LaunchScreen.storyboard +0 -32
- package/botrun-c/mobile-ios/ios/App/App/Base.lproj/Main.storyboard +0 -19
- package/botrun-c/mobile-ios/ios/App/App/Info.plist +0 -72
- package/botrun-c/mobile-ios/ios/App/App.xcodeproj/project.pbxproj +0 -446
- package/botrun-c/mobile-ios/ios/App/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme +0 -78
- package/botrun-c/mobile-ios/ios/App/App.xcworkspace/contents.xcworkspacedata +0 -10
- package/botrun-c/mobile-ios/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/botrun-c/mobile-ios/ios/App/Podfile +0 -52
- package/botrun-c/mobile-ios/ios/App/Podfile.lock +0 -205
- package/botrun-c/mobile-ios/ios/App/add_plist.rb +0 -30
- package/botrun-c/mobile-ios/ios/App/fix_plist_path.rb +0 -22
- package/botrun-c/mobile-ios/package.json +0 -29
- package/botrun-c/mobile-ios/resources/icon.png +0 -0
- package/botrun-c/mobile-ios/run-simulator.sh +0 -34
- package/botrun-c/mobile-ios/screenshot-after-clean-rebuild.png +0 -0
- package/botrun-c/mobile-ios/screenshot-final-version.png +0 -0
- package/botrun-c/mobile-ios/screenshot-simulator.png +0 -0
- package/botrun-c/mobile-ios/screenshot-version-1009.png +0 -0
- package/botrun-c/mobile-ios/screenshot-with-version.png +0 -0
- package/botrun-c/mobile-ios/screenshot-working.png +0 -0
- package/botrun-c/mobile-ios/setup-ios.sh +0 -106
- package/botrun-c/mobile-ios/tsconfig.json +0 -16
- package/botrun-c/org-policy-allow-all-users.yaml +0 -3
- package/botrun-c/package.json +0 -68
- package/botrun-c/pnpm-lock.yaml +0 -10198
- package/botrun-c/pnpm-workspace.yaml +0 -6
- package/botrun-c/prompts/BOTRUN-1.md +0 -13
- package/botrun-c/prompts/BOTRUN-2.md +0 -70
- package/botrun-c/prompts/BOTRUN-3.md +0 -139
- package/botrun-c/prototypes/firestore-gax-debug/package-lock.json +0 -1204
- package/botrun-c/prototypes/firestore-gax-debug/package.json +0 -12
- package/botrun-c/prototypes/firestore-gax-debug/pnpm-workspace.yaml +0 -2
- package/botrun-c/prototypes/firestore-gax-debug/test.js +0 -98
- package/botrun-c/prototypes/taiwan-haiku/README.md +0 -93
- package/botrun-c/prototypes/taiwan-haiku/index.ts +0 -139
- package/botrun-c/prototypes/taiwan-haiku/package.json +0 -23
- package/botrun-c/prototypes/taiwan-haiku/pnpm-lock.yaml +0 -730
- package/botrun-c/prototypes/taiwan-haiku/test-vertex-direct.ts +0 -83
- package/botrun-c/prototypes/taiwan-haiku/tsconfig.json +0 -18
- package/botrun-c/prototypes/web-search/FINDINGS-STAGE-1.md +0 -48
- package/botrun-c/prototypes/web-search/README.md +0 -46
- package/botrun-c/prototypes/web-search/VERIFICATION-REPORT.md +0 -310
- package/botrun-c/prototypes/web-search/package-lock.json +0 -595
- package/botrun-c/prototypes/web-search/package.json +0 -18
- package/botrun-c/prototypes/web-search/stage-1.1-basic-connection.js +0 -123
- package/botrun-c/prototypes/web-search/stage-1.2-with-websearch.js +0 -154
- package/botrun-c/prototypes/web-search/stage-1.3-search-query.js +0 -192
- package/botrun-c/prototypes/web-search/stage-2-agent-sdk-websearch.js +0 -265
- package/botrun-c/runtime-scripts/env-detect.sh +0 -64
- package/botrun-c/scripts/github-collaborator-manager.sh +0 -297
- package/botrun-c/scripts/github-collaborator-manager.ts +0 -325
- package/botrun-c/scripts/manage-collaborators.sh +0 -91
- package/botrun-c/scripts/setup-secrets.sh +0 -202
- package/botrun-c/scripts/stress-test-17-users.sh +0 -113
- package/botrun-c/scripts/stress-test-api.sh +0 -119
- package/botrun-c/scripts/stress-test-full-report.sh +0 -385
- package/botrun-c/specs/infra-vm/design.md +0 -0
- package/botrun-c/specs/share-skill/design.md +0 -1146
- package/botrun-c/specs/share-skill/tasks.md +0 -444
- package/botrun-c/stress-test-results/20260121-162630/config.json +0 -7
- package/botrun-c/stress-test-results/20260121-162630/user-1-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162630/user-1-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162630/user-1.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/config.json +0 -7
- package/botrun-c/stress-test-results/20260121-162646/user-1-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-1-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-1.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-10-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-10-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-10.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-11-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-11-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-11.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-12-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-12-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-12.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-13-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-13-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-13.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-14-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-14-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-14.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-15-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-15-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-15.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-16-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-16-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-16.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-17-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-17-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-17.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-2-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-2-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-2.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-3-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-3-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-3.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-4-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-4-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-4.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-5-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-5-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-5.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-6-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-6-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-6.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-7-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-7-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-7.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-8-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-8-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-8.json +0 -2
- package/botrun-c/stress-test-results/20260121-162646/user-9-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-9-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-162646/user-9.json +0 -2
- package/botrun-c/stress-test-results/20260121-163148/REPORT.html +0 -344
- package/botrun-c/stress-test-results/20260121-163148/REPORT.md +0 -93
- package/botrun-c/stress-test-results/20260121-163148/REPORT.pdf +0 -0
- package/botrun-c/stress-test-results/20260121-163148/config.json +0 -7
- package/botrun-c/stress-test-results/20260121-163148/summary.json +0 -26
- package/botrun-c/stress-test-results/20260121-163148/user-1-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-1-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-1.json +0 -206
- package/botrun-c/stress-test-results/20260121-163148/user-10-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-10-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-10.json +0 -110
- package/botrun-c/stress-test-results/20260121-163148/user-11-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-11-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-11.json +0 -104
- package/botrun-c/stress-test-results/20260121-163148/user-12-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-12-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-12.json +0 -98
- package/botrun-c/stress-test-results/20260121-163148/user-13-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-13-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-13.json +0 -68
- package/botrun-c/stress-test-results/20260121-163148/user-14-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-14-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-14.json +0 -116
- package/botrun-c/stress-test-results/20260121-163148/user-15-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-15-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-15.json +0 -131
- package/botrun-c/stress-test-results/20260121-163148/user-16-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-16-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-16.json +0 -110
- package/botrun-c/stress-test-results/20260121-163148/user-17-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-17-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-17.json +0 -116
- package/botrun-c/stress-test-results/20260121-163148/user-2-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-2-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-2.json +0 -98
- package/botrun-c/stress-test-results/20260121-163148/user-3-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-3-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-3.json +0 -62
- package/botrun-c/stress-test-results/20260121-163148/user-4-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-4-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-4.json +0 -113
- package/botrun-c/stress-test-results/20260121-163148/user-5-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-5-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-5.json +0 -83
- package/botrun-c/stress-test-results/20260121-163148/user-6-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-6-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-6.json +0 -125
- package/botrun-c/stress-test-results/20260121-163148/user-7-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-7-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-7.json +0 -62
- package/botrun-c/stress-test-results/20260121-163148/user-8-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-8-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-8.json +0 -41
- package/botrun-c/stress-test-results/20260121-163148/user-9-status.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-9-timing.txt +0 -1
- package/botrun-c/stress-test-results/20260121-163148/user-9.json +0 -53
- package/botrun-c/test-merge.md +0 -1
- package/botrun-c/version.txt +0 -1
- package/botrun-c/web/.version +0 -1
- package/botrun-c/web/ALLOW-PUBLIC-ACCESS.md +0 -57
- package/botrun-c/web/FINAL-SETUP-STEPS.md +0 -71
- package/botrun-c/web/FIREBASE-MANUAL-STEPS.md +0 -41
- package/botrun-c/web/QUICK-SETUP-HELPER.md +0 -79
- package/botrun-c/web/README.md +0 -162
- package/botrun-c/web/__tests__/image-extractor.test.ts +0 -147
- package/botrun-c/web/__tests__/useGitHub.test.ts +0 -245
- package/botrun-c/web/app/favicon.ico +0 -0
- package/botrun-c/web/app/globals.css +0 -215
- package/botrun-c/web/app/image-preview/page.tsx +0 -213
- package/botrun-c/web/app/layout.tsx +0 -46
- package/botrun-c/web/app/page.tsx +0 -45
- package/botrun-c/web/components/CapacitorProvider.tsx +0 -43
- package/botrun-c/web/components/ChatPage.tsx +0 -1736
- package/botrun-c/web/components/ConversationList.tsx +0 -237
- package/botrun-c/web/components/ConversationListItem.tsx +0 -121
- package/botrun-c/web/components/LoginPage.tsx +0 -212
- package/botrun-c/web/components/Providers.tsx +0 -12
- package/botrun-c/web/components/StatusBarProvider.tsx +0 -16
- package/botrun-c/web/components/attachment-preview.tsx +0 -193
- package/botrun-c/web/components/botrun-incubator/BotrunIncubator.tsx +0 -266
- package/botrun-c/web/components/botrun-incubator/index.ts +0 -1
- package/botrun-c/web/components/chat-input.tsx +0 -1251
- package/botrun-c/web/components/chat-message.tsx +0 -598
- package/botrun-c/web/components/drop-zone.tsx +0 -143
- package/botrun-c/web/components/gdrive/gdrive-add-dialog.tsx +0 -254
- package/botrun-c/web/components/gdrive/gdrive-drawer.tsx +0 -236
- package/botrun-c/web/components/gdrive/gdrive-selector.tsx +0 -226
- package/botrun-c/web/components/gdrive/index.ts +0 -7
- package/botrun-c/web/components/generated-image-card.tsx +0 -363
- package/botrun-c/web/components/github/GitHubConnect.tsx +0 -366
- package/botrun-c/web/components/github/index.ts +0 -2
- package/botrun-c/web/components/import-skill-dialog.tsx +0 -208
- package/botrun-c/web/components/scroll-to-bottom-button.tsx +0 -90
- package/botrun-c/web/components/share-skill-dialog.tsx +0 -175
- package/botrun-c/web/components/skills-editor.tsx +0 -443
- package/botrun-c/web/components/skills-manager-drawer.tsx +0 -586
- package/botrun-c/web/components/smart-button-group.tsx +0 -132
- package/botrun-c/web/config/smart-buttons.ts +0 -295
- package/botrun-c/web/config/welcome-messages.ts +0 -29
- package/botrun-c/web/contexts/AuthContext.tsx +0 -220
- package/botrun-c/web/hooks/use-toast.ts +0 -187
- package/botrun-c/web/hooks/useAppStoreUpdate.ts +0 -356
- package/botrun-c/web/hooks/useAppVersion.ts +0 -113
- package/botrun-c/web/hooks/useAttachments.ts +0 -269
- package/botrun-c/web/hooks/useAuthToken.ts +0 -59
- package/botrun-c/web/hooks/useAutoWelcome.ts +0 -89
- package/botrun-c/web/hooks/useCapacitorPlatform.ts +0 -113
- package/botrun-c/web/hooks/useCapawesomeLiveUpdate.ts +0 -149
- package/botrun-c/web/hooks/useClaudeModel.ts +0 -118
- package/botrun-c/web/hooks/useConversation.ts +0 -115
- package/botrun-c/web/hooks/useConversations.ts +0 -235
- package/botrun-c/web/hooks/useGdriveFolders.ts +0 -199
- package/botrun-c/web/hooks/useGdriveSync.ts +0 -107
- package/botrun-c/web/hooks/useGitHub.ts +0 -409
- package/botrun-c/web/hooks/useScrollToBottom.ts +0 -150
- package/botrun-c/web/hooks/useStatusBar.ts +0 -42
- package/botrun-c/web/hooks/useUserPlan.ts +0 -153
- package/botrun-c/web/lib/api-config.ts +0 -162
- package/botrun-c/web/lib/api-url.ts +0 -62
- package/botrun-c/web/lib/api.ts +0 -105
- package/botrun-c/web/lib/attachment-utils.ts +0 -168
- package/botrun-c/web/lib/build-version.ts +0 -11
- package/botrun-c/web/lib/clipboard-utils.ts +0 -199
- package/botrun-c/web/lib/constants.ts +0 -62
- package/botrun-c/web/lib/conversation-storage.ts +0 -324
- package/botrun-c/web/lib/firebase-capacitor.ts +0 -135
- package/botrun-c/web/lib/firebase.ts +0 -137
- package/botrun-c/web/lib/firestore-auth.ts +0 -61
- package/botrun-c/web/lib/firestore-auth.ts.migration-bak +0 -319
- package/botrun-c/web/lib/image-extractor.ts +0 -156
- package/botrun-c/web/lib/path-utils.ts +0 -48
- package/botrun-c/web/lib/rehype-del-to-mark.ts +0 -19
- package/botrun-c/web/lib/upload-service.ts +0 -326
- package/botrun-c/web/lib/utils.ts +0 -6
- package/botrun-c/web/next.config.js +0 -49
- package/botrun-c/web/package-lock.json +0 -6711
- package/botrun-c/web/package.json +0 -63
- package/botrun-c/web/postcss.config.js +0 -6
- package/botrun-c/web/public/apple_icon.png +0 -0
- package/botrun-c/web/public/google_icon.png +0 -0
- package/botrun-c/web/public/logo-48-small.png +0 -0
- package/botrun-c/web/public/logo-48.png +0 -0
- package/botrun-c/web/scripts/generate-version.js +0 -36
- package/botrun-c/web/scripts/update-build-version.js +0 -41
- package/botrun-c/web/tailwind.config.ts +0 -80
- package/botrun-c/web/test-welcome-message.mjs +0 -115
- package/botrun-c/web/tsconfig.json +0 -42
- package/botrun-c/web/types/agent.ts +0 -6
- package/botrun-c/web/types/attachment.ts +0 -39
- package/botrun-c/web/types/conversation.ts +0 -68
- package/botrun-c/web/types/flutter.d.ts +0 -6
- package/botrun-c/web/types/project.ts +0 -41
- package/botrun-c/web/types/skills.ts +0 -13
- package/botrun-c/web//350/250/272/346/226/267-Skills-/345/211/215/347/253/257/351/241/257/347/244/272/345/225/217/351/241/214.md +0 -83
- package/lib/writing/index.mjs +0 -5
- /package/{lib/core → modules/_core}/adapters/base.mjs +0 -0
- /package/{lib/core → modules/_core}/adapters/claude.mjs +0 -0
- /package/{lib/core → modules/_core}/adapters/gemini-api.mjs +0 -0
- /package/{lib/core → modules/_core}/adapters/gemini-shared.mjs +0 -0
- /package/{lib/core → modules/_core}/adapters/gemini-vertex.mjs +0 -0
- /package/{lib/core → modules/_core}/adapters/local.mjs +0 -0
- /package/{lib/core → modules/_core}/adapters/nchc.mjs +0 -0
- /package/{lib/core → modules/_core}/adapters/openai-shared.mjs +0 -0
- /package/{lib/core → modules/_core}/adapters/openrouter.mjs +0 -0
- /package/{lib/core → modules/_core}/ai-cache.mjs +0 -0
- /package/{lib/core → modules/_core}/ai-router.mjs +0 -0
- /package/{lib/core → modules/_core}/cli-utils.mjs +0 -0
- /package/{lib/core → modules/_core}/dag.mjs +0 -0
- /package/{lib/core → modules/_core}/db.mjs +0 -0
- /package/{lib/core → modules/_core}/env.mjs +0 -0
- /package/{lib/flows → modules/_core}/hatch-portal.mjs +0 -0
- /package/{lib/core → modules/_core}/llm.mjs +0 -0
- /package/{lib/flows → modules/_core}/opencode-agent.mjs +0 -0
- /package/{lib/core → modules/_core}/paths.mjs +0 -0
- /package/{lib/core → modules/_core}/proxy.mjs +0 -0
- /package/{lib/flows → modules/_core}/review-doc.mjs +0 -0
- /package/{lib → modules/_core}/tools/fs-tools.mjs +0 -0
- /package/{lib → modules/_core}/tools/index.mjs +0 -0
- /package/{lib/core → modules/_core}/watermelon.mjs +0 -0
- /package/{lib/ocr/index.mjs → modules/ocr/ocr-lib.mjs} +0 -0
- /package/{lib → modules}/portal/hatch.mjs +0 -0
- /package/{lib/portal/index.mjs → modules/portal/portal-lib.mjs} +0 -0
- /package/{lib → modules}/search/crawler.mjs +0 -0
- /package/{lib/prompt → modules/skill}/prompts/zero-framework/coding.md +0 -0
- /package/{lib/prompt → modules/skill}/prompts/zero-framework/fullstack.md +0 -0
- /package/{lib/prompt → modules/skill}/prompts/zero-framework/search.md +0 -0
- /package/{lib/prompt → modules/skill}/prompts/zero-framework/segment.md +0 -0
- /package/{lib/prompt → modules/skill}/prompts/zero-framework/slice.md +0 -0
- /package/{lib → modules}/writing/generators/nstc-generators.mjs +0 -0
- /package/{lib → modules}/writing/generators/nstc-top5.mjs +0 -0
- /package/{lib → modules}/writing/layouts/nstc-layout.mjs +0 -0
- /package/{lib → modules}/writing/renderer.mjs +0 -0
|
@@ -1,366 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* GitHubConnect - GitHub 連結管理組件
|
|
5
|
-
*
|
|
6
|
-
* 功能:
|
|
7
|
-
* - 顯示 GitHub 連結狀態
|
|
8
|
-
* - 連結/中斷 GitHub
|
|
9
|
-
* - 管理已連結的 Repositories
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import React, { useState } from 'react';
|
|
13
|
-
import { Button } from '@/components/ui/button';
|
|
14
|
-
import { useGitHub, type ConnectedRepo, type GitHubRepoInfo } from '@/hooks/useGitHub';
|
|
15
|
-
import { useAuthToken } from '@/hooks/useAuthToken';
|
|
16
|
-
|
|
17
|
-
// ============ Icons ============
|
|
18
|
-
|
|
19
|
-
const GitHubIcon = () => (
|
|
20
|
-
<svg className="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
|
|
21
|
-
<path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
|
|
22
|
-
</svg>
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
const CheckIcon = () => (
|
|
26
|
-
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
27
|
-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
|
|
28
|
-
</svg>
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
const RefreshIcon = () => (
|
|
32
|
-
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
33
|
-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
|
34
|
-
</svg>
|
|
35
|
-
);
|
|
36
|
-
|
|
37
|
-
const ExternalLinkIcon = () => (
|
|
38
|
-
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
39
|
-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" />
|
|
40
|
-
</svg>
|
|
41
|
-
);
|
|
42
|
-
|
|
43
|
-
const TrashIcon = () => (
|
|
44
|
-
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
45
|
-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
|
46
|
-
</svg>
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
const DownloadIcon = () => (
|
|
50
|
-
<svg className="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
51
|
-
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4" />
|
|
52
|
-
</svg>
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
// ============ Sub Components ============
|
|
56
|
-
|
|
57
|
-
interface RepoCardProps {
|
|
58
|
-
repo: ConnectedRepo;
|
|
59
|
-
onSync: () => void;
|
|
60
|
-
onDelete: () => void;
|
|
61
|
-
isLoading?: boolean;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
const RepoCard: React.FC<RepoCardProps> = ({ repo, onSync, onDelete, isLoading }) => {
|
|
65
|
-
const statusColors: Record<string, string> = {
|
|
66
|
-
cloned: 'bg-green-100 text-green-800',
|
|
67
|
-
cloning: 'bg-blue-100 text-blue-800',
|
|
68
|
-
syncing: 'bg-blue-100 text-blue-800',
|
|
69
|
-
pending: 'bg-yellow-100 text-yellow-800',
|
|
70
|
-
error: 'bg-red-100 text-red-800',
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
const statusLabels: Record<string, string> = {
|
|
74
|
-
cloned: '已同步',
|
|
75
|
-
cloning: 'Clone 中...',
|
|
76
|
-
syncing: '同步中...',
|
|
77
|
-
pending: '等待中',
|
|
78
|
-
error: '錯誤',
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
return (
|
|
82
|
-
<div className="flex items-center justify-between p-3 border rounded-lg hover:bg-gray-50 transition-colors">
|
|
83
|
-
<div className="flex-1 min-w-0">
|
|
84
|
-
<div className="flex items-center gap-2">
|
|
85
|
-
<span className="font-medium text-sm truncate">{repo.repoFullName}</span>
|
|
86
|
-
<span className={`px-2 py-0.5 rounded-full text-xs ${statusColors[repo.status]}`}>
|
|
87
|
-
{statusLabels[repo.status]}
|
|
88
|
-
</span>
|
|
89
|
-
</div>
|
|
90
|
-
<div className="flex items-center gap-2 mt-1 text-xs text-gray-500">
|
|
91
|
-
<span>分支: {repo.currentBranch}</span>
|
|
92
|
-
{repo.lastSyncAt && (
|
|
93
|
-
<span>• 上次同步: {new Date(repo.lastSyncAt).toLocaleString('zh-TW')}</span>
|
|
94
|
-
)}
|
|
95
|
-
</div>
|
|
96
|
-
{repo.error && (
|
|
97
|
-
<div className="mt-1 text-xs text-red-600">
|
|
98
|
-
錯誤: {repo.error.message}
|
|
99
|
-
</div>
|
|
100
|
-
)}
|
|
101
|
-
</div>
|
|
102
|
-
<div className="flex items-center gap-1 ml-2">
|
|
103
|
-
<Button
|
|
104
|
-
variant="ghost"
|
|
105
|
-
size="icon"
|
|
106
|
-
onClick={onSync}
|
|
107
|
-
disabled={isLoading || repo.status === 'syncing' || repo.status === 'cloning'}
|
|
108
|
-
title="同步"
|
|
109
|
-
>
|
|
110
|
-
<RefreshIcon />
|
|
111
|
-
</Button>
|
|
112
|
-
<a
|
|
113
|
-
href={`https://github.com/${repo.repoFullName}`}
|
|
114
|
-
target="_blank"
|
|
115
|
-
rel="noopener noreferrer"
|
|
116
|
-
className="p-2 hover:bg-gray-100 rounded-md transition-colors"
|
|
117
|
-
title="在 GitHub 開啟"
|
|
118
|
-
>
|
|
119
|
-
<ExternalLinkIcon />
|
|
120
|
-
</a>
|
|
121
|
-
<Button
|
|
122
|
-
variant="ghost"
|
|
123
|
-
size="icon"
|
|
124
|
-
onClick={onDelete}
|
|
125
|
-
disabled={isLoading}
|
|
126
|
-
className="text-red-600 hover:text-red-700 hover:bg-red-50"
|
|
127
|
-
title="移除"
|
|
128
|
-
>
|
|
129
|
-
<TrashIcon />
|
|
130
|
-
</Button>
|
|
131
|
-
</div>
|
|
132
|
-
</div>
|
|
133
|
-
);
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
interface AvailableRepoCardProps {
|
|
137
|
-
repo: GitHubRepoInfo;
|
|
138
|
-
onClone: () => void;
|
|
139
|
-
isLoading?: boolean;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
const AvailableRepoCard: React.FC<AvailableRepoCardProps> = ({ repo, onClone, isLoading }) => {
|
|
143
|
-
return (
|
|
144
|
-
<div className="flex items-center justify-between p-3 border rounded-lg hover:bg-gray-50 transition-colors">
|
|
145
|
-
<div className="flex-1 min-w-0">
|
|
146
|
-
<div className="flex items-center gap-2">
|
|
147
|
-
<span className="font-medium text-sm truncate">{repo.fullName}</span>
|
|
148
|
-
{repo.private && (
|
|
149
|
-
<span className="px-2 py-0.5 rounded-full text-xs bg-gray-100 text-gray-600">
|
|
150
|
-
私有
|
|
151
|
-
</span>
|
|
152
|
-
)}
|
|
153
|
-
</div>
|
|
154
|
-
<div className="text-xs text-gray-500 mt-1">
|
|
155
|
-
預設分支: {repo.defaultBranch}
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
<Button
|
|
159
|
-
variant="outline"
|
|
160
|
-
size="sm"
|
|
161
|
-
onClick={onClone}
|
|
162
|
-
disabled={isLoading}
|
|
163
|
-
className="ml-2"
|
|
164
|
-
>
|
|
165
|
-
<DownloadIcon />
|
|
166
|
-
<span className="ml-1">Clone</span>
|
|
167
|
-
</Button>
|
|
168
|
-
</div>
|
|
169
|
-
);
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
// ============ Main Component ============
|
|
173
|
-
|
|
174
|
-
export function GitHubConnect() {
|
|
175
|
-
const authToken = useAuthToken();
|
|
176
|
-
const {
|
|
177
|
-
connected,
|
|
178
|
-
loading,
|
|
179
|
-
error,
|
|
180
|
-
connectedRepos,
|
|
181
|
-
availableRepos,
|
|
182
|
-
connect,
|
|
183
|
-
disconnect,
|
|
184
|
-
refresh,
|
|
185
|
-
cloneRepo,
|
|
186
|
-
syncRepo,
|
|
187
|
-
deleteRepo,
|
|
188
|
-
} = useGitHub(authToken ?? undefined);
|
|
189
|
-
|
|
190
|
-
const [actionLoading, setActionLoading] = useState(false);
|
|
191
|
-
|
|
192
|
-
const handleDisconnect = async () => {
|
|
193
|
-
if (!confirm('確定要中斷 GitHub 連結嗎?這會移除所有已 Clone 的 Repositories。')) {
|
|
194
|
-
return;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
try {
|
|
198
|
-
setActionLoading(true);
|
|
199
|
-
await disconnect();
|
|
200
|
-
} catch (err) {
|
|
201
|
-
console.error('Disconnect failed:', err);
|
|
202
|
-
} finally {
|
|
203
|
-
setActionLoading(false);
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
const handleClone = async (repoFullName: string) => {
|
|
208
|
-
try {
|
|
209
|
-
setActionLoading(true);
|
|
210
|
-
await cloneRepo(repoFullName);
|
|
211
|
-
} catch (err) {
|
|
212
|
-
console.error('Clone failed:', err);
|
|
213
|
-
} finally {
|
|
214
|
-
setActionLoading(false);
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
|
|
218
|
-
const handleSync = async (repoFullName: string) => {
|
|
219
|
-
try {
|
|
220
|
-
setActionLoading(true);
|
|
221
|
-
await syncRepo(repoFullName);
|
|
222
|
-
} catch (err) {
|
|
223
|
-
console.error('Sync failed:', err);
|
|
224
|
-
} finally {
|
|
225
|
-
setActionLoading(false);
|
|
226
|
-
}
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
const handleDelete = async (repoFullName: string) => {
|
|
230
|
-
if (!confirm(`確定要移除 ${repoFullName} 嗎?`)) {
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
try {
|
|
235
|
-
setActionLoading(true);
|
|
236
|
-
await deleteRepo(repoFullName);
|
|
237
|
-
} catch (err) {
|
|
238
|
-
console.error('Delete failed:', err);
|
|
239
|
-
} finally {
|
|
240
|
-
setActionLoading(false);
|
|
241
|
-
}
|
|
242
|
-
};
|
|
243
|
-
|
|
244
|
-
if (loading) {
|
|
245
|
-
return (
|
|
246
|
-
<div className="p-4">
|
|
247
|
-
<div className="animate-pulse">
|
|
248
|
-
<div className="h-4 bg-gray-200 rounded w-1/3 mb-4"></div>
|
|
249
|
-
<div className="h-10 bg-gray-200 rounded mb-2"></div>
|
|
250
|
-
<div className="h-10 bg-gray-200 rounded"></div>
|
|
251
|
-
</div>
|
|
252
|
-
</div>
|
|
253
|
-
);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
return (
|
|
257
|
-
<div className="space-y-6">
|
|
258
|
-
{/* Header */}
|
|
259
|
-
<div className="flex items-center justify-between">
|
|
260
|
-
<h3 className="text-lg font-medium flex items-center gap-2">
|
|
261
|
-
<GitHubIcon />
|
|
262
|
-
GitHub 連結
|
|
263
|
-
</h3>
|
|
264
|
-
{connected && (
|
|
265
|
-
<Button variant="ghost" size="sm" onClick={refresh} disabled={actionLoading}>
|
|
266
|
-
<RefreshIcon />
|
|
267
|
-
<span className="ml-1">重新整理</span>
|
|
268
|
-
</Button>
|
|
269
|
-
)}
|
|
270
|
-
</div>
|
|
271
|
-
|
|
272
|
-
{/* Error Message */}
|
|
273
|
-
{error && (
|
|
274
|
-
<div className="p-3 bg-red-50 border border-red-200 rounded-lg text-red-700 text-sm">
|
|
275
|
-
{error}
|
|
276
|
-
</div>
|
|
277
|
-
)}
|
|
278
|
-
|
|
279
|
-
{/* Not Connected */}
|
|
280
|
-
{!connected && (
|
|
281
|
-
<div className="text-center py-8">
|
|
282
|
-
<GitHubIcon />
|
|
283
|
-
<p className="mt-4 text-gray-600">
|
|
284
|
-
連結您的 GitHub 帳號以存取 Repositories
|
|
285
|
-
</p>
|
|
286
|
-
<Button onClick={connect} className="mt-4 gap-2">
|
|
287
|
-
<GitHubIcon />
|
|
288
|
-
連結 GitHub 帳號
|
|
289
|
-
</Button>
|
|
290
|
-
</div>
|
|
291
|
-
)}
|
|
292
|
-
|
|
293
|
-
{/* Connected */}
|
|
294
|
-
{connected && (
|
|
295
|
-
<>
|
|
296
|
-
{/* Status */}
|
|
297
|
-
<div className="flex items-center gap-2 p-3 bg-green-50 border border-green-200 rounded-lg">
|
|
298
|
-
<CheckIcon />
|
|
299
|
-
<span className="text-green-700">已連結 GitHub</span>
|
|
300
|
-
</div>
|
|
301
|
-
|
|
302
|
-
{/* Connected Repos */}
|
|
303
|
-
<div>
|
|
304
|
-
<h4 className="font-medium mb-2">已連結的 Repositories ({connectedRepos.length})</h4>
|
|
305
|
-
{connectedRepos.length === 0 ? (
|
|
306
|
-
<p className="text-gray-500 text-sm">尚未連結任何 Repository</p>
|
|
307
|
-
) : (
|
|
308
|
-
<div className="space-y-2">
|
|
309
|
-
{connectedRepos.map((repo) => (
|
|
310
|
-
<RepoCard
|
|
311
|
-
key={repo.id}
|
|
312
|
-
repo={repo}
|
|
313
|
-
onSync={() => handleSync(repo.repoFullName)}
|
|
314
|
-
onDelete={() => handleDelete(repo.repoFullName)}
|
|
315
|
-
isLoading={actionLoading}
|
|
316
|
-
/>
|
|
317
|
-
))}
|
|
318
|
-
</div>
|
|
319
|
-
)}
|
|
320
|
-
</div>
|
|
321
|
-
|
|
322
|
-
{/* Available Repos */}
|
|
323
|
-
{availableRepos.length > 0 && (
|
|
324
|
-
<div>
|
|
325
|
-
<h4 className="font-medium mb-2">可連結的 Repositories ({availableRepos.length})</h4>
|
|
326
|
-
<div className="space-y-2 max-h-60 overflow-y-auto">
|
|
327
|
-
{availableRepos
|
|
328
|
-
.filter((r) => !connectedRepos.some((c) => c.repoFullName === r.fullName))
|
|
329
|
-
.map((repo) => (
|
|
330
|
-
<AvailableRepoCard
|
|
331
|
-
key={repo.id}
|
|
332
|
-
repo={repo}
|
|
333
|
-
onClone={() => handleClone(repo.fullName)}
|
|
334
|
-
isLoading={actionLoading}
|
|
335
|
-
/>
|
|
336
|
-
))}
|
|
337
|
-
</div>
|
|
338
|
-
</div>
|
|
339
|
-
)}
|
|
340
|
-
|
|
341
|
-
{/* Actions */}
|
|
342
|
-
<div className="flex gap-2 pt-4 border-t">
|
|
343
|
-
<a
|
|
344
|
-
href="https://github.com/apps/botrun/installations/new"
|
|
345
|
-
target="_blank"
|
|
346
|
-
rel="noopener noreferrer"
|
|
347
|
-
className="text-sm text-blue-600 hover:underline"
|
|
348
|
-
>
|
|
349
|
-
調整授權 Repos
|
|
350
|
-
</a>
|
|
351
|
-
<span className="text-gray-300">|</span>
|
|
352
|
-
<button
|
|
353
|
-
onClick={handleDisconnect}
|
|
354
|
-
disabled={actionLoading}
|
|
355
|
-
className="text-sm text-red-600 hover:underline"
|
|
356
|
-
>
|
|
357
|
-
中斷連結
|
|
358
|
-
</button>
|
|
359
|
-
</div>
|
|
360
|
-
</>
|
|
361
|
-
)}
|
|
362
|
-
</div>
|
|
363
|
-
);
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
export default GitHubConnect;
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import {
|
|
5
|
-
Dialog,
|
|
6
|
-
DialogContent,
|
|
7
|
-
DialogDescription,
|
|
8
|
-
DialogHeader,
|
|
9
|
-
DialogTitle,
|
|
10
|
-
DialogFooter,
|
|
11
|
-
} from "@/components/ui/dialog";
|
|
12
|
-
import {
|
|
13
|
-
AlertDialog,
|
|
14
|
-
AlertDialogAction,
|
|
15
|
-
AlertDialogCancel,
|
|
16
|
-
AlertDialogContent,
|
|
17
|
-
AlertDialogDescription,
|
|
18
|
-
AlertDialogFooter,
|
|
19
|
-
AlertDialogHeader,
|
|
20
|
-
AlertDialogTitle,
|
|
21
|
-
} from "@/components/ui/alert-dialog";
|
|
22
|
-
import { Button } from "@/components/ui/button";
|
|
23
|
-
import { Input } from "@/components/ui/input";
|
|
24
|
-
import { Label } from "@/components/ui/label";
|
|
25
|
-
import { Loader2, AlertCircle } from "lucide-react";
|
|
26
|
-
import { getApiEndpoint } from "@/lib/api-url";
|
|
27
|
-
import { useAuth } from "@/contexts/AuthContext";
|
|
28
|
-
|
|
29
|
-
interface ImportSkillDialogProps {
|
|
30
|
-
open: boolean;
|
|
31
|
-
onOpenChange: (open: boolean) => void;
|
|
32
|
-
onSuccess: () => void; // 匯入成功後重新載入技能列表
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
interface SkillPreview {
|
|
36
|
-
shareId: string;
|
|
37
|
-
skillName: string;
|
|
38
|
-
skillDescription: string;
|
|
39
|
-
skillIcon: string;
|
|
40
|
-
createdAt: string;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function ImportSkillDialog({
|
|
44
|
-
open,
|
|
45
|
-
onOpenChange,
|
|
46
|
-
onSuccess
|
|
47
|
-
}: ImportSkillDialogProps) {
|
|
48
|
-
const { user } = useAuth();
|
|
49
|
-
const [shareId, setShareId] = useState("");
|
|
50
|
-
const [isImporting, setIsImporting] = useState(false);
|
|
51
|
-
const [error, setError] = useState<string | null>(null);
|
|
52
|
-
|
|
53
|
-
// 名稱衝突確認對話框狀態
|
|
54
|
-
const [showConflictDialog, setShowConflictDialog] = useState(false);
|
|
55
|
-
const [conflictSkillName, setConflictSkillName] = useState<string | null>(null);
|
|
56
|
-
|
|
57
|
-
// 確認匯入
|
|
58
|
-
const handleImport = async (overwrite: boolean = false) => {
|
|
59
|
-
if (!user) {
|
|
60
|
-
setError('請先登入');
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
setIsImporting(true);
|
|
65
|
-
setError(null);
|
|
66
|
-
|
|
67
|
-
try {
|
|
68
|
-
const idToken = await user.getIdToken();
|
|
69
|
-
const url = getApiEndpoint(`/api/skills/import/${shareId.trim()}`);
|
|
70
|
-
|
|
71
|
-
const response = await fetch(url, {
|
|
72
|
-
method: 'POST',
|
|
73
|
-
headers: {
|
|
74
|
-
'Content-Type': 'application/json',
|
|
75
|
-
'Authorization': `Bearer ${idToken}`
|
|
76
|
-
},
|
|
77
|
-
body: JSON.stringify({ overwrite })
|
|
78
|
-
});
|
|
79
|
-
|
|
80
|
-
const data = await response.json();
|
|
81
|
-
|
|
82
|
-
// 檢查名稱衝突
|
|
83
|
-
if (response.status === 409 && data.conflict) {
|
|
84
|
-
setConflictSkillName(data.skillName);
|
|
85
|
-
setShowConflictDialog(true);
|
|
86
|
-
setIsImporting(false);
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// 檢查其他錯誤(包括技能不存在 404)
|
|
91
|
-
if (!response.ok || !data.success) {
|
|
92
|
-
throw new Error(data.error || '匯入失敗');
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
// 成功:關閉 Dialog 並重新載入列表
|
|
96
|
-
onOpenChange(false);
|
|
97
|
-
onSuccess();
|
|
98
|
-
|
|
99
|
-
// 重置狀態
|
|
100
|
-
setShareId("");
|
|
101
|
-
setError(null);
|
|
102
|
-
} catch (err: any) {
|
|
103
|
-
setError(err.message || '匯入失敗');
|
|
104
|
-
} finally {
|
|
105
|
-
setIsImporting(false);
|
|
106
|
-
}
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
// 處理衝突選擇
|
|
110
|
-
const handleConflictChoice = async (choice: 'overwrite' | 'cancel') => {
|
|
111
|
-
setShowConflictDialog(false);
|
|
112
|
-
|
|
113
|
-
if (choice === 'cancel') {
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
if (choice === 'overwrite') {
|
|
118
|
-
await handleImport(true);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
// 重置狀態
|
|
123
|
-
const handleOpenChange = (newOpen: boolean) => {
|
|
124
|
-
if (!newOpen) {
|
|
125
|
-
setShareId("");
|
|
126
|
-
setError(null);
|
|
127
|
-
}
|
|
128
|
-
onOpenChange(newOpen);
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
return (
|
|
132
|
-
<>
|
|
133
|
-
<Dialog open={open} onOpenChange={handleOpenChange}>
|
|
134
|
-
<DialogContent className="sm:max-w-[500px]">
|
|
135
|
-
<DialogHeader>
|
|
136
|
-
<DialogTitle>匯入分享技能</DialogTitle>
|
|
137
|
-
<DialogDescription>
|
|
138
|
-
輸入分享 ID 以匯入其他人分享的技能
|
|
139
|
-
</DialogDescription>
|
|
140
|
-
</DialogHeader>
|
|
141
|
-
|
|
142
|
-
<div className="space-y-4 py-4">
|
|
143
|
-
{/* 輸入分享 ID */}
|
|
144
|
-
<div className="space-y-2">
|
|
145
|
-
<Label htmlFor="shareId">分享 ID</Label>
|
|
146
|
-
<Input
|
|
147
|
-
id="shareId"
|
|
148
|
-
placeholder="貼上別人分享的 ID"
|
|
149
|
-
value={shareId}
|
|
150
|
-
onChange={(e) => {
|
|
151
|
-
setShareId(e.target.value);
|
|
152
|
-
setError(null);
|
|
153
|
-
}}
|
|
154
|
-
className="font-mono text-xs"
|
|
155
|
-
/>
|
|
156
|
-
</div>
|
|
157
|
-
|
|
158
|
-
{/* 錯誤訊息 */}
|
|
159
|
-
{error && (
|
|
160
|
-
<div className="flex items-start gap-2 p-3 bg-destructive/10 text-destructive rounded-md text-sm">
|
|
161
|
-
<AlertCircle className="h-4 w-4 mt-0.5 shrink-0" />
|
|
162
|
-
<span>{error}</span>
|
|
163
|
-
</div>
|
|
164
|
-
)}
|
|
165
|
-
</div>
|
|
166
|
-
|
|
167
|
-
<DialogFooter>
|
|
168
|
-
<Button variant="outline" onClick={() => onOpenChange(false)}>
|
|
169
|
-
取消
|
|
170
|
-
</Button>
|
|
171
|
-
<Button
|
|
172
|
-
onClick={() => handleImport()}
|
|
173
|
-
disabled={!shareId.trim() || isImporting}
|
|
174
|
-
>
|
|
175
|
-
{isImporting && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
|
|
176
|
-
確認匯入
|
|
177
|
-
</Button>
|
|
178
|
-
</DialogFooter>
|
|
179
|
-
</DialogContent>
|
|
180
|
-
</Dialog>
|
|
181
|
-
|
|
182
|
-
{/* 名稱衝突確認對話框 */}
|
|
183
|
-
<AlertDialog open={showConflictDialog} onOpenChange={setShowConflictDialog}>
|
|
184
|
-
<AlertDialogContent>
|
|
185
|
-
<AlertDialogHeader>
|
|
186
|
-
<AlertDialogTitle>技能名稱已存在</AlertDialogTitle>
|
|
187
|
-
<AlertDialogDescription>
|
|
188
|
-
您已經有一個名為「<strong>{conflictSkillName}</strong>」的技能。請選擇如何處理:
|
|
189
|
-
</AlertDialogDescription>
|
|
190
|
-
</AlertDialogHeader>
|
|
191
|
-
<AlertDialogFooter>
|
|
192
|
-
<AlertDialogCancel onClick={() => handleConflictChoice('cancel')}>
|
|
193
|
-
取消匯入
|
|
194
|
-
</AlertDialogCancel>
|
|
195
|
-
<AlertDialogAction
|
|
196
|
-
onClick={() => handleConflictChoice('overwrite')}
|
|
197
|
-
disabled={isImporting}
|
|
198
|
-
className="bg-destructive text-destructive-foreground hover:bg-destructive/90"
|
|
199
|
-
>
|
|
200
|
-
{isImporting && <Loader2 className="mr-2 h-4 w-4 animate-spin" />}
|
|
201
|
-
覆寫現有技能
|
|
202
|
-
</AlertDialogAction>
|
|
203
|
-
</AlertDialogFooter>
|
|
204
|
-
</AlertDialogContent>
|
|
205
|
-
</AlertDialog>
|
|
206
|
-
</>
|
|
207
|
-
);
|
|
208
|
-
}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ScrollToBottomButton Component
|
|
3
|
-
*
|
|
4
|
-
* 職責:浮動按鈕 UI,提供使用者快速回到底部的能力
|
|
5
|
-
*
|
|
6
|
-
* 遵循原則:
|
|
7
|
-
* - SRP: 單一職責 - 只負責按鈕 UI 和點擊行為
|
|
8
|
-
* - OCP: 開放封閉 - 樣式可透過 className 擴展
|
|
9
|
-
* - DIP: 依賴倒置 - 依賴 props 而非具體實作
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import { ChevronDown } from 'lucide-react';
|
|
13
|
-
import { Button } from '@/components/ui/button';
|
|
14
|
-
import { useCapacitorPlatform } from '@/hooks/useCapacitorPlatform';
|
|
15
|
-
|
|
16
|
-
export interface ScrollToBottomButtonProps {
|
|
17
|
-
/**
|
|
18
|
-
* 是否顯示按鈕
|
|
19
|
-
*/
|
|
20
|
-
visible: boolean;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* 點擊按鈕的回調函式
|
|
24
|
-
*/
|
|
25
|
-
onClick: () => void;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* 是否為 Capacitor 環境(影響 bottom 位置)
|
|
29
|
-
* @deprecated 現在由內部 useCapacitorPlatform hook 自動偵測,無需手動傳入
|
|
30
|
-
*/
|
|
31
|
-
isCapacitor?: boolean;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* 自訂 className(可選)
|
|
35
|
-
*/
|
|
36
|
-
className?: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* 浮動「回到底部」按鈕
|
|
41
|
-
*
|
|
42
|
-
* 設計特點:
|
|
43
|
-
* 1. 僅在使用者向上捲動時顯示(controlled component)
|
|
44
|
-
* 2. 使用 Lucide ChevronDown icon
|
|
45
|
-
* 3. 固定在中間下方,避開輸入框區域
|
|
46
|
-
* 4. 支援 Capacitor 環境的 safe area
|
|
47
|
-
*
|
|
48
|
-
* @example
|
|
49
|
-
* ```tsx
|
|
50
|
-
* <ScrollToBottomButton
|
|
51
|
-
* visible={!isAtBottom}
|
|
52
|
-
* onClick={scrollToBottom}
|
|
53
|
-
* />
|
|
54
|
-
* ```
|
|
55
|
-
*/
|
|
56
|
-
export function ScrollToBottomButton({
|
|
57
|
-
visible,
|
|
58
|
-
onClick,
|
|
59
|
-
isCapacitor: _deprecatedIsCapacitor, // 保留參數但不使用(向下相容)
|
|
60
|
-
className = '',
|
|
61
|
-
}: ScrollToBottomButtonProps) {
|
|
62
|
-
// 使用統一的平台偵測 hook(替代手動傳入的 isCapacitor prop)
|
|
63
|
-
const { getBottomPadding } = useCapacitorPlatform();
|
|
64
|
-
|
|
65
|
-
if (!visible) return null;
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<Button
|
|
69
|
-
onClick={onClick}
|
|
70
|
-
size="icon"
|
|
71
|
-
className={`
|
|
72
|
-
fixed left-1/2 -translate-x-1/2 z-30
|
|
73
|
-
h-9 w-9 rounded-full
|
|
74
|
-
bg-primary/90 hover:bg-primary
|
|
75
|
-
shadow-lg hover:shadow-xl
|
|
76
|
-
transition-all duration-200
|
|
77
|
-
backdrop-blur-sm
|
|
78
|
-
${className}
|
|
79
|
-
`}
|
|
80
|
-
style={{
|
|
81
|
-
// 位置:輸入框上方(距離底部 6rem)
|
|
82
|
-
// 使用統一的平台偵測邏輯,自動處理 desktop/mobile-web/ios/android
|
|
83
|
-
bottom: getBottomPadding('6rem'),
|
|
84
|
-
}}
|
|
85
|
-
aria-label="回到底部"
|
|
86
|
-
>
|
|
87
|
-
<ChevronDown className="h-4 w-4 text-primary-foreground" />
|
|
88
|
-
</Button>
|
|
89
|
-
);
|
|
90
|
-
}
|