version: 1 project: name: fullstack-node-go description: Example contract for a Node application with a Go service type: application toolchains: node: version: "22.4.0" package_managers: npm: "10.8.2" execution: default_context: host contexts: host: backend: native runtimes: go: "1.24.0" env: vars: OTA_SERVICE_ENV: default: local allowed: - local - ci tasks: setup: context: host description: Hydrate application dependencies through the declared npm lane category: setup prepare: kind: dependency_hydration medium: package_dependencies source: kind: node_package_manager cwd: . manager: npm mode: ci requirements: toolchains: - node effects: writes: - node_modules network: true network_kind: dependency_hydration safe_for_agent: true build: context: host description: Build the app bundle category: build run: npm run build depends_on: - setup requirements: toolchains: - node service-test: context: host description: Run the Go service tests category: test run: go test ./... checks: - name: node-installed kind: precondition severity: error run: node --version - name: go-installed kind: precondition severity: error run: go version agent: entrypoint: setup default_task: service-test safe_tasks: - setup - service-test verify_after_changes: - service-test writable_paths: - node_modules - src - services - docs protected_paths: - ota.yaml notes: | Use `ota run service-test` after application changes. Use `ota run build` and `ota run test` to keep the Node and Go paths in sync through the contract.