Skip to content

Commit 4adf9d4

Browse files
tildesrcPanopticon Agentclaude
authored
Sweep stale claude-specific wording from CLI-agnostic layers (comments/docstrings only) (#391)
After the AgentCLI seam (ADR 0014) made the launcher and control plane CLI-agnostic, several comments and docstrings in those layers still said "claude"/"Claude" as if it were the only CLI. This rewording pass neutralises them — no code or behaviour change. Co-authored-by: Panopticon Agent <agent@panopticon.local> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f12061b commit 4adf9d4

11 files changed

Lines changed: 20 additions & 29 deletions

File tree

src/panopticon/container/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def main(
7171
return
7272
cli.render_skills(client, task_id, config_dir.parent)
7373
cli.render_operations(client, task_id, config_dir.parent) # advance/drop/… as slash-commands
74-
cli.write_settings(config_dir.parent) # turn-flip hooks → <home>/<config_dirname>/settings
74+
cli.write_settings(config_dir.parent) # wire turn-flip hooks where the CLI supports them
7575
cli.write_mcp_config(config_dir, service_url) # point the CLI at the task service's MCP server
7676
cli.write_workflow_overview(
7777
config_dir, client.workflow_overview(task_id)

src/panopticon/container/cli/__init__.py

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
1-
"""The **agent-CLI adapter package** (ADR 0014): the :class:`AgentCLI` seam + registry, and one
2-
module per CLI.
3-
4-
Panopticon drives one agent CLI today (`claude`); Milestone 3 adds others (Codex first). The
5-
launcher (:mod:`panopticon.container.agent`) is CLI-agnostic — it drives a deterministic *bootstrap*
6-
(render skills + turn-flip hooks, wire MCP, seed trust) then a *launch* (exec the real CLI) against
7-
an :class:`AgentCLI` adapter, holding no ``claude`` literal. :mod:`~panopticon.container.cli.base`
8-
holds the ABC + the name-keyed registry; each concrete adapter is its own module
9-
(:mod:`~panopticon.container.cli.claude` and :mod:`~panopticon.container.cli.codex`). A second CLI drops in by
10-
implementing the ABC and registering under its name (the drop-in shape of workflow discovery, ADR 0004).
11-
12-
The package lives **inside** ``container/`` — the sole LLM-bearing package — so the determinism
13-
invariant holds (ADR 0014 §6): the control plane runs no CLI-specific logic.
1+
"""The **agent-CLI adapter package** (ADR 0014). See :mod:`~panopticon.container.cli.base` for the
2+
:class:`AgentCLI` seam + registry; concrete adapters are :mod:`~panopticon.container.cli.claude` and
3+
:mod:`~panopticon.container.cli.codex`.
144
"""
155

166
from panopticon.container.cli.base import (

src/panopticon/container/cli/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ def read_hook_payload(self, stdin: TextIO) -> dict[str, Any]:
119119

120120
@abstractmethod
121121
def has_live_background_task(self, payload: dict[str, Any]) -> bool:
122-
"""Whether the Stop payload reports still-running background work (gates the turn flip)."""
122+
"""Whether the hook payload reports still-running background work (gates the turn flip)."""
123123

124124
@abstractmethod
125125
def launch(self, config_dir: Path) -> None:
126-
"""Exec the real CLI in the foreground (resuming if a session exists); return when it exits."""
126+
"""Exec the real CLI in the foreground; return when it exits."""
127127

128128

129129
#: The adapter registry, keyed by CLI name. Adding a CLI is: implement :class:`AgentCLI`, register

src/panopticon/container/hooks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def settings() -> dict[str, Any]:
3939

4040
def run(actor: str, event: str | None = None, *, matcher: str | None = None) -> dict[str, Any]:
4141
# `actor` is the turn to set; the optional `event` selects the callback's side-effect
42-
# (briefing on the prompt hook, token report on stop) — the bare question hooks pass none.
42+
# (briefing on the prompt hook; background-task gating of the turn flip on stop) — the bare question hooks pass none.
4343
command = f"{HOOK_COMMAND} {actor}" + (f" {event}" if event else "")
4444
entry: dict[str, Any] = {"hooks": [{"type": "command", "command": command}]}
4545
if (

src/panopticon/core/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ class Task:
271271
#: lives in the task's plan artifact). Distinct from the ``slug`` (a short identifier the
272272
#: agent sets later); ``None`` when the creator gave none.
273273
memo: str | None = None
274-
#: Optional text prefilled (unsent) into Claude's input box on the task's first spawn,
274+
#: Optional text prefilled (unsent) into the agent CLI's input box on the task's first spawn,
275275
#: taking precedence over ``memo`` for that purpose. ``None`` until set at creation.
276276
initial_prompt: str | None = None
277277
slug: str | None = None

src/panopticon/core/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ def start_task(
507507
508508
The seed history entry carries the initial state's responsibilities (all ``PENDING``).
509509
``memo`` is the optional brief one-line reminder of what the task is, collected at creation.
510-
``initial_prompt`` is optional text prefilled into Claude's input box on first spawn.
510+
``initial_prompt`` is optional text prefilled into the agent CLI's input box on first spawn.
511511
"""
512512
state = self.initial_label
513513
return Task(

src/panopticon/sessionservice/local_runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,8 @@ def _report(phase: LifecyclePhase) -> None:
221221
**self._extra_env,
222222
}
223223
if initial_prompt:
224-
# The agent launcher reads this and passes it as a positional arg to `claude` on the
225-
# first run (no prior session), so the agent's first action is to process the prompt.
224+
# The agent launcher reads this and passes it as a positional arg to the resolved agent
225+
# CLI on the first run (no prior session), so the agent's first action is to process the prompt.
226226
env["PANOPTICON_INITIAL_PROMPT"] = initial_prompt
227227
if turn:
228228
env["PANOPTICON_TASK_TURN"] = turn

src/panopticon/sessionservice/spawner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,11 @@ def _spawn_container(self, task: JsonObj, repo: JsonObj) -> str:
235235
docker_in_docker=bool((repo.get("capabilities") or {}).get("docker_in_docker")),
236236
initial_prompt=task.get(
237237
"initial_prompt"
238-
), # passed as a CLI arg to claude on the first run
238+
), # passed as a CLI arg to the agent CLI on the first run
239239
turn=task.get("turn"), # agent's turn → INTERRUPT_PROMPT on respawn
240240
starting_model=task.get(
241241
"starting_model"
242-
), # model selection passed to claude --model on first launch
242+
), # model selection passed to the agent CLI on first launch
243243
agent_cli=agent_cli, # picks the launcher's adapter + the config-mount path
244244
progress=lambda phase: self._report(task_id, phase), # STARTING then AWAITING
245245
)

src/panopticon/taskservice/api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ class TaskOut(BaseModel):
110110
memo: (
111111
str | None
112112
) # a brief one-line reminder of what the task is, collected at creation (shown in the summary)
113-
initial_prompt: str | None # optional text prefilled into Claude's input box on first spawn
113+
initial_prompt: (
114+
str | None
115+
) # optional text prefilled into the agent CLI's input box on first spawn
114116
slug: str | None
115117
url: str | None # an optional external URL (PR, issue, …); the dashboard's `p` hotkey opens it
116118
snoozed_until: str | None = (

src/panopticon/taskservice/mcp.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ async def set_dependencies(task_id: str, dep_ids: list[str]) -> dict[str, Any]:
120120
"workflows). The task is created in your own repo. Pass your own task id as "
121121
"orchestrator_task_id. The `memo` is a brief reminder of what the task "
122122
"is (shown in the dashboard) — not a full description; the full description goes "
123-
"in the task's plan.md. `initial_prompt` (optional) is passed as Claude's first "
124-
"message on first spawn — the agent starts autonomously without waiting for user "
123+
"in the task's plan.md. `initial_prompt` (optional) is prefilled as the agent's first "
124+
"prompt on first spawn — the agent starts autonomously without waiting for user "
125125
'input, e.g. "review your plan". `artifacts` '
126126
"(optional) is a name→content map of text artifacts to write immediately (e.g. "
127127
'{"plan.md": "..."}) — written before the call returns so the spawner always '
@@ -167,7 +167,7 @@ async def list_workflows(orchestrator_task_id: str) -> list[str]:
167167
description=(
168168
"Write (create or overwrite) a task artifact, e.g. the plan. Returns its URI. "
169169
"Pass text in `content`; for a binary artifact (e.g. a screenshot) pass base64 in "
170-
"`content_base64` instead — supply exactly one. For a large binary the token-cheap "
170+
"`content_base64` instead — supply exactly one. For a large binary the more efficient "
171171
"path is the REST endpoint (PUT /tasks/{id}/artifacts/{name} with the raw bytes), which "
172172
"keeps the base64 out of your context."
173173
)

0 commit comments

Comments
 (0)