@assemblyline-agents/mirror
v8.0.2
Published
Official Assembly Line connection plugin for user-scoped Mirror accounts.
Maintainers
Readme
@assemblyline-agents/mirror
Official Assembly Line connection plugin for Mirror. It gives each authenticated agent user an optional, separately authorized path to their mirrored source records and connected accounts.
Setup
Choose a stable public client id for the agent deployment and set:
MIRROR_OAUTH_CLIENT_ID=my-assembly-line-agentMirror accepts Assembly Line's OAuth Authorization Code flow with mandatory PKCE S256. The normal callback is:
https://YOUR-AGENT-HOST/assembly-line/connections/callbackThe hosted service and MCP endpoint are used by default. Self-hosted
deployments can set MIRROR_MCP_URL and, when OAuth is on a different origin,
MIRROR_OAUTH_ISSUER. MIRROR_OAUTH_REDIRECT_URI overrides Assembly Line's normal
callback only when necessary.
assembly-line add mirror agentScoped binding packets
For least-privilege setup, create an agent binding in Mirror's Agents UI,
choose the exact provider accounts it may reach, and paste the generated
binding packet into the agent's chat. The core pair tool is exposed by
default whenever the agent has a live connection, and Assembly Line also
advertises a host-side mirror__pair connection tool through discovery while
Mirror is unauthorized. Either tool sends the packet's one-time claim secret
only to the configured Mirror deployment, stores the returned access and
refresh tokens in the connection grant store, and keeps the durable
credentials out of the model and sandbox. If the Mirror definition cannot
resolve on the runtime host (for example a missing package or unset env),
pair reports that cause instead of disappearing.
The packet's API origin must match MIRROR_OAUTH_ISSUER, MIRROR_MCP_URL, or
the connection's configured URL. Credential exchange requires HTTPS, except
for loopback development. OAuth remains available as an alternative account
authorization path.
The selected plugin exposes every reviewed Mirror tool. Gate or remove named
actions through plugins.mirror.connections.mirror.approval or disable in
agent.md.
Mirror still enforces its own account grants and exact-action approval system. When configured, Assembly Line approval is an additional outer gate.
The connection includes Mirror's read-only mirror.get_skill discovery tool.
This returns Mirror's live, versioned action contract; it is not a local
Assembly Line skill. Before requesting a provider mutation, pass its returned
version and content hash to mirror.request_action. This keeps the agent's
request shape synchronized with Mirror's reviewed action contract.
Connection events
Mirror event delivery uses the connection's existing binding grant. No separate
automation token or signing-secret environment variable is required. Assembly
Line registers and verifies the callback endpoint for its own Mirror binding.
Set plugins.mirror.connections.mirror.events: false only when the agent must
not receive Mirror events.
Connection-level event scope stays in Mirror. From the binding's Events section, the user chooses exactly which granted, event-capable provider connections may send source changes to the agent. The Assembly Line plugin never enables or disables those subscriptions.
Optional Mirror CLI
The MCP connection is the default and works without a CLI. CLI credential
projection is executable plugin policy, not an agent.md option. A developer
who needs it must implement a reviewed local plugin around this package's
TypeScript API.
Assembly Line writes
/workspace/.assembly-line/credentials/mirror/config.json with mode 0600.
Set MIRROR_HOME=/workspace/.assembly-line/credentials/mirror for Mirror CLI
commands. The reserved directory is excluded from workspace versions. Only the
current access token is projected; the rotating refresh token stays in the
host-side grant store.
