@edda-business/mcp 0.53.0 → 0.54.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/server.js +22 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edda-business/mcp",
3
- "version": "0.53.0",
3
+ "version": "0.54.0",
4
4
  "description": "Edda — the company data layer for AI agents.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/server.js CHANGED
@@ -22,7 +22,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
22
22
  import { z } from "zod";
23
23
  import { get, post, del } from "./client.js";
24
24
 
25
- export const SERVER_VERSION = "0.53.0";
25
+ export const SERVER_VERSION = "0.54.0";
26
26
 
27
27
  // ─── helpers ──────────────────────────────────────────────────────────────────
28
28
 
@@ -710,27 +710,37 @@ export function createServer() {
710
710
  // ===========================================================================
711
711
  server.tool(
712
712
  "propose_company_file",
713
- "Add or update a markdown file in the SHARED COMPANY vault — the workspace's declared " +
714
- "knowledge (policies, playbooks, decisions, SOPs, how-we-work) that every member's agent can " +
715
- "read via search_company_knowledge. Use this to contribute company-wide knowledge everyone " +
716
- "should have. ADMIN-ONLY: only an owner/admin may write the company vault; a regular member's " +
717
- "agent can read it but will get a permission message here. This is NOT the member's private " +
718
- "notes (use propose_vault_file) and NOT a note on a contact (use save_note). Pick the " +
719
- "destination company folder (it must be an existing folder in the company vault).",
713
+ "Propose a markdown file for the SHARED COMPANY vault — the workspace's declared knowledge " +
714
+ "(policies, playbooks, decisions, SOPs, how-we-work) that every member's agent can read via " +
715
+ "search_company_knowledge. This OPENS A PULL REQUEST against the connected company repo for a " +
716
+ "human to review and merge in GitHub nothing goes live until it's merged (company knowledge " +
717
+ "is shared + institutional, so review-before-publish is the default; on merge the normal git " +
718
+ "sync ingests it). Use it to contribute company-wide knowledge. ADMIN-ONLY: only an owner/admin " +
719
+ "may propose; a regular member's agent can READ the vault but gets a permission message here. " +
720
+ "NOT the member's private notes (use propose_vault_file), NOT a note on a contact (use save_note).",
720
721
  {
721
722
  folder: z.string().describe("The company-vault folder to file under (e.g. 'company-wiki', 'decisions', 'projects', 'clients'). Must be an existing company folder; no slashes."),
722
723
  name: z.string().describe("The file name, ending in .md, e.g. 'Refund Policy.md' or 'Q3 Planning — 2026-08-22.md'."),
723
724
  content: z.string().describe("The full markdown content of the file."),
724
725
  subfolder: z.string().optional().describe("Optional subfolder within the folder."),
726
+ message: z.string().optional().describe("Optional PR title / commit message describing the change."),
727
+ pr_group: z.string().optional().describe("Optional key to batch several proposals from one work session into a SINGLE pull request (same key → same PR)."),
725
728
  },
726
- async ({ folder, name, content, subfolder }) => {
729
+ async ({ folder, name, content, subfolder, message, pr_group }) => {
727
730
  try {
728
- await post("/v2/company/propose", { folder, name, content, subfolder });
729
- return { content: [{ type: "text", text: `Filed "${name}" into the company vault (${folder}). It's now searchable by the team's agents via search_company_knowledge.` }] };
731
+ const r = await post("/v2/company/propose", { folder, name, content, subfolder, message, pr_group });
732
+ const how = r?.added_to_existing ? "added to the open PR" : "opened a pull request";
733
+ return { content: [{ type: "text", text: `Proposed "${name}" — ${how}${r?.pr_url ? `: ${r.pr_url}` : ""}. Review the diff and merge it in GitHub to publish into company knowledge.` }] };
730
734
  } catch (e) {
731
735
  const msg = String(e?.message || e);
732
736
  if (msg.includes("admins_only") || msg.includes("(403)")) {
733
- return { content: [{ type: "text", text: `Not filed — writing to the company vault is admin-only. You can READ it with search_company_knowledge, but only an owner/admin can add to it.` }] };
737
+ return { content: [{ type: "text", text: `Not proposed — writing to the company vault is admin-only. You can READ it with search_company_knowledge, but only an owner/admin can propose changes.` }] };
738
+ }
739
+ if (msg.includes("no_company_repo")) {
740
+ return { content: [{ type: "text", text: `Not proposed — no company GitHub repo is connected. An admin connects one under Company vault first.` }] };
741
+ }
742
+ if (msg.includes("repo_write_denied")) {
743
+ return { content: [{ type: "text", text: `Not proposed — the connected repo token is read-only. An admin must reconnect it with Contents:write + Pull requests:write.` }] };
734
744
  }
735
745
  throw e;
736
746
  }