You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context (verified 2026-07-28; decision recorded 2026-07-28)
examples/test-app is the Expo dogfood fixture (its own README: "a minimal Expo Router fixture app for agent-device and skillgym experiments"), 496KB git-tracked across 46 files. It is the repo's only examples/ content, so anyone looking for SDK usage examples by convention finds a test fixture instead. The actual SDK snippets live only in website/docs/docs/client-api.md, while the real consumer (the agent-device-cloud bridge) imports all 11 export subpaths — there is no runnable Node.js SDK example anywhere.
Maintainer decision (thymikee): Option 2 — add real Node.js SDK examples under examples/sdk/. The examples/test-app → fixtures/ rename is explicitly deferred (blast radius: ~10 test-app:* package scripts, test-app-build-cache.yml, skillgym configs, docs). Do NOT rename or move examples/test-app in this issue.
Task
Create examples/sdk/ with small, runnable, typechecked Node.js scripts demonstrating the public SDK surface, sourced from the snippets in website/docs/docs/client-api.md and the import patterns visible in the repo's own integration tests (test/integration/installed-package-metro.test.ts).
Acceptance criteria
At minimum these examples, each a standalone .ts runnable with node --experimental-strip-types (repo Node is >=22.12): root client session (createAgentDeviceClient → open → snapshot/tap → close, with error handling via the exported error types), metro (normalizeBaseUrl/resolveRuntimeTransport), contracts (typed result consumption, e.g. centerOfRect on a snapshot node), and one of batch (runBatch) / finders (findBestMatchesByLocator).
Imports use the package name (agent-device/...), not relative src/ paths — examples must exercise the published export map. Wire them to resolve against the local build (workspace/file link or tsconfig paths) so they typecheck in CI without publishing.
CI typechecks the examples by extending an existing lane (e.g. a tsconfig included in check:tooling's typecheck or a small vitest include) — no new workflow.
Each example has a top comment stating what it demonstrates and its prerequisites (daemon running, device/simulator available); examples that need live hardware must still typecheck without it.
examples/README.md (new) indexes the examples and clarifies that test-app/ is a fixture, not an example — one line, no rename.
Drift guard: the client-api.md snippets either import/include from these files or a test asserts the doc snippets compile — pick the cheaper mechanism that fits the existing docs build.
Context (verified 2026-07-28; decision recorded 2026-07-28)
examples/test-appis the Expo dogfood fixture (its own README: "a minimal Expo Router fixture app for agent-device and skillgym experiments"), 496KB git-tracked across 46 files. It is the repo's onlyexamples/content, so anyone looking for SDK usage examples by convention finds a test fixture instead. The actual SDK snippets live only inwebsite/docs/docs/client-api.md, while the real consumer (the agent-device-cloud bridge) imports all 11 export subpaths — there is no runnable Node.js SDK example anywhere.Maintainer decision (thymikee): Option 2 — add real Node.js SDK examples under
examples/sdk/. Theexamples/test-app→fixtures/rename is explicitly deferred (blast radius: ~10test-app:*package scripts,test-app-build-cache.yml, skillgym configs, docs). Do NOT rename or moveexamples/test-appin this issue.Task
Create
examples/sdk/with small, runnable, typechecked Node.js scripts demonstrating the public SDK surface, sourced from the snippets inwebsite/docs/docs/client-api.mdand the import patterns visible in the repo's own integration tests (test/integration/installed-package-metro.test.ts).Acceptance criteria
.tsrunnable withnode --experimental-strip-types(repo Node is >=22.12): root client session (createAgentDeviceClient→ open → snapshot/tap → close, with error handling via the exported error types),metro(normalizeBaseUrl/resolveRuntimeTransport),contracts(typed result consumption, e.g.centerOfRecton a snapshot node), and one ofbatch(runBatch) /finders(findBestMatchesByLocator).agent-device/...), not relativesrc/paths — examples must exercise the published export map. Wire them to resolve against the local build (workspace/file link or tsconfig paths) so they typecheck in CI without publishing.check:tooling's typecheck or a small vitest include) — no new workflow.examples/README.md(new) indexes the examples and clarifies thattest-app/is a fixture, not an example — one line, no rename.pnpm check:toolingandpnpm test:unitgreen.