{"_id":"@cuylabs/physical-capx-agent-core","_rev":"2-13a5a47e8ee5e1ca5753a0b54d468369","name":"@cuylabs/physical-capx-agent-core","dist-tags":{"latest":"0.1.1"},"versions":{"0.1.1":{"name":"@cuylabs/physical-capx-agent-core","version":"0.1.1","keywords":["agent","physical-ai","robotics","capx","code-as-policy"],"author":{"name":"cuylabs"},"license":"Apache-2.0","_id":"@cuylabs/physical-capx-agent-core@0.1.1","maintainers":[{"name":"cyb3rward0g","email":"roberto@cuylabs.ai"}],"homepage":"https://github.com/cuylabs-ai/physical-ai-ts#readme","bugs":{"url":"https://github.com/cuylabs-ai/physical-ai-ts/issues"},"dist":{"shasum":"7738da6e016b8e44ee0eee72d02f30b1eb8782a1","tarball":"https://registry.npmjs.org/@cuylabs/physical-capx-agent-core/-/physical-capx-agent-core-0.1.1.tgz","fileCount":27,"integrity":"sha512-u85r/FOUEV/tz5icg/al6/h1uATBJqn//yUITmluCtBTBrrZ7UhHnFtI0OuitL3nQi5Mo72gSOoq7QAhkBSOoQ==","signatures":[{"sig":"MEUCIFPaU8WbhRmlDEBWP2/kS78WLpQVDK0vJByWXu5ktcw1AiEA+q6/0GPoBFOhFBBxbgBqKz2q/tAtYZAB4bAPecGQhxI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":82175},"main":"./dist/index.js","type":"module","_from":"file:cuylabs-physical-capx-agent-core-0.1.1.tgz","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./agent":{"types":"./dist/agent.d.ts","import":"./dist/agent.js","default":"./dist/agent.js"},"./tools":{"types":"./dist/tools.d.ts","import":"./dist/tools.js","default":"./dist/tools.js"},"./session":{"types":"./dist/session.d.ts","import":"./dist/session.js","default":"./dist/session.js"}},"scripts":{"dev":"tsup --config tsup.config.ts --watch","test":"vitest run","build":"tsup --config tsup.config.ts","clean":"rm -rf dist","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"cyb3rward0g","email":"roberto@cuylabs.ai"},"_resolved":"/tmp/8f074c39e6b78733812dc41288c59175/cuylabs-physical-capx-agent-core-0.1.1.tgz","_integrity":"sha512-u85r/FOUEV/tz5icg/al6/h1uATBJqn//yUITmluCtBTBrrZ7UhHnFtI0OuitL3nQi5Mo72gSOoq7QAhkBSOoQ==","repository":{"url":"git+https://github.com/cuylabs-ai/physical-ai-ts.git","type":"git","directory":"packages/physical-capx-agent-core"},"_npmVersion":"10.8.2","description":"Agent-core CaP-X agent and physical tool adapter","directories":{},"_nodeVersion":"20.20.2","dependencies":{"zod":"^3.25.76 || ^4.1.8","@cuylabs/physical-capx":"^0.1.1","@cuylabs/physical-core":"^0.1.1","@cuylabs/physical-agent-core":"^0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","tsup":"^8.0.0","dotenv":"^17.2.3","vitest":"^4.0.18","typescript":"^5.7.0","@types/node":"^22.0.0","@ai-sdk/openai":"4.0.0-beta.38","@cuylabs/agent-core":"^7.2.1"},"peerDependencies":{"@cuylabs/agent-core":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/physical-capx-agent-core_0.1.1_1780354211579_0.6572760735284013","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-06-01T22:50:11.401Z","modified":"2026-06-26T20:37:50.830Z","0.1.1":"2026-06-01T22:50:11.727Z"},"bugs":{"url":"https://github.com/cuylabs-ai/physical-ai-ts/issues"},"author":{"name":"cuylabs"},"license":"Apache-2.0","homepage":"https://github.com/cuylabs-ai/physical-ai-ts#readme","keywords":["agent","physical-ai","robotics","capx","code-as-policy"],"repository":{"url":"git+https://github.com/cuylabs-ai/physical-ai-ts.git","type":"git","directory":"packages/physical-capx-agent-core"},"description":"Agent-core CaP-X agent and physical tool adapter","maintainers":[{"email":"cyb3rpandah@gmail.com","name":"cyb3rpandah"},{"email":"roberto@cuylabs.ai","name":"cyb3rward0g"}],"readme":"# @cuylabs/physical-capx-agent-core\n\nAgent-core CaP-X agent adapter.\n\nThis package composes `@cuylabs/physical-capx`,\n`@cuylabs/physical-agent-core`, and `@cuylabs/agent-core`. It provides CaP-X\ntool creation, packaged CaP-X model guidance, and `createCapxAgent(...)`.\n\nUse this package when the host harness is `@cuylabs/agent-core`. Use\n`@cuylabs/physical-capx` directly when a TypeScript host only needs a\nbackend-neutral `CapxSession`.\n\n```text\nagent-core model loop\n  -> @cuylabs/physical-capx-agent-core tools\n    -> @cuylabs/physical-capx CapxSession\n      -> capx-agent-runtime HTTP server\n        -> CaP-X Python runtime, selected YAML config, simulator or robot\n```\n\n## Install\n\n```bash\nnpm install @cuylabs/agent-core @cuylabs/physical-core @cuylabs/physical-agent-core @cuylabs/physical-capx @cuylabs/physical-capx-agent-core\n```\n\n## Use\n\n```typescript\nimport { createCapxAgent } from \"@cuylabs/physical-capx-agent-core\";\n\nconst { agent, session } = await createCapxAgent({\n  model,\n  startSession: true,\n  toolExecutionMode: \"plan\",\n  sessionOptions: {\n    mode: \"runtime\",\n    runtimeServerUrl: \"http://127.0.0.1:8210\",\n    physicalMode: \"simulation\",\n    enablePolicyCodeExecution: true,\n  },\n});\n```\n\nThe package also exposes a migration-friendly `./session` entrypoint:\n\n```typescript\nimport {\n  createCapxPhysicalTools,\n  createCapxSession,\n} from \"@cuylabs/physical-capx-agent-core/session\";\n```\n\n## Runtime Loop\n\nThe external agent owns reasoning and code generation. CaP-X owns robotics\nexecution.\n\n```text\nstart CapxSession\n  -> capx_observe returns task prompt, state, frame, and codeContext\n  -> agent writes one Python policy-code step\n  -> capx_run_policy_code submits that code to the live runtime session\n  -> agent observes the result, reward, artifacts, and next frame\n  -> host or agent continues, reports completion, resets, or stops\n```\n\n`capx_run_policy_code` is the tool that performs physical work. It can mutate a\nsimulator or move hardware, so it should stay approval-gated and dispatched by\nthe host harness.\n\n## Tools\n\nThis package generates the `agent-core` tools below. They are the\nTypeScript-facing tool surface for a `CapxSession`; internally they call the\n`capx-agent-runtime` HTTP API through `@cuylabs/physical-capx`.\n\n- `capx_status`\n- `capx_observe`\n- `capx_artifacts`\n- `capx_stop`\n- `capx_run_policy_code` when `enablePolicyCodeExecution: true`\n- `capx_turn_history`\n\nThe raw runtime server exposes HTTP endpoints such as `/sessions`,\n`/sessions/{id}/observe`, `/sessions/{id}/execute-code`,\n`/sessions/{id}/artifacts`, and `/sessions/{id}/turns`. Its optional MCP\nwrapper has its own MCP-native tool names. The list above is the smaller\n`agent-core` default surface.\n\nThe default model-facing surface is intentionally small. It gives the agent\nenough context to write better Code-as-Policies Python without exposing every\nruntime operation as a separate robot-action tool.\n\n## CaP-X Skills\n\nThere are two different skill concepts:\n\n- `agent-core` skills are `SKILL.md` instruction packs that teach the model how\n  to use the CaP-X tools.\n- CaP-X skills are Python helper functions in the runtime skill library.\n\nThe default agent tool surface exposes CaP-X skill-library information through\n`capx_observe` as policy-code context. Programmatic clients can still use\n`CapxLiveRuntime` from `@cuylabs/physical-capx` to inspect, extract, or inject\nruntime skills deliberately with host approval.\n\n## Boundary\n\nUse this package only when the host runtime is `@cuylabs/agent-core`. The\nagent-agnostic CaP-X session adapter remains in `@cuylabs/physical-capx`.\n\nThe runtime server owns the robotics side: CaP-X checkout, selected YAML\nconfig, simulator or robot dependencies, CUDA/perception services, model\nassets, output directory, skill-library path, and execution of submitted Python\nprograms.\n\nThis TypeScript package owns only the `agent-core` side: tool creation,\napproval-aware policy-code execution, packaged model guidance, and\n`createCapxAgent(...)`.\n\n## Docs\n\n- [docs/README.md](./docs/README.md)\n- [docs/agent-core-integration.md](./docs/agent-core-integration.md)\n- [../physical-capx/docs/how-it-works.md](../physical-capx/docs/how-it-works.md)\n  for the runtime/session adapter\n- [examples/README.md](./examples/README.md)\n\n## License\n\nApache-2.0\n","readmeFilename":"README.md"}