Device session states, pause/resume, availability monitoring
npx skills add https://github.com/facebook/meta-wearables-dat-ios --skill session-lifecycle
Guide for managing device session states in DAT SDK integrations.
The DAT SDK runs work inside sessions. Meta glasses expose two experience types:
Your app observes session state changes — the device decides when to transition.
| State | Meaning | App action |
|-------|---------|------------|
| idle | Session created but not started | Call start() when ready |
| starting | Session is connecting to the device | Show connecting state |
| started | Session active and ready for capabilities | Add or resume work |
| paused | Temporarily suspended by the device | Hold work, may resume |
| stopping | Session is cleaning up | Wait for terminal state |
| stopped | Session inactive and terminal | Free resources, create a new session to restart |
let session = try Wearables.shared.createSession(deviceSelector: AutoDeviceSelector(wearables: Wearables.shared))
try session.start()
Task {
for await state in session.stateStream() {
switch state {
case .started:
// Confirm UI shows session is live
case .paused:
// Keep connection, wait for started or stopped
case .stopped:
// Release resources, allow user to restart
default:
break
}
}
}
A Stream is obtained from the Camera capability attached to a started DeviceSession:
stopped → waitingForDevice → starting → streaming → paused → stopped
guard let camera = try session.addCamera(config: StreamConfiguration()) else { return }
let stream = camera.stream
let token = stream.statePublisher.listen { state in
Task { @MainActor in
// React to state changes
}
}
The device changes session state when:
When a session is paused:
startedYour app should not attempt to restart while paused — wait for started or stopped.
Monitor device availability to know when sessions can start:
Task {
for await devices in Wearables.shared.devicesStream() {
// Update list of available glasses
}
}
Key behaviors:
stoppedstarted, paused, stopped)stoppedpaused — wait for system to resume or stopSkill converted from mcp-deploy-manage-agents.prompt.md
Use this skill when the user wants to launch a new AltClaw, OpenClaw, PicoClaw, or Ottie deployment through Cloud Claw. Covers the same user-facing fields and constraints exposed in the Cloud Claw UI, using the local altllm cloud-claw-* commands. Do NOT use for post-launch lifecycle tasks like start/stop/delete/logs; use cloud-claw-manage-vm.
Build hosted agents using Azure AI Projects SDK with ImageBasedHostedAgentDefinition. Use when creating container-based agents in Azure AI Foundry.
Build MCP (Model Context Protocol) servers on Cloudflare Workers with tools, resources, and prompts.
Chain agent outputs as inputs in sequential or parallel pipelines for data flow orchestration
Audit cloned or reimplemented websites for fidelity gaps, tracking scripts, source-brand and language residue, placeholders, and risky external dependencies. Use before handoff or deployment, or when asked to review a website clone for cleanup and readiness.
> Install and operate Hermes Tweet, a Hermes Agent plugin for X/Twitter research, timeline reading, tweet analysis, and approval-gated tweet actions. Use this skill when installing Hermes Tweet, researching X/Twitter accounts, monitoring launch signals, investigating mentions, auditing giveaways, or preparing guarded tweet actions. Use proactively when a Hermes Agent workflow needs current X/Twitter context. Requires XQUIK_API_KEY for read and action tools.
Handles LLM-as-judge evaluation workflows on Arize including creating/updating evaluators, running evaluations on spans or experiments, managing tasks, trigger-run operations, column mapping, and continuous monitoring. Use when the user mentions create evaluator, LLM judge, hallucination, faithfulness, correctness, relevance, run eval, score spans, score experiment, trigger-run, column mapping, continuous monitoring, or improve evaluator prompt.
Take facebook/session-lifecycle from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.