botrun-horse 2.29.2 → 2.30.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/botrun-c/.claude/skills/DOCX/351/226/261/350/256/200/346/212/200/350/203/275/SKILL.md +103 -0
- package/botrun-c/.claude/skills/DOCX/351/226/261/350/256/200/346/212/200/350/203/275/scripts/docx-to-markdown.mjs +206 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/SKILL.md +1093 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-branch.mjs +73 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-branches.mjs +77 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-checkout.mjs +72 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-clone.mjs +72 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-commit.mjs +75 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-delete-branch.mjs +75 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-delete-file.mjs +72 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-diff.mjs +80 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-list-tree.mjs +336 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-list.mjs +199 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-merge.mjs +86 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-move.mjs +75 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-pr-create.mjs +81 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-pr-list.mjs +74 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-pr-merge.mjs +83 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-pr-view.mjs +71 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-push.mjs +71 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-read.mjs +277 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-search.mjs +370 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-stash.mjs +116 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-sync.mjs +71 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/github-write.mjs +74 -0
- package/botrun-c/.claude/skills/GitHub/346/212/200/350/203/275/scripts/lib/path-validator.mjs +167 -0
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/SKILL.md +605 -0
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-create.mjs +127 -0
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-delete.mjs +77 -0
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-diff.mjs +87 -0
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-history.mjs +99 -0
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-list.mjs +174 -0
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-read.mjs +214 -0
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-restore.mjs +75 -0
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-search.mjs +270 -0
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-sync-back.mjs +155 -0
- package/botrun-c/.claude/skills/GoogleDrive/346/212/200/350/203/275/scripts/gdrive-update.mjs +100 -0
- package/botrun-c/.claude/skills/HTML/347/224/237/346/210/220/346/212/200/350/203/275/SKILL.md +414 -0
- package/botrun-c/.claude/skills/HTML/347/224/237/346/210/220/346/212/200/350/203/275/scripts/create-project.mjs +91 -0
- package/botrun-c/.claude/skills/HTML/347/224/237/346/210/220/346/212/200/350/203/275/scripts/finalize-project.mjs +162 -0
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/SKILL.md +206 -0
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/package.json +19 -0
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/pdf-analyze.mjs +309 -0
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/pdf-compress.mjs +315 -0
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/pdf-split.mjs +275 -0
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/pdf-to-text.mjs +336 -0
- package/botrun-c/.claude/skills/PDF/346/212/200/350/203/275/scripts/test-pdf-scripts.mjs +491 -0
- package/botrun-c/.claude/skills/docx-to-markdown/SKILL.md +76 -0
- package/botrun-c/.claude/skills/docx-to-markdown/scripts/convert_docx.py +183 -0
- package/botrun-c/.claude/skills/gcp-coord-ml-ocr/SKILL.md +133 -0
- package/botrun-c/.claude/skills/gcp-coord-ml-ocr/scripts/ocr_processor.py +381 -0
- package/botrun-c/.claude/skills/gemini-transcribe/SKILL.md +115 -0
- package/botrun-c/.claude/skills/gemini-transcribe/scripts/transcribe.py +499 -0
- package/botrun-c/.claude/skills/nchc-transcribe/SKILL.md +131 -0
- package/botrun-c/.claude/skills/nchc-transcribe/scripts/transcribe.py +522 -0
- package/botrun-c/.claude/skills/p320-moj-review/SKILL.md +200 -0
- package/botrun-c/.claude/skills/p320-moj-review/references/guideline.md +118 -0
- package/botrun-c/.claude/skills/pdf-multimodal-processor/SKILL.md +186 -0
- package/botrun-c/.claude/skills/pdf-multimodal-processor/scripts/process_pdf.py +515 -0
- package/botrun-c/.claude/skills/ripgrep/346/220/234/345/260/213/346/212/200/350/203/275/SKILL.md +81 -0
- package/botrun-c/.claude/skills/ripgrep/346/220/234/345/260/213/346/212/200/350/203/275/scripts/package.json +13 -0
- package/botrun-c/.claude/skills/ripgrep/346/220/234/345/260/213/346/212/200/350/203/275/scripts/secure-search.mjs +232 -0
- 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 +518 -0
- package/botrun-c/.claude/skills//345/216/273/350/255/230/345/210/245/346/212/200/350/203/275/SKILL.md +125 -0
- package/botrun-c/.claude/skills//345/233/236/346/206/266/346/212/200/350/203/275/SKILL.md +123 -0
- package/botrun-c/.claude/skills//345/233/236/346/206/266/346/212/200/350/203/275/scripts/recall.mjs +339 -0
- 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 +156 -0
- 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 +139 -0
- 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 +40 -0
- 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 +195 -0
- 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 +307 -0
- 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 +103 -0
- 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 +219 -0
- 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 +209 -0
- 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 +20 -0
- 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 +115 -0
- 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 +86 -0
- 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 +304 -0
- 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 +17 -0
- package/botrun-c/.claude/skills//345/255/265/345/214/226/346/212/200/350/203/275/SKILL.md +131 -0
- package/botrun-c/.claude/skills//345/255/265/345/214/226/346/212/200/350/203/275/scripts/skill-manager.mjs +542 -0
- 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 +127 -0
- 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 +53 -0
- 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 +13 -0
- 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 +149 -0
- 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 +82 -0
- 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 +16 -0
- 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 +260 -0
- 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 +156 -0
- 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 +16 -0
- 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 +139 -0
- 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 +272 -0
- 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 +166 -0
- package/botrun-c/.claude/skills//350/250/230/346/206/266/346/212/200/350/203/275/SKILL.md +114 -0
- package/botrun-c/.claude/skills//350/250/230/346/206/266/346/212/200/350/203/275/scripts/remember.mjs +159 -0
- package/botrun-c/.claude/skills//350/250/230/346/206/266/346/212/200/350/203/275/scripts/test-advanced.mjs +342 -0
- package/botrun-c/.claude/skills//350/250/230/346/206/266/346/212/200/350/203/275/scripts/test.mjs +430 -0
- 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 +30 -0
- 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 +13 -0
- 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 +294 -0
- 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 +338 -0
- package/botrun-c/.dockerignore +131 -0
- package/botrun-c/.dockeroptimize +13 -0
- package/botrun-c/.firebase/hosting.b3V0.cache +30 -0
- package/botrun-c/.firebaserc +5 -0
- package/botrun-c/.gcloudignore +56 -0
- package/botrun-c/.ruby-version +1 -0
- package/botrun-c/CHANGELOG.md +224 -0
- package/botrun-c/Dockerfile.gcp +365 -0
- package/botrun-c/Dockerfile.slim +195 -0
- package/botrun-c/Gemfile +8 -0
- package/botrun-c/Gemfile.lock +233 -0
- package/botrun-c/LOCAL-DEVELOPMENT-GUIDE.md +393 -0
- package/botrun-c/PLAN.md +131 -0
- package/botrun-c/README.md +129 -0
- package/botrun-c/TODO-CAPACITOR-INTEGRATION.md +482 -0
- package/botrun-c/VERIFICATION.md +121 -0
- package/botrun-c/admin/RATE_LIMIT_MANAGEMENT.md +312 -0
- package/botrun-c/admin/README.md +338 -0
- package/botrun-c/admin/botrun-billing-report-1765235244038.csv +22 -0
- package/botrun-c/admin/botrun-billing-report-1765235323089.csv +22 -0
- package/botrun-c/admin/botrun-dashboard-1765235244039.html +278 -0
- package/botrun-c/admin/botrun-dashboard-1765235323089.html +278 -0
- package/botrun-c/admin/botrun-timeseries-074xGzIKWyfKTBt1NMIj9lxi5mO2-1765235244039.html +161 -0
- package/botrun-c/admin/botrun-timeseries-074xGzIKWyfKTBt1NMIj9lxi5mO2-1765235323090.html +161 -0
- package/botrun-c/admin/check-billing.ts +48 -0
- package/botrun-c/admin/count-all-users.ts +65 -0
- package/botrun-c/admin/generate-analytics-report.ts +188 -0
- package/botrun-c/admin/jest.config.ts +43 -0
- package/botrun-c/admin/lib/__tests__/formatters.test.ts +264 -0
- package/botrun-c/admin/lib/__tests__/mocks/firebase.mock.ts +112 -0
- package/botrun-c/admin/lib/__tests__/services/UserService.test.ts +83 -0
- package/botrun-c/admin/lib/__tests__/user-resolver.test.ts +439 -0
- package/botrun-c/admin/lib/analyzers/BillingAnalyticsService.ts +242 -0
- package/botrun-c/admin/lib/analyzers/CsvExporter.ts +263 -0
- package/botrun-c/admin/lib/analyzers/HtmlChartGenerator.ts +530 -0
- package/botrun-c/admin/lib/analyzers/SpikeAnalyzer.ts +608 -0
- package/botrun-c/admin/lib/analyzers/TimeSeriesAnalyzer.ts +344 -0
- package/botrun-c/admin/lib/cli/CLIBootstrapper.ts +40 -0
- package/botrun-c/admin/lib/commands/AbstractCommand.ts +69 -0
- package/botrun-c/admin/lib/commands/AnalyticsCommand.ts +215 -0
- package/botrun-c/admin/lib/commands/ListCommand.ts +85 -0
- package/botrun-c/admin/lib/commands/QueryCommand.ts +81 -0
- package/botrun-c/admin/lib/commands/SpikeCommand.ts +83 -0
- package/botrun-c/admin/lib/domain/User.ts +38 -0
- package/botrun-c/admin/lib/firebase.ts +92 -0
- package/botrun-c/admin/lib/firestore-safe.ts +105 -0
- package/botrun-c/admin/lib/formatters.ts +154 -0
- package/botrun-c/admin/lib/rate-limit-detailed.ts +355 -0
- package/botrun-c/admin/lib/rate-limit.ts +286 -0
- package/botrun-c/admin/lib/repositories/UserRepository.ts +104 -0
- package/botrun-c/admin/lib/services/UserService.ts +108 -0
- package/botrun-c/admin/lib/types.ts +56 -0
- package/botrun-c/admin/lib/user-resolver.ts +275 -0
- package/botrun-c/admin/manage-auth-domains.js +178 -0
- package/botrun-c/admin/migrate-plan-free.sh +64 -0
- package/botrun-c/admin/package-lock.json +5656 -0
- package/botrun-c/admin/package.json +28 -0
- package/botrun-c/admin/rate-limit.sh +55 -0
- package/botrun-c/admin/remove-custom-limits.ts +75 -0
- package/botrun-c/admin/reset-rate.sh +70 -0
- package/botrun-c/admin/reset-trial.sh +68 -0
- package/botrun-c/admin/seed-trial-data.sh +38 -0
- package/botrun-c/admin/trial.sh +55 -0
- package/botrun-c/admin/tsconfig.json +20 -0
- package/botrun-c/admin/users-cli.py +298 -0
- package/botrun-c/admin/users.sh +12 -0
- package/botrun-c/admin/users.ts +1321 -0
- package/botrun-c/api/admin-tools/check-whitelist.mjs.migration-bak +74 -0
- package/botrun-c/api/admin-tools/create-user.mjs +92 -0
- package/botrun-c/api/admin-tools/create-user.mjs.migration-bak +92 -0
- package/botrun-c/api/admin-tools/firebase-auth-domains-v2.py +287 -0
- package/botrun-c/api/admin-tools/firebase-auth-domains-v2.py.migration-bak +287 -0
- package/botrun-c/api/admin-tools/init-firestore.mjs +75 -0
- package/botrun-c/api/admin-tools/init-firestore.mjs.migration-bak +101 -0
- package/botrun-c/api/admin-tools/list-users.mjs +43 -0
- package/botrun-c/api/admin-tools/list-users.mjs.migration-bak +43 -0
- package/botrun-c/api/admin-tools/manage-authorized-domains.ts +255 -0
- package/botrun-c/api/admin-tools/manage-authorized-domains.ts.migration-bak +255 -0
- package/botrun-c/api/admin-tools/setup-custom-claims.ts.migration-bak +155 -0
- package/botrun-c/api/admin-tools/test-claims.mjs +69 -0
- package/botrun-c/api/admin-tools/test-claims.mjs.migration-bak +69 -0
- package/botrun-c/api/admin-tools/update-service-urls-gcloud.mjs +72 -0
- package/botrun-c/api/admin-tools/update-service-urls-gcloud.mjs.migration-bak +72 -0
- package/botrun-c/api/admin-tools/update-service-urls-to-lb.mjs +159 -0
- package/botrun-c/api/admin-tools/update-service-urls-to-lb.mjs.migration-bak +159 -0
- package/botrun-c/api/admin-tools/update-service-urls.mjs +82 -0
- package/botrun-c/api/admin-tools/update-service-urls.mjs.migration-bak +82 -0
- package/botrun-c/api/package-lock.json +5031 -0
- package/botrun-c/api/package.json +63 -0
- package/botrun-c/api/pnpm-lock.yaml +4157 -0
- package/botrun-c/api/rate-limit-export-1763620678737.csv +79 -0
- package/botrun-c/api/scripts/README-migrate-plan-free.md +197 -0
- package/botrun-c/api/scripts/check-users.ts +45 -0
- package/botrun-c/api/scripts/delete-firestore-docs.js +43 -0
- package/botrun-c/api/scripts/dump-subscriptions.ts +395 -0
- package/botrun-c/api/scripts/list-all-users.ts +65 -0
- package/botrun-c/api/scripts/migrate-plan-free-rpd-16to32.ts +262 -0
- package/botrun-c/api/scripts/migrate-plan-names-to-lite-max.ts +269 -0
- package/botrun-c/api/scripts/query-user-info.ts +304 -0
- package/botrun-c/api/scripts/reset-rate-limit.ts +206 -0
- package/botrun-c/api/scripts/reset-trial-subscription.ts +166 -0
- package/botrun-c/api/scripts/rollback-plan-names-from-lite-max.ts +139 -0
- package/botrun-c/api/scripts/seed-rate-limit-test-data.ts +114 -0
- package/botrun-c/api/scripts/seed-subscription-test-data.ts +173 -0
- package/botrun-c/api/scripts/test-rate-limit-message.ts +108 -0
- package/botrun-c/api/test-billing-write.ts +103 -0
- package/botrun-c/api/test-billing.ts +81 -0
- package/botrun-c/api/test-chat-upload.sh +162 -0
- package/botrun-c/api/test-nchc-whisper.ts +87 -0
- package/botrun-c/api/test-skills-loading.js +77 -0
- package/botrun-c/api/test-skills-symlink.js +118 -0
- package/botrun-c/api/test-upload-multimodal.sh +167 -0
- package/botrun-c/api/tsconfig.json +27 -0
- package/botrun-c/api/verify-form-2-1.mjs +229 -0
- package/botrun-c/api/vitest.config.ts +9 -0
- package/botrun-c/appium-capabilities.json +20 -0
- package/botrun-c/cors.json +26 -0
- package/botrun-c/delete-old.sh +44 -0
- package/botrun-c/design/google-drive/01-architecture.md +186 -0
- package/botrun-c/design/google-drive/02-api-design.md +314 -0
- package/botrun-c/design/google-drive/03-frontend-design.md +278 -0
- package/botrun-c/design/google-drive/04-skill-design.md +384 -0
- package/botrun-c/design/google-drive/05-test-plan.md +507 -0
- package/botrun-c/design/google-drive/README.md +32 -0
- package/botrun-c/dev/mcp-token-calculator/README.md +92 -0
- package/botrun-c/dev/mcp-token-calculator/RESULTS.md +188 -0
- package/botrun-c/dev/mcp-token-calculator/calculate-current-tokens.ts +369 -0
- package/botrun-c/dev/mcp-token-calculator/calculate-mcp-tokens.ts +464 -0
- package/botrun-c/dev/mcp-token-calculator/optimization-proposals.ts +316 -0
- package/botrun-c/dev/mcp-token-calculator/package-lock.json +599 -0
- package/botrun-c/dev/mcp-token-calculator/package.json +22 -0
- package/botrun-c/dev/mcp-token-calculator/test-all-schemas.ts +314 -0
- package/botrun-c/dev/mcp-token-calculator/test-schema-correctness.ts +221 -0
- package/botrun-c/dev/mcp-token-calculator/verify-optimization.ts +159 -0
- package/botrun-c/fastlane/ANDROID-DEPLOYMENT-SETUP.md +825 -0
- package/botrun-c/fastlane/IOS-DEPLOYMENT-SETUP.md +431 -0
- package/botrun-c/fastlane/Pluginfile +5 -0
- package/botrun-c/fastlane/QUICK-START.md +133 -0
- package/botrun-c/fastlane/README.md +424 -0
- package/botrun-c/fastlane/RUBY-SETUP.md +449 -0
- package/botrun-c/fastlane/android/Appfile +11 -0
- package/botrun-c/fastlane/android/Fastfile +240 -0
- package/botrun-c/firebase.json +46 -0
- package/botrun-c/firestore-init-data.json +40 -0
- package/botrun-c/firestore.indexes.json +55 -0
- package/botrun-c/firestore.rules +53 -0
- package/botrun-c/fix-codex-permissions.sh +56 -0
- package/botrun-c/gcs-lifecycle-30day-retention.json +12 -0
- package/botrun-c/html-architecture/architecture/deployment.html +664 -0
- package/botrun-c/html-architecture/architecture/index.html +309 -0
- package/botrun-c/html-architecture/architecture/styles.css +500 -0
- package/botrun-c/html-architecture/architecture/system-components.html +538 -0
- package/botrun-c/html-architecture/architecture/user-flow.html +370 -0
- package/botrun-c/mobile-android/FIREBASE-AUTH-SETUP.md +302 -0
- package/botrun-c/mobile-android/WSL-ANDROID-SETUP.md +252 -0
- package/botrun-c/mobile-android/android/app/build.gradle +75 -0
- package/botrun-c/mobile-android/android/app/capacitor.build.gradle +31 -0
- package/botrun-c/mobile-android/android/app/proguard-rules.pro +21 -0
- package/botrun-c/mobile-android/android/build.gradle +29 -0
- package/botrun-c/mobile-android/android/capacitor.settings.gradle +42 -0
- package/botrun-c/mobile-android/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/botrun-c/mobile-android/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/botrun-c/mobile-android/android/gradle.properties +22 -0
- package/botrun-c/mobile-android/android/gradlew +252 -0
- package/botrun-c/mobile-android/android/gradlew.bat +94 -0
- package/botrun-c/mobile-android/android/settings.gradle +5 -0
- package/botrun-c/mobile-android/android/variables.gradle +16 -0
- package/botrun-c/mobile-android/capacitor.config.ts +44 -0
- package/botrun-c/mobile-android/fastlane/Appfile +11 -0
- package/botrun-c/mobile-android/fastlane/Fastfile +202 -0
- package/botrun-c/mobile-android/fastlane/README.md +96 -0
- package/botrun-c/mobile-android/google-services.json.template +39 -0
- package/botrun-c/mobile-android/package.json +32 -0
- package/botrun-c/mobile-android/resources/icon.png +0 -0
- package/botrun-c/mobile-android/tsconfig.json +15 -0
- package/botrun-c/mobile-ios/.ruby-version +1 -0
- package/botrun-c/mobile-ios/BUILD-LOG.md +82 -0
- package/botrun-c/mobile-ios/Gemfile +4 -0
- package/botrun-c/mobile-ios/Gemfile.lock +299 -0
- package/botrun-c/mobile-ios/GoogleService-Info.plist.template +34 -0
- package/botrun-c/mobile-ios/IOS-PERMISSIONS.md +80 -0
- package/botrun-c/mobile-ios/QUICK-START.md +189 -0
- package/botrun-c/mobile-ios/README.md +231 -0
- package/botrun-c/mobile-ios/capacitor.config.ts +46 -0
- package/botrun-c/mobile-ios/fastlane/Fastfile +326 -0
- package/botrun-c/mobile-ios/fastlane/README.md +88 -0
- package/botrun-c/mobile-ios/ios/App/App/App.entitlements +10 -0
- package/botrun-c/mobile-ios/ios/App/App/AppDelegate.swift +49 -0
- 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 +14 -0
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Contents.json +6 -0
- package/botrun-c/mobile-ios/ios/App/App/Assets.xcassets/Splash.imageset/Contents.json +56 -0
- 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 +32 -0
- package/botrun-c/mobile-ios/ios/App/App/Base.lproj/Main.storyboard +19 -0
- package/botrun-c/mobile-ios/ios/App/App/Info.plist +72 -0
- package/botrun-c/mobile-ios/ios/App/App.xcodeproj/project.pbxproj +446 -0
- package/botrun-c/mobile-ios/ios/App/App.xcodeproj/xcshareddata/xcschemes/App.xcscheme +78 -0
- package/botrun-c/mobile-ios/ios/App/App.xcworkspace/contents.xcworkspacedata +10 -0
- package/botrun-c/mobile-ios/ios/App/App.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/botrun-c/mobile-ios/ios/App/Podfile +52 -0
- package/botrun-c/mobile-ios/ios/App/Podfile.lock +205 -0
- package/botrun-c/mobile-ios/ios/App/add_plist.rb +30 -0
- package/botrun-c/mobile-ios/ios/App/fix_plist_path.rb +22 -0
- package/botrun-c/mobile-ios/package.json +29 -0
- package/botrun-c/mobile-ios/resources/icon.png +0 -0
- package/botrun-c/mobile-ios/run-simulator.sh +34 -0
- 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 +106 -0
- package/botrun-c/mobile-ios/tsconfig.json +16 -0
- package/botrun-c/org-policy-allow-all-users.yaml +3 -0
- package/botrun-c/package.json +68 -0
- package/botrun-c/pnpm-lock.yaml +10198 -0
- package/botrun-c/pnpm-workspace.yaml +6 -0
- package/botrun-c/prompts/BOTRUN-1.md +13 -0
- package/botrun-c/prompts/BOTRUN-2.md +70 -0
- package/botrun-c/prompts/BOTRUN-3.md +139 -0
- package/botrun-c/prototypes/firestore-gax-debug/package-lock.json +1204 -0
- package/botrun-c/prototypes/firestore-gax-debug/package.json +12 -0
- package/botrun-c/prototypes/firestore-gax-debug/pnpm-workspace.yaml +2 -0
- package/botrun-c/prototypes/firestore-gax-debug/test.js +98 -0
- package/botrun-c/prototypes/taiwan-haiku/README.md +93 -0
- package/botrun-c/prototypes/taiwan-haiku/index.ts +139 -0
- package/botrun-c/prototypes/taiwan-haiku/package.json +23 -0
- package/botrun-c/prototypes/taiwan-haiku/pnpm-lock.yaml +730 -0
- package/botrun-c/prototypes/taiwan-haiku/test-vertex-direct.ts +83 -0
- package/botrun-c/prototypes/taiwan-haiku/tsconfig.json +18 -0
- package/botrun-c/prototypes/web-search/FINDINGS-STAGE-1.md +48 -0
- package/botrun-c/prototypes/web-search/README.md +46 -0
- package/botrun-c/prototypes/web-search/VERIFICATION-REPORT.md +310 -0
- package/botrun-c/prototypes/web-search/package-lock.json +595 -0
- package/botrun-c/prototypes/web-search/package.json +18 -0
- package/botrun-c/prototypes/web-search/stage-1.1-basic-connection.js +123 -0
- package/botrun-c/prototypes/web-search/stage-1.2-with-websearch.js +154 -0
- package/botrun-c/prototypes/web-search/stage-1.3-search-query.js +192 -0
- package/botrun-c/prototypes/web-search/stage-2-agent-sdk-websearch.js +265 -0
- package/botrun-c/runtime-scripts/env-detect.sh +64 -0
- package/botrun-c/scripts/github-collaborator-manager.sh +297 -0
- package/botrun-c/scripts/github-collaborator-manager.ts +325 -0
- package/botrun-c/scripts/manage-collaborators.sh +91 -0
- package/botrun-c/scripts/setup-secrets.sh +202 -0
- package/botrun-c/scripts/stress-test-17-users.sh +113 -0
- package/botrun-c/scripts/stress-test-api.sh +119 -0
- package/botrun-c/scripts/stress-test-full-report.sh +385 -0
- package/botrun-c/specs/infra-vm/design.md +0 -0
- package/botrun-c/specs/share-skill/design.md +1146 -0
- package/botrun-c/specs/share-skill/tasks.md +444 -0
- package/botrun-c/stress-test-results/20260121-162630/config.json +7 -0
- package/botrun-c/stress-test-results/20260121-162630/user-1-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162630/user-1-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162630/user-1.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/config.json +7 -0
- package/botrun-c/stress-test-results/20260121-162646/user-1-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-1-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-1.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-10-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-10-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-10.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-11-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-11-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-11.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-12-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-12-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-12.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-13-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-13-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-13.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-14-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-14-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-14.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-15-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-15-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-15.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-16-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-16-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-16.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-17-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-17-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-17.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-2-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-2-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-2.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-3-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-3-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-3.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-4-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-4-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-4.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-5-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-5-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-5.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-6-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-6-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-6.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-7-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-7-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-7.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-8-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-8-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-8.json +2 -0
- package/botrun-c/stress-test-results/20260121-162646/user-9-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-9-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-162646/user-9.json +2 -0
- package/botrun-c/stress-test-results/20260121-163148/REPORT.html +344 -0
- package/botrun-c/stress-test-results/20260121-163148/REPORT.md +93 -0
- package/botrun-c/stress-test-results/20260121-163148/REPORT.pdf +0 -0
- package/botrun-c/stress-test-results/20260121-163148/config.json +7 -0
- package/botrun-c/stress-test-results/20260121-163148/summary.json +26 -0
- package/botrun-c/stress-test-results/20260121-163148/user-1-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-1-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-1.json +206 -0
- package/botrun-c/stress-test-results/20260121-163148/user-10-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-10-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-10.json +110 -0
- package/botrun-c/stress-test-results/20260121-163148/user-11-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-11-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-11.json +104 -0
- package/botrun-c/stress-test-results/20260121-163148/user-12-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-12-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-12.json +98 -0
- package/botrun-c/stress-test-results/20260121-163148/user-13-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-13-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-13.json +68 -0
- package/botrun-c/stress-test-results/20260121-163148/user-14-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-14-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-14.json +116 -0
- package/botrun-c/stress-test-results/20260121-163148/user-15-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-15-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-15.json +131 -0
- package/botrun-c/stress-test-results/20260121-163148/user-16-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-16-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-16.json +110 -0
- package/botrun-c/stress-test-results/20260121-163148/user-17-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-17-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-17.json +116 -0
- package/botrun-c/stress-test-results/20260121-163148/user-2-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-2-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-2.json +98 -0
- package/botrun-c/stress-test-results/20260121-163148/user-3-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-3-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-3.json +62 -0
- package/botrun-c/stress-test-results/20260121-163148/user-4-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-4-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-4.json +113 -0
- package/botrun-c/stress-test-results/20260121-163148/user-5-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-5-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-5.json +83 -0
- package/botrun-c/stress-test-results/20260121-163148/user-6-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-6-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-6.json +125 -0
- package/botrun-c/stress-test-results/20260121-163148/user-7-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-7-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-7.json +62 -0
- package/botrun-c/stress-test-results/20260121-163148/user-8-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-8-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-8.json +41 -0
- package/botrun-c/stress-test-results/20260121-163148/user-9-status.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-9-timing.txt +1 -0
- package/botrun-c/stress-test-results/20260121-163148/user-9.json +53 -0
- package/botrun-c/test-merge.md +1 -0
- package/botrun-c/version.txt +1 -0
- package/botrun-c/web/.version +1 -0
- package/botrun-c/web/ALLOW-PUBLIC-ACCESS.md +57 -0
- package/botrun-c/web/FINAL-SETUP-STEPS.md +71 -0
- package/botrun-c/web/FIREBASE-MANUAL-STEPS.md +41 -0
- package/botrun-c/web/QUICK-SETUP-HELPER.md +79 -0
- package/botrun-c/web/README.md +162 -0
- package/botrun-c/web/__tests__/image-extractor.test.ts +147 -0
- package/botrun-c/web/__tests__/useGitHub.test.ts +245 -0
- package/botrun-c/web/app/favicon.ico +0 -0
- package/botrun-c/web/app/globals.css +215 -0
- package/botrun-c/web/app/image-preview/page.tsx +213 -0
- package/botrun-c/web/app/layout.tsx +46 -0
- package/botrun-c/web/app/page.tsx +45 -0
- package/botrun-c/web/components/CapacitorProvider.tsx +43 -0
- package/botrun-c/web/components/ChatPage.tsx +1736 -0
- package/botrun-c/web/components/ConversationList.tsx +237 -0
- package/botrun-c/web/components/ConversationListItem.tsx +121 -0
- package/botrun-c/web/components/LoginPage.tsx +212 -0
- package/botrun-c/web/components/Providers.tsx +12 -0
- package/botrun-c/web/components/StatusBarProvider.tsx +16 -0
- package/botrun-c/web/components/attachment-preview.tsx +193 -0
- package/botrun-c/web/components/botrun-incubator/BotrunIncubator.tsx +266 -0
- package/botrun-c/web/components/botrun-incubator/index.ts +1 -0
- package/botrun-c/web/components/chat-input.tsx +1251 -0
- package/botrun-c/web/components/chat-message.tsx +598 -0
- package/botrun-c/web/components/drop-zone.tsx +143 -0
- package/botrun-c/web/components/gdrive/gdrive-add-dialog.tsx +254 -0
- package/botrun-c/web/components/gdrive/gdrive-drawer.tsx +236 -0
- package/botrun-c/web/components/gdrive/gdrive-selector.tsx +226 -0
- package/botrun-c/web/components/gdrive/index.ts +7 -0
- package/botrun-c/web/components/generated-image-card.tsx +363 -0
- package/botrun-c/web/components/github/GitHubConnect.tsx +366 -0
- package/botrun-c/web/components/github/index.ts +2 -0
- package/botrun-c/web/components/import-skill-dialog.tsx +208 -0
- package/botrun-c/web/components/scroll-to-bottom-button.tsx +90 -0
- package/botrun-c/web/components/share-skill-dialog.tsx +175 -0
- package/botrun-c/web/components/skills-editor.tsx +443 -0
- package/botrun-c/web/components/skills-manager-drawer.tsx +586 -0
- package/botrun-c/web/components/smart-button-group.tsx +132 -0
- package/botrun-c/web/config/smart-buttons.ts +295 -0
- package/botrun-c/web/config/welcome-messages.ts +29 -0
- package/botrun-c/web/contexts/AuthContext.tsx +220 -0
- package/botrun-c/web/hooks/use-toast.ts +187 -0
- package/botrun-c/web/hooks/useAppStoreUpdate.ts +356 -0
- package/botrun-c/web/hooks/useAppVersion.ts +113 -0
- package/botrun-c/web/hooks/useAttachments.ts +269 -0
- package/botrun-c/web/hooks/useAuthToken.ts +59 -0
- package/botrun-c/web/hooks/useAutoWelcome.ts +89 -0
- package/botrun-c/web/hooks/useCapacitorPlatform.ts +113 -0
- package/botrun-c/web/hooks/useCapawesomeLiveUpdate.ts +149 -0
- package/botrun-c/web/hooks/useClaudeModel.ts +118 -0
- package/botrun-c/web/hooks/useConversation.ts +115 -0
- package/botrun-c/web/hooks/useConversations.ts +235 -0
- package/botrun-c/web/hooks/useGdriveFolders.ts +199 -0
- package/botrun-c/web/hooks/useGdriveSync.ts +107 -0
- package/botrun-c/web/hooks/useGitHub.ts +409 -0
- package/botrun-c/web/hooks/useScrollToBottom.ts +150 -0
- package/botrun-c/web/hooks/useStatusBar.ts +42 -0
- package/botrun-c/web/hooks/useUserPlan.ts +153 -0
- package/botrun-c/web/lib/api-config.ts +162 -0
- package/botrun-c/web/lib/api-url.ts +62 -0
- package/botrun-c/web/lib/api.ts +105 -0
- package/botrun-c/web/lib/attachment-utils.ts +168 -0
- package/botrun-c/web/lib/build-version.ts +11 -0
- package/botrun-c/web/lib/clipboard-utils.ts +199 -0
- package/botrun-c/web/lib/constants.ts +62 -0
- package/botrun-c/web/lib/conversation-storage.ts +324 -0
- package/botrun-c/web/lib/firebase-capacitor.ts +135 -0
- package/botrun-c/web/lib/firebase.ts +137 -0
- package/botrun-c/web/lib/firestore-auth.ts +61 -0
- package/botrun-c/web/lib/firestore-auth.ts.migration-bak +319 -0
- package/botrun-c/web/lib/image-extractor.ts +156 -0
- package/botrun-c/web/lib/path-utils.ts +48 -0
- package/botrun-c/web/lib/rehype-del-to-mark.ts +19 -0
- package/botrun-c/web/lib/upload-service.ts +326 -0
- package/botrun-c/web/lib/utils.ts +6 -0
- package/botrun-c/web/next.config.js +49 -0
- package/botrun-c/web/package-lock.json +6711 -0
- package/botrun-c/web/package.json +63 -0
- package/botrun-c/web/postcss.config.js +6 -0
- 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 +36 -0
- package/botrun-c/web/scripts/update-build-version.js +41 -0
- package/botrun-c/web/tailwind.config.ts +80 -0
- package/botrun-c/web/test-welcome-message.mjs +115 -0
- package/botrun-c/web/tsconfig.json +42 -0
- package/botrun-c/web/types/agent.ts +6 -0
- package/botrun-c/web/types/attachment.ts +39 -0
- package/botrun-c/web/types/conversation.ts +68 -0
- package/botrun-c/web/types/flutter.d.ts +6 -0
- package/botrun-c/web/types/project.ts +41 -0
- package/botrun-c/web/types/skills.ts +13 -0
- 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 +83 -0
- package/lib/prompt/prompts/zero-framework/fullstack.md +17 -0
- package/lib/prompt/prompts/zero-framework/segment.md +13 -0
- package/package.json +1 -1
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: p320-moj-review
|
|
3
|
+
description: 產生觀護輔導紀要(報表編號 320070)。使用於收到個案資料夾(含 PDF、DOCX、音訊等檔案)後,自動轉換為純文字並依官方格式撰寫觀護輔導紀要。
|
|
4
|
+
allowed-tools: Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 觀護輔導紀要產生器
|
|
8
|
+
|
|
9
|
+
接收個案資料夾,自動將所有文件(PDF、DOCX、音訊)轉為純文字,再依法務部觀護輔導紀要官方格式(報表編號 320070),逐項撰寫觀護輔導紀要。
|
|
10
|
+
|
|
11
|
+
## 使用方式
|
|
12
|
+
|
|
13
|
+
呼叫時需提供一個資料夾路徑,例如:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
/p320-moj-review /path/to/case-folder
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
或在對話中指定:「幫我用 p320-moj-review 處理 /path/to/case-folder」
|
|
20
|
+
|
|
21
|
+
## 執行流程
|
|
22
|
+
|
|
23
|
+
### Phase 1:文件轉純文字
|
|
24
|
+
|
|
25
|
+
掃描輸入資料夾中的所有檔案,依副檔名分派至對應 skill 進行轉換,將純文字結果統一輸出到 `{輸入資料夾}/純文字output/` 目錄。
|
|
26
|
+
|
|
27
|
+
**檔案類型對應處理方式:**
|
|
28
|
+
|
|
29
|
+
| 副檔名 | 使用的 Skill | 轉換指令 |
|
|
30
|
+
|--------|-------------|---------|
|
|
31
|
+
| `.pdf` | pdf-multimodal-processor | `uv run $OFFICIAL_SKILLS_DIR/pdf-multimodal-processor/scripts/process_pdf.py -i <FILE> -o <OUTPUT_DIR>` |
|
|
32
|
+
| `.docx` | docx-to-markdown | `uv run $OFFICIAL_SKILLS_DIR/docx-to-markdown/scripts/convert_docx.py -i <FILE> -o <OUTPUT_DIR>` |
|
|
33
|
+
| `.m4a`, `.mp3`, `.wav`, `.webm`, `.ogg`, `.aac`, `.flac`, `.opus`, `.mp4` | gemini-transcribe | `uv run $OFFICIAL_SKILLS_DIR/gemini-transcribe/scripts/transcribe.py -i <FILE> -o <OUTPUT_FILE>` |
|
|
34
|
+
|
|
35
|
+
**執行步驟:**
|
|
36
|
+
|
|
37
|
+
1. 建立輸出目錄 `{輸入資料夾}/純文字output/`
|
|
38
|
+
2. 列出輸入資料夾內所有檔案(排除子目錄 `純文字output`)
|
|
39
|
+
3. 依副檔名逐一呼叫對應 skill 的腳本,將結果輸出到 `純文字output/`
|
|
40
|
+
- PDF → 輸出 `.md` 檔
|
|
41
|
+
- DOCX → 輸出 `.md` 檔
|
|
42
|
+
- 音訊 → 輸出 `.md` 檔(使用 `-o` 指定輸出路徑)
|
|
43
|
+
4. 若有不支援的副檔名,跳過並記錄警告
|
|
44
|
+
|
|
45
|
+
### Phase 2:閱讀所有純文字資料
|
|
46
|
+
|
|
47
|
+
讀取 `純文字output/` 目錄下的所有 `.md` 和 `.json` 檔案,理解個案的完整背景資訊。
|
|
48
|
+
|
|
49
|
+
### Phase 3:逐項撰寫觀護輔導紀要
|
|
50
|
+
|
|
51
|
+
依照 `references/guideline.md` 中附表 5 的格式,為以下每一個項目建立一個 todo,逐項撰寫。每個項目撰寫時,產出一個 note 檔案到 `{輸入資料夾}/notes/` 目錄。
|
|
52
|
+
|
|
53
|
+
**撰寫項目清單(共 16 項):**
|
|
54
|
+
|
|
55
|
+
#### 一、穩定動態風險說明(6 項)
|
|
56
|
+
|
|
57
|
+
| # | 項目 | Note 檔名 | 撰寫重點 |
|
|
58
|
+
|---|------|----------|---------|
|
|
59
|
+
| 1 | 工作或收入情形 | `note-01-工作收入.md` | 就學、就業、收入財務狀況 |
|
|
60
|
+
| 2 | 壓力適應情形 | `note-02-壓力適應.md` | 目前壓力負荷、韌性及衝動控制力 |
|
|
61
|
+
| 3 | 負向情緒情形 | `note-03-負向情緒.md` | 遭遇情緒挫折及解決方式 |
|
|
62
|
+
| 4 | 穩定復歸情形 | `note-04-穩定復歸.md` | 生活動態、身心健康、同儕交往、生活居住、刑案紀錄、藥酒濫用、休閒活動、社福資源(無變動可略式記載) |
|
|
63
|
+
| 5 | 遵守事項情形 | `note-05-遵守事項.md` | 身心治療、輔導教育、法治教育、義務勞務等處分之履行狀況 |
|
|
64
|
+
| 6 | 其他穩定風險 | `note-06-其他穩定風險.md` | 經觀護人、主任觀護人、檢察官評估認與再犯風險相關之事項 |
|
|
65
|
+
|
|
66
|
+
#### 二、急性動態風險說明(6 項)
|
|
67
|
+
|
|
68
|
+
| # | 項目 | Note 檔名 | 撰寫重點 |
|
|
69
|
+
|---|------|----------|---------|
|
|
70
|
+
| 7 | 列管核心問題 | `note-07-列管核心.md` | 暴力、身心狀況、性偏差等問題 |
|
|
71
|
+
| 8 | 社會支持問題 | `note-08-社會支持.md` | 支持網絡減少、與不良行為者往還 |
|
|
72
|
+
| 9 | 觀護治療問題 | `note-09-觀護治療.md` | 拒絕觀護或治療、無故未到 |
|
|
73
|
+
| 10 | 認知能力問題 | `note-10-認知能力.md` | 認知扭曲、敵意、接近被害人、性幻想 |
|
|
74
|
+
| 11 | 衝動犯罪問題 | `note-11-衝動犯罪.md` | 再犯罪偵審進度 |
|
|
75
|
+
| 12 | 其他急性風險 | `note-12-其他急性風險.md` | 經觀護人、主任觀護人、檢察官評估認與再犯風險相關之事項 |
|
|
76
|
+
|
|
77
|
+
#### 三、執行保護管束者之意見(4 項)
|
|
78
|
+
|
|
79
|
+
| # | 項目 | Note 檔名 | 撰寫重點 |
|
|
80
|
+
|---|------|----------|---------|
|
|
81
|
+
| 13 | 評估再犯風險 | `note-13-再犯風險評估.md` | 高/中/低,須附理由說明 |
|
|
82
|
+
| 14 | 列管案件別 | `note-14-列管案件別.md` | 核心/非核心,須附判斷依據 |
|
|
83
|
+
| 15 | 社會復歸需求 | `note-15-社會復歸需求.md` | 媒合就業、支持系統、居住處所、遷移戶籍等所需資源 |
|
|
84
|
+
| 16 | 後續處遇計畫 | `note-16-後續處遇計畫.md` | 轉介單、再犯預防命令、管區報到單等具體計畫 |
|
|
85
|
+
|
|
86
|
+
**每個 Note 的撰寫規範:**
|
|
87
|
+
|
|
88
|
+
- 標題:項目名稱
|
|
89
|
+
- 內容:基於 `純文字output/` 中的原始資料,擇要摘述與該項目相關的事實
|
|
90
|
+
- 語氣:觀護人專業紀錄語氣,客觀、簡潔
|
|
91
|
+
- 若原始資料中無相關資訊,記載「本次約談未涉及此項目」或「依現有資料無相關記載」
|
|
92
|
+
- 每個 note 完成後,將對應的 todo 標記為完成
|
|
93
|
+
|
|
94
|
+
### Phase 4:整合產出觀護輔導紀要
|
|
95
|
+
|
|
96
|
+
將所有 note 整合為最終的觀護輔導紀要,輸出到 `{輸入資料夾}/觀護輔導紀要.md`。
|
|
97
|
+
|
|
98
|
+
**輸出格式範本:**
|
|
99
|
+
|
|
100
|
+
```markdown
|
|
101
|
+
# 觀護輔導紀要
|
|
102
|
+
|
|
103
|
+
**報表編號**: 320070
|
|
104
|
+
**進行日期**: {日期}
|
|
105
|
+
**進行項目**: 約談
|
|
106
|
+
**案號**: {從資料中提取}
|
|
107
|
+
**個案姓名**: {從資料中提取}
|
|
108
|
+
**股別**: {從資料中提取}
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 一、穩定動態風險說明
|
|
113
|
+
|
|
114
|
+
### 1. 工作或收入情形
|
|
115
|
+
{整合 note-01 內容}
|
|
116
|
+
|
|
117
|
+
### 2. 壓力適應情形
|
|
118
|
+
{整合 note-02 內容}
|
|
119
|
+
|
|
120
|
+
### 3. 負向情緒情形
|
|
121
|
+
{整合 note-03 內容}
|
|
122
|
+
|
|
123
|
+
### 4. 穩定復歸情形
|
|
124
|
+
{整合 note-04 內容}
|
|
125
|
+
|
|
126
|
+
### 5. 遵守事項情形
|
|
127
|
+
{整合 note-05 內容}
|
|
128
|
+
|
|
129
|
+
### 6. 其他
|
|
130
|
+
{整合 note-06 內容}
|
|
131
|
+
|
|
132
|
+
## 二、急性動態風險說明
|
|
133
|
+
|
|
134
|
+
### 1. 列管核心問題
|
|
135
|
+
{整合 note-07 內容}
|
|
136
|
+
|
|
137
|
+
### 2. 社會支持問題
|
|
138
|
+
{整合 note-08 內容}
|
|
139
|
+
|
|
140
|
+
### 3. 觀護治療問題
|
|
141
|
+
{整合 note-09 內容}
|
|
142
|
+
|
|
143
|
+
### 4. 認知能力問題
|
|
144
|
+
{整合 note-10 內容}
|
|
145
|
+
|
|
146
|
+
### 5. 衝動犯罪問題
|
|
147
|
+
{整合 note-11 內容}
|
|
148
|
+
|
|
149
|
+
### 6. 其他
|
|
150
|
+
{整合 note-12 內容}
|
|
151
|
+
|
|
152
|
+
## 三、執行保護管束者之意見
|
|
153
|
+
|
|
154
|
+
### 1. 評估再犯風險
|
|
155
|
+
{整合 note-13 內容}
|
|
156
|
+
|
|
157
|
+
### 2. 列管案件別
|
|
158
|
+
{整合 note-14 內容}
|
|
159
|
+
|
|
160
|
+
### 3. 社會復歸需求
|
|
161
|
+
{整合 note-15 內容}
|
|
162
|
+
|
|
163
|
+
### 4. 後續處遇計畫
|
|
164
|
+
{整合 note-16 內容}
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
觀護人:_______________
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
## 重要原則
|
|
172
|
+
|
|
173
|
+
- **以原始資料為準**:所有撰寫內容必須基於 `純文字output/` 中的事實,不得捏造。
|
|
174
|
+
- **擇要紀錄**:依案件需求擇要記載,無需逐項詳填,無資料時可略式記載。
|
|
175
|
+
- **風險導向**:以再犯風險為撰寫核心,聚焦風險-需求-策略(RNR)架構。
|
|
176
|
+
- **避免重複**:各項目之間避免重複記載相同事實。
|
|
177
|
+
- **專業語氣**:使用觀護人專業紀錄用語,客觀、中立、簡潔。
|
|
178
|
+
|
|
179
|
+
## 輸出檔案結構
|
|
180
|
+
|
|
181
|
+
處理完成後,輸入資料夾結構如下:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
case-folder/
|
|
185
|
+
├── (原始檔案: .pdf, .docx, .m4a, ...)
|
|
186
|
+
├── 純文字output/
|
|
187
|
+
│ ├── 文件A.md
|
|
188
|
+
│ ├── 文件B.md
|
|
189
|
+
│ └── 錄音C.md
|
|
190
|
+
├── notes/
|
|
191
|
+
│ ├── note-01-工作收入.md
|
|
192
|
+
│ ├── note-02-壓力適應.md
|
|
193
|
+
│ ├── ...
|
|
194
|
+
│ └── note-16-後續處遇計畫.md
|
|
195
|
+
└── 觀護輔導紀要.md ← 最終產出
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## 參考資料
|
|
199
|
+
|
|
200
|
+
- **`references/guideline.md`** — 法務部「觀護輔導紀要」撰寫範例與說明全文,含附表 5 格式定義
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# 「觀護輔導紀要」撰寫範例與說明
|
|
2
|
+
|
|
3
|
+
114 年 0 月 00 日核定
|
|
4
|
+
|
|
5
|
+
## 一、目的
|
|
6
|
+
|
|
7
|
+
為標準化觀護人「觀護輔導紀要」記載項目,補充「執行觀護案件手冊」,俾利觀護處遇計畫之擬定、再犯風險智慧輔助系統之研發,精簡觀護人填寫約談、訪視輔導紀要之負擔,建立以再犯風險為重心之撰寫策略,提供「風險-需求-策略」之紀錄格式,俾利各地方檢察署觀護人依循。
|
|
8
|
+
|
|
9
|
+
## 二、評估再犯風險(Risk)
|
|
10
|
+
|
|
11
|
+
### (一) 靜態再犯風險因子
|
|
12
|
+
|
|
13
|
+
1. 受保護管束人於保護管束開始前,即已存在之再犯風險因子,於保護管束期間內並不會改變。
|
|
14
|
+
2. 紀錄頻率:保護管束期間彙整一次,依執行觀護案件手冊規定,於案件分案後 3 個月內擬定分類分級處遇措施之前,完成靜態再犯風險因子之彙整。
|
|
15
|
+
3. 紀錄方式:
|
|
16
|
+
- 觀護人首次訪視之「訪視報告表」(附表 1)或新案收案之「觀護輔導紀要」(附表 2),可援引監所、判決書記載,並可依輔助人力之專業,組成觀護團隊共同完成。
|
|
17
|
+
- 保護管束期間,觀護人如發現變動,得隨時於「觀護輔導紀要」中記載。
|
|
18
|
+
4. 紀錄內容:觀護人依案件需求,擇要紀錄下列與再犯風險相關之事項
|
|
19
|
+
- (1) 暴力、衝動行為及前科史(含性偏差行為史)。
|
|
20
|
+
- (2) 身心健康就醫史。
|
|
21
|
+
- (3) 偏差同儕史:交友、社會影響及參與幫派組織情形。
|
|
22
|
+
- (4) 生活史:過去成長背景、生活居住狀況及活動領域。
|
|
23
|
+
- (5) 家庭關係史:父母子女及親密關係、家庭支持情形。
|
|
24
|
+
- (6) 藥酒濫用史:施用毒品及酒精使用情況及紀錄。
|
|
25
|
+
- (7) 工作史:具備之工作技能、工作經歷及收入財務情形。
|
|
26
|
+
- (8) 教育史:智識程度、專業能力與學歷。
|
|
27
|
+
- (9) 休閒活動史:高風險活動及場所、偏差嗜好。
|
|
28
|
+
- (10) 社福資源接觸史:過去或現在持續運用之社福資源。
|
|
29
|
+
- (11) 其他經觀護人、主任觀護人、檢察官評估,認與再犯風險相關之事項。
|
|
30
|
+
|
|
31
|
+
### (二) 穩定動態再犯風險因子
|
|
32
|
+
|
|
33
|
+
1. 受保護管束人於保護管束期間內,不易產生劇烈變動之再犯風險因子。
|
|
34
|
+
2. 紀錄頻率:
|
|
35
|
+
- 保護管束案件非列管核心期間,每三月至少更新乙次(其他月份之報到,則以再犯風險智慧輔助系統、約談報告表、部頒量表等方式呈現)。
|
|
36
|
+
- 保護管束案件列管核心期間,每月併同急性動態再犯風險因子更新乙次。
|
|
37
|
+
3. 紀錄方式:觀護人「觀護輔導紀要」(附表 3)、「訪視報告表」(附表 4),可依輔助人力之專業,組成觀護團隊共同完成。
|
|
38
|
+
4. 紀錄內容:觀護人依案件需求,擇要紀錄下列與再犯風險相關之事項
|
|
39
|
+
- (1) 工作或收入情形:就學、就業、收入財務狀況。
|
|
40
|
+
- (2) 壓力適應情形:目前壓力負荷、韌性及衝動控制力等。
|
|
41
|
+
- (3) 負向情緒情形:遭遇情緒挫折及解決方式等。
|
|
42
|
+
- (4) 穩定復歸情形:如近期生活動態、身心健康、同儕交往、生活居住、刑案紀錄、藥酒濫用、休閒活動、社福資源等,如無變動,可略式記載。
|
|
43
|
+
- (5) 遵守事項情形:如身心治療、輔導教育、法治教育、義務勞務等處分之履行狀況。
|
|
44
|
+
- (6) 其他經觀護人、主任觀護人、檢察官評估,認與再犯風險相關之事項。
|
|
45
|
+
5. 全案交付榮譽觀護人案件,至少每半年需回地檢署約談報到 1 次,其觀護輔導紀要紀錄頻率,從其規定。
|
|
46
|
+
6. 轉介心理師及社工師追輔案件,心理師及社工師處遇期間,不另填寫觀護輔導紀要。
|
|
47
|
+
|
|
48
|
+
### (三) 急性動態再犯風險因子
|
|
49
|
+
|
|
50
|
+
1. 受保護管束人保護管束期間,產生劇烈變動之再犯風險因子。
|
|
51
|
+
2. 紀錄頻率:保護管束案件列管核心期間,每月至少更新乙次(該月份其餘報到,則以再犯風險智慧輔助系統、約談報告表、部頒量表等方式呈現)。
|
|
52
|
+
3. 紀錄方式:觀護人「觀護輔導紀要」(附表 5 之 1、2)、「訪視報告表」(附表 6),可依輔助人力之專業,組成觀護團隊共同完成。
|
|
53
|
+
4. 紀錄內容:觀護人依案件需求,擇要紀錄下列與再犯風險相關之事項
|
|
54
|
+
- (1) 列管核心問題:如暴力、身心狀況、性偏差等問題。
|
|
55
|
+
- (2) 社會支持問題:支持網絡減少、與不良行為者往還等。
|
|
56
|
+
- (3) 觀護治療問題:拒絕觀護或治療、無故未到等。
|
|
57
|
+
- (4) 認知能力問題:認知扭曲、敵意、接近被害人、性幻想等。
|
|
58
|
+
- (5) 衝動犯罪問題:再犯罪偵審進度等。
|
|
59
|
+
- (6) 其他經觀護人、主任觀護人、檢察官評估,認與再犯風險相關之事項。
|
|
60
|
+
|
|
61
|
+
### (四) 分級分類
|
|
62
|
+
|
|
63
|
+
撰寫觀護輔導紀要可搭配分級分類表、部頒量表、再犯風險智慧輔助系統等工具,當次之觀護輔導紀要以避免重複記載為原則。
|
|
64
|
+
|
|
65
|
+
## 三、復歸社會之需求(Need)
|
|
66
|
+
|
|
67
|
+
為減少受保護管束人再犯或降低相關風險,由觀護人(或輔助人力)彙整個案所需資源,提出問題解決方式(如媒合就業、支持系統、居住處所、遷移戶籍等)。
|
|
68
|
+
|
|
69
|
+
## 四、提出處遇計畫(Responsivity)
|
|
70
|
+
|
|
71
|
+
觀護人提出轉介單、再犯預防命令、管區報到單或撤銷保護管束報告書,並由觀護人(或輔助人力)監督、輔導並執行完成各項處遇計畫。
|
|
72
|
+
|
|
73
|
+
## 五、修訂
|
|
74
|
+
|
|
75
|
+
觀護輔導紀要記載之再犯風險因子撰寫策略、更新頻率、填寫方式等事宜,得適時檢討修正之。
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 附表 5:觀護輔導紀要(報表編號:320070)
|
|
80
|
+
|
|
81
|
+
### 表頭欄位
|
|
82
|
+
|
|
83
|
+
| 欄位 | 說明 |
|
|
84
|
+
|------|------|
|
|
85
|
+
| 進行日期 | 約談或訪視日期 |
|
|
86
|
+
| 進行項目 | 約談 |
|
|
87
|
+
| 案號 | 案件編號 |
|
|
88
|
+
| 個案姓名 | 受保護管束人姓名 |
|
|
89
|
+
| 股別 | 承辦股別 |
|
|
90
|
+
|
|
91
|
+
### 紀要內容(擇要紀錄)
|
|
92
|
+
|
|
93
|
+
#### 一、穩定動態風險說明
|
|
94
|
+
|
|
95
|
+
1. **工作或收入情形**:就學、就業、收入財務狀況。
|
|
96
|
+
2. **壓力適應情形**:目前壓力負荷、韌性及衝動控制力等。
|
|
97
|
+
3. **負向情緒情形**:遭遇情緒挫折及解決方式等。
|
|
98
|
+
4. **穩定復歸情形**:如近期生活動態、身心健康、同儕交往、生活居住、刑案紀錄、藥酒濫用、休閒活動、社福資源等,如無變動,可略式記載。
|
|
99
|
+
5. **遵守事項情形**:如身心治療、輔導教育、法治教育、義務勞務等處分之履行狀況。
|
|
100
|
+
6. **其他**:經觀護人、主任觀護人、檢察官評估,認與再犯風險相關之事項。
|
|
101
|
+
|
|
102
|
+
#### 二、急性動態風險說明
|
|
103
|
+
|
|
104
|
+
1. **列管核心問題**:如暴力、身心狀況、性偏差等問題。
|
|
105
|
+
2. **社會支持問題**:支持網絡減少、與不良行為者往還等。
|
|
106
|
+
3. **觀護治療問題**:拒絕觀護或治療、無故未到等。
|
|
107
|
+
4. **認知能力問題**:認知扭曲、敵意、接近被害人、性幻想等。
|
|
108
|
+
5. **衝動犯罪問題**:再犯罪偵審進度等。
|
|
109
|
+
6. **其他**:經觀護人、主任觀護人、檢察官評估,認與再犯風險相關之事項。
|
|
110
|
+
|
|
111
|
+
#### 三、執行保護管束者之意見
|
|
112
|
+
|
|
113
|
+
1. **評估再犯風險**:高/中/低
|
|
114
|
+
2. **列管案件別**:核心/非核心
|
|
115
|
+
3. **社會復歸需求**:(觀護人填寫)
|
|
116
|
+
4. **後續處遇計畫**:(觀護人填寫)
|
|
117
|
+
|
|
118
|
+
簽章:觀護人
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pdf-multimodal-processor
|
|
3
|
+
description: 智慧 PDF 文字提取:先用 pdfplumber 提取原生文字,掃描頁才走 OCR API。支援多頁 PDF 處理。
|
|
4
|
+
allowed-tools: Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# PDF 多模態處理器
|
|
8
|
+
|
|
9
|
+
智慧 PDF 文字提取工具。先使用 pdfplumber 嘗試提取原生文字,僅對掃描頁(無法提取文字的頁面)才轉圖片走 OCR API,大幅提升處理效率。
|
|
10
|
+
|
|
11
|
+
## 功能特色
|
|
12
|
+
|
|
13
|
+
- 智慧判斷:逐頁偵測是否為掃描頁(`page.chars == 0`)
|
|
14
|
+
- 原生文字頁直接提取,跳過圖片轉換和 OCR API
|
|
15
|
+
- 掃描頁自動轉換為圖片並走座標感知 ML OCR API
|
|
16
|
+
- 多頁結果整合為單一 JSON 檔案,每頁標記提取方式
|
|
17
|
+
- 支援繁體中文、簡體中文、英文等多語言
|
|
18
|
+
|
|
19
|
+
## 使用方式
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
uv run $OFFICIAL_SKILLS_DIR/pdf-multimodal-processor/scripts/process_pdf.py \
|
|
23
|
+
--input <PDF_PATH_OR_DIR> \
|
|
24
|
+
--output <OUTPUT_DIR>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### 參數說明
|
|
28
|
+
|
|
29
|
+
| 參數 | 縮寫 | 必填 | 說明 |
|
|
30
|
+
|------|------|------|------|
|
|
31
|
+
| `--input` | `-i` | 是 | 輸入 PDF 檔案或目錄(可指定多個) |
|
|
32
|
+
| `--output` | `-o` | 是 | 輸出目錄 |
|
|
33
|
+
| `--dpi` | `-d` | 否 | 圖片解析度,預設 200(OCR 建議最低 150) |
|
|
34
|
+
| `--quality` | `-q` | 否 | JPEG 品質,預設 85(搭配 optimize 壓縮) |
|
|
35
|
+
|
|
36
|
+
### 範例
|
|
37
|
+
|
|
38
|
+
**批次處理多個 PDF(推薦):**
|
|
39
|
+
```bash
|
|
40
|
+
uv run $OFFICIAL_SKILLS_DIR/pdf-multimodal-processor/scripts/process_pdf.py \
|
|
41
|
+
-i /path/to/文件A.pdf /path/to/文件B.pdf /path/to/文件C.pdf \
|
|
42
|
+
-o /path/to/output/
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**處理單個 PDF:**
|
|
46
|
+
```bash
|
|
47
|
+
uv run $OFFICIAL_SKILLS_DIR/pdf-multimodal-processor/scripts/process_pdf.py \
|
|
48
|
+
-i /path/to/申請書.pdf \
|
|
49
|
+
-o /path/to/output/
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**指定 DPI 和品質:**
|
|
53
|
+
```bash
|
|
54
|
+
uv run $OFFICIAL_SKILLS_DIR/pdf-multimodal-processor/scripts/process_pdf.py \
|
|
55
|
+
-i /path/to/a.pdf /path/to/b.pdf \
|
|
56
|
+
-o /path/to/output/ \
|
|
57
|
+
--dpi 400 \
|
|
58
|
+
--quality 90
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 處理流程
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
PDF 文件
|
|
65
|
+
│
|
|
66
|
+
▼
|
|
67
|
+
┌───────────────────────────────┐
|
|
68
|
+
│ 1. pdfplumber 逐頁分析 │
|
|
69
|
+
│ 判斷:len(page.chars) == 0 │
|
|
70
|
+
└───────────────────────────────┘
|
|
71
|
+
│ │
|
|
72
|
+
│ 有文字 │ 掃描頁
|
|
73
|
+
▼ ▼
|
|
74
|
+
┌───────────────┐ ┌────────────────────┐
|
|
75
|
+
│ 直接提取文字 │ │ 轉圖片 → OCR API │
|
|
76
|
+
│ extract_text │ │ (pdf2image + OCR) │
|
|
77
|
+
│ method:native │ │ method: ocr │
|
|
78
|
+
└───────────────┘ └────────────────────┘
|
|
79
|
+
│ │
|
|
80
|
+
└────────┬───────────┘
|
|
81
|
+
▼
|
|
82
|
+
┌───────────────────────────────┐
|
|
83
|
+
│ 3. 合併 JSON │
|
|
84
|
+
│ 每頁標記 extraction_method │
|
|
85
|
+
│ 輸出 JSON + Markdown │
|
|
86
|
+
└───────────────────────────────┘
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
## 輸出檔案
|
|
90
|
+
|
|
91
|
+
處理完成後會產生:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
data/output/
|
|
95
|
+
├── 申請書.json # OCR 結果 JSON(含結構化資料)
|
|
96
|
+
├── 申請書.md # 純文字內容(full_text)
|
|
97
|
+
└── [img]申請書/ # PDF 轉出的圖片
|
|
98
|
+
├── 申請書_page_1.jpg
|
|
99
|
+
├── 申請書_page_2.jpg
|
|
100
|
+
└── 申請書_page_3.jpg
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## 輸出 JSON 結構
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"source_file": "申請書.pdf",
|
|
108
|
+
"file_type": "pdf",
|
|
109
|
+
"total_pages": 3,
|
|
110
|
+
"processed_at": "2026-01-15T12:00:00Z",
|
|
111
|
+
"pages": [
|
|
112
|
+
{
|
|
113
|
+
"page": 1,
|
|
114
|
+
"extraction_method": "native",
|
|
115
|
+
"text": "原生提取的文字..."
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"page": 2,
|
|
119
|
+
"extraction_method": "ocr",
|
|
120
|
+
"image_file": "申請書_page_2.jpg",
|
|
121
|
+
"ocr_result": {
|
|
122
|
+
"status": "succeeded",
|
|
123
|
+
"text": "OCR 辨識的文字...",
|
|
124
|
+
"lines": [
|
|
125
|
+
{
|
|
126
|
+
"text": "辨識的文字行...",
|
|
127
|
+
"boundingBox": [x1, y1, x2, y2, ...]
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
"full_text": "所有頁面合併的純文字"
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## API 說明
|
|
138
|
+
|
|
139
|
+
使用座標感知 ML OCR API(非同步):
|
|
140
|
+
- **端點**: `https://app.botrun.ai/azure-ocr-api`
|
|
141
|
+
- **提交**: POST `/vision/v3.2/read/analyze`
|
|
142
|
+
- **取得結果**: GET `/vision/v3.2/read/analyzeResults/{operation-id}`
|
|
143
|
+
- **等待機制**: 最多 4 次輪詢,每次間隔 15 秒
|
|
144
|
+
|
|
145
|
+
## 支援的檔案格式
|
|
146
|
+
|
|
147
|
+
| 格式 | 副檔名 |
|
|
148
|
+
|------|--------|
|
|
149
|
+
| PDF | .pdf |
|
|
150
|
+
|
|
151
|
+
> 若需處理單張圖片,請使用 `gcp-coord-ml-ocr` skill。
|
|
152
|
+
|
|
153
|
+
## 環境需求
|
|
154
|
+
|
|
155
|
+
- Python 3.8+
|
|
156
|
+
- 網路連線(需存取座標感知 ML OCR API)
|
|
157
|
+
- 使用 `uv run` 執行(自動安裝依賴)
|
|
158
|
+
|
|
159
|
+
## 依賴套件
|
|
160
|
+
|
|
161
|
+
腳本使用 PEP 723 inline script metadata,`uv run` 會自動安裝:
|
|
162
|
+
- `requests>=2.28.0`
|
|
163
|
+
- `pdf2image>=1.17.0`
|
|
164
|
+
- `Pillow>=10.0.0`
|
|
165
|
+
- `pdfplumber>=0.10.0`
|
|
166
|
+
|
|
167
|
+
## 故障排除
|
|
168
|
+
|
|
169
|
+
### PDF 轉圖片失敗
|
|
170
|
+
|
|
171
|
+
確保已安裝 poppler:
|
|
172
|
+
```bash
|
|
173
|
+
# macOS
|
|
174
|
+
brew install poppler
|
|
175
|
+
|
|
176
|
+
# Ubuntu/Debian
|
|
177
|
+
sudo apt-get install poppler-utils
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### OCR 請求超時
|
|
181
|
+
|
|
182
|
+
API 預設等待 60 秒(4 次輪詢 × 15 秒),若 PDF 頁數過多可能需要更長時間。
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
*Version: 2.0.0*
|