borgmcp 3.6.3 → 3.8.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.
@@ -3,29 +3,24 @@
3
3
  *
4
4
  * `borg_docs` (index.ts) returns these sections so an agent can route a "how
5
5
  * does borgmcp work / setup / concept / tool" question to the right
6
- * repository-local document, then WebFetch the URL for the content. Pure data +
6
+ * public documentation page, then WebFetch the URL for the content. Pure data +
7
7
  * a lazy keyword match — NO server-side fetch, NO RAG/embeddings.
8
8
  *
9
- * This is a local-only client: every URL points at the public source repository
10
- * (its README + `docs/`), never a hosted product site.
11
- *
12
- * `page` is the repository-local file each section maps to (anti-drift anchor).
9
+ * Most topics route to borgmcp.ai; repository-resident operator detail routes
10
+ * to the public source repository.
13
11
  */
14
12
 
15
- export const DOCS_BASE_URL = "https://github.com/Byte-Ventures/borg-mcp-client";
16
-
17
- const README_URL = `${DOCS_BASE_URL}#readme`;
18
- const LOCAL_SERVER_URL = `${DOCS_BASE_URL}/blob/main/docs/LOCAL_SERVER.md`;
19
- const SEAT_LIFECYCLE_URL = `${DOCS_BASE_URL}/blob/main/docs/SEAT_LIFECYCLE.md`;
13
+ const SITE_URL = "https://borgmcp.ai";
14
+ const REPOSITORY_URL = "https://github.com/Byte-Ventures/borg-mcp-client";
15
+ const LOCAL_SERVER_URL = `${REPOSITORY_URL}/blob/main/docs/LOCAL_SERVER.md`;
16
+ const SEAT_LIFECYCLE_URL = `${REPOSITORY_URL}/blob/main/docs/SEAT_LIFECYCLE.md`;
20
17
 
21
18
  export interface DocsSection {
22
19
  /** logical topic key */
23
20
  slug: string;
24
21
  title: string;
25
- /** repository-local document URL the agent should WebFetch */
22
+ /** public documentation URL the agent should WebFetch */
26
23
  url: string;
27
- /** the repository file this section maps to (anti-drift anchor) */
28
- page: string;
29
24
  summary: string;
30
25
  /** extra match terms for the topic lookup */
31
26
  keywords: string[];
@@ -35,82 +30,79 @@ export const DOCS_SECTIONS: DocsSection[] = [
35
30
  {
36
31
  slug: "overview",
37
32
  title: "Overview",
38
- url: README_URL,
39
- page: "README.md",
33
+ url: `${SITE_URL}/docs/`,
40
34
  summary: "What Borg MCP is + the cube / drone / role / log mental model.",
41
35
  keywords: ["overview", "what is", "intro", "mental model", "how it works", "start"],
42
36
  },
43
37
  {
44
38
  slug: "concepts",
45
39
  title: "Core concepts",
46
- url: README_URL,
47
- page: "README.md",
40
+ url: `${SITE_URL}/docs/concepts/`,
48
41
  summary: "Cubes, drones, roles, the activity log + signals, claims, decisions.",
49
42
  keywords: ["cube", "drone", "role", "log", "signal", "claim", "decision", "coordinate", "coordination"],
50
43
  },
51
44
  {
52
45
  slug: "install",
53
46
  title: "Install client",
54
- url: README_URL,
55
- page: "README.md",
47
+ url: `${SITE_URL}/get-started/`,
56
48
  summary: "Install the published Borg MCP client and verify the borg CLI.",
57
49
  keywords: ["install", "installation", "npm", "client", "borgmcp", "borg help", "claude code", "codex", "opencode"],
58
50
  },
59
51
  {
60
52
  slug: "run-server",
61
53
  title: "Run server",
62
- url: LOCAL_SERVER_URL,
63
- page: "docs/LOCAL_SERVER.md",
64
- summary: "Run a self-hosted borgmcp-server: setup, start, endpoint, network configuration.",
65
- keywords: ["server", "self-hosted", "borgmcp-server", "borg-mcp-server", "setup", "start", "listen port", "7091", "local server", "--lan", "tls"],
54
+ url: `${SITE_URL}/docs/run-server/`,
55
+ summary: "Run a self-hosted borgmcp-server: setup, start, private-LAN and TLS configuration.",
56
+ keywords: ["server", "self-hosted", "borgmcp-server", "borg-mcp-server", "setup", "start", "local server", "--lan", "tls"],
66
57
  },
67
58
  {
68
59
  slug: "enroll",
69
60
  title: "Enroll",
70
61
  url: LOCAL_SERVER_URL,
71
- page: "docs/LOCAL_SERVER.md",
72
62
  summary: "Connect a client to a self-hosted server: invitations, assimilate --host --enroll, credentials.",
73
- keywords: ["enroll", "enrollment", "invitation", "invite", "assimilate", "--host", "credential", "credentials", "owner", "join server"],
63
+ keywords: ["enroll", "enrollment", "invitation", "invite", "assimilate", "--host", "credential", "credentials", "owner", "join server", "add agent", "teammate"],
74
64
  },
75
65
  {
76
66
  slug: "seat-lifecycle",
77
67
  title: "Seat lifecycle and recovery",
78
68
  url: SEAT_LIFECYCLE_URL,
79
- page: "docs/SEAT_LIFECYCLE.md",
80
69
  summary: "Saved-seat states, re-attach and reset recovery, duplicate-session guards, and deterministic multi-seat selection.",
81
70
  keywords: ["seat", "lifecycle", "reattach", "re-attach", "reset-local-connection", "evicted", "revoked", "superseded", "inbox monitor", "multiple seats", "silent deafness"],
82
71
  },
83
72
  {
84
73
  slug: "self-hosting",
85
74
  title: "Self-hosting operations",
86
- url: LOCAL_SERVER_URL,
87
- page: "docs/LOCAL_SERVER.md",
75
+ url: `${SITE_URL}/docs/self-hosting/`,
88
76
  summary: "Operate a self-hosted server: data directory, credential rotation and grants, capacity, backup, upgrades.",
89
- keywords: ["self-hosting", "operations", "operate", "backup", "restore", "upgrade", "rotate", "revoke", "grant", "capacity", "data directory", "license"],
77
+ keywords: ["self-hosting", "operations", "operate", "backup", "restore", "upgrade", "rotate", "revoke", "grant", "capacity", "data directory", "dashboard", "monitoring", "observability"],
90
78
  },
91
79
  {
92
80
  slug: "cli",
93
81
  title: "CLI commands",
94
- url: README_URL,
95
- page: "README.md",
96
- summary: "Client launch, sync, cleanup, worktree maintenance, and launch-all reference.",
97
- keywords: ["cli", "command", "sync", "cleanup", "worktree", "launch", "launch-all", "terminal", "maintenance", "prune"],
82
+ url: `${SITE_URL}/docs/cli/`,
83
+ summary: "Client launch, cleanup, worktree maintenance, and launch-all reference.",
84
+ keywords: ["cli", "command", "cleanup", "worktree", "launch", "launch-all", "terminal", "maintenance", "prune"],
98
85
  },
99
86
  {
100
87
  slug: "tools",
101
88
  title: "Tool reference",
102
- url: README_URL,
103
- page: "README.md",
89
+ url: `${SITE_URL}/docs/tools/`,
104
90
  summary: "Every borg_* tool — name, description, params.",
105
91
  keywords: ["tool", "tools", "api", "reference", "param", "borg_"],
106
92
  },
107
93
  {
108
94
  slug: "faq",
109
95
  title: "FAQ",
110
- url: README_URL,
111
- page: "README.md",
112
- summary: "Common questions agents, coordination, worktrees, docs maturity, security.",
113
- keywords: ["faq", "question", "agent", "claude", "codex", "opencode", "coordination", "worktree", "security", "reporting", "second agent"],
96
+ url: `${SITE_URL}/docs/faq/`,
97
+ summary: "Common questions — agents, coordination, worktrees, local setup, security, cost and licensing.",
98
+ keywords: ["faq", "question", "agent", "claude", "codex", "opencode", "coordination", "worktree", "security", "reporting", "second agent", "pricing", "cost", "free"],
99
+ },
100
+ {
101
+ slug: "license",
102
+ title: "License",
103
+ url: `${SITE_URL}/docs/license/`,
104
+ summary: "Licenses for the client, shared contracts, and self-hosted server.",
105
+ keywords: ["license", "licensing", "apache", "fsl", "source available"],
114
106
  },
115
107
  ];
116
108
 
@@ -554,11 +554,9 @@ export function formatRegenMarkdown(
554
554
  ? [
555
555
  '## Getting started',
556
556
  '',
557
- 'Welcome to your first cube. Here\'s how to get going:',
558
- '',
559
- '1. Post your first activity: `borg_log message="Starting work on <your task>"`',
560
- '2. Invite another agent session: open a new terminal and run `borg assimilate --worktree <name>`',
561
- '3. Check who\'s here: `borg_roster`',
557
+ '**You (this agent):** post `borg_log message="<task>"`; check `borg_roster`.',
558
+ '**Your user:** in a new terminal in the repository, add a teammate: `borg assimilate <role>`; optional `--worktree <name>` names its worktree.',
559
+ 'For "what do I do next?", use `borg_docs`.',
562
560
  '',
563
561
  '---',
564
562
  '',
@@ -19,7 +19,7 @@ import { formatDroneAddressToken } from 'borgmcp-shared/drone-address';
19
19
  import { escapeSyncDisplay } from './sync-roles-render.js';
20
20
 
21
21
  export const RUNTIME_METADATA_ADVISORY =
22
- 'Agent CLI, reported model, and working repository are advisory. They do not determine authority, role, health, activity, wake behavior, or routing.';
22
+ "Agent CLI and reported model are advisory; they do not determine authority, role, health, activity, wake behavior, or routing. Working repository is the drone's home assignment for implementation work: route repository-specific implementation work to the drone homed in that repository, and drones do not take implementation work outside their home repository. These fields carry no server-side authority, and the server does not enforce repository homing.";
23
23
 
24
24
  export interface RosterDrone {
25
25
  id?: string;
@@ -4,9 +4,11 @@
4
4
  * The single canonical list of borg_* MCP tool definitions. The runtime and
5
5
  * documentation consumers use the same pure-data list.
6
6
  *
7
- * PURE DATA — no imports, no side effects so documentation builds do not pull
8
- * in the client's MCP runtime dependencies.
7
+ * CONTRACT-BACKED DATA — imports only published scalar contract constants, with
8
+ * no client runtime side effects.
9
9
  */
10
+ import { DECISION_TEXT_MAX_BYTES } from 'borgmcp-shared/protocol';
11
+
10
12
  export interface ToolManifestEntry {
11
13
  name: string;
12
14
  description: string;
@@ -128,7 +130,7 @@ export const TOOL_MANIFEST: ToolManifestEntry[] = [
128
130
  {
129
131
  name: 'borg_docs',
130
132
  description:
131
- 'Look up the Borg MCP documentation. Call this when the user asks how borgmcp works, or any feature / usage / setup / concept / tool question. Returns the docs index — each section\'s repository documentation URL + a one-line summary. Pass `topic` (e.g. "worktree", "roles", "codex") to get the best-matching section(s) instead of the full index. Then WebFetch the returned URL to read the page — borg_docs returns the index only, it does not fetch the page for you.',
133
+ 'Look up the Borg MCP documentation. Call this when the user asks how borgmcp works, or any feature / usage / setup / concept / tool question. Returns the docs index — each section\'s documentation URL + a one-line summary. Pass `topic` (e.g. "worktree", "roles", "codex") to get the best-matching section(s) instead of the full index. Then WebFetch the returned URL to read the page — borg_docs returns the index only, it does not fetch the page for you.',
132
134
  inputSchema: {
133
135
  type: 'object',
134
136
  properties: {
@@ -262,11 +264,11 @@ export const TOOL_MANIFEST: ToolManifestEntry[] = [
262
264
  },
263
265
  decision: {
264
266
  type: 'string',
265
- description: 'The ratified decision text. Max 2000 chars.',
267
+ description: `The ratified decision text. Max ${DECISION_TEXT_MAX_BYTES} UTF-8 bytes (bytes, not characters).`,
266
268
  },
267
269
  rationale: {
268
270
  type: 'string',
269
- description: 'Optional why. Max 2000 chars.',
271
+ description: `Optional why. Max ${DECISION_TEXT_MAX_BYTES} UTF-8 bytes (bytes, not characters).`,
270
272
  },
271
273
  },
272
274
  },
@@ -519,7 +521,7 @@ export const TOOL_MANIFEST: ToolManifestEntry[] = [
519
521
  {
520
522
  name: 'borg_list-drones',
521
523
  description:
522
- 'List every drone in a cube when this local client has a live read, write, or manage grant. Returns id, label, role_id, agent_kind, last_seen, advisory reported model, working repository, and wake_path_alert_class. Role labels affect workflow only and grant no server permission.',
524
+ 'List every drone in a cube when this local client has a live read, write, or manage grant. Returns id, label, role_id, agent_kind, last_seen, advisory reported model, working repository home assignment for implementation work, and wake_path_alert_class. Route repository-specific implementation work to the drone homed in that repository; drones do not take implementation work outside their home repository. Repository homing and role labels grant no server permission, and the server does not enforce repository homing.',
523
525
  inputSchema: {
524
526
  type: 'object',
525
527
  properties: {