{"_id":"@affectively/orchestrator","_rev":"3-82c37bb34c4bb3cf24e0b3042f1e1cd3","name":"@affectively/orchestrator","dist-tags":{"latest":"5.0.0"},"versions":{"1.0.0":{"name":"@affectively/orchestrator","version":"1.0.0","keywords":["orchestration","workflow","automation","ci-cd","agent","composition","bun","pnpm","monorepo","nx","turborepo","typescript"],"author":{"name":"AFFECTIVELY.AI"},"license":"MIT","_id":"@affectively/orchestrator@1.0.0","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"homepage":"https://github.com/affectively-ai/orchestrator#readme","bugs":{"url":"https://github.com/affectively-ai/orchestrator/issues"},"bin":{"fix-tests":"dist/scripts/fix-all-tests.js","orchestrate":"dist/scripts/execute-workflow.js","type-analyze":"dist/scripts/type-check-analyze.js"},"dist":{"shasum":"3ec1ccdaa9c478bc3909344190b9e54440d46644","tarball":"https://registry.npmjs.org/@affectively/orchestrator/-/orchestrator-1.0.0.tgz","fileCount":91,"integrity":"sha512-ri1xZMAMqxhkP0gw4RXOtGRhbTkwm9b4/4mpnTY6NJVOYhankRDFKUtM/nXFjp8WCg+flh/KkxlJMI3pYrq22Q==","signatures":[{"sig":"MEYCIQD7PHOSi282fVluCjLKuytbJvaDnQV3PJeENpUABIQmKwIhAKsMuMTFsOMSmXSDttQJeghE4iUgWqn7F24Ozv3Hjtgu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":310905},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"bun":">=1.0.0","node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./scripts":{"types":"./dist/scripts/index.d.ts","import":"./dist/scripts/index.js"},"./workflow":{"types":"./dist/workflow/index.d.ts","import":"./dist/workflow/index.js"},"./orchestration":{"types":"./dist/orchestration/index.d.ts","import":"./dist/orchestration/index.js"}},"gitHead":"f74c5f9b19c2d5672096441a1dc66c295d8f41a7","scripts":{"dev":"tsc --watch","test":"bun test","build":"tsc && tsc -p tsconfig.cjs.json","clean":"rm -rf dist","type-check":"tsc --noEmit","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"buley","email":"buley@outlook.com"},"repository":{"url":"git+https://github.com/affectively-ai/orchestrator.git","type":"git"},"_npmVersion":"11.8.0","description":"Production-grade workflow orchestration and composition engine for building autonomous agents and CI/CD pipelines","directories":{},"_nodeVersion":"25.5.0","_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"ai":">=6.0.0","typescript":">=5.0.0","@ai-sdk/google":">=1.0.0","@ai-sdk/openai":">=1.0.0"},"peerDependenciesMeta":{"ai":{"optional":true},"@ai-sdk/google":{"optional":true},"@ai-sdk/openai":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/orchestrator_1.0.0_1770075164678_0.9779804978474544","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is deprecated and no longer supported. Do not use."},"5.0.0":{"name":"@affectively/orchestrator","version":"5.0.0","keywords":["orchestration","workflow","automation","ci-cd","agent","composition","bun","pnpm","monorepo","nx","turborepo","typescript"],"author":{"name":"AFFECTIVELY.AI"},"license":"UNLICENSED","_id":"@affectively/orchestrator@5.0.0","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"homepage":"https://github.com/affectively-ai/orchestrator#readme","bugs":{"url":"https://github.com/affectively-ai/orchestrator/issues"},"bin":{"fix-tests":"dist/scripts/fix-all-tests.js","orchestrate":"dist/scripts/execute-workflow.js","type-analyze":"dist/scripts/type-check-analyze.js"},"dist":{"shasum":"91b23145bb094128ec36def04d7e07039ab29a72","tarball":"https://registry.npmjs.org/@affectively/orchestrator/-/orchestrator-5.0.0.tgz","fileCount":91,"integrity":"sha512-PBafHyw3CC48zz41b0VaPnhtRidMcdNJ821lBpHn4ytDUbEo4BuZQ4YLWTlwR/npAkcd17npsMsStHlxVKncIA==","signatures":[{"sig":"MEYCIQC+xoPysyS7QoWBXw7SUtfYNcOwpm9AfmeJqRKlfbezqgIhAIIpgmGoDM1fwl8nTEHXmkz4gap4pDAoiI2jsIPGFZRw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":311972},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"bun":">=1.0.0","node":">=22.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./scripts":{"types":"./dist/scripts/index.d.ts","import":"./dist/scripts/index.js"},"./workflow":{"types":"./dist/workflow/index.d.ts","import":"./dist/workflow/index.js"},"./orchestration":{"types":"./dist/orchestration/index.d.ts","import":"./dist/orchestration/index.js"}},"gitHead":"ae54b0df6ac98ed86b037accafa16cf218dda541","scripts":{"dev":"tsc --watch","test":"bun test","build":"tsc && tsc -p tsconfig.cjs.json","clean":"rm -rf dist","type-check":"tsc --noEmit","prepublishOnly":"bun run clean && bun run build"},"_npmUser":{"name":"buley","email":"buley@outlook.com"},"repository":{"url":"git+https://github.com/affectively-ai/orchestrator.git","type":"git"},"_npmVersion":"11.8.0","description":"Production-grade workflow orchestration and composition engine for building autonomous agents and CI/CD pipelines","directories":{},"_nodeVersion":"25.5.0","_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest","typescript":"^5.7.0","@types/node":"^22.0.0"},"peerDependencies":{"ai":">=6.0.0","typescript":">=5.0.0","@ai-sdk/google":">=1.0.0","@ai-sdk/openai":">=1.0.0"},"peerDependenciesMeta":{"ai":{"optional":true},"@ai-sdk/google":{"optional":true},"@ai-sdk/openai":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/orchestrator_5.0.0_1773156343885_0.6845522436216411","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is deprecated and no longer supported. Do not use."}},"time":{"created":"2026-02-02T23:32:44.592Z","modified":"2026-03-27T20:03:41.346Z","1.0.0":"2026-02-02T23:32:44.824Z","5.0.0":"2026-03-10T15:25:44.066Z"},"bugs":{"url":"https://github.com/affectively-ai/orchestrator/issues"},"author":{"name":"AFFECTIVELY.AI"},"license":"UNLICENSED","homepage":"https://github.com/affectively-ai/orchestrator#readme","keywords":["orchestration","workflow","automation","ci-cd","agent","composition","bun","pnpm","monorepo","nx","turborepo","typescript"],"repository":{"url":"git+https://github.com/affectively-ai/orchestrator.git","type":"git"},"description":"Production-grade workflow orchestration and composition engine for building autonomous agents and CI/CD pipelines","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"readme":"# Open-Source Workflows Repository\n\nFlexible, production-grade CI/CD workflows for linting, testing, and code cleanup. Designed to support **any repository structure**—monorepo or single package, works with **Bun and pnpm**.\n\n## Features\n\n✅ **Package Manager Agnostic** - Auto-detects `bun.lock` or `pnpm-lock.yaml`\n✅ **Monorepo & Non-Monorepo Support** - Works with Nx, Turborepo, or single packages\n✅ **Flexible Project Detection** - Adapts to Angular, Next.js, React Native, etc.\n✅ **Intelligent Caching** - Smart cache keys for dependencies and build artifacts\n✅ **Fail-Fast Testing** - Tests per-project sequentially to isolate failures\n✅ **Type-Safety First** - TypeScript validation before linting\n✅ **Accessibility Compliance** - WCAG 2.1 AA standards built-in\n✅ **Zero Configuration** - Works out of the box with sensible defaults\n\n## Quick Start\n\n### 1. Add as Git Submodule\n\n```bash\ngit submodule add https://github.com/your-org/workflows.git .workflows\ngit config -f .gitmodules submodule.workflows.shallow true\ngit submodule update --init --recursive\n```\n\n### 2. Use GitHub Actions Workflows\n\nCopy workflows to `.github/workflows/`:\n\n```bash\ncp .workflows/github-actions/*.yml .github/workflows/\n```\n\nOr link them:\n\n```bash\n# In .github/workflows/ci.yml\nname: CI\non: [push, pull_request]\njobs:\n  include:\n    - uses: ./.workflows/github-actions/lint.yml\n```\n\n### 3. Use Agent Workflows\n\nReference workflows for autonomous agent execution:\n\n```bash\n# Example: Run code quality check\nbun scripts/execute-workflow.ts code-quality-check\n```\n\n## Repository Detection\n\nThe workflows automatically detect your repository structure:\n\n### Detection Priority\n\n1. **`bun.lock`** → Use Bun as package manager\n2. **`pnpm-lock.yaml`** → Use pnpm as package manager\n3. **`package-lock.json`** → Fall back to npm\n4. **`yarn.lock`** → Fall back to yarn\n\n### Monorepo Detection\n\n- **Nx** - Detects `nx.json`\n- **Turborepo** - Detects `turbo.json`\n- **pnpm workspaces** - Detects `pnpm-workspace.yaml`\n- **Single package** - Uses `package.json` root\n\n## Workflow Types\n\n### GitHub Actions Workflows (`.github/workflows/`)\n\nAutomated CI/CD workflows triggered by GitHub events:\n\n- **`ci.yml`** - Main CI pipeline (lint, type-check, test on every push/PR)\n- **`lint.yml`** - ESLint + Prettier checks\n- **`type-check.yml`** - TypeScript validation\n- **`test.yml`** - Jest/Vitest unit testing\n- **`code-quality.yml`** - Full quality check with auto-fix\n- **`cleanup.yml`** - Manual workflow for fixing all issues\n\n### Agent Workflows (`.agent/workflows/`)\n\nDocumentation-based workflows for autonomous agent execution:\n\n- **`code-quality-check.md`** - Type checking, linting, formatting\n- **`fix-all-tests-workflow.md`** - Systematically fix all failing tests\n- **`clean-all.md`** - Complete cleanup of all code quality issues\n- **`build-and-fix.md`** - Build all projects and fix errors\n\n## Configuration\n\n### Environment Variables\n\nCreate `.env` or configure in your repo:\n\n```bash\n# Package manager (auto-detected if not set)\nPACKAGE_MANAGER=bun\n\n# Node version for actions\nNODE_VERSION=22\n\n# Skip certain checks\nSKIP_ACCESSIBILITY_CHECKS=false\nSKIP_E2E_TESTS=false\n```\n\n### Custom Rules\n\n#### ESLint Configuration\n\nPlace at repo root:\n\n```json\n// .eslintrc.json\n{\n  \"extends\": [\"eslint:recommended\", \"plugin:@typescript-eslint/recommended\"],\n  \"rules\": {\n    \"@typescript-eslint/no-explicit-any\": \"error\"\n  }\n}\n```\n\n#### TypeScript Configuration\n\nPlace at repo root:\n\n```json\n// tsconfig.json\n{\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noImplicitAny\": true\n  }\n}\n```\n\n## Usage Examples\n\n### Run CI Locally\n\n```bash\n# Lint only changed files\nbunx eslint --ext .ts,.tsx src/\n\n# Type-check\nbun run type-check\n\n# Run tests\nbun test\n```\n\n### Use GitHub Actions\n\nPush to trigger automatic workflows:\n\n```bash\ngit add .\ngit commit -m \"feat: new feature\"\ngit push origin main\n```\n\n### Manual Workflow Dispatch\n\nTrigger from GitHub UI:\n\n1. Go to **Actions** tab\n2. Select workflow\n3. Click **Run workflow**\n4. Choose branch and options\n\n## Scripts\n\nUtility scripts for local development and CI/CD:\n\n### `detect-repo-type.ts`\n\nAutomatically detects repository structure:\n\n```bash\nbun scripts/detect-repo-type.ts\n# Output: { packageManager: 'bun', isMonorepo: true, buildSystem: 'nx' }\n```\n\n### `run-linter.ts`\n\nFlexible linting with file detection:\n\n```bash\n# Lint all files\nbun scripts/run-linter.ts --all\n\n# Lint changed files only\nbun scripts/run-linter.ts --changed\n\n# Fix issues\nbun scripts/run-linter.ts --fix\n```\n\n### `run-tests.ts`\n\nSmart test runner:\n\n```bash\n# Run all tests\nbun scripts/run-tests.ts --all\n\n# Run changed tests\nbun scripts/run-tests.ts --changed\n\n# Run specific project\nbun scripts/run-tests.ts --project web-app\n\n# Run with coverage\nbun scripts/run-tests.ts --coverage\n```\n\n### `fix-all-tests.ts`\n\nSystematically fix failing tests:\n\n```bash\nbun scripts/fix-all-tests.ts\n# Runs each project sequentially until all pass\n```\n\n### `type-check-analyze.ts`\n\nAnalyze TypeScript errors:\n\n```bash\n# Show all errors\nbun scripts/type-check-analyze.ts\n\n# Show only fixable errors\nbun scripts/type-check-analyze.ts --fixable\n\n# Show specific error code\nbun scripts/type-check-analyze.ts --code TS2307\n```\n\n## Supported Technologies\n\n### Package Managers\n- **Bun** 1.0+\n- **pnpm** 8+\n- npm (fallback)\n- Yarn (fallback)\n\n### Build Systems\n- **Nx** 18+\n- **Turborepo** 1.13+\n- **pnpm workspaces**\n- Single package repos\n\n### Frameworks\n- Next.js 14+\n- React 18+\n- React Native 0.72+\n- Angular 17+\n- Vue 3+\n- SvelteKit\n- Node.js backends\n\n### Languages\n- **TypeScript** (strict mode)\n- JavaScript (ES2020+)\n- JSX/TSX\n\n### Testing\n- Jest 29+\n- Vitest 1+\n- Bun:test\n\n## CI/CD Integration\n\n### GitHub Actions\n\nWorkflows run on:\n- Push to `main`, `develop`, `staging`\n- Pull requests\n- Manual workflow dispatch\n- Scheduled (cron jobs)\n\n### Other Platforms\n\nAdapt workflows for:\n- **GitLab CI** - Convert `.yml` to `.gitlab-ci.yml`\n- **CircleCI** - Use equivalent config format\n- **Jenkins** - Use pipeline syntax\n- **Azure Pipelines** - Use YAML format\n\n## Performance Optimization\n\n### Caching Strategy\n\n- **Node Modules** - Cache based on lock files\n- **Build Artifacts** - Cache `.next`, `.nx/cache`, etc.\n- **TypeScript Cache** - Cache incremental compilation\n\n### Parallel Execution\n\n- Tests run per-project for fail-fast\n- Multiple workflows run concurrently\n- Shared cache prevents duplicate work\n\n### Cost Reduction\n\n- Skip expensive checks on documentation-only changes\n- Use `continue-on-error` for non-blocking checks\n- Run full suite only on main branch\n\n## Troubleshooting\n\n### Common Issues\n\n**\"Package manager not detected\"**\n```bash\n# Ensure lock file exists\nbun install  # Creates bun.lock\n# or\npnpm install  # Creates pnpm-lock.yaml\n```\n\n**\"Cannot find project configuration\"**\n```bash\n# For Nx: ensure nx.json exists\n# For Turborepo: ensure turbo.json exists\n# For pnpm: ensure pnpm-workspace.yaml exists\n```\n\n**\"Tests fail in CI but pass locally\"**\n- Check Node/Bun versions match\n- Verify environment variables\n- Check for cache issues: clear and rebuild\n\n**\"Workflows run too slow\"**\n- Enable caching (enabled by default)\n- Run only changed files: `--changed` flag\n- Reduce test suite: focus on affected projects\n\n## Contributing\n\nContributions welcome! Areas:\n\n- New workflow templates\n- Platform support (GitLab, CircleCI, etc.)\n- Documentation improvements\n- Performance optimizations\n- Bug reports and fixes\n\n## License\n\nMIT License - See LICENSE file\n\n## Resources\n\n- [Bun Documentation](https://bun.sh)\n- [pnpm Documentation](https://pnpm.io)\n- [Nx Documentation](https://nx.dev)\n- [GitHub Actions Documentation](https://docs.github.com/actions)\n- [ESLint Configuration](https://eslint.org/docs/rules/)\n- [TypeScript Compiler Options](https://www.typescriptlang.org/tsconfig)\n\n## Related Projects\n\n- [AFFECTIVELY](https://github.com/your-org/emotions) - Reference implementation\n- Other open-source templates\n\n---\n\n**Questions?** Open an issue or discussion in the repository.\n","readmeFilename":"README.md"}