Repository navigation
Backlog
Labels
platform:iosiOS simulators or devicestask:readySpec checked. An agent may implement it once its Depends on allow.
Description
Part of #2100.
Scope
An agent-device client that sends deviceNeeds on allocate leases with needs, and agent-device itself never sees the field. agent-device's CLI must add the flag before its users can send it (it has none for deviceExcept either); this task makes Simlock ready for it.
If it goes wrong, deviceNeeds would be dropped (the lease granted without the needs) or passed to agent-device, which would refuse the unknown key.
Technical spec
Commit 9280021.
Rows
- Behaviours: B14
- Interfaces: I8
- Existing code: X25, X29
Facts
| # | Fact | Source |
|---|---|---|
| F1 | agent-device v0.21.43 (the version package.json pins) passes deviceMode and deviceBaseline from its options into a command's flags and has no deviceExcept or deviceNeeds; Simlock's front maps deviceExcept only when a client sends it |
gh api 'repos/callstack/agent-device/contents/packages/command-surface/src/command-flags.ts?ref=v0.21.43' printed lines 64-65 (deviceMode: options.deviceMode, deviceBaseline: options.deviceBaseline); gh api 'search/code?q=deviceExcept+repo:callstack/agent-device' printed 0 |
Modules touched
Searches: rg -n "deviceExcept" src.
src/agent-device/shared/rpc.ts(leaseCallFields),src/agent-device/front/allocate.ts(the mapping and the stripped allocate),src/agent-device/front/request-rules.ts(ruleLeaseKeys)src/agent-device/device-mode.test.ts(B14)- website:
using-devices/agent-device.mdx
Rules in play
- ADR 0105 §1 and Consequences: the front maps
deviceNeedsas it mapsdeviceExcept. src/agent-device/AGENTS.md, Front:checkRequestand the key rules run before anything is forwarded.
Tests
The seam is the agent-device front, model on src/agent-device/device-mode.test.ts.
- B14: An agent-device allocate with
deviceNeedsleases withneeds, and agent-device never sees the field:deviceNeeds: [push]→ lease requestneeds: [push], allocate forwarded without it;deviceNeeds: null→ absent;["Push"]→refused by simlock:with I1's message and no lease;"push"→refused by simlock:with the messagelease.requestgives it and no lease; a command withdeviceNeedsonflags, oninputor in a batch step reaches agent-device without it
Done when
pnpm test:changedpasses, with the B14 cases above.website/src/content/docs/docs/using-devices/agent-device.mdxnamesdeviceNeedsbesidedeviceExcept.
Out of scope
- The flag in agent-device itself (callstack/agent-device).
Depends on
Written by an agent.
Metadata
Metadata
Assignees
Labels
platform:iosiOS simulators or devicestask:readySpec checked. An agent may implement it once its Depends on allow.
Activity