@synapta/skills 0.1.0 → 0.1.2
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/dist/index.js +11 -4
- package/package.json +3 -4
- package/skills/ATTRIBUTION.md +80 -0
- package/skills/accessibility-audit/SKILL.md +325 -0
- package/skills/accessibility-audit/reference/wcag-checklist.md +103 -0
- package/skills/apns-notifier/SKILL.md +86 -0
- package/skills/approval-policy-enforcer/SKILL.md +66 -0
- package/skills/apps-sdk-builder/LICENSE.txt +201 -0
- package/skills/apps-sdk-builder/SKILL.md +328 -0
- package/skills/apps-sdk-builder/agents/openai.yaml +13 -0
- package/skills/apps-sdk-builder/references/app-archetypes.md +132 -0
- package/skills/apps-sdk-builder/references/apps-sdk-docs-workflow.md +135 -0
- package/skills/apps-sdk-builder/references/interactive-state-sync-patterns.md +113 -0
- package/skills/apps-sdk-builder/references/repo-contract-and-validation.md +93 -0
- package/skills/apps-sdk-builder/references/search-fetch-standard.md +67 -0
- package/skills/apps-sdk-builder/references/upstream-example-workflow.md +79 -0
- package/skills/apps-sdk-builder/references/window-openai-patterns.md +79 -0
- package/skills/apps-sdk-builder/scripts/scaffold_node_ext_apps.mjs +606 -0
- package/skills/architecture-selector/SKILL.md +64 -0
- package/skills/backlog-planner/SKILL.md +68 -0
- package/skills/carplay-entitlement-checker/SKILL.md +82 -0
- package/skills/concept-discovery/SKILL.md +517 -0
- package/skills/concept-discovery/assets/sample-analysis.json +81 -0
- package/skills/concept-discovery/expected_outputs/sample-enum-dictionary.md +25 -0
- package/skills/concept-discovery/expected_outputs/sample-page-user-list.md +83 -0
- package/skills/concept-discovery/expected_outputs/sample-prd-readme.md +43 -0
- package/skills/concept-discovery/references/framework-patterns.md +228 -0
- package/skills/concept-discovery/references/prd-quality-checklist.md +65 -0
- package/skills/concept-discovery/scripts/codebase_analyzer.py +732 -0
- package/skills/concept-discovery/scripts/prd_scaffolder.py +435 -0
- package/skills/dast-zap/SKILL.md +453 -0
- package/skills/dast-zap/assets/.gitkeep +9 -0
- package/skills/dast-zap/assets/github_action.yml +207 -0
- package/skills/dast-zap/assets/gitlab_ci.yml +226 -0
- package/skills/dast-zap/assets/zap_automation.yaml +196 -0
- package/skills/dast-zap/assets/zap_context.xml +192 -0
- package/skills/dast-zap/references/EXAMPLE.md +40 -0
- package/skills/dast-zap/references/api_testing_guide.md +475 -0
- package/skills/dast-zap/references/authentication_guide.md +431 -0
- package/skills/dast-zap/references/false_positive_handling.md +427 -0
- package/skills/dast-zap/references/owasp_mapping.md +255 -0
- package/skills/dep-sbom-scan/SKILL.md +466 -0
- package/skills/deploy-cloudflare/SKILL.md +930 -0
- package/skills/deploy-docker/SKILL.md +55 -0
- package/skills/deploy-fly/SKILL.md +228 -0
- package/skills/deploy-k8s/SKILL.md +108 -0
- package/skills/deploy-k8s/assets/logo.png +0 -0
- package/skills/deploy-k8s/docs/README.md +29 -0
- package/skills/deploy-k8s/docs/SUMMARY.md +56 -0
- package/skills/deploy-k8s/docs/advanced/token-efficiency.md +61 -0
- package/skills/deploy-k8s/docs/architecture/multi-tenancy.md +96 -0
- package/skills/deploy-k8s/docs/architecture/storage-and-state.md +102 -0
- package/skills/deploy-k8s/docs/architecture/workload-patterns.md +87 -0
- package/skills/deploy-k8s/docs/book.json +16 -0
- package/skills/deploy-k8s/docs/community/changelog.md +34 -0
- package/skills/deploy-k8s/docs/community/contributing.md +67 -0
- package/skills/deploy-k8s/docs/core-concepts/failure-modes.md +153 -0
- package/skills/deploy-k8s/docs/core-concepts/philosophy.md +83 -0
- package/skills/deploy-k8s/docs/core-concepts/workflow.md +124 -0
- package/skills/deploy-k8s/docs/examples/bad-patterns.md +47 -0
- package/skills/deploy-k8s/docs/examples/do-dont-checklist.md +37 -0
- package/skills/deploy-k8s/docs/examples/good-patterns.md +49 -0
- package/skills/deploy-k8s/docs/failure-modes/api-drift.md +104 -0
- package/skills/deploy-k8s/docs/failure-modes/fragile-rollouts.md +99 -0
- package/skills/deploy-k8s/docs/failure-modes/insecure-workload-defaults.md +80 -0
- package/skills/deploy-k8s/docs/failure-modes/network-exposure.md +98 -0
- package/skills/deploy-k8s/docs/failure-modes/privilege-sprawl.md +91 -0
- package/skills/deploy-k8s/docs/failure-modes/resource-starvation.md +85 -0
- package/skills/deploy-k8s/docs/getting-started/installation.md +152 -0
- package/skills/deploy-k8s/docs/getting-started/quick-start.md +115 -0
- package/skills/deploy-k8s/docs/guides/helm-patterns.md +71 -0
- package/skills/deploy-k8s/docs/guides/kustomize-patterns.md +65 -0
- package/skills/deploy-k8s/docs/guides/observability.md +67 -0
- package/skills/deploy-k8s/docs/guides/security-hardening.md +59 -0
- package/skills/deploy-k8s/docs/guides/validation-and-policy.md +66 -0
- package/skills/deploy-k8s/docs/integrations/mcp-integration.md +52 -0
- package/skills/deploy-k8s/docs/package-lock.json +2892 -0
- package/skills/deploy-k8s/docs/package.json +13 -0
- package/skills/deploy-k8s/references/api-drift.md +298 -0
- package/skills/deploy-k8s/references/conditional/aks-patterns.md +70 -0
- package/skills/deploy-k8s/references/conditional/eks-patterns.md +79 -0
- package/skills/deploy-k8s/references/conditional/gitops-controllers.md +71 -0
- package/skills/deploy-k8s/references/conditional/gke-patterns.md +74 -0
- package/skills/deploy-k8s/references/conditional/observability-stacks.md +80 -0
- package/skills/deploy-k8s/references/conditional/openshift-patterns.md +67 -0
- package/skills/deploy-k8s/references/daemonset-operator-patterns.md +155 -0
- package/skills/deploy-k8s/references/deployment-patterns.md +146 -0
- package/skills/deploy-k8s/references/do-dont-patterns.md +87 -0
- package/skills/deploy-k8s/references/examples-bad.md +282 -0
- package/skills/deploy-k8s/references/examples-good.md +440 -0
- package/skills/deploy-k8s/references/fragile-rollouts.md +303 -0
- package/skills/deploy-k8s/references/helm-patterns.md +203 -0
- package/skills/deploy-k8s/references/insecure-workload-defaults.md +300 -0
- package/skills/deploy-k8s/references/job-patterns.md +120 -0
- package/skills/deploy-k8s/references/kustomize-patterns.md +239 -0
- package/skills/deploy-k8s/references/multi-tenancy.md +343 -0
- package/skills/deploy-k8s/references/network-exposure.md +481 -0
- package/skills/deploy-k8s/references/observability.md +302 -0
- package/skills/deploy-k8s/references/privilege-sprawl.md +273 -0
- package/skills/deploy-k8s/references/resource-starvation.md +374 -0
- package/skills/deploy-k8s/references/security-hardening.md +209 -0
- package/skills/deploy-k8s/references/stateful-patterns.md +130 -0
- package/skills/deploy-k8s/references/storage-and-state.md +330 -0
- package/skills/deploy-k8s/references/validation-and-policy.md +242 -0
- package/skills/deploy-railway/SKILL.md +235 -0
- package/skills/deploy-railway/references/analyze-db-mongo.md +84 -0
- package/skills/deploy-railway/references/analyze-db-mysql.md +254 -0
- package/skills/deploy-railway/references/analyze-db-postgres.md +479 -0
- package/skills/deploy-railway/references/analyze-db-redis.md +208 -0
- package/skills/deploy-railway/references/analyze-db.md +344 -0
- package/skills/deploy-railway/references/configure.md +309 -0
- package/skills/deploy-railway/references/deploy.md +195 -0
- package/skills/deploy-railway/references/operate.md +214 -0
- package/skills/deploy-railway/references/request.md +248 -0
- package/skills/deploy-railway/references/setup.md +312 -0
- package/skills/deploy-railway/scripts/analyze-mongo.py +1549 -0
- package/skills/deploy-railway/scripts/analyze-mysql.py +1195 -0
- package/skills/deploy-railway/scripts/analyze-postgres.py +3058 -0
- package/skills/deploy-railway/scripts/analyze-redis.py +1090 -0
- package/skills/deploy-railway/scripts/dal.py +671 -0
- package/skills/deploy-railway/scripts/enable-pg-stats.py +170 -0
- package/skills/deploy-railway/scripts/pg-extensions.py +370 -0
- package/skills/deploy-railway/scripts/railway-api.sh +52 -0
- package/skills/deploy-ssh/SKILL.md +91 -0
- package/skills/deploy-vercel/SKILL.md +304 -0
- package/skills/deploy-vercel/resources/deploy-codex.sh +301 -0
- package/skills/deploy-vercel/resources/deploy.sh +301 -0
- package/skills/docs-runbooks/SKILL.md +399 -0
- package/skills/drive-status-renderer/SKILL.md +62 -0
- package/skills/iac-scan/SKILL.md +680 -0
- package/skills/iac-scan/assets/.gitkeep +9 -0
- package/skills/iac-scan/assets/checkov_config.yaml +94 -0
- package/skills/iac-scan/assets/github_actions.yml +199 -0
- package/skills/iac-scan/assets/gitlab_ci.yml +218 -0
- package/skills/iac-scan/assets/pre_commit_config.yaml +92 -0
- package/skills/iac-scan/references/EXAMPLE.md +40 -0
- package/skills/iac-scan/references/compliance_mapping.md +237 -0
- package/skills/iac-scan/references/custom_policies.md +460 -0
- package/skills/iac-scan/references/suppression_guide.md +431 -0
- package/skills/incident-briefing/SKILL.md +66 -0
- package/skills/incident-triage/SKILL.md +481 -0
- package/{LICENSE → skills/mcp-builder/LICENSE.txt} +15 -14
- package/skills/mcp-builder/SKILL.md +244 -0
- package/skills/mcp-builder/reference/evaluation.md +602 -0
- package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/skills/mcp-builder/scripts/connections.py +151 -0
- package/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/mobile-pairing/SKILL.md +52 -0
- package/skills/ops-sre/SKILL.md +297 -0
- package/skills/playwright-qa/LICENSE.txt +201 -0
- package/skills/playwright-qa/NOTICE.txt +14 -0
- package/skills/playwright-qa/SKILL.md +156 -0
- package/skills/playwright-qa/agents/openai.yaml +6 -0
- package/skills/playwright-qa/assets/playwright-small.svg +3 -0
- package/skills/playwright-qa/assets/playwright.png +0 -0
- package/skills/playwright-qa/references/cli.md +116 -0
- package/skills/playwright-qa/references/workflows.md +95 -0
- package/skills/playwright-qa/scripts/playwright_cli.sh +25 -0
- package/skills/release-publish/SKILL.md +85 -0
- package/skills/repo-bootstrap/SKILL.md +92 -0
- package/skills/repo-bootstrap/assets/example-workflows/validate-agents.yml +89 -0
- package/skills/repo-bootstrap/assets/root-thin.md +141 -0
- package/skills/repo-bootstrap/assets/root-verbose.md +149 -0
- package/skills/repo-bootstrap/assets/scoped/backend-go.md +107 -0
- package/skills/repo-bootstrap/assets/scoped/backend-php.md +94 -0
- package/skills/repo-bootstrap/assets/scoped/backend-python.md +84 -0
- package/skills/repo-bootstrap/assets/scoped/backend-typescript.md +89 -0
- package/skills/repo-bootstrap/assets/scoped/claude-code-skill.md +101 -0
- package/skills/repo-bootstrap/assets/scoped/cli.md +83 -0
- package/skills/repo-bootstrap/assets/scoped/concourse.md +196 -0
- package/skills/repo-bootstrap/assets/scoped/ddev.md +68 -0
- package/skills/repo-bootstrap/assets/scoped/docker.md +160 -0
- package/skills/repo-bootstrap/assets/scoped/documentation.md +98 -0
- package/skills/repo-bootstrap/assets/scoped/examples.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/frontend-typescript.md +88 -0
- package/skills/repo-bootstrap/assets/scoped/github-actions.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/gitlab-ci.md +174 -0
- package/skills/repo-bootstrap/assets/scoped/oro-bundle.md +209 -0
- package/skills/repo-bootstrap/assets/scoped/oro-project.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/python-modern.md +170 -0
- package/skills/repo-bootstrap/assets/scoped/resources.md +96 -0
- package/skills/repo-bootstrap/assets/scoped/skill-repo.md +139 -0
- package/skills/repo-bootstrap/assets/scoped/symfony.md +168 -0
- package/skills/repo-bootstrap/assets/scoped/testing.md +87 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-docs.md +103 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-extension.md +133 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-project.md +137 -0
- package/skills/repo-bootstrap/assets/scoped/typo3-testing.md +80 -0
- package/skills/repo-bootstrap/checkpoints.yaml +279 -0
- package/skills/repo-bootstrap/evals/evals.json +385 -0
- package/skills/repo-bootstrap/references/ai-contribution-guidelines.md +63 -0
- package/skills/repo-bootstrap/references/ai-tool-compatibility.md +223 -0
- package/skills/repo-bootstrap/references/directory-coverage.md +82 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/coding-agent-cli/scripts-AGENTS.md +389 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/.env.example +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/package.json +33 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/pnpm-lock.yaml +3 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/config.ts +28 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/controllers/userController.ts +74 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/index.ts +26 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/errorHandler.ts +45 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/middleware/requestLogger.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/health.ts +18 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/routes/users.ts +13 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/errors.ts +40 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/src/utils/logger.ts +14 -0
- package/skills/repo-bootstrap/references/examples/express-api-ts/tsconfig.json +24 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/.env.example +19 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/pyproject.toml +88 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/AGENTS.md +85 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/__init__.py +3 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/config.py +49 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/main.py +66 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/__init__.py +13 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/item.py +43 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/models/user.py +40 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/__init__.py +5 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/health.py +20 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/items.py +61 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/routes/users.py +55 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/__init__.py +6 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/item_service.py +77 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/src/services/user_service.py +69 -0
- package/skills/repo-bootstrap/references/examples/fastapi-app/uv.lock +4 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/AGENTS.md +86 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/package.json +20 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/admin/src/App.tsx +5 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/cmd/api/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-api-with-react-admin/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/AGENTS.md +89 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/go.mod +2 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/AGENTS.md +90 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/package.json +17 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/App.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Button.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Footer.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Header.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/internal/web/src/Sidebar.tsx +1 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/main.go +7 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package-lock.json +0 -0
- package/skills/repo-bootstrap/references/examples/go-with-internal-web-tsx/package.json +12 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-AGENTS.md +371 -0
- package/skills/repo-bootstrap/references/examples/ldap-selfservice/internal-web-AGENTS.md +448 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/.scopes +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/AGENTS.md +91 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/composer.json +8 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/package.json +15 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/pnpm-lock.yaml +0 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/src/Controller.php +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/AGENTS.md +92 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/package.json +26 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/App.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Button.tsx +10 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Footer.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/Header.tsx +9 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/src/main.tsx +3 -0
- package/skills/repo-bootstrap/references/examples/php-with-frontend/web/tsconfig.json +13 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/AGENTS.md +75 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/package.json +7 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/package.json +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/packages/web/src/index.ts +11 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-lock.yaml +42 -0
- package/skills/repo-bootstrap/references/examples/pnpm-workspace/pnpm-workspace.yaml +2 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/examples-AGENTS.md +45 -0
- package/skills/repo-bootstrap/references/examples/simple-ldap-go/go.mod +3 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/AGENTS.md +70 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/Classes-AGENTS.md +392 -0
- package/skills/repo-bootstrap/references/examples/t3x-rte-ckeditor-image/composer.json +8 -0
- package/skills/repo-bootstrap/references/feedback-memory-schema.md +135 -0
- package/skills/repo-bootstrap/references/git-hooks-setup.md +79 -0
- package/skills/repo-bootstrap/references/output-structure.md +124 -0
- package/skills/repo-bootstrap/references/scripts-guide.md +175 -0
- package/skills/repo-bootstrap/references/verification-guide.md +137 -0
- package/skills/repo-bootstrap/scripts/analyze-git-history.sh +315 -0
- package/skills/repo-bootstrap/scripts/check-freshness.sh +230 -0
- package/skills/repo-bootstrap/scripts/detect-golden-samples.sh +161 -0
- package/skills/repo-bootstrap/scripts/detect-heuristics.sh +93 -0
- package/skills/repo-bootstrap/scripts/detect-project.sh +486 -0
- package/skills/repo-bootstrap/scripts/detect-scopes.sh +330 -0
- package/skills/repo-bootstrap/scripts/detect-utilities.sh +133 -0
- package/skills/repo-bootstrap/scripts/extract-adrs.sh +194 -0
- package/skills/repo-bootstrap/scripts/extract-agent-configs.sh +331 -0
- package/skills/repo-bootstrap/scripts/extract-architecture-rules.sh +522 -0
- package/skills/repo-bootstrap/scripts/extract-ci-commands.sh +385 -0
- package/skills/repo-bootstrap/scripts/extract-ci-rules.sh +384 -0
- package/skills/repo-bootstrap/scripts/extract-commands.sh +358 -0
- package/skills/repo-bootstrap/scripts/extract-documentation.sh +308 -0
- package/skills/repo-bootstrap/scripts/extract-github-rulesets.sh +96 -0
- package/skills/repo-bootstrap/scripts/extract-github-settings.sh +88 -0
- package/skills/repo-bootstrap/scripts/extract-ide-settings.sh +228 -0
- package/skills/repo-bootstrap/scripts/extract-platform-files.sh +290 -0
- package/skills/repo-bootstrap/scripts/extract-quality-configs.sh +442 -0
- package/skills/repo-bootstrap/scripts/generate-agents.sh +2424 -0
- package/skills/repo-bootstrap/scripts/generate-file-map.sh +153 -0
- package/skills/repo-bootstrap/scripts/lib/config-root.sh +211 -0
- package/skills/repo-bootstrap/scripts/lib/summary.sh +244 -0
- package/skills/repo-bootstrap/scripts/lib/template.sh +397 -0
- package/skills/repo-bootstrap/scripts/validate-structure.sh +324 -0
- package/skills/repo-bootstrap/scripts/verify-commands.sh +615 -0
- package/skills/repo-bootstrap/scripts/verify-content.sh +302 -0
- package/skills/schema-api-contracts/SKILL.md +56 -0
- package/skills/secret-hygiene/SKILL.md +511 -0
- package/skills/secret-hygiene/assets/.gitkeep +9 -0
- package/skills/secret-hygiene/assets/config-balanced.toml +81 -0
- package/skills/secret-hygiene/assets/config-custom.toml +178 -0
- package/skills/secret-hygiene/assets/config-strict.toml +48 -0
- package/skills/secret-hygiene/assets/github-action.yml +181 -0
- package/skills/secret-hygiene/assets/gitlab-ci.yml +257 -0
- package/skills/secret-hygiene/assets/precommit-config.yaml +70 -0
- package/skills/secret-hygiene/references/EXAMPLE.md +40 -0
- package/skills/secret-hygiene/references/compliance_mapping.md +538 -0
- package/skills/secret-hygiene/references/detection_rules.md +276 -0
- package/skills/secret-hygiene/references/false_positives.md +598 -0
- package/skills/secret-hygiene/references/remediation_guide.md +530 -0
- package/skills/stack-selector/SKILL.md +56 -0
- package/skills/telegram-control/SKILL.md +110 -0
- package/skills/telegram-control/references/architecture.md +184 -0
- package/skills/telegram-control/references/convex.md +173 -0
- package/skills/telegram-control/references/error_handling.md +212 -0
- package/skills/telegram-control/references/initial_setup.md +165 -0
- package/skills/telegram-control/references/telegram_api.md +156 -0
- package/skills/telegram-control/scripts/cancel_message.ts +53 -0
- package/skills/telegram-control/scripts/list_scheduled.ts +103 -0
- package/skills/telegram-control/scripts/logger.ts +121 -0
- package/skills/telegram-control/scripts/proxy-util.ts +11 -0
- package/skills/telegram-control/scripts/schedule_message.ts +216 -0
- package/skills/telegram-control/scripts/send_message.ts +115 -0
- package/skills/telegram-control/scripts/setup.ts +185 -0
- package/skills/telegram-control/scripts/types.ts +75 -0
- package/skills/telegram-control/scripts/view_history.ts +74 -0
- package/skills/test-strategy/SKILL.md +352 -0
- package/skills/threat-model/SKILL.md +303 -0
- package/skills/threat-model/examples/example-output.md +196 -0
- package/skills/threat-model/template.md +96 -0
- package/skills/ts-lint/SKILL.md +80 -0
- package/skills/ui-flow/SKILL.md +668 -0
- package/skills/voice-command-router/SKILL.md +51 -0
- package/skills/widget-live-activity-sync/SKILL.md +66 -0
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# Architecture
|
|
2
|
+
|
|
3
|
+
## System Overview
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
7
|
+
│ Convex Cloud (24/7) │
|
|
8
|
+
│ │
|
|
9
|
+
│ ┌─────────────────────────────────────────────────────┐ │
|
|
10
|
+
│ │ Database (Document Store) │ │
|
|
11
|
+
│ │ ┌─────────────────────┐ ┌─────────────────────┐ │ │
|
|
12
|
+
│ │ │ scheduled_messages │ │ message_history │ │ │
|
|
13
|
+
│ │ │ - title │ │ - title │ │ │
|
|
14
|
+
│ │ │ - message_text │ │ - message_text │ │ │
|
|
15
|
+
│ │ │ - scheduled_time │ │ - sent_at │ │ │
|
|
16
|
+
│ │ │ - status │ │ - status │ │ │
|
|
17
|
+
│ │ │ - recurring │ │ - error │ │ │
|
|
18
|
+
│ │ │ - storage_id │ │ │ │ │
|
|
19
|
+
│ │ │ - file_name │ │ │ │ │
|
|
20
|
+
│ │ └─────────────────────┘ └─────────────────────┘ │ │
|
|
21
|
+
│ └─────────────────────────────────────────────────────┘ │
|
|
22
|
+
│ │
|
|
23
|
+
│ ┌─────────────────────────────────────────────────────┐ │
|
|
24
|
+
│ │ Cron Job (every minute) │ │
|
|
25
|
+
│ │ processScheduledMessages() → Telegram API │ │
|
|
26
|
+
│ └─────────────────────────────────────────────────────┘ │
|
|
27
|
+
│ │
|
|
28
|
+
│ ┌─────────────────────────────────────────────────────┐ │
|
|
29
|
+
│ │ Functions │ │
|
|
30
|
+
│ │ Queries: listScheduled, viewHistory │ │
|
|
31
|
+
│ │ Mutations: scheduleMessage, cancelMessage │ │
|
|
32
|
+
│ │ Actions: sendMessage, processScheduledMessages │ │
|
|
33
|
+
│ └─────────────────────────────────────────────────────┘ │
|
|
34
|
+
└─────────────────────────────────────────────────────────────┘
|
|
35
|
+
↑ ↓
|
|
36
|
+
┌───────────────────────────────────────┐
|
|
37
|
+
│ Client Scripts (Claude) │
|
|
38
|
+
│ send_message.ts, schedule_message.ts │
|
|
39
|
+
│ list_scheduled.ts, cancel_message.ts │
|
|
40
|
+
│ view_history.ts, setup.ts │
|
|
41
|
+
└───────────────────────────────────────┘
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Convex Cloud Components
|
|
45
|
+
|
|
46
|
+
### Database
|
|
47
|
+
|
|
48
|
+
| Table | Purpose | Key Fields |
|
|
49
|
+
| -------------------- | ------------------------------ | ----------------------------------------------------------------------------- |
|
|
50
|
+
| `scheduled_messages` | Pending and completed messages | title, message_text, scheduled_time, status, recurring, storage_id, file_name |
|
|
51
|
+
| `message_history` | Full send history | title, message_text, sent_at, status, error |
|
|
52
|
+
|
|
53
|
+
Features:
|
|
54
|
+
|
|
55
|
+
- Document-based storage with automatic indexing
|
|
56
|
+
- ACID transactions with serializable isolation
|
|
57
|
+
- Real-time subscriptions (available but not used)
|
|
58
|
+
|
|
59
|
+
### Functions
|
|
60
|
+
|
|
61
|
+
| Type | Purpose | Examples |
|
|
62
|
+
| ------------- | -------------------------------- | ---------------------------------------------------- |
|
|
63
|
+
| **Queries** | Read-only database operations | `listScheduled`, `viewHistory`, `getPendingMessages` |
|
|
64
|
+
| **Mutations** | Read-write database transactions | `scheduleMessage`, `cancelMessage`, `markAsSent` |
|
|
65
|
+
| **Actions** | External API calls (Telegram) | `sendMessage`, `processScheduledMessages` |
|
|
66
|
+
| **Internal** | Backend-only functions | `getPendingMessages` (internalQuery) |
|
|
67
|
+
|
|
68
|
+
### Cron Job
|
|
69
|
+
|
|
70
|
+
Defined in `convex/crons.ts`:
|
|
71
|
+
|
|
72
|
+
- Runs every minute
|
|
73
|
+
- Queries for messages where `scheduled_time <= now` and `status == "pending"`
|
|
74
|
+
- Sends each via Telegram API
|
|
75
|
+
- Updates status to "sent" or "failed"
|
|
76
|
+
- For recurring messages: calculates and schedules next occurrence
|
|
77
|
+
|
|
78
|
+
## Local Components
|
|
79
|
+
|
|
80
|
+
### Client Scripts (`scripts/`)
|
|
81
|
+
|
|
82
|
+
| Script | Purpose |
|
|
83
|
+
| --------------------- | ------------------------------------ |
|
|
84
|
+
| `setup.ts` | Initial deployment and configuration |
|
|
85
|
+
| `send_message.ts` | Send immediate messages |
|
|
86
|
+
| `schedule_message.ts` | Schedule future messages |
|
|
87
|
+
| `list_scheduled.ts` | List pending messages |
|
|
88
|
+
| `cancel_message.ts` | Cancel scheduled messages |
|
|
89
|
+
| `view_history.ts` | View message history |
|
|
90
|
+
|
|
91
|
+
Scripts connect to Convex via HTTP using the deployment URL derived from the deploy key.
|
|
92
|
+
|
|
93
|
+
### Configuration
|
|
94
|
+
|
|
95
|
+
Stored at `/mnt/user-data/outputs/telegram_config.json`:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"bot_token": "123456:ABC...",
|
|
100
|
+
"user_id": "123456789",
|
|
101
|
+
"deploy_key": "prod:deployment|key..."
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Persists across sessions for seamless operation.
|
|
106
|
+
|
|
107
|
+
## Message Flow
|
|
108
|
+
|
|
109
|
+
### Immediate Send
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
User Request → send_message.ts → Convex Action → Telegram API → User
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Scheduled Send
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
User Request → schedule_message.ts → Convex Mutation → Database
|
|
119
|
+
↓
|
|
120
|
+
User ← Telegram API ← Convex Action ← Cron Job (every min) ←
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Recurring Messages
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Cron Job → Send Message → Calculate Next Time → Create New Record
|
|
127
|
+
↓ ↓
|
|
128
|
+
message_history scheduled_messages
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## File Structure
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
telegram-reminders/
|
|
135
|
+
├── convex/ # Backend (Convex Cloud)
|
|
136
|
+
│ ├── schema.ts # Database schema definition
|
|
137
|
+
│ ├── messages.ts # Queries and mutations
|
|
138
|
+
│ ├── telegram.ts # Actions (Telegram API calls)
|
|
139
|
+
│ ├── crons.ts # Cron job definition
|
|
140
|
+
│ └── tsconfig.json # Convex TypeScript config
|
|
141
|
+
├── scripts/ # Client scripts (local)
|
|
142
|
+
│ ├── setup.ts # Initial setup + deploy
|
|
143
|
+
│ ├── send_message.ts # Send immediately
|
|
144
|
+
│ ├── schedule_message.ts # Schedule message
|
|
145
|
+
│ ├── list_scheduled.ts # List scheduled
|
|
146
|
+
│ ├── cancel_message.ts # Cancel message
|
|
147
|
+
│ └── view_history.ts # View history
|
|
148
|
+
├── references/ # Documentation
|
|
149
|
+
│ ├── architecture.md # This file
|
|
150
|
+
│ ├── convex.md # Convex platform reference
|
|
151
|
+
│ ├── telegram_api.md # Telegram API reference
|
|
152
|
+
│ ├── initial_setup.md # Setup guide
|
|
153
|
+
│ └── error_handling.md # Troubleshooting guide
|
|
154
|
+
├── package.json # Dependencies and scripts
|
|
155
|
+
└── tsconfig.json # Root TypeScript config
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Security & Privacy
|
|
159
|
+
|
|
160
|
+
| Aspect | Implementation |
|
|
161
|
+
| ----------------- | ------------------------------------------------ |
|
|
162
|
+
| Bot token | Stored encrypted in Convex environment variables |
|
|
163
|
+
| Deploy key | Stored in local config file |
|
|
164
|
+
| Communication | All HTTPS |
|
|
165
|
+
| Platform security | Convex enterprise-grade infrastructure |
|
|
166
|
+
|
|
167
|
+
**Never share**: bot token, user ID, or deploy key publicly.
|
|
168
|
+
|
|
169
|
+
## Dependencies
|
|
170
|
+
|
|
171
|
+
### Root Package
|
|
172
|
+
|
|
173
|
+
- `convex` - Convex client library
|
|
174
|
+
- `chrono-node` - Natural language time parsing
|
|
175
|
+
- `form-data` - File uploads to Telegram
|
|
176
|
+
- `tsx` - TypeScript execution runtime
|
|
177
|
+
- `undici` - HTTP client
|
|
178
|
+
- `typescript` - TypeScript compiler
|
|
179
|
+
- `@types/node` - Node.js type definitions
|
|
180
|
+
|
|
181
|
+
### Convex Backend
|
|
182
|
+
|
|
183
|
+
- TypeScript functions compiled automatically by Convex
|
|
184
|
+
- No additional dependencies required
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Convex Reference
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
Convex is a backend-as-a-service platform providing:
|
|
6
|
+
|
|
7
|
+
- **Reactive Database**: Real-time, document-relational database
|
|
8
|
+
- **Serverless Functions**: TypeScript/JavaScript functions in the cloud
|
|
9
|
+
- **Scheduled Jobs**: Cron jobs and scheduled functions
|
|
10
|
+
- **Zero Infrastructure**: No server management or connection strings
|
|
11
|
+
|
|
12
|
+
## Quick Reference
|
|
13
|
+
|
|
14
|
+
| Feature | Description |
|
|
15
|
+
| ---------- | ---------------------------------------------------------- |
|
|
16
|
+
| Database | Document-based, ACID transactions, automatic indexing |
|
|
17
|
+
| Functions | Queries (read), Mutations (write), Actions (external APIs) |
|
|
18
|
+
| Scheduling | Cron jobs + dynamic scheduling |
|
|
19
|
+
| Deployment | `npx convex deploy` with deploy key |
|
|
20
|
+
| Dashboard | [dashboard.convex.dev](https://dashboard.convex.dev) |
|
|
21
|
+
|
|
22
|
+
## Function Types
|
|
23
|
+
|
|
24
|
+
| Type | Purpose | Can Call External APIs | Database Access |
|
|
25
|
+
| ------------ | -------------- | ---------------------- | --------------- |
|
|
26
|
+
| **Query** | Read data | ❌ | Read-only |
|
|
27
|
+
| **Mutation** | Write data | ❌ | Read-write |
|
|
28
|
+
| **Action** | External calls | ✅ | Via mutations |
|
|
29
|
+
| **Internal** | Backend-only | Depends on type | Depends on type |
|
|
30
|
+
|
|
31
|
+
### Example Usage
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
// Query - read-only
|
|
35
|
+
export const listScheduled = query({
|
|
36
|
+
handler: async (ctx) => {
|
|
37
|
+
return await ctx.db.query('scheduled_messages').collect();
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// Mutation - read-write
|
|
42
|
+
export const scheduleMessage = mutation({
|
|
43
|
+
args: { title: v.string(), scheduled_time: v.number() },
|
|
44
|
+
handler: async (ctx, args) => {
|
|
45
|
+
return await ctx.db.insert('scheduled_messages', args);
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
// Action - external API calls
|
|
50
|
+
export const sendMessage = action({
|
|
51
|
+
args: { text: v.string() },
|
|
52
|
+
handler: async (ctx, args) => {
|
|
53
|
+
await fetch('https://api.telegram.org/...');
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Scheduling
|
|
59
|
+
|
|
60
|
+
### Cron Jobs (Static)
|
|
61
|
+
|
|
62
|
+
Defined in `convex/crons.ts`:
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
import { cronJobs } from 'convex/server';
|
|
66
|
+
|
|
67
|
+
const crons = cronJobs();
|
|
68
|
+
crons.interval(
|
|
69
|
+
'process-messages',
|
|
70
|
+
{ minutes: 1 },
|
|
71
|
+
internal.telegram.processScheduledMessages
|
|
72
|
+
);
|
|
73
|
+
export default crons;
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Dynamic Scheduling
|
|
77
|
+
|
|
78
|
+
Schedule functions from other functions:
|
|
79
|
+
|
|
80
|
+
```typescript
|
|
81
|
+
await ctx.scheduler.runAfter(delay, internal.myFunction, args);
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Deployment
|
|
85
|
+
|
|
86
|
+
### Deploy Key Setup
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
# Set environment variable
|
|
90
|
+
export CONVEX_DEPLOY_KEY="prod:deployment-name|key..."
|
|
91
|
+
|
|
92
|
+
# Deploy
|
|
93
|
+
npx convex deploy
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Deploy keys grant permission to:
|
|
97
|
+
|
|
98
|
+
- Push code and update schema
|
|
99
|
+
- Set environment variables
|
|
100
|
+
- View logs and dashboard
|
|
101
|
+
|
|
102
|
+
### Environment Variables
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Set variables
|
|
106
|
+
npx convex env set TELEGRAM_BOT_TOKEN "123456:ABC..."
|
|
107
|
+
npx convex env set TELEGRAM_USER_ID "123456789"
|
|
108
|
+
|
|
109
|
+
# List variables
|
|
110
|
+
npx convex env list
|
|
111
|
+
|
|
112
|
+
# Remove variable
|
|
113
|
+
npx convex env unset VARIABLE_NAME
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Access in functions: `process.env.VARIABLE_NAME`
|
|
117
|
+
|
|
118
|
+
### Deployment URL
|
|
119
|
+
|
|
120
|
+
Derived from deploy key:
|
|
121
|
+
|
|
122
|
+
- Key: `prod:deployment-name|secret...`
|
|
123
|
+
- URL: `https://deployment-name.convex.cloud`
|
|
124
|
+
|
|
125
|
+
## Dashboard
|
|
126
|
+
|
|
127
|
+
Access at [dashboard.convex.dev](https://dashboard.convex.dev):
|
|
128
|
+
|
|
129
|
+
| Section | Purpose |
|
|
130
|
+
| ------------- | ---------------------------------- |
|
|
131
|
+
| **Data** | View/edit database tables |
|
|
132
|
+
| **Functions** | See function definitions and logs |
|
|
133
|
+
| **Logs** | Real-time execution logs |
|
|
134
|
+
| **Crons** | Monitor cron job runs |
|
|
135
|
+
| **Settings** | Deploy keys, environment variables |
|
|
136
|
+
|
|
137
|
+
## Free Tier
|
|
138
|
+
|
|
139
|
+
| Resource | Limit |
|
|
140
|
+
| ------------------- | ------------ |
|
|
141
|
+
| Database storage | Unlimited |
|
|
142
|
+
| Function executions | Unlimited |
|
|
143
|
+
| Bandwidth | Unlimited |
|
|
144
|
+
| Credit card | Not required |
|
|
145
|
+
| Time limit | None |
|
|
146
|
+
|
|
147
|
+
Perfect for personal projects and small-scale use.
|
|
148
|
+
|
|
149
|
+
## CLI Commands
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# Deploy to cloud
|
|
153
|
+
npx convex deploy
|
|
154
|
+
|
|
155
|
+
# View logs
|
|
156
|
+
npx convex logs
|
|
157
|
+
npx convex logs --watch # Real-time
|
|
158
|
+
|
|
159
|
+
# Environment variables
|
|
160
|
+
npx convex env list
|
|
161
|
+
npx convex env set KEY "value"
|
|
162
|
+
npx convex env unset KEY
|
|
163
|
+
|
|
164
|
+
# Development (local)
|
|
165
|
+
npx convex dev
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Resources
|
|
169
|
+
|
|
170
|
+
- **Documentation**: [docs.convex.dev](https://docs.convex.dev)
|
|
171
|
+
- **Dashboard**: [dashboard.convex.dev](https://dashboard.convex.dev)
|
|
172
|
+
- **Status**: [status.convex.dev](https://status.convex.dev)
|
|
173
|
+
- **Examples**: [github.com/get-convex/convex-demos](https://github.com/get-convex/convex-demos)
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# Error Handling Guide
|
|
2
|
+
|
|
3
|
+
## Quick Reference
|
|
4
|
+
|
|
5
|
+
| Error | Cause | Solution |
|
|
6
|
+
| -------------------- | ------------------------ | ---------------------------------------------- |
|
|
7
|
+
| "Bot not configured" | Setup not run | `tsx scripts/setup.ts <token> <id> <key>` |
|
|
8
|
+
| "Unauthorized" | Invalid token or blocked | Verify token, start chat with bot |
|
|
9
|
+
| "chat not found" | Wrong user ID | Get ID from @userinfobot |
|
|
10
|
+
| "EAI_AGAIN" | DNS resolution failure | Scripts use undici with proxy auto-detection |
|
|
11
|
+
| Deployment failed | Invalid deploy key | Get new key from dashboard |
|
|
12
|
+
|
|
13
|
+
## Setup Errors
|
|
14
|
+
|
|
15
|
+
### "Bot not configured"
|
|
16
|
+
|
|
17
|
+
**Cause**: Configuration file missing or incomplete.
|
|
18
|
+
|
|
19
|
+
**Solution**:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
tsx scripts/setup.ts <bot_token> <user_id> <deploy_key>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### "Invalid deploy key format"
|
|
26
|
+
|
|
27
|
+
**Cause**: Deploy key not copied correctly or expired.
|
|
28
|
+
|
|
29
|
+
**Solution**:
|
|
30
|
+
|
|
31
|
+
1. Go to [dashboard.convex.dev](https://dashboard.convex.dev)
|
|
32
|
+
2. Navigate to your project → Settings → Deploy Keys
|
|
33
|
+
3. Create a new "Production" deploy key
|
|
34
|
+
4. Copy the full key (format: `prod:deployment-name|key...`)
|
|
35
|
+
|
|
36
|
+
## Telegram API Errors
|
|
37
|
+
|
|
38
|
+
### "Unauthorized" or "bot was blocked by the user"
|
|
39
|
+
|
|
40
|
+
**Causes**:
|
|
41
|
+
|
|
42
|
+
- User hasn't started chat with bot
|
|
43
|
+
- Bot token is invalid
|
|
44
|
+
- User blocked the bot
|
|
45
|
+
|
|
46
|
+
**Solutions**:
|
|
47
|
+
|
|
48
|
+
1. Search for your bot in Telegram by username
|
|
49
|
+
2. Press "Start" to begin the chat
|
|
50
|
+
3. Verify bot token: `curl "https://api.telegram.org/bot<TOKEN>/getMe"`
|
|
51
|
+
|
|
52
|
+
### "chat not found"
|
|
53
|
+
|
|
54
|
+
**Cause**: User ID is incorrect.
|
|
55
|
+
|
|
56
|
+
**Solution**:
|
|
57
|
+
|
|
58
|
+
1. Message [@userinfobot](https://t.me/userinfobot) on Telegram
|
|
59
|
+
2. Copy the numeric ID it returns
|
|
60
|
+
3. Update environment variable: `npx convex env set TELEGRAM_USER_ID "correct_id"`
|
|
61
|
+
|
|
62
|
+
### Rate Limit (429 Too Many Requests)
|
|
63
|
+
|
|
64
|
+
**Cause**: Exceeded Telegram's rate limits.
|
|
65
|
+
|
|
66
|
+
**Limits**:
|
|
67
|
+
|
|
68
|
+
- 30 messages/second globally
|
|
69
|
+
- 20 messages/minute per user
|
|
70
|
+
|
|
71
|
+
**Solution**: Wait and retry. For personal use, this is rarely hit.
|
|
72
|
+
|
|
73
|
+
## Network Errors
|
|
74
|
+
|
|
75
|
+
### "EAI_AGAIN" DNS Resolution Failure
|
|
76
|
+
|
|
77
|
+
**Cause**: Node.js native fetch doesn't use the environment's egress proxy, causing DNS resolution failures in sandboxed environments.
|
|
78
|
+
|
|
79
|
+
**Solution**: The tsx scripts now use `undici` with automatic proxy detection from `HTTP_PROXY`/`HTTPS_PROXY` environment variables. This is already configured in all scripts.
|
|
80
|
+
|
|
81
|
+
**How it works**:
|
|
82
|
+
|
|
83
|
+
- Scripts import `fetch` and `ProxyAgent` from `undici`
|
|
84
|
+
- Proxy is auto-detected: `process.env.HTTP_PROXY || process.env.HTTPS_PROXY`
|
|
85
|
+
- All fetch calls use `dispatcher: proxyAgent` option
|
|
86
|
+
|
|
87
|
+
**If you still have issues**:
|
|
88
|
+
|
|
89
|
+
1. Verify proxy environment variables are set
|
|
90
|
+
2. Check that undici is installed: `npm list undici`
|
|
91
|
+
3. Reinstall if needed: `npm install undici`
|
|
92
|
+
|
|
93
|
+
### General Network Issues
|
|
94
|
+
|
|
95
|
+
**Symptoms**: Timeouts, connection refused, DNS errors.
|
|
96
|
+
|
|
97
|
+
**Solutions**:
|
|
98
|
+
|
|
99
|
+
1. Check internet connection
|
|
100
|
+
2. Verify proxy environment variables (`HTTP_PROXY`, `HTTPS_PROXY`)
|
|
101
|
+
3. Check Convex status at [status.convex.dev](https://status.convex.dev)
|
|
102
|
+
4. Review logs: `npx convex logs`
|
|
103
|
+
|
|
104
|
+
## Deployment Errors
|
|
105
|
+
|
|
106
|
+
### "Could not resolve 'fs'" Error
|
|
107
|
+
|
|
108
|
+
**Cause**: Missing `"use node";` directive.
|
|
109
|
+
|
|
110
|
+
**Fix**: Ensure first line of `convex/telegram.ts` is:
|
|
111
|
+
|
|
112
|
+
```typescript
|
|
113
|
+
'use node';
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### "Two output files share the same path" Error
|
|
117
|
+
|
|
118
|
+
**Cause**: Duplicate .js files in convex directory.
|
|
119
|
+
|
|
120
|
+
**Fix**:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
rm -f convex/*.js convex/_generated/*.js
|
|
124
|
+
npx convex deploy
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### TypeScript "Property does not exist" Errors
|
|
128
|
+
|
|
129
|
+
**Cause**: Missing type definitions or incorrect function visibility.
|
|
130
|
+
|
|
131
|
+
**Fixes**:
|
|
132
|
+
|
|
133
|
+
- Ensure internal functions use `internalQuery`/`internalMutation`
|
|
134
|
+
- Add `as any` type assertions to fetch responses
|
|
135
|
+
|
|
136
|
+
### "Cannot write file" TypeScript Error
|
|
137
|
+
|
|
138
|
+
**Cause**: TypeScript trying to generate files that exist.
|
|
139
|
+
|
|
140
|
+
**Fix**:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
rm -f convex/_generated/*.js
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
## Message Delivery Issues
|
|
147
|
+
|
|
148
|
+
### Messages Not Sending
|
|
149
|
+
|
|
150
|
+
**Diagnostic steps**:
|
|
151
|
+
|
|
152
|
+
1. **Check cron is running**:
|
|
153
|
+
- Convex Dashboard → Functions → Crons
|
|
154
|
+
- Should see `process-scheduled-messages` every minute
|
|
155
|
+
|
|
156
|
+
2. **Verify environment variables**:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
npx convex env list
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
3. **Check pending messages**:
|
|
163
|
+
- Dashboard → Data → `scheduled_messages`
|
|
164
|
+
- Verify `status: "pending"` and `scheduled_time` is past
|
|
165
|
+
|
|
166
|
+
4. **Review logs**:
|
|
167
|
+
```bash
|
|
168
|
+
npx convex logs --watch
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Wrong Timestamp Format
|
|
172
|
+
|
|
173
|
+
**Symptom**: Messages scheduled but never sent.
|
|
174
|
+
|
|
175
|
+
**Cause**: Using seconds instead of milliseconds.
|
|
176
|
+
|
|
177
|
+
**Correct format**: Unix timestamp in **milliseconds** (13 digits)
|
|
178
|
+
|
|
179
|
+
- ✅ `1768355400000`
|
|
180
|
+
- ❌ `1768355400`
|
|
181
|
+
|
|
182
|
+
**Get current timestamp**:
|
|
183
|
+
|
|
184
|
+
```javascript
|
|
185
|
+
Date.now(); // JavaScript
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
date +%s000 # Bash
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Debugging Commands
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
# Check configuration
|
|
196
|
+
cat /mnt/user-data/outputs/telegram_config.json
|
|
197
|
+
|
|
198
|
+
# Test database connection
|
|
199
|
+
tsx scripts/list_scheduled.ts
|
|
200
|
+
|
|
201
|
+
# Verify Telegram API
|
|
202
|
+
tsx scripts/send_message.ts "test"
|
|
203
|
+
|
|
204
|
+
# Check Convex deployment
|
|
205
|
+
curl https://<deployment>.convex.cloud
|
|
206
|
+
|
|
207
|
+
# Monitor real-time logs
|
|
208
|
+
npx convex logs --watch
|
|
209
|
+
|
|
210
|
+
# List environment variables
|
|
211
|
+
npx convex env list
|
|
212
|
+
```
|