Skip to content

Slim features: the agent-device front maps deviceNeeds #2105

Backlog

Description

@V3RON

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 deviceNeeds as it maps deviceExcept.
  • src/agent-device/AGENTS.md, Front: checkRequest and 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 deviceNeeds leases with needs, and agent-device never sees the field: deviceNeeds: [push] → lease request needs: [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 message lease.request gives it and no lease; a command with deviceNeeds on flags, on input or in a batch step reaches agent-device without it

Done when

  • pnpm test:changed passes, with the B14 cases above.
  • website/src/content/docs/docs/using-devices/agent-device.mdx names deviceNeeds beside deviceExcept.

Out of scope

  • The flag in agent-device itself (callstack/agent-device).

Depends on

Written by an agent.

Activity

  1. added
    task:draft
    platform:ios
    on Dec 4, 2026
  2. added
    task:ready
    and removed
    task:draft
    on Dec 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform:iostask:ready

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions