@mcpbox/mcpbox-claude 0.1.0 → 0.1.2

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.
@@ -5,8 +5,8 @@ description: Open an mcpbox maturity run from raw input (torii→…→fujin→h
5
5
  The user invoked `/mcpbox:pipeline-run` with a raw idea/request in `$ARGUMENTS`.
6
6
 
7
7
  Raw input matures through the layers; a daruma task is created **only** via handoff,
8
- never by `daruma_create` directly. The server enforces the layer order (skip / `torii`
9
- as target → `422`).
8
+ never by materializing a daruma task directly. The server enforces the layer order
9
+ (skip / `torii` as target → `422`).
10
10
 
11
11
  ## Steps
12
12
 
@@ -15,7 +15,16 @@ import { pathToFileURL } from "node:url";
15
15
  const PATTERNS = [
16
16
  {
17
17
  re: /\b(pipeline|maturity|handoff|action\s*packet)\b|(?<![а-яёА-ЯЁ])(пайплайн|конвейер|зрелость|хендофф)(?![а-яёА-ЯЁ])/,
18
- hint: "[mcpbox] Detected pipeline intent → /mcpbox:pipeline-run or mcpbox_pipeline_run (raw input matures torii→…→fujin→handoff, never daruma_create directly).",
18
+ hint: "[mcpbox] Detected pipeline intent → /mcpbox:pipeline-run or mcpbox_pipeline_run (raw input matures torii→…→fujin→handoff, never a direct daruma task).",
19
+ },
20
+ {
21
+ // create / import — ACTION + task/issue OBJECT (avoids bare-verb false positives).
22
+ re: /\b(add|create|new|log|move|import)\s+(a\s+|an\s+)?(task|issue|ticket|subtask)\b|(?<![а-яёА-ЯЁ])(добавь|добавить|заведи|завести|создай|создать)\s+(задачу|таск|подзадачу|тикет)(?![а-яёА-ЯЁ])|(?<![а-яёА-ЯЁ])(перенеси|перенести|импортируй|заведи)\s+(ишью|задачу|таск|тикет|issue)(?![а-яёА-ЯЁ])/,
23
+ hint: "[mcpbox] Detected task-intake/import intent → daruma_plan_materialize (plan-only intake, ADR-0007; external issue: also daruma_link the source). Adding to an EXISTING plan: still materialize (no bare-task intake), then attach via daruma_plan_add_task (recompose) or pass parent_plan_id. Not a lookup — don't treat the id as an existing task.",
24
+ },
25
+ {
26
+ re: /\b(list|show|view)\s+(all\s+|active\s+|open\s+)?(tasks|issues|backlog)\b|(?<![а-яёА-ЯЁ])(выпиши|покажи|перечисли|список)\s+(активные\s+)?(задачи|задач|таски|бэклог)(?![а-яёА-ЯЁ])/,
27
+ hint: "[mcpbox] Detected task-list intent → /mcpbox:tasks (daruma_list status=active, scoped).",
19
28
  },
20
29
  {
21
30
  re: /\b(capture|record|lesson)\b|(?<![а-яёА-ЯЁ])(сохрани|запомни|урок)(?![а-яёА-ЯЁ])/,
@@ -36,7 +45,10 @@ const PATTERNS = [
36
45
  ];
37
46
 
38
47
  export function promptSubmitHint(promptText = "") {
39
- const prompt = promptText.toLowerCase().trim();
48
+ // Strip fenced code blocks so a keyword pasted inside ``` … ``` doesn't
49
+ // trigger a routing hint (OMC-style false-positive guard, kept minimal —
50
+ // these hints are low-stakes suggestions, not mode activation).
51
+ const prompt = promptText.replace(/```[\s\S]*?```/g, " ").toLowerCase().trim();
40
52
  for (const { re, hint } of PATTERNS) {
41
53
  if (re.test(prompt)) return hint;
42
54
  }
package/lib/policy.mjs CHANGED
@@ -46,17 +46,16 @@ platform **pipeline** tools (\`mcpbox_pipeline_*\`, \`mcpbox_trace_get\`,
46
46
  1. **All durable task/plan state lives in mcpbox (daruma tools).** Never persist
47
47
  tasks, plans, subtasks, or backlogs in markdown scratchpads,
48
48
  \`TODO.md\` files, or in-chat notes as the source of truth. Use
49
- \`daruma_create\`, \`daruma_plan_create\`,
50
- \`daruma_plan_add_task\`, \`daruma_set_status\`,
51
- \`daruma_comment\`.
49
+ \`daruma_plan_materialize\` (plan-only intake, ADR-0007),
50
+ \`daruma_set_status\`, \`daruma_comment\`.
52
51
 
53
52
  2. **Do not create or modify \`.omc/plans/\`, \`.omc/ultragoal/\`, or
54
53
  \`.omc/state/plans*\`.** OMC skills (\`/plan\`, \`/ultragoal\`,
55
54
  \`/autopilot\`, \`/ralph\`, \`/ultrawork\`, \`/ralplan\`, \`/team\`)
56
55
  must not author new files under those paths. If a request triggers
57
56
  one of those skills, route the plan into mcpbox first:
58
- \`daruma_workspace_info\` → \`daruma_create\` →
59
- \`daruma_plan_create\` → \`daruma_plan_add_task\`. OMC may
57
+ \`daruma_workspace_info\` →
58
+ \`daruma_plan_materialize\` (the plan with its tasks, one atomic call). OMC may
60
59
  still execute, but the plan it follows must come from
61
60
  \`daruma_plan_get\` / \`daruma_plan_next_task\`.
62
61
 
@@ -131,18 +130,24 @@ When the user mentions any of the following, the conversation is about
131
130
  **this workspace's mcpbox tracker**. Do not invent another tracker
132
131
  and do not reach for \`.omc/plans/\` or markdown TODO files.
133
132
 
134
- - **Russian:** «трекер», «таск-трекер», «трекер задач», «бэклог»,
135
- «список задач», «план», «задача», «подзадача», «декомпозиция»,
136
- «декомпозировать», «спланируй», «что дальше», «прогресс»,
137
- «закрыть задачу».
138
- - **English:** "tracker", "issue tracker", "task tracker", "backlog",
139
- "todo system", "plan", "task", "subtask", "decompose", "break into
140
- subtasks", "what's next", "mark this done", "track progress".
133
+ - **Russian:** «трекер», «таск-трекер», «таск-менеджер», «таск менеджер»,
134
+ «менеджер задач», «трекер задач», «бэклог», «список задач», «план»,
135
+ «задача», «таск», «подзадача», «ишью», «декомпозиция», «декомпозировать»,
136
+ «спланируй», «что дальше», «прогресс», «закрыть задачу».
137
+ - **English:** "tracker", "issue tracker", "task tracker", "task manager",
138
+ "backlog", "todo system", "plan", "task", "issue", "subtask", "decompose",
139
+ "break into subtasks", "what's next", "mark this done", "track progress".
141
140
 
142
- If the user says "the tracker" / «наш трекер» without naming a tool,
143
- **assume mcpbox**. Only ask for clarification when they explicitly
141
+ If the user says "the tracker" / «наш трекер» / «таск-менеджер» without naming
142
+ a tool, **assume mcpbox**. Only ask for clarification when they explicitly
144
143
  mention a different system (Linear, Jira, GitHub Issues, etc.).
145
144
 
145
+ **Importing an external issue** — «перенеси/заведи ишью N в трекер / таск-менеджер»,
146
+ "move/import issue N into the tracker" — is **intake**, not a lookup: land it by
147
+ materializing a plan (\`daruma_plan_materialize\`) that carries the imported task,
148
+ and when the source is a real system (GitHub/Jira/Linear) \`daruma_link\` the new
149
+ task back to it. Do not treat the issue id as an existing daruma task to fetch.
150
+
146
151
  ---
147
152
 
148
153
  ## Part B — MCPBox pipeline (full maturity stack)
@@ -189,8 +194,8 @@ daruma execution задача/план (терминальный слой
189
194
  артефактов — полный контекст персистирован на сервере, читается через
190
195
  \`mcpbox_trace_get\`.
191
196
  - **daruma-задача заводится ТОЛЬКО через \`mcpbox_pipeline_handoff\`** зрелого
192
- Action Packet. Создавать задачи «из воздуха» (\`daruma_create\` без
193
- апстрима) в pipeline-контексте запрещено — на стороне daruma инвариант
197
+ Action Packet. Материализовать задачу «из воздуха» (\`daruma_plan_materialize\`
198
+ без апстрима) в pipeline-контексте запрещено — на стороне daruma инвариант
194
199
  «планы — единственный вход».
195
200
  - **Отказ слоя → возврат на предыдущий слой, не обход.** Ошибка хопа помечает
196
201
  прогон \`failed\` (причина в \`mcpbox_trace_get\`); почини вход предыдущего
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpbox/mcpbox-claude",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
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": {