@thehammer/danx-dashboard-mcp 0.1.154 → 0.1.156

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/dist/handlers.js CHANGED
@@ -126,47 +126,11 @@ export async function issueGet(client, args) {
126
126
  board: args.board,
127
127
  });
128
128
  }
129
- // ---------------- repo_knowledge_get / repo_knowledge_set ----------------
130
- const REPO_KNOWLEDGE_BASE_PATH = "/api/repo-knowledge";
131
- /**
132
- * Fetch the board's working-knowledge doc via GET /api/repo-knowledge
133
- * (DX-1128, Story 2). Mirrors `issueGet` — a bare board-scoped GET, no id
134
- * (the doc is 1-per-board). Board resolves the same way every other tool's
135
- * `board` arg does: per-call override, else the dispatch's env-derived board.
136
- */
137
- export async function repoKnowledgeGet(client, args = {}) {
138
- return client.request({
139
- method: "GET",
140
- path: "",
141
- basePath: REPO_KNOWLEDGE_BASE_PATH,
142
- board: args.board,
143
- });
144
- }
145
- /**
146
- * Write the board's working-knowledge doc via PUT /api/repo-knowledge
147
- * (DX-1128, Story 2). Mirrors `issueEdit`'s shape (a PATCH-like body write)
148
- * but targets the repo-knowledge route family, not `/api/issues`. The
149
- * server's optimistic-concurrency guard rejects a stale `base_hash` — the
150
- * refusal envelope (`{ok: false, body: {error, currentHash}}`) passes
151
- * through verbatim so the caller can re-get, re-merge, and retry.
152
- */
153
- export async function repoKnowledgeSet(client, args) {
154
- const { board, ...body } = args;
155
- return client.request({
156
- method: "PUT",
157
- path: "",
158
- basePath: REPO_KNOWLEDGE_BASE_PATH,
159
- body,
160
- board,
161
- });
162
- }
163
129
  // ---------------- brief_list / brief_get_page / brief_set_page ----------------
164
130
  const BRIEF_BASE_PATH = "/api/brief";
165
131
  /**
166
132
  * List the board's named Brief pages via GET /api/brief (DX-2083).
167
- * Mirrors `repoKnowledgeGet`'s shape (a bare board-scoped GET, no id) but
168
- * targets the list-shaped sibling surface — many named pages per board,
169
- * not one document.
133
+ * A bare board-scoped GET, no id — many named pages per board.
170
134
  */
171
135
  export async function briefList(client, args = {}) {
172
136
  return client.request({
@@ -179,7 +143,7 @@ export async function briefList(client, args = {}) {
179
143
  /**
180
144
  * Fetch one Brief page by slug via GET /api/brief/page?slug=
181
145
  * (DX-2083). A missing row (including a not-yet-created page) reads as the
182
- * same empty-view convention `repoKnowledgeGet` uses — never a 404.
146
+ * empty view — never a 404.
183
147
  */
184
148
  export async function briefGetPage(client, args) {
185
149
  return client.request({
@@ -192,10 +156,9 @@ export async function briefGetPage(client, args) {
192
156
  }
193
157
  /**
194
158
  * Write one Brief page via PUT /api/brief/page?slug= (DX-2083).
195
- * Mirrors `repoKnowledgeSet`'s shape (optimistic-concurrency `base_hash`,
196
- * verbatim 409 passthrough on a stale write) but targets one named page
197
- * instead of the board's single working-knowledge doc. `slug` rides the
198
- * query string (matching the route), never the body.
159
+ * Optimistic-concurrency `base_hash` with a verbatim 409 passthrough on a
160
+ * stale write. `slug` rides the query string (matching the route), never
161
+ * the body.
199
162
  */
200
163
  export async function briefSetPage(client, args) {
201
164
  const { slug, board, ...body } = args;
package/dist/index.js CHANGED
@@ -34,8 +34,6 @@
34
34
  * - issue_attach POST /api/issues/:id/attachments (reads a local file)
35
35
  * - quality_gate_instruction
36
36
  * GET /api/quality-gates/:gate/instruction (DX-3341, not card-scoped)
37
- * - repo_knowledge_get GET /api/repo-knowledge
38
- * - repo_knowledge_set PUT /api/repo-knowledge (DX-1128, Story 2)
39
37
  * - brief_list GET /api/brief
40
38
  * - brief_get_page GET /api/brief/page (DX-2083 / DX-2484)
41
39
  * - brief_set_page PUT /api/brief/page (DX-2083 / DX-2484)
@@ -110,7 +108,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
110
108
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
111
109
  import { z } from "zod";
112
110
  import { DashboardHttpClient } from "./http-client.js";
113
- import { issueAttach, issueChecklist, issueComment, issueCreate, issueDependency, issueEdit, issueGet, issueList, issueProblem, issueQualityGate, issueQualityGateVerdict, issueRetireBranch, issueRetro, issueSolution, issueTransition, issueTriage, briefGetPage, briefList, briefSetPage, failureCategoryCreate, failureCategoryList, failureCategoryUpdate, dispatchTranscriptSearch, planAddArchitectureSection, planAddCard, planAddNote, planAddRecord, planConnect, planCreate, planDeleteArchitectureSection, planDeleteNote, planDeleteRecord, planGet, PLAN_FIELD_GROUPS, PLAN_EVENT_KINDS, PLAN_EVENT_ORIGINS, PLAN_STATUSES, ISSUE_BATCH_GET_MAX, LIST_PAGE_MAX_LIMIT, PLAN_GET_CARDS_DEFAULT_LIMIT, PLAN_GET_EVENTS_DEFAULT_LIMIT, PLAN_GET_EVENTS_MAX_LIMIT, planGetArchitectureSection, planGetRecord, planList, planRemoveCard, planRename, planReorderArchitectureSection, planUpdateArchitectureSection, planUpdateNote, planUpdateRecord, repoKnowledgeGet, repoKnowledgeSet, qualityGateInstruction, resourceFields, } from "./handlers.js";
111
+ import { issueAttach, issueChecklist, issueComment, issueCreate, issueDependency, issueEdit, issueGet, issueList, issueProblem, issueQualityGate, issueQualityGateVerdict, issueRetireBranch, issueRetro, issueSolution, issueTransition, issueTriage, briefGetPage, briefList, briefSetPage, failureCategoryCreate, failureCategoryList, failureCategoryUpdate, dispatchTranscriptSearch, planAddArchitectureSection, planAddCard, planAddNote, planAddRecord, planConnect, planCreate, planDeleteArchitectureSection, planDeleteNote, planDeleteRecord, planGet, PLAN_FIELD_GROUPS, PLAN_EVENT_KINDS, PLAN_EVENT_ORIGINS, PLAN_STATUSES, ISSUE_BATCH_GET_MAX, LIST_PAGE_MAX_LIMIT, PLAN_GET_CARDS_DEFAULT_LIMIT, PLAN_GET_EVENTS_DEFAULT_LIMIT, PLAN_GET_EVENTS_MAX_LIMIT, planGetArchitectureSection, planGetRecord, planList, planRemoveCard, planRename, planReorderArchitectureSection, planUpdateArchitectureSection, planUpdateNote, planUpdateRecord, qualityGateInstruction, resourceFields, } from "./handlers.js";
114
112
  import { PRIORITY_TIER_WORDS } from "./priority.js";
115
113
  import { fieldTreeSchema } from "./field-tree.js";
116
114
  function readEnvOrDie(name) {
@@ -874,21 +872,8 @@ strictTool("issue_attach", "Attach a LOCAL file to an issue card: `id` (the card
874
872
  .describe("Absolute path to a local file on the dispatch's shared filesystem (must start with `/`)."),
875
873
  ...boardField,
876
874
  }, async (args) => jsonResult(await issueAttach(client, args)));
877
- // ---------------- repo_knowledge_get ----------------
878
- strictTool("repo_knowledge_get", "Fetch the board's working-knowledge markdown doc. Board-scoped; see `board`. Returns `{ok, status, body: {content, contentHash, updatedAt, updatedBy, boardId}}` — an unset doc reads as the empty view (content/contentHash `\"\"`), not a 404. Before `repo_knowledge_set`, always get immediately first and pass `contentHash` back as `base_hash` — the concurrency guard rejects a stale write.", {
879
- ...boardField,
880
- }, async (args) => jsonResult(await repoKnowledgeGet(client, args)));
881
- // ---------------- repo_knowledge_set ----------------
882
- strictTool("repo_knowledge_set", 'Write the board\'s working-knowledge markdown doc. Board-scoped; see `board`. `base_hash` must be the `contentHash` from the immediately-prior `repo_knowledge_get` ("" for the true first write). On mismatch, fails loud with `{error: "stale_repo_knowledge", currentHash}` rather than overwriting — re-get, re-merge, retry with the new hash. On success persists to the DB, publishes `repo-knowledge:updated` over SSE, and returns the new view.', {
883
- content: z.string(),
884
- base_hash: z
885
- .string()
886
- .optional()
887
- .describe('The contentHash last read via repo_knowledge_get ("" for a true first write). Omitted also normalizes to "" server-side, so it only succeeds against an empty/absent doc — always get immediately before set.'),
888
- ...boardField,
889
- }, async (args) => jsonResult(await repoKnowledgeSet(client, args)));
890
875
  // ---------------- brief_list ----------------
891
- strictTool("brief_list", "List the board's named Brief pages. Board-scoped; see `board`. Returns `{boardId, pages: [{slug, title, contentHash, sortOrder, updatedAt, updatedBy}]}` — metadata only, no content (use `brief_get_page`). Unlike `repo_knowledge_get`/`_set` (one board-level doc), Brief pages are MANY named pages per board (Goals/Architecture/Rules/Caveats tabs), keyed by (board, slug). The reserved `index` slug always exists.", {
876
+ strictTool("brief_list", "List the board's named Brief pages. Board-scoped; see `board`. Returns `{boardId, pages: [{slug, title, contentHash, sortOrder, updatedAt, updatedBy}]}` — metadata only, no content (use `brief_get_page`). Brief pages are MANY named pages per board (Goals/Architecture/Rules/Caveats tabs), keyed by (board, slug). The reserved `index` slug always exists.", {
892
877
  ...boardField,
893
878
  }, async (args) => jsonResult(await briefList(client, args)));
894
879
  // ---------------- brief_get_page ----------------
@@ -900,7 +885,7 @@ strictTool("brief_get_page", 'Fetch one Brief page by slug. Board-scoped; see `b
900
885
  ...boardField,
901
886
  }, async (args) => jsonResult(await briefGetPage(client, args)));
902
887
  // ---------------- brief_set_page ----------------
903
- strictTool("brief_set_page", 'Write one Brief page. Board-scoped; see `board`. Body: `{content, title?, sortOrder?, base_hash?}` — same optimistic-concurrency shape as `repo_knowledge_set`, targeting one named page. `base_hash` must be the `contentHash` from the immediately-prior `brief_get_page` (`""` for a true first write). On mismatch fails loud with `{error: "stale_brief_page", currentHash}` — re-get, re-merge, retry, never overwrite blindly. On success persists, publishes `brief:updated` over SSE, and returns the new view. No delete tool on this surface; the reserved `index` slug is never deletable — removing a non-index page is dashboard-UI-only.', {
888
+ strictTool("brief_set_page", 'Write one Brief page. Board-scoped; see `board`. Body: `{content, title?, sortOrder?, base_hash?}` — optimistic-concurrency, targeting one named page. `base_hash` must be the `contentHash` from the immediately-prior `brief_get_page` (`""` for a true first write). On mismatch fails loud with `{error: "stale_brief_page", currentHash}` — re-get, re-merge, retry, never overwrite blindly. On success persists, publishes `brief:updated` over SSE, and returns the new view. No delete tool on this surface; the reserved `index` slug is never deletable — removing a non-index page is dashboard-UI-only.', {
904
889
  slug: z
905
890
  .string()
906
891
  .min(1)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thehammer/danx-dashboard-mcp",
3
- "version": "0.1.154",
3
+ "version": "0.1.156",
4
4
  "description": "Stdio MCP server wrapping danxbot's dashboard /api/issues/* normalized DB-backed HTTP routes for dispatched agents (DX-704 Phase 2).",
5
5
  "license": "MIT",
6
6
  "type": "module",