@mcpbox/mcpbox-claude 0.1.8 → 0.1.10
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/.claude-plugin/plugin.json +1 -1
- package/commands/mode.md +2 -2
- package/hooks/user-prompt-submit.mjs +1 -1
- package/lib/codex.mjs +19 -2
- package/lib/policy.mjs +11 -5
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcpbox-claude",
|
|
3
3
|
"description": "MCPBox × Claude Code glue. Drives the mcpbox MCP server (daruma tracker + full MeiSei pipeline torii→…→fujin→daruma). Ships /mcpbox:{tasks,plan,next,mine,status,close,sync,capture,doctor,mode} and pipeline commands, SessionStart/Stop/UserPromptSubmit hooks, and a managed CLAUDE.md policy that makes mcpbox the default tracker AND pipeline substrate.",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.10",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "tupical"
|
|
7
7
|
},
|
package/commands/mode.md
CHANGED
|
@@ -17,8 +17,8 @@ The user invoked `/mcpbox:mode` with `$ARGUMENTS` = `off` | `lite` | `full` (emp
|
|
|
17
17
|
The mode only tunes how actively you *offer* the pipeline. It does not change where work
|
|
18
18
|
lands — that is the one routing rule, identical in the MCP server's `initialize` instructions,
|
|
19
19
|
the policy block, and the `daruma_plan_materialize` description: decided-and-bounded work and
|
|
20
|
-
follow-ups extending a run
|
|
21
|
-
through the pipeline.
|
|
20
|
+
follow-ups extending a run that already handed off go straight to daruma; raw material — and
|
|
21
|
+
anything belonging to a run still in flight — goes through the pipeline.
|
|
22
22
|
|
|
23
23
|
The level persists across sessions (stored in `~/.agents/mcpbox/mode`) and is read by the
|
|
24
24
|
UserPromptSubmit hook, which injects the matching reminder on each prompt.
|
|
@@ -58,7 +58,7 @@ const PATTERNS = [
|
|
|
58
58
|
// full mode: remind the agent to judge rawness itself — a regex can't. Only
|
|
59
59
|
// fires on substantive prompts that didn't already match an explicit intent.
|
|
60
60
|
const FULL_ASSESS_HINT =
|
|
61
|
-
"[mcpbox:full] Assess this request for rawness before acting: only raw material — an idea, hypothesis, or undecided direction — matures through the pipeline (mcpbox_pipeline_run → …fujin → handoff). Work that is already decided and bounded, and follow-up work
|
|
61
|
+
"[mcpbox:full] Assess this request for rawness before acting: only raw material — an idea, hypothesis, or undecided direction — matures through the pipeline (mcpbox_pipeline_run → …fujin → handoff). Work that is already decided and bounded, and follow-up work extending a run that has already handed off (it has a task_id), both go straight to daruma via daruma_plan_materialize. A run still in flight is not a shortcut — finish it first.";
|
|
62
62
|
|
|
63
63
|
// ponytail: length heuristic for "substantive" — cheap and good enough to skip
|
|
64
64
|
// "ok"/"yes"/"go". Swap for a token/keyword check only if it nags in practice.
|
package/lib/codex.mjs
CHANGED
|
@@ -66,8 +66,25 @@ export function removeCodexPolicy({ projectDir } = {}) {
|
|
|
66
66
|
|
|
67
67
|
// [mcp_servers.mcpbox] entry in the global ~/.codex/config.toml.
|
|
68
68
|
// `configPath` overrides the target (used by tests).
|
|
69
|
-
export function installCodexMcp({ configPath } = {}) {
|
|
70
|
-
|
|
69
|
+
export async function installCodexMcp({ configPath } = {}) {
|
|
70
|
+
const target = codexConfigPath(configPath);
|
|
71
|
+
// Someone else may already declare the server — oh-my-claudecode keeps its own
|
|
72
|
+
// "OMC MANAGED MCP REGISTRY" block, for one. Appending ours next to it makes
|
|
73
|
+
// `[mcp_servers.mcpbox]` a duplicate key, which is a TOML parse error: codex
|
|
74
|
+
// then fails to read its whole config. An entry that already points at us is
|
|
75
|
+
// the entry we wanted, so leave it alone.
|
|
76
|
+
let existing = "";
|
|
77
|
+
try {
|
|
78
|
+
existing = await fs.readFile(target, "utf8");
|
|
79
|
+
} catch { /* absent → install */ }
|
|
80
|
+
const outsideOurBlock = existing.replace(
|
|
81
|
+
new RegExp(`${TOML_BEGIN}[\\s\\S]*?${TOML_END}\\n?`, "g"),
|
|
82
|
+
"",
|
|
83
|
+
);
|
|
84
|
+
if (/^\s*\[mcp_servers\.mcpbox\]/m.test(outsideOurBlock)) {
|
|
85
|
+
return { action: "unchanged", path: target, reason: "already declared outside the managed block" };
|
|
86
|
+
}
|
|
87
|
+
return installManagedBlock({ target, begin: TOML_BEGIN, end: TOML_END, block: TOML_BLOCK });
|
|
71
88
|
}
|
|
72
89
|
|
|
73
90
|
export function removeCodexMcp({ configPath } = {}) {
|
package/lib/policy.mjs
CHANGED
|
@@ -242,11 +242,17 @@ daruma execution задача/план (терминальный слой
|
|
|
242
242
|
1. **Решена и ограничена** — цель, границы и критерий завершения известны
|
|
243
243
|
(включая внешний issue с готовой постановкой) → сразу в daruma через
|
|
244
244
|
\`daruma_plan_materialize\`. Pipeline не нужен.
|
|
245
|
-
2.
|
|
246
|
-
расширение того, что прогон
|
|
247
|
-
\`
|
|
248
|
-
|
|
249
|
-
|
|
245
|
+
2. **Продолжает прогон, который уже отдал задачу** — follow-up, подзадача,
|
|
246
|
+
доработка или расширение того, что прогон **уже принёс** (в
|
|
247
|
+
\`mcpbox_trace_get\` у него \`status=handed_off\` и есть \`task_id\`) → тоже
|
|
248
|
+
сразу в daruma через \`daruma_plan_materialize\`, и свяжи с этой задачей
|
|
249
|
+
(\`daruma_link\`). **Заново гнать это через torii неверно**: доставленное
|
|
250
|
+
прогоном уже созрело.
|
|
251
|
+
|
|
252
|
+
Если прогон ещё **не** дошёл до handoff — связывать не с чем (задачи нет,
|
|
253
|
+
\`attach_task\` пишет её только при handoff), а его материал ещё зреет:
|
|
254
|
+
доведи прогон (\`mcpbox_pipeline_advance\` → \`mcpbox_pipeline_handoff\`), а
|
|
255
|
+
потом заводи продолжение. Идущий прогон — не повод пропустить созревание.
|
|
250
256
|
3. **Сырьё** — идея, гипотеза, неопределённое направление, где ещё не решено
|
|
251
257
|
*что* делать → \`mcpbox_pipeline_run\`, довести до \`fujin\`, материализовать
|
|
252
258
|
через \`mcpbox_pipeline_handoff\`. Напрямую в daruma такое не заводить.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcpbox/mcpbox-claude",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "MCPBox agent harness for Claude Code: managed policy (daruma tracker + full pipeline), hooks, and slash commands over the single mcpbox MCP server.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|