{"_id":"@code44/worktree-worker","_rev":"8-5ffc7839d859cd37caa31a187c576cef","name":"@code44/worktree-worker","dist-tags":{"latest":"1.8.0"},"versions":{"1.7.2":{"name":"@code44/worktree-worker","version":"1.7.2","keywords":["git","worktree","codesandbox","agent","trial"],"author":{"name":"Origin"},"license":"MIT","_id":"@code44/worktree-worker@1.7.2","maintainers":[{"name":"code44","email":"saidu@o.xyz"}],"bin":{"worktree-worker":"dist/main.js"},"dist":{"shasum":"5d90eb3eade0e08f76e6755e58ae0df39b748a34","tarball":"https://registry.npmjs.org/@code44/worktree-worker/-/worktree-worker-1.7.2.tgz","fileCount":4,"integrity":"sha512-Y1FtYzVZgeZVAZzbxKOs8JuyHwbilKWAJQBLYblGDqB6dsI4xbNALg3t1+u2lqhAZpPcL8lMYZ5opTUvGluyyA==","signatures":[{"sig":"MEUCIQCFsxeVKlVb3s4DbkIOIGE75TN5ewolywYNCl10A3nkngIgF4YhOm4zskPEaLtox32+1hAziP0tCxwlTKjBYGgMv/8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77739},"main":"dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=18.0.0"},"gitHead":"5a4bdf156f65670fb291dfe395b8cf3fa1488748","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","build":"tsup","start":"node dist/main.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"code44","email":"saidu@o.xyz"},"_npmVersion":"10.8.2","description":"Git worktree management service for AI agent trials","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.0","hono":"^4.6.0","pino":"^9.5.0","pino-pretty":"^13.0.0","@hono/node-server":"^1.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.3.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/worktree-worker_1.7.2_1769523594092_0.3550770068944844","host":"s3://npm-registry-packages-npm-production"}},"1.7.3":{"name":"@code44/worktree-worker","version":"1.7.3","keywords":["git","worktree","codesandbox","agent","trial"],"author":{"name":"Origin"},"license":"MIT","_id":"@code44/worktree-worker@1.7.3","maintainers":[{"name":"code44","email":"saidu@o.xyz"}],"bin":{"worktree-worker":"dist/main.js"},"dist":{"shasum":"0c90e7cdec1c022bca264fc074a3926e54d04571","tarball":"https://registry.npmjs.org/@code44/worktree-worker/-/worktree-worker-1.7.3.tgz","fileCount":4,"integrity":"sha512-ZxXoPrHpjSDtWuz2NRymKkGzFyFEhvfwufxp5FbQZcYC1Gp/CGKuOfPtxTjHICjayWuaWUhWuFgnCk4YyVM2Sw==","signatures":[{"sig":"MEYCIQDVdQRTo+mDJ1XDsu5WtB00PLiqPFV5FKIZ2QYBRm7V4wIhAJjw6FlgtF+T77ierDrBtasMLLMlkXnt0jfm/0gqNu1q","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77868},"main":"dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=18.0.0"},"gitHead":"5a4bdf156f65670fb291dfe395b8cf3fa1488748","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","build":"tsup","start":"node dist/main.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"code44","email":"saidu@o.xyz"},"_npmVersion":"10.8.2","description":"Git worktree management service for AI agent trials","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.0","hono":"^4.6.0","pino":"^9.5.0","pino-pretty":"^13.0.0","@hono/node-server":"^1.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.3.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/worktree-worker_1.7.3_1769540237500_0.7560307076461912","host":"s3://npm-registry-packages-npm-production"}},"1.7.4":{"name":"@code44/worktree-worker","version":"1.7.4","keywords":["git","worktree","codesandbox","agent","trial"],"author":{"name":"Origin"},"license":"MIT","_id":"@code44/worktree-worker@1.7.4","maintainers":[{"name":"code44","email":"saidu@o.xyz"}],"bin":{"worktree-worker":"dist/main.js"},"dist":{"shasum":"d840e377996c428f8e52b3569eb5c56f3d5431d3","tarball":"https://registry.npmjs.org/@code44/worktree-worker/-/worktree-worker-1.7.4.tgz","fileCount":4,"integrity":"sha512-2OwtHjpUjgh/OWDA9Zzqmh1mM0cZHEXItek7XrQZD4x0OsvfOfmS5GJH48L61xsbp30TbLOV0J071LDaYUJVng==","signatures":[{"sig":"MEQCIG+RWKsny5v6DL7ImKkDWevhcTuHOqAcVqu1XBwZ8pyKAiA8wQJ0b/Urd4Nxq1XOQoBKYrRTFk23UCDwH5w8UuWU2g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":78632},"main":"dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=18.0.0"},"gitHead":"8430d3f42cba163d1199f3a0c373b04331d4549a","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","build":"tsup","start":"node dist/main.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"code44","email":"saidu@o.xyz"},"_npmVersion":"10.8.2","description":"Git worktree management service for AI agent trials","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.0","hono":"^4.6.0","pino":"^9.5.0","pino-pretty":"^13.0.0","@hono/node-server":"^1.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.3.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/worktree-worker_1.7.4_1769793016055_0.32423677757073777","host":"s3://npm-registry-packages-npm-production"}},"1.7.5":{"name":"@code44/worktree-worker","version":"1.7.5","keywords":["git","worktree","codesandbox","agent","trial"],"author":{"name":"Origin"},"license":"MIT","_id":"@code44/worktree-worker@1.7.5","maintainers":[{"name":"code44","email":"saidu@o.xyz"}],"bin":{"worktree-worker":"dist/main.js"},"dist":{"shasum":"6c9b4b50c65b18186b3d85700e6d4512c49a7d77","tarball":"https://registry.npmjs.org/@code44/worktree-worker/-/worktree-worker-1.7.5.tgz","fileCount":4,"integrity":"sha512-6P6hxazyJreCB248KoqARbt5Y9HLtKIgGBnip8sAHt5ap5f4bJE1mU1e2kBx/OAD1qV73SWqegw6/CtfoHT/pA==","signatures":[{"sig":"MEUCIQDmoGE/vypAhuHjCwbU4PLrtEYo2EMi9ZQqBCgDq5eEMAIgd//NqiG421iSsYqJ8uA9f+d0t6B7CmiVTiCBTTWpDlI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82813},"main":"dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=18.0.0"},"gitHead":"1570da299fd9343637e7bc9ec41e6c6d3ad08d36","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","build":"tsup","start":"node dist/main.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"code44","email":"saidu@o.xyz"},"_npmVersion":"10.8.2","description":"Git worktree management service for AI agent trials","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.0","hono":"^4.6.0","pino":"^9.5.0","pino-pretty":"^13.0.0","@hono/node-server":"^1.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.3.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/worktree-worker_1.7.5_1769852597992_0.32157811775484113","host":"s3://npm-registry-packages-npm-production"}},"1.7.6":{"name":"@code44/worktree-worker","version":"1.7.6","keywords":["git","worktree","codesandbox","agent","trial"],"author":{"name":"Origin"},"license":"MIT","_id":"@code44/worktree-worker@1.7.6","maintainers":[{"name":"code44","email":"saidu@o.xyz"}],"bin":{"worktree-worker":"dist/main.js"},"dist":{"shasum":"9dfa761094a00adfe7262be887619478a4288e94","tarball":"https://registry.npmjs.org/@code44/worktree-worker/-/worktree-worker-1.7.6.tgz","fileCount":4,"integrity":"sha512-wQOo07kDaX5JZKcsKSXBZJKnR2Uu4xLB2sDH8Tqzu8yy6X/lgDmxQ8idV67oWZ86koYN6bXkRbZy9KutNqHVFg==","signatures":[{"sig":"MEQCIDTco9OPTvK7WGrrQpZznWN6Z9jcI7GlDe/hHEkSa0K6AiBErEW2hXZoM3QKgXK2YyN193IzV/wuVR6fyIHGOCcbKg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82813},"main":"dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=18.0.0"},"gitHead":"1570da299fd9343637e7bc9ec41e6c6d3ad08d36","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","build":"tsup","start":"node dist/main.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"code44","email":"saidu@o.xyz"},"_npmVersion":"10.8.2","description":"Git worktree management service for AI agent trials","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.0","hono":"^4.6.0","pino":"^9.5.0","pino-pretty":"^13.0.0","@hono/node-server":"^1.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.3.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/worktree-worker_1.7.6_1769853804329_0.7755770837372693","host":"s3://npm-registry-packages-npm-production"}},"1.7.8":{"name":"@code44/worktree-worker","version":"1.7.8","keywords":["git","worktree","codesandbox","agent","trial"],"author":{"name":"Origin"},"license":"MIT","_id":"@code44/worktree-worker@1.7.8","maintainers":[{"name":"code44","email":"saidu@o.xyz"}],"bin":{"worktree-worker":"dist/main.js"},"dist":{"shasum":"de3cedfbe349ff01c1a99a424b36be20c1538515","tarball":"https://registry.npmjs.org/@code44/worktree-worker/-/worktree-worker-1.7.8.tgz","fileCount":4,"integrity":"sha512-l7ZQsCMzDLKJ+wJH1qTriMOqehtjgVOcbUrZPqJz2yHV0oDq8dUauV6M7MNjZXTxZxzh81sz+MraZxDni7x/Pg==","signatures":[{"sig":"MEYCIQD2zArYMiErKeoJTgb++U1skCADAqpL2d8WKnshF84xuQIhAPvBZfp4eXGIpU625PuMc9PWH8zbAv6708IjjcViWcdU","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":84403},"main":"dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=18.0.0"},"gitHead":"7338e7df659e75a36f268ffbfdce701c008a0cd3","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","build":"tsup","start":"node dist/main.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"code44","email":"saidu@o.xyz"},"_npmVersion":"10.8.2","description":"Git worktree management service for AI agent trials","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.0","hono":"^4.6.0","pino":"^9.5.0","pino-pretty":"^13.0.0","@hono/node-server":"^1.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.3.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/worktree-worker_1.7.8_1769981721498_0.2722464572493324","host":"s3://npm-registry-packages-npm-production"}},"1.7.9":{"name":"@code44/worktree-worker","version":"1.7.9","keywords":["git","worktree","codesandbox","agent","trial"],"author":{"name":"Origin"},"license":"MIT","_id":"@code44/worktree-worker@1.7.9","maintainers":[{"name":"code44","email":"saidu@o.xyz"}],"bin":{"worktree-worker":"dist/main.js"},"dist":{"shasum":"32b95c1996384e9c7dabf6c22ec167812aaabc16","tarball":"https://registry.npmjs.org/@code44/worktree-worker/-/worktree-worker-1.7.9.tgz","fileCount":4,"integrity":"sha512-8Q7nA5p3ue3osuyIYolGpfmhDyeFa1APyL9t1R90+4XzSaeWvOuMs+nsiOyCm2dF4ub8GkMruMdwQuJnONLFEg==","signatures":[{"sig":"MEUCIAaGbfesXikoZ3/h9xXe2dZOCzxC18G/c6djooNH12S7AiEA6+5/oXh38HYU9B0kq3hp/LepQ3pn3E4ILSvIfAtTqf8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":92478},"main":"dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=18.0.0"},"gitHead":"a141bd703298cfed2e88bcb8ef5eae65f59074da","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","build":"tsup","start":"node dist/main.js","typecheck":"tsc --noEmit","prepublishOnly":"npm run build"},"_npmUser":{"name":"code44","email":"saidu@o.xyz"},"_npmVersion":"10.8.2","description":"Git worktree management service for AI agent trials","directories":{},"_nodeVersion":"20.19.4","dependencies":{"zod":"^3.24.0","hono":"^4.6.0","pino":"^9.5.0","pino-pretty":"^13.0.0","@hono/node-server":"^1.13.7"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.0","tsup":"^8.3.0","typescript":"^5.7.0","@types/node":"^22.10.0"},"_npmOperationalInternal":{"tmp":"tmp/worktree-worker_1.7.9_1770302810795_0.39062922884980833","host":"s3://npm-registry-packages-npm-production"}},"1.8.0":{"name":"@code44/worktree-worker","version":"1.8.0","description":"Git worktree management service for AI agent trials","type":"module","main":"dist/main.js","bin":{"worktree-worker":"dist/main.js"},"scripts":{"build":"tsup","dev":"tsx watch src/main.ts","start":"node dist/main.js","typecheck":"tsc --noEmit","lint":"eslint src/","prepublishOnly":"npm run build"},"keywords":["git","worktree","codesandbox","agent","trial"],"author":{"name":"Origin"},"license":"MIT","dependencies":{"@hono/node-server":"^1.13.7","hono":"^4.6.0","pino":"^9.5.0","pino-pretty":"^13.0.0","zod":"^3.24.0"},"devDependencies":{"@types/node":"^22.10.0","tsup":"^8.3.0","tsx":"^4.19.0","typescript":"^5.7.0"},"engines":{"node":">=18.0.0"},"publishConfig":{"access":"public"},"_id":"@code44/worktree-worker@1.8.0","gitHead":"a141bd703298cfed2e88bcb8ef5eae65f59074da","types":"./dist/main.d.ts","_nodeVersion":"20.19.4","_npmVersion":"10.8.2","dist":{"integrity":"sha512-r0eQs26/0ZK40Qx6MrwlkZAMb0xtBTt16Kz91zi70PI0uJUkbvMUkTv3t1Xjzrh5oWGkKTs++KsKF5n328GTiQ==","shasum":"15fa824ed66874f29c848bb7215958b51f8b1f2e","tarball":"https://registry.npmjs.org/@code44/worktree-worker/-/worktree-worker-1.8.0.tgz","fileCount":4,"unpackedSize":92969,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGskAYBcl6N+wFJja6/Q2SgZncUCD7hP2aX7nP1Izln+AiAE6UcOgE5w+jx1/+Nry9oDsnHRe+kSFPoWNvOr5kcehA=="}]},"_npmUser":{"name":"code44","email":"saidu@o.xyz"},"directories":{},"maintainers":[{"name":"code44","email":"saidu@o.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/worktree-worker_1.8.0_1770304284717_0.13222729969815283"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-27T14:19:54.004Z","modified":"2026-02-05T15:11:25.248Z","1.7.2":"2026-01-27T14:19:54.250Z","1.7.3":"2026-01-27T18:57:17.651Z","1.7.4":"2026-01-30T17:10:16.234Z","1.7.5":"2026-01-31T09:43:18.167Z","1.7.6":"2026-01-31T10:03:24.496Z","1.7.8":"2026-02-01T21:35:21.646Z","1.7.9":"2026-02-05T14:46:50.959Z","1.8.0":"2026-02-05T15:11:24.860Z"},"author":{"name":"Origin"},"license":"MIT","keywords":["git","worktree","codesandbox","agent","trial"],"description":"Git worktree management service for AI agent trials","maintainers":[{"name":"code44","email":"saidu@o.xyz"}],"readme":"# @saeed42/worktree-worker\n\nGit worktree management service for AI agent trials. Runs as an npm package in CodeSandbox or any\nNode.js environment.\n\n## Security\n\n**GitHub tokens are NEVER persisted to disk.** All authenticated operations require the token to be\npassed in the request body. This is critical for sandbox environments where credentials should not\nbe stored.\n\n## Installation\n\n```bash\n# Install globally\nnpm install -g @saeed42/worktree-worker\n\n# Or add to your project\nnpm install @saeed42/worktree-worker\n```\n\n## Quick Start\n\n### Run as CLI\n\n```bash\n# Set environment variables\nexport WORKER_TOKEN=your-secret-token\nexport PORT=8787\n\n# Run the service\nworktree-worker\n```\n\n### Run in CodeSandbox\n\nAdd to your `package.json`:\n\n```json\n{\n  \"dependencies\": {\n    \"@saeed42/worktree-worker\": \"^1.0.0\"\n  },\n  \"scripts\": {\n    \"worktree-worker\": \"worktree-worker\"\n  }\n}\n```\n\nOr run directly:\n\n```bash\nnpx @saeed42/worktree-worker\n```\n\n### Run Programmatically\n\n```typescript\nimport { app } from '@saeed42/worktree-worker';\n\n// The app is a Hono instance\n// You can extend it or use it as middleware\n```\n\n## Architecture\n\n```\n/project/\n├── sandbox/              # BASE_WORKSPACE_DIR - Main repo clone\n└── workspaces/\n    └── trials/           # TRIALS_WORKSPACE_DIR - Worktrees\n        ├── feature-auth-a1b2c3d4/\n        ├── fix-bug-xyz-5e6f7g8h/\n        └── ...\n```\n\n## API Endpoints\n\n### Health Checks\n\n| Endpoint            | Description        |\n| ------------------- | ------------------ |\n| `GET /health`       | Basic health check |\n| `GET /health/ready` | Readiness check    |\n| `GET /health/live`  | Liveness check     |\n\n### Repository Management\n\n| Endpoint                | Description       |\n| ----------------------- | ----------------- |\n| `POST /v1/repo/init`    | Clone repository  |\n| `POST /v1/repo/update`  | Fetch/pull latest |\n| `GET /v1/repo/status`   | Get repo status   |\n| `GET /v1/repo/branches` | List branches     |\n\n### Worktree Management\n\n| Endpoint                                   | Description           |\n| ------------------------------------------ | --------------------- |\n| `POST /v1/trials/:trialId/worktree/reset`  | Create/reset worktree |\n| `DELETE /v1/trials/:trialId/worktree`      | Delete worktree       |\n| `GET /v1/trials/:trialId/worktree/status`  | Get status            |\n| `GET /v1/trials/:trialId/worktree/diff`    | Get diff              |\n| `POST /v1/trials/:trialId/worktree/commit` | Commit changes        |\n| `POST /v1/trials/:trialId/worktree/push`   | Push to remote        |\n\n## Configuration\n\n| Variable               | Default                      | Description                  |\n| ---------------------- | ---------------------------- | ---------------------------- |\n| `PORT`                 | `8787`                       | HTTP server port             |\n| `NODE_ENV`             | `development`                | Environment mode             |\n| `WORKER_TOKEN`         | ``                           | Auth token (empty = no auth) |\n| `BASE_WORKSPACE_DIR`   | `/project/sandbox`           | Main repo path               |\n| `TRIALS_WORKSPACE_DIR` | `/project/workspaces/trials` | Worktrees path               |\n| `DEFAULT_BRANCH`       | `main`                       | Default base branch          |\n| `GIT_TIMEOUT_MS`       | `60000`                      | Git timeout                  |\n| `CLEANUP_AFTER_HOURS`  | `24`                         | Stale worktree cleanup       |\n\n## Usage Examples\n\n### Initialize Repository\n\n```bash\ncurl -X POST http://localhost:8787/v1/repo/init \\\n  -H \"Authorization: Bearer your-token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"repoUrl\": \"https://github.com/owner/repo\",\n    \"branch\": \"main\",\n    \"githubToken\": \"ghp_xxx\"\n  }'\n```\n\n### Create Worktree\n\n```bash\ncurl -X POST http://localhost:8787/v1/trials/abc123/worktree/reset \\\n  -H \"Authorization: Bearer your-token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"baseBranch\": \"main\",\n    \"trialBranch\": \"feature/my-feature\",\n    \"githubToken\": \"ghp_xxx\"\n  }'\n```\n\n> **Note:** `githubToken` is required for private repositories. The token is used inline and **never\n> stored on disk**.\n\nResponse:\n\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"worktreePath\": \"/project/workspaces/trials/feature-my-feature-abc12345\",\n    \"branch\": \"feature/my-feature\",\n    \"headSha\": \"a1b2c3d4e5f6...\"\n  }\n}\n```\n\n### Commit Changes\n\n```bash\ncurl -X POST http://localhost:8787/v1/trials/abc123/worktree/commit \\\n  -H \"Authorization: Bearer your-token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"message\": \"feat: implement auth\",\n    \"author\": {\n      \"name\": \"AI Agent\",\n      \"email\": \"agent@origin.ai\"\n    }\n  }'\n```\n\n### Push Changes\n\n```bash\ncurl -X POST http://localhost:8787/v1/trials/abc123/worktree/push \\\n  -H \"Authorization: Bearer your-token\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"githubToken\": \"ghp_xxx\",\n    \"force\": false\n  }'\n```\n\n> **Note:** `githubToken` is **required** for push operations. The token is used inline and **never\n> stored on disk**.\n\n## Development\n\n```bash\n# Clone the repo\ncd worker-service-node\n\n# Install dependencies\nnpm install\n\n# Run in dev mode (with watch)\nnpm run dev\n\n# Type check\nnpm run typecheck\n\n# Build\nnpm run build\n\n# Run production build\nnpm start\n```\n\n## Publishing\n\n```bash\n# Build and publish to npm\nnpm publish --access public\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}