@monnet/mcp 0.2.5 → 0.4.1

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 (42) hide show
  1. package/README.md +20 -27
  2. package/dist/approval.d.ts +19 -11
  3. package/dist/approval.js +73 -52
  4. package/dist/approval.js.map +1 -1
  5. package/dist/client.js +1 -1
  6. package/dist/client.js.map +1 -1
  7. package/dist/index.js +10 -44
  8. package/dist/index.js.map +1 -1
  9. package/dist/instructions.d.ts +15 -0
  10. package/dist/instructions.js +31 -0
  11. package/dist/instructions.js.map +1 -0
  12. package/dist/registry.d.ts +95 -0
  13. package/dist/registry.js +50 -0
  14. package/dist/registry.js.map +1 -0
  15. package/dist/rendering/motion.d.ts +4 -13
  16. package/dist/rendering/motion.js +12 -28
  17. package/dist/rendering/motion.js.map +1 -1
  18. package/dist/test-env.d.ts +15 -0
  19. package/dist/test-env.js +17 -0
  20. package/dist/test-env.js.map +1 -0
  21. package/dist/tools/list-motions.js +1 -2
  22. package/dist/tools/list-motions.js.map +1 -1
  23. package/dist/tools/wiki/_common.d.ts +102 -0
  24. package/dist/tools/wiki/_common.js +132 -0
  25. package/dist/tools/wiki/_common.js.map +1 -0
  26. package/dist/tools/wiki/index.d.ts +21 -0
  27. package/dist/tools/wiki/index.js +48 -0
  28. package/dist/tools/wiki/index.js.map +1 -0
  29. package/dist/tools/wiki/read.d.ts +68 -0
  30. package/dist/tools/wiki/read.js +124 -0
  31. package/dist/tools/wiki/read.js.map +1 -0
  32. package/dist/tools/wiki/sources.d.ts +114 -0
  33. package/dist/tools/wiki/sources.js +288 -0
  34. package/dist/tools/wiki/sources.js.map +1 -0
  35. package/dist/tools/wiki/write.d.ts +174 -0
  36. package/dist/tools/wiki/write.js +280 -0
  37. package/dist/tools/wiki/write.js.map +1 -0
  38. package/package.json +3 -8
  39. package/LICENSE +0 -21
  40. package/dist/tools/get-workspace-memory.d.ts +0 -15
  41. package/dist/tools/get-workspace-memory.js +0 -35
  42. package/dist/tools/get-workspace-memory.js.map +0 -1
@@ -1,25 +1,17 @@
1
1
  interface PlanStep {
2
- kind?: "step";
3
2
  content: string;
4
3
  status: string;
5
- assignee?: string | null;
6
- step_type?: "task" | "approval" | "decision" | "interview";
7
- approved_by?: string | null;
4
+ assignees?: string[];
5
+ approval?: boolean;
6
+ approved_by?: string[];
8
7
  }
9
- interface PlanGroup {
10
- kind: "group";
11
- title: string;
12
- execution?: "parallel" | "sequential";
13
- children: PlanItem[];
14
- }
15
- type PlanItem = PlanStep | PlanGroup;
16
8
  interface MotionDetail {
17
9
  id: string;
18
10
  summary: string;
19
11
  status: string;
20
12
  priority: string | null;
21
13
  body: string | null;
22
- plan: PlanItem[] | null;
14
+ plan: PlanStep[] | null;
23
15
  author: string;
24
16
  created_at: string;
25
17
  updated_at: string;
@@ -57,7 +49,6 @@ interface MotionListData {
57
49
  workspace_slug: string;
58
50
  status: string;
59
51
  page: number;
60
- limit: number;
61
52
  total: number;
62
53
  motions: MotionListItem[];
63
54
  }
@@ -8,35 +8,10 @@ const PRIORITY_DOTS = {
8
8
  normal: "●",
9
9
  low: "○",
10
10
  };
11
- function isGroup(item) {
12
- return item.kind === "group";
13
- }
14
11
  const DIVIDER = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━";
15
12
  function padRight(str, len) {
16
13
  return str.length >= len ? str : str + " ".repeat(len - str.length);
17
14
  }
18
- // Render the plan tree recursively. Groups print their title + execution mode
19
- // and recurse into their children; steps print status icon, content, assignee
20
- // and an approval lock. Numbering is hierarchical (1, 2, 2.1, 2.2, …).
21
- function renderPlanItems(items, nameMap, lines, depth, prefix) {
22
- const indent = " ".repeat(depth + 1);
23
- items.forEach((item, i) => {
24
- const number = `${prefix}${i + 1}`;
25
- if (isGroup(item)) {
26
- const exec = item.execution ? ` (${item.execution})` : "";
27
- lines.push(`${indent}${number}. 📂 ${item.title}${exec}`);
28
- renderPlanItems(item.children || [], nameMap, lines, depth + 1, `${number}.`);
29
- }
30
- else {
31
- const icon = STATUS_ICONS[item.status] || "⏳";
32
- const assigneeStr = item.assignee
33
- ? ` → ${nameMap.get(item.assignee) || item.assignee}`
34
- : "";
35
- const lock = item.step_type === "approval" ? " 🔒" : "";
36
- lines.push(`${indent}${number}. ${icon} ${item.content}${assigneeStr}${lock}`);
37
- }
38
- });
39
- }
40
15
  export function renderMotionDetail(data) {
41
16
  const priority = data.priority || "normal";
42
17
  const dot = PRIORITY_DOTS[priority] || "●";
@@ -71,7 +46,16 @@ export function renderMotionDetail(data) {
71
46
  if (data.plan && data.plan.length > 0) {
72
47
  lines.push("");
73
48
  lines.push("PLAN");
74
- renderPlanItems(data.plan, nameMap, lines, 0, "");
49
+ data.plan.forEach((step, i) => {
50
+ const icon = STATUS_ICONS[step.status] || "⏳";
51
+ let assigneeStr = "";
52
+ if (step.assignees && step.assignees.length > 0) {
53
+ const names = step.assignees.map((uid) => nameMap.get(uid) || uid);
54
+ assigneeStr = ` → ${names.join(", ")}`;
55
+ }
56
+ const lock = step.approval ? " 🔒" : "";
57
+ lines.push(` ${i + 1}. ${icon} ${step.content}${assigneeStr}${lock}`);
58
+ });
75
59
  }
76
60
  // Members — show motion-level roles (editor/commenter) when available,
77
61
  // fall back to workspace role (owner/member) otherwise.
@@ -133,9 +117,9 @@ export function renderMotionList(data) {
133
117
  const dot = PRIORITY_DOTS[m.priority || "normal"] || "●";
134
118
  lines.push(`- \`${m.short_id}\` ${dot} **${m.summary}** — ${m.author}`);
135
119
  }
136
- if (data.total > data.limit) {
120
+ if (data.total > data.motions.length) {
137
121
  lines.push("");
138
- lines.push(`_Page ${data.page} of ${Math.ceil(data.total / data.limit)}. Pass \`page\` to see more._`);
122
+ lines.push(`_Page ${data.page} of ${Math.ceil(data.total / data.motions.length)}. Pass \`page\` to see more._`);
139
123
  }
140
124
  return lines.join("\n");
141
125
  }
@@ -1 +1 @@
1
- {"version":3,"file":"motion.js","sourceRoot":"","sources":["../../src/rendering/motion.ts"],"names":[],"mappings":"AA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AAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Imported first by every test file.
3
+ *
4
+ * `client.ts` calls `process.exit(1)` at import time when MONNET_API_KEY is
5
+ * unset — right for a server a client just spawned with no config, fatal for a
6
+ * test suite. Without this the whole file dies before its first assertion, and
7
+ * it dies SILENTLY as far as a developer with a key exported is concerned: the
8
+ * suite passes on their machine and runs zero tests everywhere else. That is
9
+ * how the approval gate — the one thing standing between a model and an
10
+ * irreversible delete — came to have tests that never ran in CI.
11
+ *
12
+ * `??=` so a real key in the environment still wins; nothing here reaches the
13
+ * network anyway, since every test stubs `fetch`.
14
+ */
15
+ export {};
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Imported first by every test file.
3
+ *
4
+ * `client.ts` calls `process.exit(1)` at import time when MONNET_API_KEY is
5
+ * unset — right for a server a client just spawned with no config, fatal for a
6
+ * test suite. Without this the whole file dies before its first assertion, and
7
+ * it dies SILENTLY as far as a developer with a key exported is concerned: the
8
+ * suite passes on their machine and runs zero tests everywhere else. That is
9
+ * how the approval gate — the one thing standing between a model and an
10
+ * irreversible delete — came to have tests that never ran in CI.
11
+ *
12
+ * `??=` so a real key in the environment still wins; nothing here reaches the
13
+ * network anyway, since every test stubs `fetch`.
14
+ */
15
+ process.env.MONNET_API_KEY ??= "mnk_test_not_a_real_key";
16
+ export {};
17
+ //# sourceMappingURL=test-env.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-env.js","sourceRoot":"","sources":["../src/test-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,yBAAyB,CAAC"}
@@ -15,7 +15,7 @@ export async function handleListMotions(args) {
15
15
  const limit = parsed.limit ?? 10;
16
16
  const wsId = await resolveWorkspaceId(parsed.workspace_slug);
17
17
  const params = new URLSearchParams({
18
- motion_status: status,
18
+ status,
19
19
  page: String(page),
20
20
  limit: String(limit),
21
21
  });
@@ -24,7 +24,6 @@ export async function handleListMotions(args) {
24
24
  workspace_slug: parsed.workspace_slug,
25
25
  status,
26
26
  page,
27
- limit,
28
27
  total: data.total,
29
28
  motions: data.motions.map((m) => ({
30
29
  short_id: m.id.slice(0, 8),
@@ -1 +1 @@
1
- {"version":3,"file":"list-motions.js","sourceRoot":"","sources":["../../src/tools/list-motions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAU,CAAC;AAE5D,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACjC,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACxC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;CAClD,CAAC,CAAC;AAiBH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,IAAa;IACnD,MAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC;IACvC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC;IA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I,EAAE,QAAQ;gBACd,WAAW,EAAE,+CAA+C;aAC7D;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kCAAkC;gBAC/C,IAAI,EAAE,cAAc;aACrB;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,oCAAoC;gBACjD,OAAO,EAAE,CAAC;aACX;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,iDAAiD;gBAC9D,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,EAAE;aACZ;SACF;QACD,QAAQ,EAAE,CAAC,gBAAgB,CAAC;KAC7B;CACF,CAAC"}
@@ -0,0 +1,102 @@
1
+ /**
2
+ * Shared plumbing for the company-brain tools.
3
+ *
4
+ * Grouped in one folder rather than thirteen sibling files, mirroring the
5
+ * backend's own `tool_handlers/wiki.py`: they share workspace resolution, the
6
+ * `?page=` link format and the same error vocabulary, and splitting them would
7
+ * mean repeating those thirteen times. The tool surface is unchanged — each is
8
+ * still registered by name in `index.ts`.
9
+ *
10
+ * These are deliberately the SAME names Monnet's own tools carry
11
+ * (`read_wiki_page`, `edit_wiki_page`, …). One vocabulary for the wiki,
12
+ * whether the agent writing is Monnet in the app or an agent on somebody's
13
+ * laptop; two sets of names for one surface would be two things to learn and
14
+ * two things to keep in step.
15
+ */
16
+ import { z } from "zod";
17
+ /** Every wiki tool is scoped to one workspace, and says so the same way. */
18
+ export declare const WORKSPACE_SLUG_PROPERTY: {
19
+ type: "string";
20
+ description: string;
21
+ };
22
+ export declare const PAGE_ID_PROPERTY: {
23
+ type: "string";
24
+ description: string;
25
+ };
26
+ export declare function wikiBase(workspaceSlug: string): Promise<string>;
27
+ export interface WikiNode {
28
+ id: string;
29
+ type: "folder" | "page";
30
+ name: string;
31
+ path: string;
32
+ position: number;
33
+ children: WikiNode[];
34
+ }
35
+ export declare function fetchTree(workspaceSlug: string): Promise<WikiNode[]>;
36
+ /**
37
+ * The tree as indented lines, ids included.
38
+ *
39
+ * Ids are on every line because they are not decoration: a link is
40
+ * `[Label](?page=<id>)`, and the backend refuses a write whose links do not
41
+ * resolve. A listing without them would send the caller guessing at exactly
42
+ * the value it must copy.
43
+ */
44
+ export declare function renderTree(nodes: WikiNode[], depth?: number): string;
45
+ /**
46
+ * Every node in the tree, flat, in render order.
47
+ *
48
+ * One walk that the folder lookups, the ambiguity check and the error listing
49
+ * all read, so they cannot disagree about what a folder's path is — they did,
50
+ * and the refusal could list the very path it had just rejected, written a
51
+ * different way.
52
+ */
53
+ export declare function flatten(nodes: WikiNode[]): WikiNode[];
54
+ /**
55
+ * Normalise a folder path to the backend's shape: one leading slash, none
56
+ * trailing. "" and "/" both mean the wiki root, and so does `undefined`.
57
+ */
58
+ export declare function normaliseFolderPath(path: string | undefined): string;
59
+ export type FolderLookup = {
60
+ id: string | null;
61
+ } | {
62
+ error: string;
63
+ };
64
+ /**
65
+ * Resolve a folder path to an id, agreeing with `resolve_folder_path` on the
66
+ * backend — the same comparison, and the same two refusals.
67
+ *
68
+ * Exact match, not case-insensitive: the backend compares exactly, and a
69
+ * client that accepted `product/design` where Monnet's own tool rejects it
70
+ * would make the wiki answer to two different vocabularies.
71
+ *
72
+ * Ambiguity is an error rather than a first match. Nothing stops two siblings
73
+ * sharing a name, so two folders can answer to one path — and silently taking
74
+ * either files a page into an arbitrary one of them, over and over, with
75
+ * nothing to notice.
76
+ */
77
+ export declare function resolveFolderPath(nodes: WikiNode[], path: string | undefined): FolderLookup;
78
+ /**
79
+ * `resolveFolderPath` against the workspace's current tree, which every write
80
+ * tool needs before it can place anything. Returns the tree too: the caller
81
+ * that moves a node needs it again to append rather than prepend.
82
+ */
83
+ export declare function lookUpFolder(workspaceSlug: string, path: string | undefined): Promise<{
84
+ tree: WikiNode[];
85
+ } & FolderLookup>;
86
+ /**
87
+ * The node a move should land AFTER: the destination's last child.
88
+ *
89
+ * Omitting it means "first" to the server's placement, which would take the top
90
+ * slot of the destination and push down an order the team set by hand. Monnet's
91
+ * own move tool computes the same value for the same reason (`_last_sibling_id`
92
+ * in the backend's wiki tool handlers) — an agent move appends.
93
+ */
94
+ export declare function lastChildId(nodes: WikiNode[], destinationId: string | null, movingId: string): string | null;
95
+ /** Every wiki tool is scoped to one workspace, and validates it the same way. */
96
+ export declare const WorkspaceOnlyArgs: z.ZodObject<{
97
+ workspace_slug: z.ZodString;
98
+ }, "strip", z.ZodTypeAny, {
99
+ workspace_slug: string;
100
+ }, {
101
+ workspace_slug: string;
102
+ }>;
@@ -0,0 +1,132 @@
1
+ /**
2
+ * Shared plumbing for the company-brain tools.
3
+ *
4
+ * Grouped in one folder rather than thirteen sibling files, mirroring the
5
+ * backend's own `tool_handlers/wiki.py`: they share workspace resolution, the
6
+ * `?page=` link format and the same error vocabulary, and splitting them would
7
+ * mean repeating those thirteen times. The tool surface is unchanged — each is
8
+ * still registered by name in `index.ts`.
9
+ *
10
+ * These are deliberately the SAME names Monnet's own tools carry
11
+ * (`read_wiki_page`, `edit_wiki_page`, …). One vocabulary for the wiki,
12
+ * whether the agent writing is Monnet in the app or an agent on somebody's
13
+ * laptop; two sets of names for one surface would be two things to learn and
14
+ * two things to keep in step.
15
+ */
16
+ import { z } from "zod";
17
+ import { apiFetch, resolveWorkspaceId } from "../../client.js";
18
+ /** Every wiki tool is scoped to one workspace, and says so the same way. */
19
+ export const WORKSPACE_SLUG_PROPERTY = {
20
+ type: "string",
21
+ description: "The workspace slug, from any Monnet URL (e.g. 'monnet-team-410b'). Call list_workspaces if you do not have it.",
22
+ };
23
+ export const PAGE_ID_PROPERTY = {
24
+ type: "string",
25
+ description: "The page's full id, as returned by get_wiki_tree, search_wiki or create_wiki_page. Not the 8-character short id — those address motions, not pages.",
26
+ };
27
+ export async function wikiBase(workspaceSlug) {
28
+ return `/workspaces/${await resolveWorkspaceId(workspaceSlug)}/wiki`;
29
+ }
30
+ export async function fetchTree(workspaceSlug) {
31
+ return apiFetch(`${await wikiBase(workspaceSlug)}/tree`);
32
+ }
33
+ /**
34
+ * The tree as indented lines, ids included.
35
+ *
36
+ * Ids are on every line because they are not decoration: a link is
37
+ * `[Label](?page=<id>)`, and the backend refuses a write whose links do not
38
+ * resolve. A listing without them would send the caller guessing at exactly
39
+ * the value it must copy.
40
+ */
41
+ export function renderTree(nodes, depth = 0) {
42
+ return nodes
43
+ .flatMap((node) => {
44
+ const indent = " ".repeat(depth);
45
+ const line = node.type === "folder"
46
+ ? `${indent}${node.name}/`
47
+ : `${indent}${node.name} (id: ${node.id})`;
48
+ return [line, ...(node.children.length ? [renderTree(node.children, depth + 1)] : [])];
49
+ })
50
+ .join("\n");
51
+ }
52
+ /**
53
+ * Every node in the tree, flat, in render order.
54
+ *
55
+ * One walk that the folder lookups, the ambiguity check and the error listing
56
+ * all read, so they cannot disagree about what a folder's path is — they did,
57
+ * and the refusal could list the very path it had just rejected, written a
58
+ * different way.
59
+ */
60
+ export function flatten(nodes) {
61
+ return nodes.flatMap((node) => [node, ...flatten(node.children)]);
62
+ }
63
+ /**
64
+ * Normalise a folder path to the backend's shape: one leading slash, none
65
+ * trailing. "" and "/" both mean the wiki root, and so does `undefined`.
66
+ */
67
+ export function normaliseFolderPath(path) {
68
+ const trimmed = (path || "").trim().replace(/^\/+|\/+$/g, "");
69
+ return trimmed ? `/${trimmed}` : "";
70
+ }
71
+ /**
72
+ * Resolve a folder path to an id, agreeing with `resolve_folder_path` on the
73
+ * backend — the same comparison, and the same two refusals.
74
+ *
75
+ * Exact match, not case-insensitive: the backend compares exactly, and a
76
+ * client that accepted `product/design` where Monnet's own tool rejects it
77
+ * would make the wiki answer to two different vocabularies.
78
+ *
79
+ * Ambiguity is an error rather than a first match. Nothing stops two siblings
80
+ * sharing a name, so two folders can answer to one path — and silently taking
81
+ * either files a page into an arbitrary one of them, over and over, with
82
+ * nothing to notice.
83
+ */
84
+ export function resolveFolderPath(nodes, path) {
85
+ const wanted = normaliseFolderPath(path);
86
+ if (!wanted)
87
+ return { id: null };
88
+ const folders = flatten(nodes).filter((node) => node.type === "folder");
89
+ const matches = folders.filter((node) => normaliseFolderPath(node.path) === wanted);
90
+ if (matches.length > 1) {
91
+ return {
92
+ error: `Error: two folders answer to ${wanted}. Rename one of them, or move ` +
93
+ `the node by hand — this path cannot say which you mean.`,
94
+ };
95
+ }
96
+ if (matches.length === 1)
97
+ return { id: matches[0].id };
98
+ const existing = folders.map((node) => normaliseFolderPath(node.path));
99
+ return {
100
+ error: `Error: no folder at "${wanted}". ` +
101
+ (existing.length
102
+ ? `Existing folders: ${existing.join(", ")}. Create one with create_wiki_folder, or omit the path to work at the root.`
103
+ : "This wiki has no folders yet — omit the path to work at the root."),
104
+ };
105
+ }
106
+ /**
107
+ * `resolveFolderPath` against the workspace's current tree, which every write
108
+ * tool needs before it can place anything. Returns the tree too: the caller
109
+ * that moves a node needs it again to append rather than prepend.
110
+ */
111
+ export async function lookUpFolder(workspaceSlug, path) {
112
+ const tree = await fetchTree(workspaceSlug);
113
+ return { tree, ...resolveFolderPath(tree, path) };
114
+ }
115
+ /**
116
+ * The node a move should land AFTER: the destination's last child.
117
+ *
118
+ * Omitting it means "first" to the server's placement, which would take the top
119
+ * slot of the destination and push down an order the team set by hand. Monnet's
120
+ * own move tool computes the same value for the same reason (`_last_sibling_id`
121
+ * in the backend's wiki tool handlers) — an agent move appends.
122
+ */
123
+ export function lastChildId(nodes, destinationId, movingId) {
124
+ const siblings = destinationId === null
125
+ ? nodes
126
+ : flatten(nodes).find((node) => node.id === destinationId)?.children ?? [];
127
+ const candidates = siblings.filter((node) => node.id !== movingId);
128
+ return candidates.length ? candidates[candidates.length - 1].id : null;
129
+ }
130
+ /** Every wiki tool is scoped to one workspace, and validates it the same way. */
131
+ export const WorkspaceOnlyArgs = z.object({ workspace_slug: z.string().min(1) });
132
+ //# sourceMappingURL=_common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_common.js","sourceRoot":"","sources":["../../../src/tools/wiki/_common.ts"],"names":[],"mappings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AACzE,CAAC;AAGD,iFAAiF;AACjF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The company-brain surface, as one registration list.
3
+ *
4
+ * `index.ts` spreads these rather than importing thirteen names, so adding a
5
+ * wiki tool is one entry here instead of three edits in the server file.
6
+ */
7
+ export declare const WIKI_TOOLS: {
8
+ name: string;
9
+ description: string;
10
+ inputSchema: {
11
+ type: "object";
12
+ properties: {
13
+ workspace_slug: {
14
+ type: "string";
15
+ description: string;
16
+ };
17
+ };
18
+ required: string[];
19
+ };
20
+ }[];
21
+ export declare const WIKI_HANDLERS: Record<string, (args: unknown) => Promise<string>>;
@@ -0,0 +1,48 @@
1
+ /**
2
+ * The company-brain surface, as one registration list.
3
+ *
4
+ * `index.ts` spreads these rather than importing thirteen names, so adding a
5
+ * wiki tool is one entry here instead of three edits in the server file.
6
+ */
7
+ import { GET_WIKI_SCHEMA_TOOL_DEFINITION, GET_WIKI_TREE_TOOL_DEFINITION, READ_WIKI_PAGE_TOOL_DEFINITION, SEARCH_WIKI_TOOL_DEFINITION, handleGetWikiSchema, handleGetWikiTree, handleReadWikiPage, handleSearchWiki, } from "./read.js";
8
+ import { CREATE_WIKI_FOLDER_TOOL_DEFINITION, CREATE_WIKI_PAGE_TOOL_DEFINITION, DELETE_WIKI_FOLDER_TOOL_DEFINITION, DELETE_WIKI_PAGE_TOOL_DEFINITION, EDIT_WIKI_PAGE_TOOL_DEFINITION, MOVE_WIKI_NODE_TOOL_DEFINITION, RENAME_WIKI_FOLDER_TOOL_DEFINITION, handleCreateWikiFolder, handleCreateWikiPage, handleDeleteWikiFolder, handleDeleteWikiPage, handleEditWikiPage, handleMoveWikiNode, handleRenameWikiFolder, } from "./write.js";
9
+ import { DELETE_WIKI_SOURCE_TOOL_DEFINITION, LIST_WIKI_SOURCES_TOOL_DEFINITION, MARK_WIKI_SOURCE_INGESTED_TOOL_DEFINITION, PUSH_WIKI_SOURCE_TOOL_DEFINITION, READ_WIKI_SOURCE_TOOL_DEFINITION, REQUEUE_WIKI_SOURCE_TOOL_DEFINITION, handleDeleteWikiSource, handleListWikiSources, handleMarkWikiSourceIngested, handlePushWikiSource, handleReadWikiSource, handleRequeueWikiSource, } from "./sources.js";
10
+ export const WIKI_TOOLS = [
11
+ GET_WIKI_SCHEMA_TOOL_DEFINITION,
12
+ GET_WIKI_TREE_TOOL_DEFINITION,
13
+ READ_WIKI_PAGE_TOOL_DEFINITION,
14
+ SEARCH_WIKI_TOOL_DEFINITION,
15
+ CREATE_WIKI_PAGE_TOOL_DEFINITION,
16
+ EDIT_WIKI_PAGE_TOOL_DEFINITION,
17
+ DELETE_WIKI_PAGE_TOOL_DEFINITION,
18
+ CREATE_WIKI_FOLDER_TOOL_DEFINITION,
19
+ RENAME_WIKI_FOLDER_TOOL_DEFINITION,
20
+ DELETE_WIKI_FOLDER_TOOL_DEFINITION,
21
+ MOVE_WIKI_NODE_TOOL_DEFINITION,
22
+ LIST_WIKI_SOURCES_TOOL_DEFINITION,
23
+ READ_WIKI_SOURCE_TOOL_DEFINITION,
24
+ PUSH_WIKI_SOURCE_TOOL_DEFINITION,
25
+ MARK_WIKI_SOURCE_INGESTED_TOOL_DEFINITION,
26
+ REQUEUE_WIKI_SOURCE_TOOL_DEFINITION,
27
+ DELETE_WIKI_SOURCE_TOOL_DEFINITION,
28
+ ];
29
+ export const WIKI_HANDLERS = {
30
+ get_wiki_schema: handleGetWikiSchema,
31
+ get_wiki_tree: handleGetWikiTree,
32
+ read_wiki_page: handleReadWikiPage,
33
+ search_wiki: handleSearchWiki,
34
+ create_wiki_page: handleCreateWikiPage,
35
+ edit_wiki_page: handleEditWikiPage,
36
+ delete_wiki_page: handleDeleteWikiPage,
37
+ create_wiki_folder: handleCreateWikiFolder,
38
+ rename_wiki_folder: handleRenameWikiFolder,
39
+ delete_wiki_folder: handleDeleteWikiFolder,
40
+ move_wiki_node: handleMoveWikiNode,
41
+ list_wiki_sources: handleListWikiSources,
42
+ read_wiki_source: handleReadWikiSource,
43
+ push_wiki_source: handlePushWikiSource,
44
+ mark_wiki_source_ingested: handleMarkWikiSourceIngested,
45
+ requeue_wiki_source: handleRequeueWikiSource,
46
+ delete_wiki_source: handleDeleteWikiSource,
47
+ };
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/wiki/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,+BAA+B,EAC/B,6BAA6B,EAC7B,8BAA8B,EAC9B,2BAA2B,EAC3B,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,kCAAkC,EAClC,gCAAgC,EAChC,kCAAkC,EAClC,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,kCAAkC,EAClC,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,GACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,kCAAkC,EAClC,iCAAiC,EACjC,yCAAyC,EACzC,gCAAgC,EAChC,gCAAgC,EAChC,mCAAmC,EACnC,sBAAsB,EACtB,qBAAqB,EACrB,4BAA4B,EAC5B,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,GACxB,MAAM,cAAc,CAAC;AAEtB,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,+BAA+B;IAC/B,6BAA6B;IAC7B,8BAA8B;IAC9B,2BAA2B;IAC3B,gCAAgC;IAChC,8BAA8B;IAC9B,gCAAgC;IAChC,kCAAkC;IAClC,kCAAkC;IAClC,kCAAkC;IAClC,8BAA8B;IAC9B,iCAAiC;IACjC,gCAAgC;IAChC,gCAAgC;IAChC,yCAAyC;IACzC,mCAAmC;IACnC,kCAAkC;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAuD;IAC/E,eAAe,EAAE,mBAAmB;IACpC,aAAa,EAAE,iBAAiB;IAChC,cAAc,EAAE,kBAAkB;IAClC,WAAW,EAAE,gBAAgB;IAC7B,gBAAgB,EAAE,oBAAoB;IACtC,cAAc,EAAE,kBAAkB;IAClC,gBAAgB,EAAE,oBAAoB;IACtC,kBAAkB,EAAE,sBAAsB;IAC1C,kBAAkB,EAAE,sBAAsB;IAC1C,kBAAkB,EAAE,sBAAsB;IAC1C,cAAc,EAAE,kBAAkB;IAClC,iBAAiB,EAAE,qBAAqB;IACxC,gBAAgB,EAAE,oBAAoB;IACtC,gBAAgB,EAAE,oBAAoB;IACtC,yBAAyB,EAAE,4BAA4B;IACvD,mBAAmB,EAAE,uBAAuB;IAC5C,kBAAkB,EAAE,sBAAsB;CAC3C,CAAC"}
@@ -0,0 +1,68 @@
1
+ export declare function handleGetWikiSchema(args: unknown): Promise<string>;
2
+ export declare const GET_WIKI_SCHEMA_TOOL_DEFINITION: {
3
+ name: string;
4
+ description: string;
5
+ inputSchema: {
6
+ type: "object";
7
+ properties: {
8
+ workspace_slug: {
9
+ type: "string";
10
+ description: string;
11
+ };
12
+ };
13
+ required: string[];
14
+ };
15
+ };
16
+ export declare function handleGetWikiTree(args: unknown): Promise<string>;
17
+ export declare const GET_WIKI_TREE_TOOL_DEFINITION: {
18
+ name: string;
19
+ description: string;
20
+ inputSchema: {
21
+ type: "object";
22
+ properties: {
23
+ workspace_slug: {
24
+ type: "string";
25
+ description: string;
26
+ };
27
+ };
28
+ required: string[];
29
+ };
30
+ };
31
+ export declare function handleReadWikiPage(args: unknown): Promise<string>;
32
+ export declare const READ_WIKI_PAGE_TOOL_DEFINITION: {
33
+ name: string;
34
+ description: string;
35
+ inputSchema: {
36
+ type: "object";
37
+ properties: {
38
+ workspace_slug: {
39
+ type: "string";
40
+ description: string;
41
+ };
42
+ page_id: {
43
+ type: "string";
44
+ description: string;
45
+ };
46
+ };
47
+ required: string[];
48
+ };
49
+ };
50
+ export declare function handleSearchWiki(args: unknown): Promise<string>;
51
+ export declare const SEARCH_WIKI_TOOL_DEFINITION: {
52
+ name: string;
53
+ description: string;
54
+ inputSchema: {
55
+ type: "object";
56
+ properties: {
57
+ workspace_slug: {
58
+ type: "string";
59
+ description: string;
60
+ };
61
+ query: {
62
+ type: string;
63
+ description: string;
64
+ };
65
+ };
66
+ required: string[];
67
+ };
68
+ };