feat(hashline): change hashline_edit default from true to false

Hashline edit tool and companion hooks now require explicit opt-in
via `"hashline_edit": true` in config. Previously enabled by default.

- tool-registry: hashline edit tool not registered unless opted in
- create-tool-guard-hooks: hashline-read-enhancer disabled by default
- Updated config schema comment and documentation
- Added TDD tests for default behavior
This commit is contained in:
YeonGyu-Kim
2026-03-02 15:20:02 +09:00
parent 0dd9ac43ea
commit 3db46a58a7
5 changed files with 57 additions and 6 deletions
+51
View File
@@ -1,5 +1,6 @@
const { describe, expect, test } = require("bun:test")
const { createToolExecuteBeforeHandler } = require("./tool-execute-before")
const { createToolRegistry } = require("./tool-registry")
describe("createToolExecuteBeforeHandler", () => {
test("does not execute subagent question blocker hook for question tool", async () => {
@@ -219,4 +220,54 @@ describe("createToolExecuteBeforeHandler", () => {
})
})
describe("createToolRegistry", () => {
function createRegistryInput(overrides = {}) {
return {
ctx: {
directory: process.cwd(),
client: {},
},
pluginConfig: {
...overrides,
},
managers: {
backgroundManager: {},
tmuxSessionManager: {},
skillMcpManager: {},
},
skillContext: {
mergedSkills: [],
availableSkills: [],
browserProvider: "playwright",
disabledSkills: new Set(),
},
availableCategories: [],
}
}
describe("#given hashline_edit is undefined", () => {
describe("#when creating tool registry", () => {
test("#then should not register edit tool", () => {
const result = createToolRegistry(createRegistryInput())
expect(result.filteredTools.edit).toBeUndefined()
})
})
})
describe("#given hashline_edit is true", () => {
describe("#when creating tool registry", () => {
test("#then should register edit tool", () => {
const result = createToolRegistry(
createRegistryInput({
hashline_edit: true,
}),
)
expect(result.filteredTools.edit).toBeDefined()
})
})
})
})
export {}