@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,165 @@
|
|
|
1
|
+
# Telegram Reminders Setup Guide
|
|
2
|
+
|
|
3
|
+
This guide will help you set up the Telegram Reminders skill, especially in sandboxed environments like Claude's computer.
|
|
4
|
+
|
|
5
|
+
## Quick Setup (3 Steps)
|
|
6
|
+
|
|
7
|
+
### Step 1: Get Your Credentials
|
|
8
|
+
|
|
9
|
+
1. **Bot Token**:
|
|
10
|
+
|
|
11
|
+
- Open Telegram and message [@BotFather](https://t.me/BotFather)
|
|
12
|
+
- Send `/newbot` and follow the prompts
|
|
13
|
+
- Copy the bot token (format: `1234567890:ABCdefGHIjklMNOpqrsTUVwxyz`)
|
|
14
|
+
|
|
15
|
+
2. **User ID**:
|
|
16
|
+
|
|
17
|
+
- Message [@userinfobot](https://t.me/userinfobot) on Telegram
|
|
18
|
+
- Copy your numeric ID (format: `123456789`)
|
|
19
|
+
|
|
20
|
+
3. **Convex Deploy Key**:
|
|
21
|
+
- Go to [dashboard.convex.dev](https://dashboard.convex.dev)
|
|
22
|
+
- Create a new project (or use existing)
|
|
23
|
+
- Go to Settings → Deploy Keys
|
|
24
|
+
- Create a "Production" deploy key
|
|
25
|
+
- Copy the key (format: `prod:name-123|abc123def...`)
|
|
26
|
+
|
|
27
|
+
### Step 2: Run Setup
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
cd /mnt/skills/user/telegram-reminders
|
|
31
|
+
npm install
|
|
32
|
+
tsx scripts/setup.ts <bot_token> <user_id> <deploy_key>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The setup will:
|
|
36
|
+
|
|
37
|
+
- Save your credentials
|
|
38
|
+
- Deploy to Convex Cloud
|
|
39
|
+
- Configure environment variables
|
|
40
|
+
- Attempt to send a test message
|
|
41
|
+
|
|
42
|
+
**Note**: Scripts use `undici` with automatic proxy detection for network requests, ensuring compatibility with sandboxed environments.
|
|
43
|
+
|
|
44
|
+
### Step 3: Start Chat with Your Bot
|
|
45
|
+
|
|
46
|
+
**CRITICAL**: You must do this before the bot can send you messages!
|
|
47
|
+
|
|
48
|
+
1. Open Telegram
|
|
49
|
+
2. Search for your bot (by the name you gave it in BotFather)
|
|
50
|
+
3. Click on it and press "Start"
|
|
51
|
+
|
|
52
|
+
## Using the Skill
|
|
53
|
+
|
|
54
|
+
Use the tsx scripts for all operations:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Send a message
|
|
58
|
+
tsx scripts/send_message.ts "Hello!"
|
|
59
|
+
|
|
60
|
+
# Send with file attachment
|
|
61
|
+
tsx scripts/send_message.ts "Check this file" /path/to/file.pdf
|
|
62
|
+
|
|
63
|
+
# Schedule a reminder
|
|
64
|
+
tsx scripts/schedule_message.ts "Meeting" "Team standup" "tomorrow 10am"
|
|
65
|
+
|
|
66
|
+
# List pending messages
|
|
67
|
+
tsx scripts/list_scheduled.ts
|
|
68
|
+
|
|
69
|
+
# Cancel a message
|
|
70
|
+
tsx scripts/cancel_message.ts <message_id>
|
|
71
|
+
|
|
72
|
+
# View history
|
|
73
|
+
tsx scripts/view_history.ts 50
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Common Issues
|
|
77
|
+
|
|
78
|
+
### "EAI_AGAIN" DNS Error
|
|
79
|
+
|
|
80
|
+
**Cause**: DNS resolution failure in sandboxed environments.
|
|
81
|
+
|
|
82
|
+
**Solution**: Scripts now use `undici` with automatic proxy detection from `HTTP_PROXY`/`HTTPS_PROXY` environment variables. This should work automatically.
|
|
83
|
+
|
|
84
|
+
### "Unauthorized" or "bot was blocked"
|
|
85
|
+
|
|
86
|
+
**Cause**: You haven't started a chat with your bot.
|
|
87
|
+
|
|
88
|
+
**Solution**:
|
|
89
|
+
|
|
90
|
+
1. Open Telegram
|
|
91
|
+
2. Search for your bot
|
|
92
|
+
3. Press "Start"
|
|
93
|
+
|
|
94
|
+
### Messages Not Sending
|
|
95
|
+
|
|
96
|
+
**Cause**: Environment variables not set in Convex.
|
|
97
|
+
|
|
98
|
+
**Solution**:
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
npx convex env set TELEGRAM_BOT_TOKEN "your_token"
|
|
102
|
+
npx convex env set TELEGRAM_USER_ID "your_id"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Setup Script Fails at Verification
|
|
106
|
+
|
|
107
|
+
**Cause**: Network issues during setup.
|
|
108
|
+
|
|
109
|
+
**Solution**: Verify manually by sending a test message:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
tsx scripts/send_message.ts "Test message"
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Manual Setup (If Script Fails)
|
|
116
|
+
|
|
117
|
+
If the setup script doesn't work, you can set up manually:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# 1. Install dependencies
|
|
121
|
+
npm install
|
|
122
|
+
|
|
123
|
+
# 2. Create config file
|
|
124
|
+
cat > /mnt/user-data/outputs/telegram_config.json << EOF
|
|
125
|
+
{
|
|
126
|
+
"botToken": "YOUR_BOT_TOKEN",
|
|
127
|
+
"userId": "YOUR_USER_ID",
|
|
128
|
+
"deployKey": "YOUR_DEPLOY_KEY",
|
|
129
|
+
"setupDate": "$(date -u +"%Y-%m-%dT%H:%M:%SZ")"
|
|
130
|
+
}
|
|
131
|
+
EOF
|
|
132
|
+
|
|
133
|
+
# 3. Create .env.local
|
|
134
|
+
echo "CONVEX_DEPLOY_KEY=YOUR_DEPLOY_KEY" > .env.local
|
|
135
|
+
|
|
136
|
+
# 4. Deploy to Convex
|
|
137
|
+
npx convex deploy
|
|
138
|
+
|
|
139
|
+
# 5. Set environment variables
|
|
140
|
+
npx convex env set TELEGRAM_BOT_TOKEN "YOUR_BOT_TOKEN"
|
|
141
|
+
npx convex env set TELEGRAM_USER_ID "YOUR_USER_ID"
|
|
142
|
+
|
|
143
|
+
# 6. Test
|
|
144
|
+
tsx scripts/send_message.ts "Setup test!"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Verification
|
|
148
|
+
|
|
149
|
+
To verify everything is working:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
# Check Convex deployment
|
|
153
|
+
npx convex env list
|
|
154
|
+
|
|
155
|
+
# Send test message
|
|
156
|
+
tsx scripts/send_message.ts "Test!"
|
|
157
|
+
|
|
158
|
+
# Check for message in Telegram
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Need Help?
|
|
162
|
+
|
|
163
|
+
- Check the main [SKILL.md](SKILL.md) for detailed documentation
|
|
164
|
+
- Monitor your deployment at [dashboard.convex.dev](https://dashboard.convex.dev)
|
|
165
|
+
- Review Convex logs: `npx convex logs --watch`
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# Telegram Bot API Reference
|
|
2
|
+
|
|
3
|
+
## Quick Reference
|
|
4
|
+
|
|
5
|
+
| Action | Endpoint |
|
|
6
|
+
| ------------ | ------------------------------- |
|
|
7
|
+
| Send text | `POST /bot<TOKEN>/sendMessage` |
|
|
8
|
+
| Send file | `POST /bot<TOKEN>/sendDocument` |
|
|
9
|
+
| Get bot info | `GET /bot<TOKEN>/getMe` |
|
|
10
|
+
|
|
11
|
+
Base URL: `https://api.telegram.org`
|
|
12
|
+
|
|
13
|
+
## Bot Setup
|
|
14
|
+
|
|
15
|
+
### 1. Create a Bot
|
|
16
|
+
|
|
17
|
+
1. Message [@BotFather](https://t.me/BotFather) on Telegram
|
|
18
|
+
2. Send `/newbot`
|
|
19
|
+
3. Follow prompts to name your bot
|
|
20
|
+
4. Copy the token (format: `123456789:ABCdefGHI...`)
|
|
21
|
+
|
|
22
|
+
### 2. Get Your User ID
|
|
23
|
+
|
|
24
|
+
1. Message [@userinfobot](https://t.me/userinfobot)
|
|
25
|
+
2. Copy the numeric ID it returns
|
|
26
|
+
|
|
27
|
+
### 3. Start Chat with Bot (Critical!)
|
|
28
|
+
|
|
29
|
+
Before the bot can message you:
|
|
30
|
+
|
|
31
|
+
1. Search for your bot by username in Telegram
|
|
32
|
+
2. Press "Start" to begin the chat
|
|
33
|
+
|
|
34
|
+
## API Endpoints
|
|
35
|
+
|
|
36
|
+
### Send Text Message
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
curl -X POST "https://api.telegram.org/bot<TOKEN>/sendMessage" \
|
|
40
|
+
-H "Content-Type: application/json" \
|
|
41
|
+
-d '{
|
|
42
|
+
"chat_id": "123456789",
|
|
43
|
+
"text": "Your message",
|
|
44
|
+
"parse_mode": "Markdown"
|
|
45
|
+
}'
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Parameters**:
|
|
49
|
+
| Parameter | Required | Description |
|
|
50
|
+
|-----------|----------|-------------|
|
|
51
|
+
| `chat_id` | Yes | User ID (numeric) |
|
|
52
|
+
| `text` | Yes | Message content (max 4096 chars) |
|
|
53
|
+
| `parse_mode` | No | `Markdown` or `HTML` |
|
|
54
|
+
|
|
55
|
+
### Send Document
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
curl -X POST "https://api.telegram.org/bot<TOKEN>/sendDocument" \
|
|
59
|
+
-F "chat_id=123456789" \
|
|
60
|
+
-F "document=@/path/to/file.md" \
|
|
61
|
+
-F "caption=Optional caption"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Parameters**:
|
|
65
|
+
| Parameter | Required | Description |
|
|
66
|
+
|-----------|----------|-------------|
|
|
67
|
+
| `chat_id` | Yes | User ID |
|
|
68
|
+
| `document` | Yes | File to send |
|
|
69
|
+
| `caption` | No | Text caption (max 1024 chars) |
|
|
70
|
+
|
|
71
|
+
### Verify Bot Token
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
curl "https://api.telegram.org/bot<TOKEN>/getMe"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Returns `{"ok": true, "result": {...}}` if valid.
|
|
78
|
+
|
|
79
|
+
## Text Formatting
|
|
80
|
+
|
|
81
|
+
### Markdown Mode
|
|
82
|
+
|
|
83
|
+
````
|
|
84
|
+
*bold*
|
|
85
|
+
_italic_
|
|
86
|
+
`code`
|
|
87
|
+
```code block```
|
|
88
|
+
[link](https://example.com)
|
|
89
|
+
````
|
|
90
|
+
|
|
91
|
+
### HTML Mode
|
|
92
|
+
|
|
93
|
+
```html
|
|
94
|
+
<b>bold</b>
|
|
95
|
+
<i>italic</i>
|
|
96
|
+
<code>code</code>
|
|
97
|
+
<pre>code block</pre>
|
|
98
|
+
<a href="https://example.com">link</a>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Note**: Escape special characters in user input to avoid parsing errors.
|
|
102
|
+
|
|
103
|
+
## Error Codes
|
|
104
|
+
|
|
105
|
+
| Code | Error | Cause | Solution |
|
|
106
|
+
| ---- | ----------------- | --------------------------------------- | -------------------------------- |
|
|
107
|
+
| 401 | Unauthorized | Invalid bot token | Verify token with `/getMe` |
|
|
108
|
+
| 400 | chat not found | Invalid user ID | Get correct ID from @userinfobot |
|
|
109
|
+
| 403 | bot was blocked | User blocked bot or hasn't started chat | User must press "Start" |
|
|
110
|
+
| 429 | Too Many Requests | Rate limit exceeded | Wait and retry |
|
|
111
|
+
|
|
112
|
+
## Limits
|
|
113
|
+
|
|
114
|
+
| Limit | Value |
|
|
115
|
+
| -------------------------- | --------------- |
|
|
116
|
+
| Message length | 4096 characters |
|
|
117
|
+
| Caption length | 1024 characters |
|
|
118
|
+
| File size | 50 MB |
|
|
119
|
+
| Messages/second (global) | 30 |
|
|
120
|
+
| Messages/minute (per user) | 20 |
|
|
121
|
+
|
|
122
|
+
## Best Practices
|
|
123
|
+
|
|
124
|
+
1. **Always check `response.ok`** before processing results
|
|
125
|
+
2. **Implement retry logic** with exponential backoff for 429 errors
|
|
126
|
+
3. **Escape special characters** in Markdown/HTML to prevent parsing errors
|
|
127
|
+
4. **Keep messages concise** - split long content into multiple messages
|
|
128
|
+
5. **Use documents for files** - preserves quality better than inline
|
|
129
|
+
|
|
130
|
+
## Example: Send with Error Handling
|
|
131
|
+
|
|
132
|
+
```typescript
|
|
133
|
+
async function sendTelegram(token: string, chatId: string, text: string) {
|
|
134
|
+
const response = await fetch(
|
|
135
|
+
`https://api.telegram.org/bot${token}/sendMessage`,
|
|
136
|
+
{
|
|
137
|
+
method: 'POST',
|
|
138
|
+
headers: { 'Content-Type': 'application/json' },
|
|
139
|
+
body: JSON.stringify({ chat_id: chatId, text }),
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
const data = await response.json();
|
|
144
|
+
if (!data.ok) {
|
|
145
|
+
throw new Error(`Telegram error: ${data.description}`);
|
|
146
|
+
}
|
|
147
|
+
return data.result;
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Resources
|
|
152
|
+
|
|
153
|
+
- **Official Docs**: [core.telegram.org/bots/api](https://core.telegram.org/bots/api)
|
|
154
|
+
- **Bot Tutorial**: [core.telegram.org/bots/tutorial](https://core.telegram.org/bots/tutorial)
|
|
155
|
+
- **BotFather**: [@BotFather](https://t.me/BotFather)
|
|
156
|
+
- **User Info Bot**: [@userinfobot](https://t.me/userinfobot)
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
|
|
3
|
+
import { ConvexHttpClient } from "convex/browser";
|
|
4
|
+
import { readFileSync, existsSync } from "fs";
|
|
5
|
+
import { api } from "../convex/_generated/api.js";
|
|
6
|
+
import { Id } from "../convex/_generated/dataModel.js";
|
|
7
|
+
import { Config, CONFIG_PATH, getConvexUrl } from "./types.js";
|
|
8
|
+
import { logError, logSuccess, logInfo, logUsage, logNotConfigured } from "./logger.js";
|
|
9
|
+
import { setupProxy } from "./proxy-util.js";
|
|
10
|
+
|
|
11
|
+
setupProxy();
|
|
12
|
+
|
|
13
|
+
async function cancelMessage(): Promise<void> {
|
|
14
|
+
const args = process.argv.slice(2);
|
|
15
|
+
|
|
16
|
+
if (args.length < 1) {
|
|
17
|
+
logUsage("Usage: tsx cancel_message.ts <message_id>", [
|
|
18
|
+
"Get message IDs with: npm run list",
|
|
19
|
+
]);
|
|
20
|
+
process.exit(1);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const messageId = args[0] as Id<"scheduled_messages">;
|
|
24
|
+
|
|
25
|
+
// Load config
|
|
26
|
+
if (!existsSync(CONFIG_PATH)) {
|
|
27
|
+
logNotConfigured();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const config: Config = JSON.parse(readFileSync(CONFIG_PATH, "utf-8"));
|
|
31
|
+
|
|
32
|
+
// Get Convex URL
|
|
33
|
+
const deploymentUrl = getConvexUrl(config.deployKey);
|
|
34
|
+
const client = new ConvexHttpClient(deploymentUrl);
|
|
35
|
+
|
|
36
|
+
logInfo("🗑️", `Cancelling message ${messageId}...`);
|
|
37
|
+
|
|
38
|
+
try {
|
|
39
|
+
await client.mutation(api.messages.cancelMessage, {
|
|
40
|
+
messageId,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
logSuccess("Message cancelled successfully!");
|
|
44
|
+
} catch (error: any) {
|
|
45
|
+
logError(`Failed to cancel: ${error.message}`);
|
|
46
|
+
process.exit(1);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
cancelMessage().catch((error: Error) => {
|
|
51
|
+
logError(error.message);
|
|
52
|
+
process.exit(1);
|
|
53
|
+
});
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
#!/usr/bin/env tsx
|
|
2
|
+
|
|
3
|
+
import { ConvexHttpClient } from "convex/browser";
|
|
4
|
+
import { readFileSync, existsSync } from "fs";
|
|
5
|
+
import { api } from "../convex/_generated/api.js";
|
|
6
|
+
import { Config, CONFIG_PATH, ScheduledMessage, getConvexUrl } from "./types.js";
|
|
7
|
+
import { setupProxy } from "./proxy-util.js";
|
|
8
|
+
import {
|
|
9
|
+
logError,
|
|
10
|
+
logInfo,
|
|
11
|
+
log,
|
|
12
|
+
logSeparator,
|
|
13
|
+
logNotConfigured,
|
|
14
|
+
logMessageEntry,
|
|
15
|
+
} from "./logger.js";
|
|
16
|
+
|
|
17
|
+
setupProxy();
|
|
18
|
+
|
|
19
|
+
async function listScheduled(): Promise<void> {
|
|
20
|
+
// Load config
|
|
21
|
+
if (!existsSync(CONFIG_PATH)) {
|
|
22
|
+
logNotConfigured();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const config: Config = JSON.parse(readFileSync(CONFIG_PATH, "utf-8"));
|
|
26
|
+
|
|
27
|
+
// Get Convex URL
|
|
28
|
+
const deploymentUrl = getConvexUrl(config.deployKey);
|
|
29
|
+
const client = new ConvexHttpClient(deploymentUrl);
|
|
30
|
+
|
|
31
|
+
logInfo("📋", "Fetching scheduled messages...\n");
|
|
32
|
+
|
|
33
|
+
try {
|
|
34
|
+
const messages = await client.query(api.messages.listScheduled, {}) as ScheduledMessage[];
|
|
35
|
+
|
|
36
|
+
if (messages.length === 0) {
|
|
37
|
+
log("No scheduled messages found.");
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// Group by status
|
|
42
|
+
const pending = messages.filter((m) => m.status === "pending");
|
|
43
|
+
const sent = messages.filter((m) => m.status === "sent");
|
|
44
|
+
const failed = messages.filter((m) => m.status === "failed");
|
|
45
|
+
|
|
46
|
+
if (pending.length > 0) {
|
|
47
|
+
log("⏰ PENDING MESSAGES:");
|
|
48
|
+
logSeparator();
|
|
49
|
+
pending.forEach((msg) => {
|
|
50
|
+
const time = new Date(msg.scheduled_time).toLocaleString();
|
|
51
|
+
const preview = msg.message_text
|
|
52
|
+
? msg.message_text.substring(0, 50) + "..."
|
|
53
|
+
: undefined;
|
|
54
|
+
|
|
55
|
+
logMessageEntry({
|
|
56
|
+
id: msg._id,
|
|
57
|
+
title: msg.title,
|
|
58
|
+
time,
|
|
59
|
+
recurring: msg.recurring,
|
|
60
|
+
message: preview,
|
|
61
|
+
fileName: msg.file_name,
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
log("\n" + "─".repeat(60));
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (sent.length > 0) {
|
|
68
|
+
log(`\n✅ SENT MESSAGES (${sent.length}):`);
|
|
69
|
+
logSeparator();
|
|
70
|
+
sent.slice(0, 5).forEach((msg) => {
|
|
71
|
+
const time = new Date(msg.last_sent_at || msg.scheduled_time).toLocaleString();
|
|
72
|
+
log(`\n${msg.title} - ${time}`);
|
|
73
|
+
});
|
|
74
|
+
if (sent.length > 5) {
|
|
75
|
+
log(`\n... and ${sent.length - 5} more`);
|
|
76
|
+
}
|
|
77
|
+
log("\n" + "─".repeat(60));
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
if (failed.length > 0) {
|
|
81
|
+
log(`\n❌ FAILED MESSAGES (${failed.length}):`);
|
|
82
|
+
logSeparator();
|
|
83
|
+
failed.forEach((msg) => {
|
|
84
|
+
logMessageEntry({
|
|
85
|
+
id: msg._id,
|
|
86
|
+
title: msg.title,
|
|
87
|
+
error: msg.error_message,
|
|
88
|
+
});
|
|
89
|
+
});
|
|
90
|
+
log("\n" + "─".repeat(60));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
log(`\nTotal: ${messages.length} messages`);
|
|
94
|
+
} catch (error: any) {
|
|
95
|
+
logError(`Failed to list messages: ${error.message}`);
|
|
96
|
+
process.exit(1);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
listScheduled().catch((error: Error) => {
|
|
101
|
+
logError(error.message);
|
|
102
|
+
process.exit(1);
|
|
103
|
+
});
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized logging utilities for CLI scripts
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import pino from "pino";
|
|
6
|
+
|
|
7
|
+
const transport = pino.transport({
|
|
8
|
+
target: "pino-pretty",
|
|
9
|
+
options: {
|
|
10
|
+
colorize: true,
|
|
11
|
+
ignore: "pid,hostname,level,time",
|
|
12
|
+
messageFormat: "{msg}",
|
|
13
|
+
},
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const logger = pino(
|
|
17
|
+
{
|
|
18
|
+
level: process.env.LOG_LEVEL || "info",
|
|
19
|
+
base: null,
|
|
20
|
+
timestamp: false,
|
|
21
|
+
},
|
|
22
|
+
transport
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Log an error message with [!] prefix
|
|
27
|
+
*/
|
|
28
|
+
export function logError(message: string): void {
|
|
29
|
+
logger.error(`[!] ${message}`);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Log a success message with [+] prefix
|
|
34
|
+
*/
|
|
35
|
+
export function logSuccess(message: string): void {
|
|
36
|
+
logger.info(`[+] ${message}`);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Log an info message with custom emoji prefix
|
|
41
|
+
*/
|
|
42
|
+
export function logInfo(emoji: string, message: string): void {
|
|
43
|
+
logger.info(`${emoji} ${message}`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Log a message without prefix
|
|
48
|
+
*/
|
|
49
|
+
export function log(message: string): void {
|
|
50
|
+
logger.info(message);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Log a separator line
|
|
55
|
+
*/
|
|
56
|
+
export function logSeparator(length: number = 60): void {
|
|
57
|
+
logger.info("-".repeat(length));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Log an indented detail line
|
|
62
|
+
*/
|
|
63
|
+
export function logDetail(message: string, indent: string = " "): void {
|
|
64
|
+
logger.info(`${indent}${message}`);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Log usage help for a script
|
|
69
|
+
*/
|
|
70
|
+
export function logUsage(usage: string, examples?: string[]): void {
|
|
71
|
+
logger.error(usage);
|
|
72
|
+
if (examples && examples.length > 0) {
|
|
73
|
+
logger.error("");
|
|
74
|
+
logger.error("Examples:");
|
|
75
|
+
examples.forEach((example) => logger.error(` ${example}`));
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Log a section header with optional emoji
|
|
81
|
+
*/
|
|
82
|
+
export function logSection(emoji: string, title: string): void {
|
|
83
|
+
logger.info(`\n${emoji} ${title}`);
|
|
84
|
+
logSeparator();
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Log not configured error and exit
|
|
89
|
+
*/
|
|
90
|
+
export function logNotConfigured(): never {
|
|
91
|
+
logError("Not configured. Run: npm run setup");
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Log a structured message entry with details
|
|
97
|
+
*/
|
|
98
|
+
export function logMessageEntry(details: {
|
|
99
|
+
id?: string;
|
|
100
|
+
title: string;
|
|
101
|
+
time?: string;
|
|
102
|
+
recurring?: string;
|
|
103
|
+
message?: string;
|
|
104
|
+
fileName?: string;
|
|
105
|
+
error?: string;
|
|
106
|
+
status?: string;
|
|
107
|
+
index?: number;
|
|
108
|
+
}): void {
|
|
109
|
+
const prefix = details.index ? `${details.index}. ` : "";
|
|
110
|
+
const statusEmoji =
|
|
111
|
+
details.status === "sent" ? "[+]" : details.status === "failed" ? "[!]" : "";
|
|
112
|
+
|
|
113
|
+
log(`\n${prefix}${statusEmoji ? statusEmoji + " " : ""}${details.title}`);
|
|
114
|
+
|
|
115
|
+
if (details.id) logDetail(`ID: ${details.id}`);
|
|
116
|
+
if (details.time) logDetail(`Time: ${details.time}`);
|
|
117
|
+
if (details.recurring) logDetail(`Recurring: ${details.recurring}`);
|
|
118
|
+
if (details.message) logDetail(`Message: ${details.message}`);
|
|
119
|
+
if (details.fileName) logDetail(`File: ${details.fileName}`);
|
|
120
|
+
if (details.error) logDetail(`Error: ${details.error}`);
|
|
121
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ProxyAgent, setGlobalDispatcher } from "undici";
|
|
2
|
+
|
|
3
|
+
export function setupProxy(): void {
|
|
4
|
+
const proxyUrl = process.env.HTTP_PROXY || process.env.HTTPS_PROXY;
|
|
5
|
+
if (!proxyUrl) {
|
|
6
|
+
return;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const proxyAgent = new ProxyAgent(proxyUrl);
|
|
10
|
+
setGlobalDispatcher(proxyAgent);
|
|
11
|
+
}
|