clikit-plugin 0.2.28 → 0.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +30 -32
- package/README.md +45 -26
- package/command/create.md +37 -122
- package/command/handoff.md +45 -69
- package/command/init.md +125 -48
- package/command/plan.md +101 -159
- package/command/research.md +1 -1
- package/command/resume.md +34 -55
- package/command/vision.md +132 -64
- package/dist/.tsbuildinfo +1 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +95 -11
- package/dist/clikit.schema.json +245 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/config.d.ts +43 -43
- package/dist/config.d.ts.map +1 -1
- package/dist/hooks/git-guard.test.d.ts +2 -0
- package/dist/hooks/git-guard.test.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +3 -14
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/memory-digest.d.ts +27 -0
- package/dist/hooks/memory-digest.d.ts.map +1 -0
- package/dist/hooks/security-check.test.d.ts +2 -0
- package/dist/hooks/security-check.test.d.ts.map +1 -0
- package/dist/hooks/todo-beads-sync.d.ts +23 -0
- package/dist/hooks/todo-beads-sync.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +740 -909
- package/dist/skills/index.d.ts.map +1 -1
- package/dist/tools/beads-memory-sync.d.ts.map +1 -1
- package/dist/tools/context-summary.d.ts.map +1 -1
- package/dist/tools/memory-db.d.ts +12 -0
- package/dist/tools/memory-db.d.ts.map +1 -0
- package/dist/tools/memory.d.ts.map +1 -1
- package/dist/tools/observation.d.ts.map +1 -1
- package/memory/_templates/plan.md +18 -0
- package/package.json +7 -4
- package/src/agents/AGENTS.md +11 -39
- package/src/agents/build.md +152 -94
- package/src/agents/index.ts +31 -5
- package/src/agents/looker.md +5 -0
- package/src/agents/oracle.md +2 -0
- package/src/agents/plan.md +247 -44
- package/src/agents/review.md +1 -0
- package/src/agents/vision.md +251 -115
- package/dist/cli.test.d.ts +0 -2
- package/dist/cli.test.d.ts.map +0 -1
- package/dist/hooks/auto-format.d.ts +0 -30
- package/dist/hooks/auto-format.d.ts.map +0 -1
- package/dist/hooks/comment-checker.d.ts +0 -17
- package/dist/hooks/comment-checker.d.ts.map +0 -1
- package/dist/hooks/compaction.d.ts +0 -60
- package/dist/hooks/compaction.d.ts.map +0 -1
- package/dist/hooks/env-context.d.ts +0 -43
- package/dist/hooks/env-context.d.ts.map +0 -1
- package/dist/hooks/ritual-enforcer.d.ts +0 -29
- package/dist/hooks/ritual-enforcer.d.ts.map +0 -1
- package/dist/hooks/session-notification.d.ts +0 -23
- package/dist/hooks/session-notification.d.ts.map +0 -1
- package/dist/hooks/session-notification.test.d.ts +0 -2
- package/dist/hooks/session-notification.test.d.ts.map +0 -1
- package/dist/hooks/typecheck-gate.d.ts +0 -31
- package/dist/hooks/typecheck-gate.d.ts.map +0 -1
- package/memory/handoffs/2026-02-15-complete-audit.md +0 -136
- package/memory/handoffs/2026-02-15-complete-fix.md +0 -140
- package/memory/handoffs/2026-02-15-importmeta-fix.md +0 -121
- package/memory/handoffs/2026-02-15-installing.md +0 -90
- package/memory/handoffs/2026-02-15-plugin-install-fix.md +0 -140
- package/memory/handoffs/2026-02-15-runtime-fixes.md +0 -80
- package/memory/plans/2026-02-16-plugin-install.md +0 -195
- package/memory/research/2026-02-16-opencode-plugin-alignment.md +0 -128
package/dist/cli.js
CHANGED
|
@@ -25,7 +25,7 @@ import * as path from "path";
|
|
|
25
25
|
import * as os from "os";
|
|
26
26
|
import { fileURLToPath } from "url";
|
|
27
27
|
var PLUGIN_NAME = "clikit-plugin";
|
|
28
|
-
var VERSION = "0.
|
|
28
|
+
var VERSION = "0.0.0";
|
|
29
29
|
function getPackageRoot() {
|
|
30
30
|
const currentFile = fileURLToPath(import.meta.url);
|
|
31
31
|
const currentDir = path.dirname(currentFile);
|
|
@@ -47,6 +47,57 @@ function getPackageVersion() {
|
|
|
47
47
|
function getPluginEntry() {
|
|
48
48
|
return `${PLUGIN_NAME}@${getPackageVersion()}`;
|
|
49
49
|
}
|
|
50
|
+
function getDefaultMcpEntries() {
|
|
51
|
+
const context7ApiKey = process.env.CONTEXT7_API_KEY;
|
|
52
|
+
return {
|
|
53
|
+
"beads-village": {
|
|
54
|
+
type: "local",
|
|
55
|
+
command: ["npx", "beads-village"],
|
|
56
|
+
enabled: true
|
|
57
|
+
},
|
|
58
|
+
context7: {
|
|
59
|
+
type: "remote",
|
|
60
|
+
url: "https://mcp.context7.com/mcp",
|
|
61
|
+
enabled: true,
|
|
62
|
+
headers: {
|
|
63
|
+
CONTEXT7_API_KEY: context7ApiKey || "{env:CONTEXT7_API_KEY}"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
grep: {
|
|
67
|
+
type: "remote",
|
|
68
|
+
url: "https://mcp.grep.app",
|
|
69
|
+
enabled: true
|
|
70
|
+
},
|
|
71
|
+
"human-mcp": {
|
|
72
|
+
type: "local",
|
|
73
|
+
command: ["npx", "@goonnguyen/human-mcp"],
|
|
74
|
+
enabled: true,
|
|
75
|
+
environment: {
|
|
76
|
+
GOOGLE_GEMINI_API_KEY: "{env:GOOGLE_GEMINI_API_KEY}",
|
|
77
|
+
TRANSPORT_TYPE: "stdio"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function asRecord(value) {
|
|
83
|
+
return typeof value === "object" && value !== null ? value : {};
|
|
84
|
+
}
|
|
85
|
+
function mergeDefaultMcpEntries(config) {
|
|
86
|
+
const defaults = getDefaultMcpEntries();
|
|
87
|
+
const existingMcp = asRecord(config.mcp);
|
|
88
|
+
const mergedMcp = { ...existingMcp };
|
|
89
|
+
const addedMcpNames = [];
|
|
90
|
+
for (const [name, entry] of Object.entries(defaults)) {
|
|
91
|
+
if (!(name in mergedMcp)) {
|
|
92
|
+
mergedMcp[name] = entry;
|
|
93
|
+
addedMcpNames.push(name);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
mergedConfig: { ...config, mcp: mergedMcp },
|
|
98
|
+
addedMcpNames
|
|
99
|
+
};
|
|
100
|
+
}
|
|
50
101
|
function resolveProjectDir(env = process.env, cwd = process.cwd()) {
|
|
51
102
|
const candidates = [env.INIT_CWD, env.PWD, cwd].filter((value) => typeof value === "string" && value.trim().length > 0);
|
|
52
103
|
for (const candidate of candidates) {
|
|
@@ -146,6 +197,9 @@ function getRealHome() {
|
|
|
146
197
|
return home;
|
|
147
198
|
}
|
|
148
199
|
function getConfigDir() {
|
|
200
|
+
if (process.env.OPENCODE_CONFIG_DIR) {
|
|
201
|
+
return process.env.OPENCODE_CONFIG_DIR;
|
|
202
|
+
}
|
|
149
203
|
const home = getRealHome();
|
|
150
204
|
if (process.platform === "win32") {
|
|
151
205
|
return path.join(process.env.APPDATA || path.join(home, "AppData", "Roaming"), "opencode");
|
|
@@ -156,12 +210,22 @@ function getConfigPath() {
|
|
|
156
210
|
const configDir = getConfigDir();
|
|
157
211
|
const jsonPath = path.join(configDir, "opencode.json");
|
|
158
212
|
const jsoncPath = path.join(configDir, "opencode.jsonc");
|
|
159
|
-
if (fs.existsSync(jsonPath))
|
|
160
|
-
return jsonPath;
|
|
161
213
|
if (fs.existsSync(jsoncPath))
|
|
162
214
|
return jsoncPath;
|
|
215
|
+
if (fs.existsSync(jsonPath))
|
|
216
|
+
return jsonPath;
|
|
163
217
|
return jsonPath;
|
|
164
218
|
}
|
|
219
|
+
function getCliKitConfigPath(configDir = getConfigDir()) {
|
|
220
|
+
const candidates = ["clikit.jsonc", "clikit.json", "clikit.config.json"];
|
|
221
|
+
for (const name of candidates) {
|
|
222
|
+
const fullPath = path.join(configDir, name);
|
|
223
|
+
if (fs.existsSync(fullPath)) {
|
|
224
|
+
return fullPath;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return path.join(configDir, "clikit.json");
|
|
228
|
+
}
|
|
165
229
|
function ensureConfigDir() {
|
|
166
230
|
const configDir = getConfigDir();
|
|
167
231
|
if (!fs.existsSync(configDir)) {
|
|
@@ -202,7 +266,7 @@ async function install(options) {
|
|
|
202
266
|
================
|
|
203
267
|
`);
|
|
204
268
|
const pluginVersion = getPackageVersion();
|
|
205
|
-
console.log("[1/
|
|
269
|
+
console.log("[1/6] Adding CliKit plugin and MCP defaults to OpenCode config...");
|
|
206
270
|
try {
|
|
207
271
|
ensureConfigDir();
|
|
208
272
|
} catch (err) {
|
|
@@ -225,16 +289,22 @@ async function install(options) {
|
|
|
225
289
|
console.log(` Preserving existing config: ${preservedKeys.join(", ")}`);
|
|
226
290
|
}
|
|
227
291
|
const filteredPlugins = upsertPluginEntry(existingPlugins, PLUGIN_NAME, pluginVersion);
|
|
228
|
-
const
|
|
292
|
+
const pluginMergedConfig = { ...config, plugin: filteredPlugins };
|
|
293
|
+
const { mergedConfig: newConfig, addedMcpNames } = mergeDefaultMcpEntries(pluginMergedConfig);
|
|
229
294
|
writeConfig(configPath, newConfig);
|
|
230
295
|
console.log(`\u2713 Plugin added to ${configPath} as ${getPluginEntry()}`);
|
|
296
|
+
if (addedMcpNames.length > 0) {
|
|
297
|
+
console.log(`\u2713 Added MCP servers: ${addedMcpNames.join(", ")}`);
|
|
298
|
+
} else {
|
|
299
|
+
console.log("\u2713 MCP servers already configured (no changes)");
|
|
300
|
+
}
|
|
231
301
|
} catch (err) {
|
|
232
302
|
console.error(`\u2717 Failed to update OpenCode config: ${err}`);
|
|
233
303
|
return 1;
|
|
234
304
|
}
|
|
235
305
|
if (options.includeProjectScaffold) {
|
|
236
306
|
console.log(`
|
|
237
|
-
[2/
|
|
307
|
+
[2/6] Scaffolding project .opencode assets...`);
|
|
238
308
|
try {
|
|
239
309
|
const projectDir = resolveProjectDir();
|
|
240
310
|
const stats = scaffoldProjectOpencode(projectDir);
|
|
@@ -252,10 +322,10 @@ async function install(options) {
|
|
|
252
322
|
}
|
|
253
323
|
} else {
|
|
254
324
|
console.log(`
|
|
255
|
-
[2/
|
|
325
|
+
[2/6] Skipping project scaffold (global-only install)`);
|
|
256
326
|
}
|
|
257
327
|
console.log(`
|
|
258
|
-
[3/
|
|
328
|
+
[3/6] Cleaning legacy local plugin assets...`);
|
|
259
329
|
try {
|
|
260
330
|
removeLegacyGlobalPluginAssets(getConfigDir());
|
|
261
331
|
console.log("\u2713 Global install mode uses npm plugin from opencode config");
|
|
@@ -264,7 +334,7 @@ async function install(options) {
|
|
|
264
334
|
return 1;
|
|
265
335
|
}
|
|
266
336
|
console.log(`
|
|
267
|
-
[4/
|
|
337
|
+
[4/6] Creating memory directories...`);
|
|
268
338
|
const memoryDir = path.join(getConfigDir(), "memory");
|
|
269
339
|
const memorySubdirs = ["specs", "plans", "research", "reviews", "handoffs", "beads", "prds"];
|
|
270
340
|
for (const subdir of memorySubdirs) {
|
|
@@ -275,14 +345,28 @@ async function install(options) {
|
|
|
275
345
|
}
|
|
276
346
|
console.log(`\u2713 Memory directories created in ${memoryDir}`);
|
|
277
347
|
console.log(`
|
|
278
|
-
[5/
|
|
279
|
-
|
|
348
|
+
[5/6] Verifying MCP environment hints...`);
|
|
349
|
+
if (!process.env.CONTEXT7_API_KEY) {
|
|
350
|
+
console.log("! CONTEXT7_API_KEY not set; using {env:CONTEXT7_API_KEY} placeholder");
|
|
351
|
+
}
|
|
352
|
+
if (!process.env.GOOGLE_GEMINI_API_KEY) {
|
|
353
|
+
console.log("! GOOGLE_GEMINI_API_KEY not set; human-mcp will require it at runtime");
|
|
354
|
+
}
|
|
355
|
+
console.log(`
|
|
356
|
+
[6/6] Creating CliKit config...`);
|
|
357
|
+
const clikitConfigPath = getCliKitConfigPath();
|
|
280
358
|
if (!fs.existsSync(clikitConfigPath)) {
|
|
281
359
|
const defaultConfig = {
|
|
282
360
|
$schema: `https://unpkg.com/${PLUGIN_NAME}@latest/schema.json`,
|
|
283
361
|
disabled_agents: [],
|
|
284
362
|
disabled_commands: [],
|
|
363
|
+
disabled_skills: [],
|
|
285
364
|
agents: {},
|
|
365
|
+
commands: {},
|
|
366
|
+
skills: {
|
|
367
|
+
enable: [],
|
|
368
|
+
disable: []
|
|
369
|
+
},
|
|
286
370
|
hooks: {}
|
|
287
371
|
};
|
|
288
372
|
writeConfig(clikitConfigPath, defaultConfig);
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://unpkg.com/clikit-plugin/schema.json",
|
|
4
|
+
"title": "CliKit Config",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"$schema": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"disabled_agents": {
|
|
12
|
+
"type": "array",
|
|
13
|
+
"items": { "type": "string" },
|
|
14
|
+
"default": []
|
|
15
|
+
},
|
|
16
|
+
"disabled_commands": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"items": { "type": "string" },
|
|
19
|
+
"default": []
|
|
20
|
+
},
|
|
21
|
+
"disabled_skills": {
|
|
22
|
+
"type": "array",
|
|
23
|
+
"items": { "type": "string" },
|
|
24
|
+
"default": []
|
|
25
|
+
},
|
|
26
|
+
"agents": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": {
|
|
29
|
+
"type": "object",
|
|
30
|
+
"additionalProperties": true,
|
|
31
|
+
"properties": {
|
|
32
|
+
"model": { "type": "string" },
|
|
33
|
+
"temperature": { "type": "number" },
|
|
34
|
+
"mode": { "enum": ["subagent", "primary", "all"] },
|
|
35
|
+
"disabled": { "type": "boolean" },
|
|
36
|
+
"tools": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"additionalProperties": { "type": "boolean" }
|
|
39
|
+
},
|
|
40
|
+
"permission": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"additionalProperties": true
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"default": {}
|
|
47
|
+
},
|
|
48
|
+
"commands": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": true
|
|
53
|
+
},
|
|
54
|
+
"default": {}
|
|
55
|
+
},
|
|
56
|
+
"skills": {
|
|
57
|
+
"anyOf": [
|
|
58
|
+
{
|
|
59
|
+
"type": "array",
|
|
60
|
+
"items": { "type": "string" }
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "object",
|
|
64
|
+
"properties": {
|
|
65
|
+
"sources": {
|
|
66
|
+
"type": "array",
|
|
67
|
+
"items": {
|
|
68
|
+
"anyOf": [
|
|
69
|
+
{ "type": "string" },
|
|
70
|
+
{
|
|
71
|
+
"type": "object",
|
|
72
|
+
"required": ["path"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"path": { "type": "string" },
|
|
75
|
+
"recursive": { "type": "boolean" },
|
|
76
|
+
"glob": { "type": "string" }
|
|
77
|
+
},
|
|
78
|
+
"additionalProperties": false
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"enable": {
|
|
84
|
+
"type": "array",
|
|
85
|
+
"items": { "type": "string" }
|
|
86
|
+
},
|
|
87
|
+
"disable": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": { "type": "string" }
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"additionalProperties": {
|
|
93
|
+
"anyOf": [
|
|
94
|
+
{ "type": "boolean" },
|
|
95
|
+
{
|
|
96
|
+
"type": "object",
|
|
97
|
+
"additionalProperties": true,
|
|
98
|
+
"properties": {
|
|
99
|
+
"description": { "type": "string" },
|
|
100
|
+
"template": { "type": "string" },
|
|
101
|
+
"from": { "type": "string" },
|
|
102
|
+
"model": { "type": "string" },
|
|
103
|
+
"agent": { "type": "string" },
|
|
104
|
+
"subtask": { "type": "boolean" },
|
|
105
|
+
"argument-hint": { "type": "string" },
|
|
106
|
+
"license": { "type": "string" },
|
|
107
|
+
"compatibility": { "type": "string" },
|
|
108
|
+
"metadata": { "type": "object", "additionalProperties": true },
|
|
109
|
+
"allowed-tools": {
|
|
110
|
+
"type": "array",
|
|
111
|
+
"items": { "type": "string" }
|
|
112
|
+
},
|
|
113
|
+
"disable": { "type": "boolean" }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
"default": {}
|
|
121
|
+
},
|
|
122
|
+
"lsp": {
|
|
123
|
+
"type": "object",
|
|
124
|
+
"additionalProperties": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": true,
|
|
127
|
+
"required": ["command"],
|
|
128
|
+
"properties": {
|
|
129
|
+
"command": {
|
|
130
|
+
"type": "array",
|
|
131
|
+
"items": { "type": "string" },
|
|
132
|
+
"minItems": 1
|
|
133
|
+
},
|
|
134
|
+
"extensions": {
|
|
135
|
+
"type": "array",
|
|
136
|
+
"items": { "type": "string" }
|
|
137
|
+
},
|
|
138
|
+
"priority": { "type": "number" },
|
|
139
|
+
"disabled": { "type": "boolean" },
|
|
140
|
+
"env": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": { "type": "string" }
|
|
143
|
+
},
|
|
144
|
+
"initialization": {
|
|
145
|
+
"type": "object",
|
|
146
|
+
"additionalProperties": true
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"default": {}
|
|
151
|
+
},
|
|
152
|
+
"hooks": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"additionalProperties": false,
|
|
155
|
+
"properties": {
|
|
156
|
+
"session_logging": { "type": "boolean" },
|
|
157
|
+
"tool_logging": { "type": "boolean" },
|
|
158
|
+
"todo_enforcer": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"additionalProperties": false,
|
|
161
|
+
"properties": {
|
|
162
|
+
"enabled": { "type": "boolean" },
|
|
163
|
+
"warn_on_incomplete": { "type": "boolean" }
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
"empty_message_sanitizer": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": false,
|
|
169
|
+
"properties": {
|
|
170
|
+
"enabled": { "type": "boolean" },
|
|
171
|
+
"log_empty": { "type": "boolean" },
|
|
172
|
+
"placeholder": { "type": "string" }
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"git_guard": {
|
|
176
|
+
"type": "object",
|
|
177
|
+
"additionalProperties": false,
|
|
178
|
+
"properties": {
|
|
179
|
+
"enabled": { "type": "boolean" },
|
|
180
|
+
"allow_force_with_lease": { "type": "boolean" }
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"security_check": {
|
|
184
|
+
"type": "object",
|
|
185
|
+
"additionalProperties": false,
|
|
186
|
+
"properties": {
|
|
187
|
+
"enabled": { "type": "boolean" },
|
|
188
|
+
"block_commits": { "type": "boolean" }
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"subagent_question_blocker": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"additionalProperties": false,
|
|
194
|
+
"properties": {
|
|
195
|
+
"enabled": { "type": "boolean" }
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
"truncator": {
|
|
199
|
+
"type": "object",
|
|
200
|
+
"additionalProperties": false,
|
|
201
|
+
"properties": {
|
|
202
|
+
"enabled": { "type": "boolean" },
|
|
203
|
+
"max_output_chars": { "type": "number" },
|
|
204
|
+
"max_output_lines": { "type": "number" },
|
|
205
|
+
"preserve_head_lines": { "type": "number" },
|
|
206
|
+
"preserve_tail_lines": { "type": "number" },
|
|
207
|
+
"log": { "type": "boolean" }
|
|
208
|
+
}
|
|
209
|
+
},
|
|
210
|
+
"swarm_enforcer": {
|
|
211
|
+
"type": "object",
|
|
212
|
+
"additionalProperties": false,
|
|
213
|
+
"properties": {
|
|
214
|
+
"enabled": { "type": "boolean" },
|
|
215
|
+
"strict_file_locking": { "type": "boolean" },
|
|
216
|
+
"block_unreserved_edits": { "type": "boolean" },
|
|
217
|
+
"log": { "type": "boolean" }
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
"memory_digest": {
|
|
221
|
+
"type": "object",
|
|
222
|
+
"additionalProperties": false,
|
|
223
|
+
"properties": {
|
|
224
|
+
"enabled": { "type": "boolean" },
|
|
225
|
+
"max_per_type": { "type": "number" },
|
|
226
|
+
"include_types": {
|
|
227
|
+
"type": "array",
|
|
228
|
+
"items": { "type": "string" }
|
|
229
|
+
},
|
|
230
|
+
"log": { "type": "boolean" }
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"todo_beads_sync": {
|
|
234
|
+
"type": "object",
|
|
235
|
+
"additionalProperties": false,
|
|
236
|
+
"properties": {
|
|
237
|
+
"enabled": { "type": "boolean" },
|
|
238
|
+
"close_missing": { "type": "boolean" },
|
|
239
|
+
"log": { "type": "boolean" }
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AA8C9C,wBAAgB,YAAY,IAAI,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAuB5D;AAKD,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAUlE"}
|
package/dist/config.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AgentConfig, CommandConfig } from "./types";
|
|
2
|
+
import type { SkillConfig } from "./skills";
|
|
2
3
|
export interface AgentOverride {
|
|
3
4
|
model?: string;
|
|
4
5
|
temperature?: number;
|
|
@@ -35,35 +36,6 @@ export interface SecurityCheckHookConfig {
|
|
|
35
36
|
export interface SubagentQuestionBlockerHookConfig {
|
|
36
37
|
enabled?: boolean;
|
|
37
38
|
}
|
|
38
|
-
export interface CommentCheckerHookConfig {
|
|
39
|
-
enabled?: boolean;
|
|
40
|
-
threshold?: number;
|
|
41
|
-
}
|
|
42
|
-
export interface EnvContextHookConfig {
|
|
43
|
-
enabled?: boolean;
|
|
44
|
-
include_git?: boolean;
|
|
45
|
-
include_package?: boolean;
|
|
46
|
-
include_structure?: boolean;
|
|
47
|
-
max_depth?: number;
|
|
48
|
-
}
|
|
49
|
-
export interface AutoFormatHookConfig {
|
|
50
|
-
enabled?: boolean;
|
|
51
|
-
formatter?: string;
|
|
52
|
-
extensions?: string[];
|
|
53
|
-
log?: boolean;
|
|
54
|
-
}
|
|
55
|
-
export interface TypeCheckGateHookConfig {
|
|
56
|
-
enabled?: boolean;
|
|
57
|
-
tsconfig?: string;
|
|
58
|
-
log?: boolean;
|
|
59
|
-
block_on_error?: boolean;
|
|
60
|
-
}
|
|
61
|
-
export interface SessionNotificationHookConfig {
|
|
62
|
-
enabled?: boolean;
|
|
63
|
-
on_idle?: boolean;
|
|
64
|
-
on_error?: boolean;
|
|
65
|
-
title_prefix?: string;
|
|
66
|
-
}
|
|
67
39
|
export interface TruncatorHookConfig {
|
|
68
40
|
enabled?: boolean;
|
|
69
41
|
max_output_chars?: number;
|
|
@@ -72,19 +44,23 @@ export interface TruncatorHookConfig {
|
|
|
72
44
|
preserve_tail_lines?: number;
|
|
73
45
|
log?: boolean;
|
|
74
46
|
}
|
|
75
|
-
export interface CompactionHookConfig {
|
|
76
|
-
enabled?: boolean;
|
|
77
|
-
include_beads_state?: boolean;
|
|
78
|
-
include_memory_refs?: boolean;
|
|
79
|
-
include_todo_state?: boolean;
|
|
80
|
-
max_state_chars?: number;
|
|
81
|
-
}
|
|
82
47
|
export interface SwarmEnforcerHookConfig {
|
|
83
48
|
enabled?: boolean;
|
|
84
49
|
strict_file_locking?: boolean;
|
|
85
50
|
block_unreserved_edits?: boolean;
|
|
86
51
|
log?: boolean;
|
|
87
52
|
}
|
|
53
|
+
export interface MemoryDigestHookConfig {
|
|
54
|
+
enabled?: boolean;
|
|
55
|
+
max_per_type?: number;
|
|
56
|
+
include_types?: string[];
|
|
57
|
+
log?: boolean;
|
|
58
|
+
}
|
|
59
|
+
export interface TodoBeadsSyncHookConfig {
|
|
60
|
+
enabled?: boolean;
|
|
61
|
+
close_missing?: boolean;
|
|
62
|
+
log?: boolean;
|
|
63
|
+
}
|
|
88
64
|
export interface HooksConfig {
|
|
89
65
|
session_logging?: boolean;
|
|
90
66
|
tool_logging?: boolean;
|
|
@@ -93,20 +69,43 @@ export interface HooksConfig {
|
|
|
93
69
|
git_guard?: GitGuardHookConfig;
|
|
94
70
|
security_check?: SecurityCheckHookConfig;
|
|
95
71
|
subagent_question_blocker?: SubagentQuestionBlockerHookConfig;
|
|
96
|
-
comment_checker?: CommentCheckerHookConfig;
|
|
97
|
-
env_context?: EnvContextHookConfig;
|
|
98
|
-
auto_format?: AutoFormatHookConfig;
|
|
99
|
-
typecheck_gate?: TypeCheckGateHookConfig;
|
|
100
|
-
session_notification?: SessionNotificationHookConfig;
|
|
101
72
|
truncator?: TruncatorHookConfig;
|
|
102
|
-
compaction?: CompactionHookConfig;
|
|
103
73
|
swarm_enforcer?: SwarmEnforcerHookConfig;
|
|
104
|
-
|
|
74
|
+
memory_digest?: MemoryDigestHookConfig;
|
|
75
|
+
todo_beads_sync?: TodoBeadsSyncHookConfig;
|
|
76
|
+
}
|
|
77
|
+
export interface SkillOverride {
|
|
78
|
+
disable?: boolean;
|
|
79
|
+
description?: string;
|
|
80
|
+
template?: string;
|
|
81
|
+
from?: string;
|
|
82
|
+
model?: string;
|
|
83
|
+
agent?: string;
|
|
84
|
+
subtask?: boolean;
|
|
85
|
+
"argument-hint"?: string;
|
|
86
|
+
license?: string;
|
|
87
|
+
compatibility?: string;
|
|
88
|
+
metadata?: Record<string, unknown>;
|
|
89
|
+
"allowed-tools"?: string[];
|
|
90
|
+
}
|
|
91
|
+
export interface SkillsConfigObject {
|
|
92
|
+
sources?: Array<string | {
|
|
93
|
+
path: string;
|
|
94
|
+
recursive?: boolean;
|
|
95
|
+
glob?: string;
|
|
96
|
+
}>;
|
|
97
|
+
enable?: string[];
|
|
98
|
+
disable?: string[];
|
|
99
|
+
[key: string]: unknown;
|
|
100
|
+
}
|
|
101
|
+
export type SkillsConfig = string[] | SkillsConfigObject | Record<string, boolean | SkillOverride>;
|
|
105
102
|
export interface CliKitConfig {
|
|
106
103
|
disabled_agents?: string[];
|
|
107
104
|
disabled_commands?: string[];
|
|
105
|
+
disabled_skills?: string[];
|
|
108
106
|
agents?: Record<string, AgentOverride>;
|
|
109
107
|
commands?: Record<string, Partial<CommandConfig>>;
|
|
108
|
+
skills?: SkillsConfig;
|
|
110
109
|
lsp?: Record<string, LspServerConfig>;
|
|
111
110
|
hooks?: HooksConfig;
|
|
112
111
|
}
|
|
@@ -114,5 +113,6 @@ declare function getUserConfigDir(): string;
|
|
|
114
113
|
export declare function loadCliKitConfig(projectDirectory: unknown): CliKitConfig;
|
|
115
114
|
export declare function filterAgents(agents: Record<string, AgentConfig>, config: CliKitConfig | undefined | null): Record<string, AgentConfig>;
|
|
116
115
|
export declare function filterCommands(commands: Record<string, CommandConfig>, config: CliKitConfig | undefined | null): Record<string, CommandConfig>;
|
|
116
|
+
export declare function filterSkills(skills: Record<string, SkillConfig>, config: CliKitConfig | undefined | null): Record<string, SkillConfig>;
|
|
117
117
|
export { getUserConfigDir };
|
|
118
118
|
//# sourceMappingURL=config.d.ts.map
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[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,MAAM,EAAE,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;IAClD,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AA6DD,iBAAS,gBAAgB,IAAI,MAAM,CAKlC;AAyHD,wBAAgB,gBAAgB,CAAC,gBAAgB,EAAE,OAAO,GAAG,YAAY,CAqCxE;AAED,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACnC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CA4B7B;AAED,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,EACvC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI,GACtC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAsB/B;AAMD,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EACnC,MAAM,EAAE,YAAY,GAAG,SAAS,GAAG,IAAI,GACtC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAwD7B;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-guard.test.d.ts","sourceRoot":"","sources":["../../src/hooks/git-guard.test.ts"],"names":[],"mappings":""}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -7,29 +7,18 @@
|
|
|
7
7
|
* - Git Guard — blocks dangerous git commands
|
|
8
8
|
* - Security Check — scans for secrets before commits
|
|
9
9
|
* - Subagent Question Blocker — prevents subagents from asking questions
|
|
10
|
-
* - Comment Checker — detects excessive AI-generated comments
|
|
11
10
|
* - Context Injector — removed (use /resume, /start commands instead)
|
|
12
|
-
* - Environment Context — injects project/env info into prompts
|
|
13
|
-
* - Auto-Format — runs formatter after file edits
|
|
14
|
-
* - TypeCheck Gate — runs tsc after TypeScript edits
|
|
15
|
-
* - Session Notification — desktop notifications on idle/error
|
|
16
11
|
* - Truncator — dynamic output truncation
|
|
17
|
-
* - Compaction — preserves state during context compaction
|
|
18
12
|
* - Swarm Enforcer — enforces task isolation in multi-agent swarms
|
|
19
|
-
* -
|
|
13
|
+
* - Memory Digest — generates _digest.md from SQLite observations for agent access
|
|
20
14
|
*/
|
|
21
15
|
export { checkTodoCompletion, formatIncompleteWarning, type TodoItem, type TodoCheckResult, } from "./todo-enforcer";
|
|
22
16
|
export { isEmptyContent, sanitizeContent, } from "./empty-message-sanitizer";
|
|
23
17
|
export { checkDangerousCommand, formatBlockedWarning, type GitGuardResult, } from "./git-guard";
|
|
24
18
|
export { scanContentForSecrets, isSensitiveFile, formatSecurityWarning, type SecurityFinding, type SecurityCheckResult, } from "./security-check";
|
|
25
19
|
export { containsQuestion, isSubagentTool, formatBlockerWarning, } from "./subagent-question-blocker";
|
|
26
|
-
export { checkCommentDensity, hasExcessiveAIComments, formatCommentWarning, type CommentCheckResult, } from "./comment-checker";
|
|
27
|
-
export { collectEnvInfo, buildEnvBlock, formatEnvSummary, getGitInfo, getPackageInfo, getTopLevelStructure, type EnvContextConfig, type EnvInfo, type GitInfo, type PackageInfo, } from "./env-context";
|
|
28
|
-
export { detectFormatter, shouldFormat, runFormatter, formatAutoFormatLog, type AutoFormatConfig, type FormatResult, } from "./auto-format";
|
|
29
|
-
export { isTypeScriptFile, findTsConfig, hasTscInstalled, runTypeCheck, formatTypeCheckWarning, type TypeCheckConfig, type TypeDiagnostic, type TypeCheckResult, } from "./typecheck-gate";
|
|
30
|
-
export { sendNotification, buildIdleNotification, buildErrorNotification, formatNotificationLog, type SessionNotificationConfig, type NotificationPayload, } from "./session-notification";
|
|
31
20
|
export { shouldTruncate, truncateOutput, formatTruncationLog, type TruncatorConfig, type TruncateResult, } from "./truncator";
|
|
32
|
-
export { readBeadsState, readMemoryRefs, buildCompactionBlock, collectCompactionPayload, formatCompactionLog, type CompactionConfig, type BeadsState, type MemoryRef, type CompactionPayload, } from "./compaction";
|
|
33
21
|
export { isFileInScope, checkEditPermission, extractFileFromToolInput, formatEnforcementWarning, type SwarmEnforcerConfig, type TaskScope, type EnforcementResult, } from "./swarm-enforcer";
|
|
34
|
-
export {
|
|
22
|
+
export { generateMemoryDigest, formatDigestLog, type MemoryDigestConfig, } from "./memory-digest";
|
|
23
|
+
export { syncTodosToBeads, formatTodoBeadsSyncLog, type OpenCodeTodo, type TodoBeadsSyncConfig, type TodoBeadsSyncResult, } from "./todo-beads-sync";
|
|
35
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,QAAQ,EACb,KAAK,eAAe,GACrB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,cAAc,EACd,eAAe,GAChB,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,EACpB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,oBAAoB,GACrB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EACL,cAAc,EACd,cAAc,EACd,mBAAmB,EACnB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,wBAAwB,EACxB,wBAAwB,EACxB,KAAK,mBAAmB,EACxB,KAAK,SAAS,EACd,KAAK,iBAAiB,GACvB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Memory Digest Hook
|
|
3
|
+
*
|
|
4
|
+
* Generates .opencode/memory/_digest.md on session start with
|
|
5
|
+
* recent observations from the SQLite memory DB. This makes
|
|
6
|
+
* past decisions, learnings, blockers, and handoffs accessible
|
|
7
|
+
* to agents that can read files but cannot query SQLite directly
|
|
8
|
+
* (e.g., Plan agent with bash: false).
|
|
9
|
+
*
|
|
10
|
+
* Runs on session.created event.
|
|
11
|
+
*/
|
|
12
|
+
export interface MemoryDigestConfig {
|
|
13
|
+
enabled?: boolean;
|
|
14
|
+
max_per_type?: number;
|
|
15
|
+
include_types?: string[];
|
|
16
|
+
log?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare function generateMemoryDigest(projectDir: unknown, config?: MemoryDigestConfig): {
|
|
19
|
+
written: boolean;
|
|
20
|
+
path: string;
|
|
21
|
+
counts: Record<string, number>;
|
|
22
|
+
};
|
|
23
|
+
export declare function formatDigestLog(result: {
|
|
24
|
+
written: boolean;
|
|
25
|
+
counts: Record<string, number>;
|
|
26
|
+
}): string;
|
|
27
|
+
//# sourceMappingURL=memory-digest.d.ts.map
|