diff options
| author | t <t@tjp.lol> | 2026-08-19 19:02:30 -0600 |
|---|---|---|
| committer | t <t@tjp.lol> | 2026-08-19 19:03:52 -0600 |
| commit | d1306506aa7f504b0e91c9c6ed7314afbf99978e (patch) | |
| tree | e5a7295dbc566a3679e99e14dae13376b0469e84 /subagents/profiles.lua | |
| parent | 94e3fd8358bbdb5d6ed81aed475fab7fc73e2097 (diff) | |
Add background Lua workflows, inline child prompts, and layered config
subagents.lua now starts a workflow on its own coroutine and returns a
session-scoped id immediately, so fan-out continues while the primary keeps
working; completion wakes the primary, and later calls read immutable records
from subagents.workflows. Every ctx:agent takes a workflow-unique name so those
records are addressable. A session_start guidance message tells the primary when
to reach for run vs lua.
Children no longer inherit the primary's system context: a child starts from the
fixed child-role instruction plus its profile, and subagents.run/ctx:agent
accept an inline system_prompt instead of a profile. The now-redundant `agent`
form of subagents.models is gone.
Concurrency defaults to five and is configurable through [subagents]
max_concurrent in any layered config.toml; turn boundaries reap only settled
jobs so background workflows survive, while interrupt and session end cancel.
Config roots come from panto.ext.dirs.layers rather than a hand-rolled XDG
lookup, which picks up the base and git-ignored local layers for both agents/
and workflows/.
TOML workflows tighten up: the subagents.workflow tool takes a discovered name
only (inline `steps` duplicated subagents.lua at less power), an optional
top-level `output` array chooses the reported steps and their order instead of
the terminal set, a step with no workflow input gets no empty input heading, and
a workflow naming an undiscovered agent is rejected at discovery rather than
part-way through a run.
Diffstat (limited to 'subagents/profiles.lua')
| -rw-r--r-- | subagents/profiles.lua | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/subagents/profiles.lua b/subagents/profiles.lua index 4ae9f91..b1acdf3 100644 --- a/subagents/profiles.lua +++ b/subagents/profiles.lua @@ -1,13 +1,11 @@ -- Discover agent profiles: Markdown files with YAML frontmatter. -- --- Two layers are read, lowest precedence first: +-- One `agents/**/*.md` root per host config layer, lowest precedence first: +-- base, user, project, local (`panto.ext.dirs.layers`; see subagents/paths.lua). -- --- 1. ${XDG_CONFIG_HOME:-$HOME/.config}/panto/agents/**/*.md (user) --- 2. <cwd>/.panto/agents/**/*.md (project) --- --- A project profile shadows a user profile with the same resolved name. Both --- layers are walked recursively; nesting is organisational only and never part --- of a profile's name. +-- A later layer's profile shadows an earlier one with the same resolved name. +-- Every layer is walked recursively; nesting is organisational only and never +-- part of a profile's name. -- -- Recognised frontmatter keys, all optional: -- |
