mirror of
https://github.com/andrewyng/openworker.git
synced 2026-09-12 23:29:55 +00:00
Personas: requires_folder/subagents/scheduling traits replace family and the workspace enum
Manifest keeps a legacy family shim; telemetry wire fields unchanged. No behavior change; spec in ocw-context/docs/workspace-scratch-design.md.
This commit is contained in:
+11
-7
@@ -30,15 +30,19 @@ class Agent:
|
||||
name: str
|
||||
title: str
|
||||
system_prompt: str
|
||||
needs_workspace: bool = False
|
||||
tool_factory: Optional[Callable[[AgentContext], list]] = None
|
||||
# Traits that replace the old per-agent-name branching in build_engine / manager.
|
||||
# family: "code" gets explorer subagents; "knowledge" gets scheduling / request_directory /
|
||||
# roots context (when it has a workspace). messaging: exposes send_message. connectors:
|
||||
# loads the integration toolset — True = every connected connector (general builtins
|
||||
# only), a tuple = allowlist (session gets declared ∩ connected; OPE-93), False = none.
|
||||
# Defaults keep non-persona callers behaving as before.
|
||||
family: str = "knowledge"
|
||||
# requires_folder: the session cannot start without a user-picked primary folder
|
||||
# (composer + engine gate; everything else starts on a scratch dir). subagents:
|
||||
# read-only explorer fan-out. scheduling: scheduled tasks + self-wake. messaging:
|
||||
# exposes send_message. connectors: loads the integration toolset — True = every
|
||||
# connected connector (general builtins only), a tuple = allowlist (session gets
|
||||
# declared ∩ connected; OPE-93), False = none. Defaults keep non-persona callers
|
||||
# behaving as before. (The old family/needs_workspace/workspace trio collapsed into
|
||||
# these — see ocw-context/docs/workspace-scratch-design.md.)
|
||||
requires_folder: bool = False
|
||||
subagents: bool = False
|
||||
scheduling: bool = False
|
||||
messaging: bool = False
|
||||
connectors: bool | tuple[str, ...] = False
|
||||
# Team identity: "lead" | "worker" | None (solo-only). Gates the board/journal
|
||||
|
||||
@@ -17,6 +17,5 @@ def chat_agent() -> Agent:
|
||||
name="chat",
|
||||
title="Chat",
|
||||
system_prompt=CHAT_INSTRUCTIONS,
|
||||
needs_workspace=False,
|
||||
tool_factory=None,
|
||||
)
|
||||
|
||||
@@ -68,7 +68,7 @@ def code_agent() -> Agent:
|
||||
name="code",
|
||||
title="Code",
|
||||
system_prompt=CODE_INSTRUCTIONS,
|
||||
needs_workspace=True,
|
||||
tool_factory=lambda context: expand(CODE_CAPABILITIES, context),
|
||||
family="code",
|
||||
requires_folder=True,
|
||||
subagents=True,
|
||||
)
|
||||
|
||||
@@ -48,9 +48,8 @@ def cowork_agent() -> Agent:
|
||||
name="cowork",
|
||||
title="Cowork",
|
||||
system_prompt=COWORK_INSTRUCTIONS,
|
||||
needs_workspace=True,
|
||||
tool_factory=cowork_tool_factory,
|
||||
family="knowledge",
|
||||
scheduling=True,
|
||||
messaging=True,
|
||||
connectors=True,
|
||||
)
|
||||
|
||||
@@ -32,8 +32,7 @@ def myhelper_agent(name: str = DEFAULT_HELPER_NAME) -> Agent:
|
||||
name="myhelper",
|
||||
title=name,
|
||||
system_prompt=myhelper_instructions(name),
|
||||
needs_workspace=True,
|
||||
tool_factory=cowork_tool_factory,
|
||||
family="knowledge",
|
||||
scheduling=True,
|
||||
messaging=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user