{"id":50402535,"url":"https://github.com/xtrape-com/xtrape-capsule-demo","last_synced_at":"2026-05-31T00:03:25.055Z","repository":{"id":356292862,"uuid":"1231681602","full_name":"xtrape-com/xtrape-capsule-demo","owner":"xtrape-com","description":"Demo Capsule Services for testing and learning Xtrape Capsule Opstage integration.","archived":false,"fork":false,"pushed_at":"2026-05-14T18:11:02.000Z","size":51,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-14T20:16:59.638Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xtrape-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-07T07:25:46.000Z","updated_at":"2026-05-14T18:11:04.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/xtrape-com/xtrape-capsule-demo","commit_stats":null,"previous_names":["xtrape-com/xtrape-capsule-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xtrape-com/xtrape-capsule-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtrape-com%2Fxtrape-capsule-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtrape-com%2Fxtrape-capsule-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtrape-com%2Fxtrape-capsule-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtrape-com%2Fxtrape-capsule-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtrape-com","download_url":"https://codeload.github.com/xtrape-com/xtrape-capsule-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtrape-com%2Fxtrape-capsule-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33714036,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-30T02:00:06.278Z","response_time":92,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-31T00:03:23.218Z","updated_at":"2026-05-31T00:03:25.051Z","avatar_url":"https://github.com/xtrape-com.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xtrape-capsule-demo\n\n\u003e Reference Capsule Service for testing and learning Xtrape Capsule Opstage integration.\n\n[![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](./LICENSE)\n[![Status: Public Review](https://img.shields.io/badge/status-Public%20Review-orange.svg)](https://xtrape-com.github.io/xtrape-capsule-site/)\n[![Docs](https://img.shields.io/badge/docs-xtrape--capsule--site-blue.svg)](https://xtrape-com.github.io/xtrape-capsule-site/agents/node-embedded-agent)\n\nThis repository demonstrates two v0.3 modes:\n\n- **Embedded Agent mode**: Single Capsule Service that connects directly to Opstage CE\n- **OpHub-managed adapter mode**: Local HTTP adapter endpoints for OpHub to discover and manage\n\n\u003e **Package status:** Xtrape Capsule is currently in **Public Review** before\n\u003e the `v0.1.0 Public Preview` release. This package is published under the\n\u003e `public-review` dist-tag. APIs, contracts, deployment instructions, and SDK\n\u003e interfaces may still change.\n\n## Install\n\nDuring Public Review, install the prerelease package with:\n\n```bash\npnpm add @xtrape/capsule-agent-node@public-review\n```\n\nThe current Public Review version may change before `v0.1.0`.\n\nFor this repository itself:\n\n```bash\npnpm install\npnpm build\n```\n\n## Embedded Agent Mode\n\nThis is the default mode. The demo service connects directly to Opstage CE using\n`@xtrape/capsule-agent-node`.\n\nConfigure `.env`:\n\n```env\nDEMO_MODE=embedded\nOPSTAGE_BACKEND_URL=http://localhost:8080\nOPSTAGE_REGISTRATION_TOKEN=opstage_reg_...\n```\n\nRun:\n\n```bash\npnpm dev\n```\n\n## OpHub-managed Adapter Mode\n\nIn this mode, the demo exposes local HTTP adapter endpoints that OpHub can\ndiscover and manage. The demo does not connect directly to Opstage CE.\n\nConfigure `.env`:\n\n```env\nDEMO_MODE=adapter\nDEMO_HTTP_PORT=3101\n```\n\nRun:\n\n```bash\npnpm dev\n```\n\nThe demo will expose these local endpoints for OpHub:\n\n- `GET /capsule/manifest`\n- `GET /capsule/health`  \n- `GET /capsule/configs`\n- `GET /capsule/actions`\n- `POST /capsule/actions/:name/prepare`\n- `POST /capsule/actions/:name/execute`\n\nOpHub discovers these endpoints and reports the service to Opstage CE with\n`mode: \"ophub\"`.\n\n## Verify In Opstage\n\n### Embedded Mode\n1. Open **Agents**.\n2. Confirm `demo-worker` is `ONLINE` and has mode `embedded`.\n3. Open the agent drawer and confirm it lists one service: `demo-worker`.\n\n### OpHub-managed Mode\n1. Start OpHub configured to discover this demo service.\n2. Open **Agents**.\n3. Confirm your OpHub agent is `ONLINE` and has mode `ophub`.\n4. Open the agent drawer and confirm it lists `demo-worker` as a managed service.\n\n## Troubleshooting\n\n### Registration token rejected\nCreate a fresh registration token in Opstage and remove the old token file:\n\n```bash\nrm -f ./data/agent-token.txt\n```\n\n### OpHub cannot discover adapter endpoints\nConfirm the demo is running in adapter mode and the HTTP port is accessible\nfrom OpHub's network context.\n\n## Related Repositories\n\n- Opstage CE: https://github.com/xtrape-com/xtrape-capsule-ce\n- Documentation: https://github.com/xtrape-com/xtrape-capsule-site\n- Node.js Embedded Agent SDK: https://github.com/xtrape-com/xtrape-capsule-agent-node\n- Contracts: https://github.com/xtrape-com/xtrape-capsule-contracts-node\n\n## License\n\nApache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtrape-com%2Fxtrape-capsule-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtrape-com%2Fxtrape-capsule-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtrape-com%2Fxtrape-capsule-demo/lists"}