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
37 changes: 7 additions & 30 deletions packages/opencode/src/kilocode/agent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ import PROMPT_ORCHESTRATOR from "../../agent/prompt/orchestrator.txt"
import PROMPT_ASK from "../../agent/prompt/ask.txt"
import PROMPT_EXPLORE from "../../agent/prompt/explore.txt"

export const bash: Record<string, "allow" | "ask" | "deny"> = {
"*": "ask",
const readable: Record<string, "allow"> = {
"cat *": "allow",
"head *": "allow",
"tail *": "allow",
Expand Down Expand Up @@ -48,6 +47,11 @@ export const bash: Record<string, "allow" | "ask" | "deny"> = {
"cut *": "allow",
"tr *": "allow",
"jq *": "allow",
}

export const bash: Record<string, "allow" | "ask" | "deny"> = {
"*": "ask",
...readable,
"touch *": "allow",
"mkdir *": "allow",
"cp *": "allow",
Expand All @@ -62,34 +66,7 @@ export const bash: Record<string, "allow" | "ask" | "deny"> = {

export const readOnlyBash: Record<string, "allow" | "ask" | "deny"> = {
"*": "deny",
"cat *": "allow",
"head *": "allow",
"tail *": "allow",
"less *": "allow",
"ls *": "allow",
"tree *": "allow",
"pwd *": "allow",
"echo *": "allow",
"wc *": "allow",
"which *": "allow",
"type *": "allow",
"file *": "allow",
"diff *": "allow",
"du *": "allow",
"df *": "allow",
"date *": "allow",
"uname *": "allow",
"whoami *": "allow",
"printenv *": "allow",
"man *": "allow",
"grep *": "allow",
"rg *": "allow",
"ag *": "allow",
"sort *": "allow",
"uniq *": "allow",
"cut *": "allow",
"tr *": "allow",
"jq *": "allow",
...readable,
"git *": "deny",
"git log *": "allow",
"git show *": "allow",
Expand Down
9 changes: 0 additions & 9 deletions script/kilocode-duplication-allowlist.json
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,6 @@
"owner": "kilo-vscode",
"reason": "Existing duplication before the ratchet; remove through a focused, behavior-preserving extraction."
},
{
"files": ["packages/opencode/src/kilocode/agent/index.ts", "packages/opencode/src/kilocode/agent/index.ts"],
"fingerprint": "9044b540f896a694",
"maxMatches": 1,
"maxTokens": 113,
"kind": "legacy",
"owner": "opencode",
"reason": "Existing duplication before the ratchet; remove through a focused, behavior-preserving extraction."
},
{
"files": [
"packages/opencode/src/kilocode/cli/cmd/tui/component/dialog-memory.tsx",
Expand Down
Loading