feat(eda): workflow inputs, optional repository and agent profiles

Workflow definitions declare inputs, repository (none, optional or
required; default required) and profile. A binding assigns each input
from a mapped parameter or a constant and may take its repository from a
parameter, which must name a configured repo; both are checked when the
binding is saved and again at dispatch. Inputs travel as structured task
data (tasks.inputs, the task brief, and a JSON block in the agent's
mission), never as body text.

A task with no repository runs in a per-task scratch workspace with no
clone and no publication grant. The agent.run step runs one mission
without a repository and finishes the task in the new completed status.

Agent profiles live under [containers.profiles.<name>]: an image and an
allowlist over the tools archie adds (MCP, scripts, plugins).
[containers].image is the default profile; an unconfigured profile parks
the task. The workflow is now pinned before the container starts so the
profile can choose its image.

Also stop two archied tests writing embedded NATS state into the package
directory, refuse an empty state_dir for embedded NATS, and drop the NATS
store files an earlier lane commit tracked.
This commit is contained in:
sam committed 2026-09-24 20:29:33 +10:00
1 parent 7181e7917d
commit c431834e2b
118 files changed
+2163 -327

No files matched your search

+22 -3
View File
@@ -40,6 +40,11 @@ type LoopRunner struct {
// Limits bounds the size of tool results fed back into the stage. The
// zero value applies no limits.
Limits ToolLimits
// AllowTools is the agent profile's allowlist over the tools archie adds
// (central/MCP, repository scripts and skill plugins). Empty allows them
// all. A stage's capture tools are how it returns structured results, so
// they are never filtered.
AllowTools []string
}
func NewLoopRunner(
@@ -114,10 +119,10 @@ func (r *LoopRunner) Run(ctx context.Context, workspace string, req Request, rep
ReadOnly: req.ReadOnly,
ProtectPaths: protectionMatcher(req.Protection, req.ReadOnly),
Extra: mergeToolSets(
centralTools,
allowedTools(centralTools, r.AllowTools),
captureTools,
scriptTools,
pluginTools,
allowedTools(scriptTools, r.AllowTools),
allowedTools(pluginTools, r.AllowTools),
),
Logger: r.logger(req),
})
@@ -390,6 +395,20 @@ func scriptToolSet(workspace string) core.ToolSet {
// mergeToolSets combines tool sets into one; later sets win on name
// collisions.
// allowedTools keeps the tools allow names; an empty allow keeps them all.
func allowedTools(set core.ToolSet, allow []string) core.ToolSet {
if len(allow) == 0 {
return set
}
kept := core.ToolSet{}
for name, tool := range set {
if slices.Contains(allow, name) {
kept[name] = tool
}
}
return kept
}
func mergeToolSets(sets ...core.ToolSet) core.ToolSet {
merged := core.ToolSet{}
for _, set := range sets {