feat(agents): add cline adapter#133
Conversation
Greptile SummaryAdds the Cline headless agent adapter: binary resolution, launch/restore command building, workspace-local hook installation, activity derivation, and registration in the adapter registry and activity-dispatch map.
Confidence Score: 5/5Safe to merge — the adapter is well-structured, the AcceptEdits inversion noted in a previous review has been corrected, and the remaining notes are comment-level clarifications with no runtime impact. The adapter correctly resolves the binary, builds launch/restore argv, writes atomic hook scripts, and derives activity state. The hook idempotency and user-hook preservation logic are tested end-to-end. The two findings are a misleading inline comment and a note about Cline CLI's binary --auto-approve flag making AcceptEdits and Auto equivalent — neither affects runtime correctness. backend/internal/adapters/agent/cline/cline.go — the appendApprovalFlags comment for --yolo and the AcceptEdits/Auto equivalence are worth a second glance before merging. Important Files Changed
Sequence DiagramsequenceDiagram
participant AO as AO Daemon
participant Plugin as cline.Plugin
participant FS as Filesystem
participant Cline as Cline CLI
participant Dispatch as activitydispatch
AO->>Plugin: GetAgentHooks(WorkspaceHookConfig)
Plugin->>FS: atomicWriteFile(TaskStart, UserPromptSubmit, PreToolUse, TaskCancel)
FS-->>Plugin: ok
AO->>Plugin: GetLaunchCommand(LaunchConfig)
Plugin-->>AO: cline --json flags -- prompt
AO->>Cline: exec
Cline->>FS: TaskStart hook
FS->>Dispatch: ao hooks cline session-start
Dispatch-->>FS: ActivityActive
FS-->>Cline: cancel false
Cline->>FS: PreToolUse hook
FS->>Dispatch: ao hooks cline permission-request
Dispatch-->>FS: ActivityWaitingInput
FS-->>Cline: cancel false
Cline->>FS: TaskCancel hook
FS->>Dispatch: ao hooks cline stop
Dispatch-->>FS: ActivityIdle
FS-->>Cline: cancel false
Reviews (2): Last reviewed commit: "feat(agents): add cline adapter" | Re-trigger Greptile |
Registers the cline harness, stacked on the agent platform. Includes its own activity deriver. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(agents): add kimi adapter Registers the kimi harness, stacked on the agent platform. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(agents/kimi): drop approval flags on -p and --session paths Kimi rejects `--prompt` combined with `--yolo`/`--auto`/`--plan`, and rejects `--yolo`/`--auto` combined with `--session`/`--continue` (non-interactive and resumed sessions inherit the auto permission policy). The previous mapping appended one of those flags before `-p` on every launch and before `--session` on every restore, so every non-interactive launch would fail at startup. The local binary (v1.37.0) additionally has no `--auto` option at all, which would fail even on otherwise-permissible paths. - GetLaunchCommand: emit approval flags only on the interactive path (no prompt). The `-p <prompt>` path is now bare. - GetRestoreCommand: never emit approval flags; resumed sessions inherit the original session's approval settings. - Tests assert no approval/plan flag leaks onto either path for any PermissionMode, and keep the interactive mapping unchanged. Refs: https://moonshotai.github.io/kimi-code/en/reference/kimi-command.html --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: harshitsinghbhandari <24b4506@iitb.ac.in>
There was a problem hiding this comment.
yyovil has reached the 50-review limit for trial accounts. To continue receiving code reviews, upgrade your plan.
Adds the cline harness, stacked on #119 (agent platform). Adapter package +
Constructors()registration + resolver test. Includes its own activity deriver.🤖 Generated with Claude Code
Stack