Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# Ignore everything
*
# Ignore everything at the top level
/*

# But descend into directories
!*/

# Recursively allow files under subtree
!/.github/**
!/cecli/**
!/benchmark/**
!/docker/**
!/requirements/**
!/scripts/**
!/tests/**
# Then allow only specific directories; their contents are tracked
!/.github
!/cecli
!/benchmark
!/docker
!/requirements
!/scripts
!/tests

# Specific Files
!/.dockerignore
Expand Down Expand Up @@ -47,4 +44,4 @@ __pycache__/
cecli/website/_site/*
cecli/website/.sass-cache/*
cecli/website/.docmd-*/*
cecli/website/node_modules/*
cecli/website/node_modules/*
20 changes: 20 additions & 0 deletions cecli/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"custom",
"system_one",
"tui_config",
"workflows",
}
)

Expand Down Expand Up @@ -428,6 +429,25 @@ def get_parser(default_config_files, git_root):
help="Specify hooks configuration as a JSON string",
default=None,
)
group.add_argument(
"--workflows",
metavar="WORKFLOWS_JSON",
help=(
"Specify workflows configuration as an inline JSON/YAML string (e.g.,"
' \'[{"name": "nightly", "tasks": [...]}]\') or a path to a workflows file'
),
default=None,
)
group.add_argument(
"--scheduler",
action=argparse.BooleanOptionalAction,
default=None,
help=(
"Force the workflow scheduler on (--scheduler) or off (--no-scheduler) for"
" this session. (default: auto, on when any enabled scheduled workflow"
" exists)"
),
)
group.add_argument(
"--system-one",
metavar="SYSTEM_ONE_JSON",
Expand Down
2 changes: 2 additions & 0 deletions cecli/coders/agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,7 @@ def get_sub_agent_states(self):
info
for info in children
if not info.independent
and not info.detached
and info.status not in (SubAgentStatus.FINISHED, SubAgentStatus.ERROR)
]

Expand All @@ -1810,6 +1811,7 @@ def get_sub_agent_states(self):
for info in service.sub_agents.values():
if (
info.independent
and not info.detached
and str(info.coder.uuid) != originator_uuid
and info.status not in (SubAgentStatus.ERROR,)
and info.coder.uuid not in dependent_uuids
Expand Down
12 changes: 12 additions & 0 deletions cecli/coders/base_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,18 @@ async def create(
if from_coder.tui:
res.tui = from_coder.tui

# The scheduler is an active service owned by the primary
# coder: a switch runs inside the same event loop, so carry it
# over (and rebind its coder) instead of leaking a ticking
# zombie onto the retired coder. Recreations that keep the
# uuid are switches/reloads; sub-agents spawn with a fresh
# uuid, and a stopped scheduler (reload) is never handed on.
scheduler = getattr(from_coder, "scheduler", None)
if scheduler is not None and scheduler.running and res.uuid == from_coder.uuid:
from_coder.scheduler = None
res.scheduler = scheduler
scheduler.coder = res

# Sub-agents get a dedicated, independent MCP manager so they
# can rebuild a custom tool list (their own LocalServer tools /
# filters) and be disconnected independently from the parent.
Expand Down
3 changes: 3 additions & 0 deletions cecli/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
from .voice import VoiceCommand
from .weak_model import WeakModelCommand
from .web import WebCommand
from .workflows import WorkflowCommand
from .workspace import WorkspaceCommand

# Register commands
Expand Down Expand Up @@ -182,6 +183,7 @@
CommandRegistry.register(VoiceCommand)
CommandRegistry.register(WeakModelCommand)
CommandRegistry.register(WebCommand)
CommandRegistry.register(WorkflowCommand)
CommandRegistry.register(WorkspaceCommand)


Expand Down Expand Up @@ -279,5 +281,6 @@
"VoiceCommand",
"WeakModelCommand",
"WebCommand",
"WorkflowCommand",
"WorkspaceCommand",
]
Loading
Loading