Skip to content

Expose script's actors client to trusted spawned actors #324

Description

@NotASithLord

Problem

The JavaScript-first orchestration path is currently inconsistent:

  • a trusted-lineage spawned actor granted message_actor may delegate directly and receives the reply in-band;
  • the same actor granted both script and message_actor gets no actors.* client inside script, because the tool mint and the actors/call route reject every kind: 'spawned' owner.

That forces the model back into one-tool-call-per-turn choreography exactly where code should be strongest: fan-out, chaining replies, retry/timeout logic, and returning only the synthesized result.

Direction

Expose the existing actors.list/ask/send client to a spawned actor only when its already-narrowed grants contain the corresponding authority. Reuse the current messageActor sender gate on every op; do not add a second delegation path.

This is an ergonomics change, not an authority expansion:

  • require both script and message_actor for ask/send;
  • require actor_list for list;
  • preserve the trusted-lineage and inbound-turn checks;
  • keep bound environment actors blocked from cross-actor delegation;
  • preserve root-keyed rate/outstanding caps, dedupe, audit, fencing, tracing, and Stop cancellation.

Acceptance criteria

  • Trusted spawned actors can fan out/choreograph actor work inside one script call.
  • A spawned actor without message_actor cannot mint or use the client.
  • Tainted/untrusted lineage is refused by the existing sender gate.
  • actors.list() cannot bypass the spawned actor's narrowed grant set.
  • Bound actors remain unable to delegate to other actors.
  • Focused unit coverage proves minting, per-op authorization, lineage refusal, and Stop behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions