Context
Cloud issue AgentWorkforce/cloud#1783 shipped the hosted run observability side (PR AgentWorkforce/cloud#1788): per-run history/detail API for deployed agents (status, exitCode, error, summary, stdout/stderr/mountLogTail, failure class) plus an agent-consumable compact shape (?format=compact), with a run origin field reserved for future local_dry_run / cloud_simulation ingestion.
Per #1783's division of labor, the simulation/dry-run half belongs in workforce. This issue tracks it.
Current state (from the #1783 investigation)
packages/deploy/src/deploy.ts / packages/cli/src/deploy-command.ts: --dry-run validates persona/deploy config only, then exits — it does NOT simulate an invocation.
packages/runtime/src/types.ts: WorkforceCtx.log(level, message, attrs?) exists and handlers use it.
packages/runtime/src/runner.ts: emits runner.started, runner.handler.ok, runner.handler.error lifecycle events.
- Missing: a way to ask “if this agent received this event, what would happen?” with captured
ctx.log(...), summary, and predicted side effects in a safe inspection mode.
Scope
- True invocation dry-run / simulation path — execute the handler against an event with side-effect controls (no external writes, or recorded-not-executed), distinct from the existing deploy-preflight
--dry-run.
- Event fixture / replay contract — e.g.
workforce invoke --fixture event.json --dry-run and/or workforce deployments simulate <agent> --event ….
- Safe side-effect controls for simulation mode.
- Machine-readable run record — preserve
ctx.log(...) emissions + invocation summary in a shape compatible with Cloud's hosted run model (runId/status/exitCode/summary/error/timings/trigger/logs + origin: "local_dry_run"), so Cloud can later ingest/display simulated runs alongside hosted ones without redesign.
Acceptance
Refs: AgentWorkforce/cloud#1783, AgentWorkforce/cloud#1788.
Context
Cloud issue AgentWorkforce/cloud#1783 shipped the hosted run observability side (PR AgentWorkforce/cloud#1788): per-run history/detail API for deployed agents (status, exitCode, error, summary, stdout/stderr/mountLogTail, failure class) plus an agent-consumable compact shape (
?format=compact), with a runoriginfield reserved for futurelocal_dry_run/cloud_simulationingestion.Per #1783's division of labor, the simulation/dry-run half belongs in workforce. This issue tracks it.
Current state (from the #1783 investigation)
packages/deploy/src/deploy.ts/packages/cli/src/deploy-command.ts:--dry-runvalidates persona/deploy config only, then exits — it does NOT simulate an invocation.packages/runtime/src/types.ts:WorkforceCtx.log(level, message, attrs?)exists and handlers use it.packages/runtime/src/runner.ts: emitsrunner.started,runner.handler.ok,runner.handler.errorlifecycle events.ctx.log(...), summary, and predicted side effects in a safe inspection mode.Scope
--dry-run.workforce invoke --fixture event.json --dry-runand/orworkforce deployments simulate <agent> --event ….ctx.log(...)emissions + invocation summary in a shape compatible with Cloud's hosted run model (runId/status/exitCode/summary/error/timings/trigger/logs +origin: "local_dry_run"), so Cloud can later ingest/display simulated runs alongside hosted ones without redesign.Acceptance
origin: local_dry_run.--dry-run.Refs: AgentWorkforce/cloud#1783, AgentWorkforce/cloud#1788.