@lovelybunch/mcp 1.0.76-alpha.8 → 1.0.76

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 (46) hide show
  1. package/dist/agents-context-tool.d.ts +7 -0
  2. package/dist/agents-context-tool.d.ts.map +1 -0
  3. package/dist/agents-context-tool.js +32 -0
  4. package/dist/agents-context-tool.js.map +1 -0
  5. package/dist/connectors-tool.d.ts +6 -0
  6. package/dist/connectors-tool.d.ts.map +1 -0
  7. package/dist/connectors-tool.js +60 -0
  8. package/dist/connectors-tool.js.map +1 -0
  9. package/dist/index.d.ts +4 -2
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/index.js +4 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/knowledge-tool.d.ts.map +1 -1
  14. package/dist/knowledge-tool.js +5 -2
  15. package/dist/knowledge-tool.js.map +1 -1
  16. package/dist/memory-context-tool.d.ts +7 -0
  17. package/dist/memory-context-tool.d.ts.map +1 -0
  18. package/dist/memory-context-tool.js +32 -0
  19. package/dist/memory-context-tool.js.map +1 -0
  20. package/dist/resources-tool.js +1 -1
  21. package/dist/resources-tool.js.map +1 -1
  22. package/dist/team-context-tool.d.ts +7 -0
  23. package/dist/team-context-tool.d.ts.map +1 -0
  24. package/dist/team-context-tool.js +32 -0
  25. package/dist/team-context-tool.js.map +1 -0
  26. package/package.json +3 -3
  27. package/src/{project-context-tool.ts → agents-context-tool.ts} +5 -10
  28. package/src/connectors-tool.ts +65 -0
  29. package/src/index.ts +4 -2
  30. package/src/knowledge-tool.test.ts +14 -0
  31. package/src/knowledge-tool.ts +8 -2
  32. package/src/{architecture-context-tool.ts → memory-context-tool.ts} +5 -10
  33. package/src/resources-tool.ts +1 -1
  34. package/src/team-context-tool.ts +34 -0
  35. package/dist/fetch-tool.d.ts +0 -53
  36. package/dist/fetch-tool.d.ts.map +0 -1
  37. package/dist/fetch-tool.js +0 -87
  38. package/dist/fetch-tool.js.map +0 -1
  39. package/dist/proposals-tool.d.ts +0 -26
  40. package/dist/proposals-tool.d.ts.map +0 -1
  41. package/dist/proposals-tool.js +0 -286
  42. package/dist/proposals-tool.js.map +0 -1
  43. package/dist/url-reader-tool.d.ts +0 -7
  44. package/dist/url-reader-tool.d.ts.map +0 -1
  45. package/dist/url-reader-tool.js +0 -24
  46. package/dist/url-reader-tool.js.map +0 -1
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Agents Context tool for MCP - READ + WRITE
3
+ * Allows the AI assistant to read and update the agents definition document (.nut/context/agents.md)
4
+ */
5
+ import type { MCPTool } from './tasks-tool.js';
6
+ export declare const agentsContextTool: MCPTool;
7
+ //# sourceMappingURL=agents-context-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents-context-tool.d.ts","sourceRoot":"","sources":["../src/agents-context-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C,eAAO,MAAM,iBAAiB,EAAE,OA0B/B,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Agents Context tool for MCP - READ + WRITE
3
+ * Allows the AI assistant to read and update the agents definition document (.nut/context/agents.md)
4
+ */
5
+ export const agentsContextTool = {
6
+ name: "agents_context",
7
+ description: "Read or update the agents definition document (.nut/context/agents.md). This document defines the AI agents available to the project — their capabilities, configurations, and usage guidelines. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users define their agents, ask about agent roles, capabilities, constraints, and how they should collaborate.",
8
+ parameters: {
9
+ type: "object",
10
+ properties: {
11
+ operation: {
12
+ type: "string",
13
+ enum: ["get", "append", "replace_section", "update"],
14
+ description: "Operation: 'get' to read, 'append' to add at end, 'replace_section' to find-and-replace specific text (PREFERRED for edits), 'update' to replace entire document (only for new/small docs)"
15
+ },
16
+ content: {
17
+ type: "string",
18
+ description: "For append: the new section to add. For update: the complete document content. Not used for get/replace_section."
19
+ },
20
+ old_text: {
21
+ type: "string",
22
+ description: "For replace_section: the exact text to find and replace (must match exactly, including whitespace)"
23
+ },
24
+ new_text: {
25
+ type: "string",
26
+ description: "For replace_section: the new text to replace old_text with"
27
+ }
28
+ },
29
+ required: ["operation"]
30
+ }
31
+ };
32
+ //# sourceMappingURL=agents-context-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents-context-tool.js","sourceRoot":"","sources":["../src/agents-context-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAAY;IACxC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,yfAAyf;IACtgB,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,CAAC;gBACpD,WAAW,EAAE,4LAA4L;aAC1M;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kHAAkH;aAChI;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oGAAoG;aAClH;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4DAA4D;aAC1E;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACF,CAAA"}
@@ -0,0 +1,6 @@
1
+ import type { MCPTool } from './tasks-tool.js';
2
+ export declare const CONNECTOR_BASE_URL_MAP: Record<string, string>;
3
+ export declare function resolveConnectorUrl(app: string, path: string): string | null;
4
+ export declare const listConnectorsTool: MCPTool;
5
+ export declare const connectorRequestTool: MCPTool;
6
+ //# sourceMappingURL=connectors-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectors-tool.d.ts","sourceRoot":"","sources":["../src/connectors-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOzD,CAAA;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAU5E;AAED,eAAO,MAAM,kBAAkB,EAAE,OAQhC,CAAA;AAED,eAAO,MAAM,oBAAoB,EAAE,OA+BlC,CAAA"}
@@ -0,0 +1,60 @@
1
+ export const CONNECTOR_BASE_URL_MAP = {
2
+ google_drive: 'https://www.googleapis.com',
3
+ hubspot: 'https://api.hubapi.com',
4
+ slack: 'https://slack.com',
5
+ notion: 'https://api.notion.com',
6
+ github: 'https://api.github.com',
7
+ stripe: 'https://api.stripe.com',
8
+ };
9
+ export function resolveConnectorUrl(app, path) {
10
+ if (path.startsWith('https://') || path.startsWith('http://')) {
11
+ return path;
12
+ }
13
+ const baseUrl = CONNECTOR_BASE_URL_MAP[app];
14
+ if (!baseUrl)
15
+ return null;
16
+ const separator = path.startsWith('/') ? '' : '/';
17
+ return `${baseUrl}${separator}${path}`;
18
+ }
19
+ export const listConnectorsTool = {
20
+ name: 'list_connectors',
21
+ description: 'List all third-party services connected to the Coconut control plane (e.g. Google Drive, Slack, GitHub, HubSpot, Stripe). Returns each service\'s app slug, name, and connection status.',
22
+ parameters: {
23
+ type: 'object',
24
+ properties: {},
25
+ additionalProperties: false
26
+ }
27
+ };
28
+ export const connectorRequestTool = {
29
+ name: 'connector_request',
30
+ description: 'Make an authenticated API request to a connected third-party service through the Coconut control plane proxy. The control plane injects OAuth/API credentials automatically — you only specify the app, method, and path.',
31
+ parameters: {
32
+ type: 'object',
33
+ properties: {
34
+ app: {
35
+ type: 'string',
36
+ description: 'App slug as returned by list_connectors (e.g. "google_drive", "slack", "hubspot", "stripe", "github")'
37
+ },
38
+ method: {
39
+ type: 'string',
40
+ enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
41
+ description: 'HTTP method for the request'
42
+ },
43
+ path: {
44
+ type: 'string',
45
+ description: 'API path relative to the service (e.g. "/drive/v3/files?pageSize=5") or a full URL for unsupported apps'
46
+ },
47
+ body: {
48
+ type: 'string',
49
+ description: 'JSON request body (for POST/PUT/PATCH requests)'
50
+ },
51
+ headers: {
52
+ type: 'string',
53
+ description: 'Additional headers as a JSON string (e.g. \'{"Accept": "application/json"}\')'
54
+ }
55
+ },
56
+ required: ['app', 'method', 'path'],
57
+ additionalProperties: false
58
+ }
59
+ };
60
+ //# sourceMappingURL=connectors-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectors-tool.js","sourceRoot":"","sources":["../src/connectors-tool.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAA2B;IAC5D,YAAY,EAAE,4BAA4B;IAC1C,OAAO,EAAE,wBAAwB;IACjC,KAAK,EAAE,mBAAmB;IAC1B,MAAM,EAAE,wBAAwB;IAChC,MAAM,EAAE,wBAAwB;IAChC,MAAM,EAAE,wBAAwB;CACjC,CAAA;AAED,MAAM,UAAU,mBAAmB,CAAC,GAAW,EAAE,IAAY;IAC3D,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9D,OAAO,IAAI,CAAA;IACb,CAAC;IAED,MAAM,OAAO,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAA;IAC3C,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IAEzB,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAA;IACjD,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,EAAE,CAAA;AACxC,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAY;IACzC,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,0LAA0L;IACvM,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,EAAE;QACd,oBAAoB,EAAE,KAAK;KAC5B;CACF,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAY;IAC3C,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE,2NAA2N;IACxO,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uGAAuG;aACrH;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAC;gBAC/C,WAAW,EAAE,6BAA6B;aAC3C;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yGAAyG;aACvH;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iDAAiD;aAC/D;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+EAA+E;aAC7F;SACF;QACD,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,CAAC;QACnC,oBAAoB,EAAE,KAAK;KAC5B;CACF,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  export { tasksTool, tasksReadOnlyTool, tasksFullTool, listTasksTool, validateTaskData, createToolCall } from './tasks-tool.js';
2
2
  export { eventsTool } from './events-tool.js';
3
- export { projectContextTool } from './project-context-tool.js';
4
- export { architectureContextTool } from './architecture-context-tool.js';
3
+ export { agentsContextTool } from './agents-context-tool.js';
4
+ export { teamContextTool } from './team-context-tool.js';
5
+ export { memoryContextTool } from './memory-context-tool.js';
5
6
  export { roleContextTool } from './role-context-tool.js';
6
7
  export { knowledgeTool, createKnowledgeToolCall, normalizeKnowledgeMetadata, buildKnowledgeActionPayload } from './knowledge-tool.js';
7
8
  export type { KnowledgeActionPayload, KnowledgeActionType, KnowledgeDocument, KnowledgeDocumentMetadata } from './knowledge-tool.js';
8
9
  export { resourcesTool } from './resources-tool.js';
10
+ export { listConnectorsTool, connectorRequestTool, resolveConnectorUrl, CONNECTOR_BASE_URL_MAP } from './connectors-tool.js';
9
11
  export type { MCPTool, MCPToolCall } from './tasks-tool.js';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC9H,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC9H,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,qBAAqB,CAAA;AAC5B,YAAY,EACV,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAC5H,YAAY,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA"}
package/dist/index.js CHANGED
@@ -1,8 +1,10 @@
1
1
  export { tasksTool, tasksReadOnlyTool, tasksFullTool, listTasksTool, validateTaskData, createToolCall } from './tasks-tool.js';
2
2
  export { eventsTool } from './events-tool.js';
3
- export { projectContextTool } from './project-context-tool.js';
4
- export { architectureContextTool } from './architecture-context-tool.js';
3
+ export { agentsContextTool } from './agents-context-tool.js';
4
+ export { teamContextTool } from './team-context-tool.js';
5
+ export { memoryContextTool } from './memory-context-tool.js';
5
6
  export { roleContextTool } from './role-context-tool.js';
6
7
  export { knowledgeTool, createKnowledgeToolCall, normalizeKnowledgeMetadata, buildKnowledgeActionPayload } from './knowledge-tool.js';
7
8
  export { resourcesTool } from './resources-tool.js';
9
+ export { listConnectorsTool, connectorRequestTool, resolveConnectorUrl, CONNECTOR_BASE_URL_MAP } from './connectors-tool.js';
8
10
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC9H,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,qBAAqB,CAAA;AAO5B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC9H,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EACL,aAAa,EACb,uBAAuB,EACvB,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,qBAAqB,CAAA;AAO5B,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACnD,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,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AQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,yBAAyB,CAAA;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,yBAAyB,CAAA;IACnC,OAAO,EAAE,MAAM,CAAA;CAChB;AA2BD,eAAO,MAAM,aAAa,EAAE,OAoC3B,CAAA;AAED,wBAAgB,uBAAuB,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW,CAQrG;AAQD,wBAAgB,0BAA0B,CAAC,QAAQ,CAAC,EAAE,yBAAyB,GAAG,IAAI,GAAG,yBAAyB,CAWjH;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,sBAAsB,GAAG,sBAAsB,CAMjG"}
@@ -68,9 +68,11 @@ export function createKnowledgeToolCall(operation, args) {
68
68
  }
69
69
  };
70
70
  }
71
+ function stripUndefined(obj) {
72
+ return Object.fromEntries(Object.entries(obj).filter(([, v]) => v !== undefined));
73
+ }
71
74
  export function normalizeKnowledgeMetadata(metadata) {
72
- // Note: 'updated' is now derived from file mtime at read time, not set here
73
- return {
75
+ const raw = {
74
76
  type: 'knowledge',
75
77
  updated: '', // Placeholder - will be overwritten with file mtime when reading
76
78
  ...metadata,
@@ -79,6 +81,7 @@ export function normalizeKnowledgeMetadata(metadata) {
79
81
  related: metadata?.related ? [...metadata.related] : [],
80
82
  audience: metadata?.audience ? [...metadata.audience] : []
81
83
  };
84
+ return stripUndefined(raw);
82
85
  }
83
86
  export function buildKnowledgeActionPayload(input) {
84
87
  const metadata = input.metadata ? normalizeKnowledgeMetadata(input.metadata) : undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"knowledge-tool.js","sourceRoot":"","sources":["../src/knowledge-tool.ts"],"names":[],"mappings":"AAuCA,MAAM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AAQ,CAAC,CAAC,CAAC,0BAA0B,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACxF,OAAO;QACL,GAAG,KAAK;QACR,QAAQ;KACT,CAAA;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Memory Context tool for MCP - READ + WRITE
3
+ * Allows the AI assistant to read and update the memory document (.nut/context/memory.md)
4
+ */
5
+ import type { MCPTool } from './tasks-tool.js';
6
+ export declare const memoryContextTool: MCPTool;
7
+ //# sourceMappingURL=memory-context-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-context-tool.d.ts","sourceRoot":"","sources":["../src/memory-context-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C,eAAO,MAAM,iBAAiB,EAAE,OA0B/B,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Memory Context tool for MCP - READ + WRITE
3
+ * Allows the AI assistant to read and update the memory document (.nut/context/memory.md)
4
+ */
5
+ export const memoryContextTool = {
6
+ name: "memory_context",
7
+ description: "Read or update the memory document (.nut/context/memory.md). This document stores persistent notes, decisions, preferences, and learned context that should be remembered across conversations. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users manage memory, ask about key decisions, user preferences, recurring patterns, and important context to retain.",
8
+ parameters: {
9
+ type: "object",
10
+ properties: {
11
+ operation: {
12
+ type: "string",
13
+ enum: ["get", "append", "replace_section", "update"],
14
+ description: "Operation: 'get' to read, 'append' to add at end, 'replace_section' to find-and-replace specific text (PREFERRED for edits), 'update' to replace entire document (only for new/small docs)"
15
+ },
16
+ content: {
17
+ type: "string",
18
+ description: "For append: the new section to add. For update: the complete document content. Not used for get/replace_section."
19
+ },
20
+ old_text: {
21
+ type: "string",
22
+ description: "For replace_section: the exact text to find and replace (must match exactly, including whitespace)"
23
+ },
24
+ new_text: {
25
+ type: "string",
26
+ description: "For replace_section: the new text to replace old_text with"
27
+ }
28
+ },
29
+ required: ["operation"]
30
+ }
31
+ };
32
+ //# sourceMappingURL=memory-context-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-context-tool.js","sourceRoot":"","sources":["../src/memory-context-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,MAAM,iBAAiB,GAAY;IACxC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,+fAA+f;IAC5gB,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,CAAC;gBACpD,WAAW,EAAE,4LAA4L;aAC1M;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kHAAkH;aAChI;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oGAAoG;aAClH;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4DAA4D;aAC1E;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACF,CAAA"}
@@ -29,7 +29,7 @@ export const resourcesTool = {
29
29
  },
30
30
  model: {
31
31
  type: 'string',
32
- enum: ['nano-banana-pro', 'flux-2-dev', 'flux-2-pro', 'gpt-image-1.5'],
32
+ enum: ['nano-banana-pro', 'nano-banana-2', 'flux-2-dev', 'flux-2-pro', 'gpt-image-1.5'],
33
33
  description: 'AI model for image generation. Default: nano-banana-pro. Use gpt-image-1.5 for transparent backgrounds.'
34
34
  },
35
35
  aspect_ratio: {
@@ -1 +1 @@
1
- {"version":3,"file":"resources-tool.js","sourceRoot":"","sources":["../src/resources-tool.ts"],"names":[],"mappings":"AAE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IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oHAAoH;aAClI;YACD,wBAAwB;YACxB,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gDAAgD;aAC9D;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gEAAgE;aAC9E;YACD,2CAA2C;YAC3C,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6CAA6C;aAC3D;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qDAAqD;aACnE;YACD,sBAAsB;YACtB,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wCAAwC;aACtD;YACD,kBAAkB;YAClB,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uCAAuC;aACrD;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;QACvB,oBAAoB,EAAE,KAAK;KAC5B;CACF,CAAA"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Team Context tool for MCP - READ + WRITE
3
+ * Allows the AI assistant to read and update the team definition document (.nut/context/team.md)
4
+ */
5
+ import type { MCPTool } from './tasks-tool.js';
6
+ export declare const teamContextTool: MCPTool;
7
+ //# sourceMappingURL=team-context-tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team-context-tool.d.ts","sourceRoot":"","sources":["../src/team-context-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAE9C,eAAO,MAAM,eAAe,EAAE,OA0B7B,CAAA"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Team Context tool for MCP - READ + WRITE
3
+ * Allows the AI assistant to read and update the team definition document (.nut/context/team.md)
4
+ */
5
+ export const teamContextTool = {
6
+ name: "team_context",
7
+ description: "Read or update the team definition document (.nut/context/team.md). This document captures team members, their roles, responsibilities, and contact information. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users define their team, ask about team structure, individual roles, areas of ownership, and communication preferences.",
8
+ parameters: {
9
+ type: "object",
10
+ properties: {
11
+ operation: {
12
+ type: "string",
13
+ enum: ["get", "append", "replace_section", "update"],
14
+ description: "Operation: 'get' to read, 'append' to add at end, 'replace_section' to find-and-replace specific text (PREFERRED for edits), 'update' to replace entire document (only for new/small docs)"
15
+ },
16
+ content: {
17
+ type: "string",
18
+ description: "For append: the new section to add. For update: the complete document content. Not used for get/replace_section."
19
+ },
20
+ old_text: {
21
+ type: "string",
22
+ description: "For replace_section: the exact text to find and replace (must match exactly, including whitespace)"
23
+ },
24
+ new_text: {
25
+ type: "string",
26
+ description: "For replace_section: the new text to replace old_text with"
27
+ }
28
+ },
29
+ required: ["operation"]
30
+ }
31
+ };
32
+ //# sourceMappingURL=team-context-tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"team-context-tool.js","sourceRoot":"","sources":["../src/team-context-tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,CAAC,MAAM,eAAe,GAAY;IACtC,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,meAAme;IAChf,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,QAAQ,CAAC;gBACpD,WAAW,EAAE,4LAA4L;aAC1M;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kHAAkH;aAChI;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oGAAoG;aAClH;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4DAA4D;aAC1E;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACF,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovelybunch/mcp",
3
- "version": "1.0.76-alpha.8",
3
+ "version": "1.0.76",
4
4
  "description": "MCP tools for Coconut",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -14,8 +14,8 @@
14
14
  "test:ui": "vitest --ui"
15
15
  },
16
16
  "dependencies": {
17
- "@lovelybunch/core": "^1.0.76-alpha.8",
18
- "@lovelybunch/types": "^1.0.76-alpha.8",
17
+ "@lovelybunch/core": "^1.0.76",
18
+ "@lovelybunch/types": "^1.0.76",
19
19
  "hono": "^4.0.0"
20
20
  },
21
21
  "devDependencies": {
@@ -1,17 +1,13 @@
1
1
  /**
2
- * Project Context tool for MCP - READ + WRITE
3
- * Allows the AI assistant to read and update the project definition document (.nut/context/project.md)
2
+ * Agents Context tool for MCP - READ + WRITE
3
+ * Allows the AI assistant to read and update the agents definition document (.nut/context/agents.md)
4
4
  */
5
5
 
6
6
  import type { MCPTool } from './tasks-tool.js'
7
7
 
8
- /**
9
- * Project context tool for AI assistant.
10
- * Read and update the core project definition document.
11
- */
12
- export const projectContextTool: MCPTool = {
13
- name: "project_context",
14
- description: "Read or update the project definition document (.nut/context/project.md). This document captures what the project is about - its goals, metrics, stakeholders, and roadmap. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users define their project, ask discovery questions about what they're building, who it's for, and what success looks like.",
8
+ export const agentsContextTool: MCPTool = {
9
+ name: "agents_context",
10
+ description: "Read or update the agents definition document (.nut/context/agents.md). This document defines the AI agents available to the project their capabilities, configurations, and usage guidelines. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users define their agents, ask about agent roles, capabilities, constraints, and how they should collaborate.",
15
11
  parameters: {
16
12
  type: "object",
17
13
  properties: {
@@ -36,4 +32,3 @@ export const projectContextTool: MCPTool = {
36
32
  required: ["operation"]
37
33
  }
38
34
  }
39
-
@@ -0,0 +1,65 @@
1
+ import type { MCPTool } from './tasks-tool.js'
2
+
3
+ export const CONNECTOR_BASE_URL_MAP: Record<string, string> = {
4
+ google_drive: 'https://www.googleapis.com',
5
+ hubspot: 'https://api.hubapi.com',
6
+ slack: 'https://slack.com',
7
+ notion: 'https://api.notion.com',
8
+ github: 'https://api.github.com',
9
+ stripe: 'https://api.stripe.com',
10
+ }
11
+
12
+ export function resolveConnectorUrl(app: string, path: string): string | null {
13
+ if (path.startsWith('https://') || path.startsWith('http://')) {
14
+ return path
15
+ }
16
+
17
+ const baseUrl = CONNECTOR_BASE_URL_MAP[app]
18
+ if (!baseUrl) return null
19
+
20
+ const separator = path.startsWith('/') ? '' : '/'
21
+ return `${baseUrl}${separator}${path}`
22
+ }
23
+
24
+ export const listConnectorsTool: MCPTool = {
25
+ name: 'list_connectors',
26
+ description: 'List all third-party services connected to the Coconut control plane (e.g. Google Drive, Slack, GitHub, HubSpot, Stripe). Returns each service\'s app slug, name, and connection status.',
27
+ parameters: {
28
+ type: 'object',
29
+ properties: {},
30
+ additionalProperties: false
31
+ }
32
+ }
33
+
34
+ export const connectorRequestTool: MCPTool = {
35
+ name: 'connector_request',
36
+ description: 'Make an authenticated API request to a connected third-party service through the Coconut control plane proxy. The control plane injects OAuth/API credentials automatically — you only specify the app, method, and path.',
37
+ parameters: {
38
+ type: 'object',
39
+ properties: {
40
+ app: {
41
+ type: 'string',
42
+ description: 'App slug as returned by list_connectors (e.g. "google_drive", "slack", "hubspot", "stripe", "github")'
43
+ },
44
+ method: {
45
+ type: 'string',
46
+ enum: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
47
+ description: 'HTTP method for the request'
48
+ },
49
+ path: {
50
+ type: 'string',
51
+ description: 'API path relative to the service (e.g. "/drive/v3/files?pageSize=5") or a full URL for unsupported apps'
52
+ },
53
+ body: {
54
+ type: 'string',
55
+ description: 'JSON request body (for POST/PUT/PATCH requests)'
56
+ },
57
+ headers: {
58
+ type: 'string',
59
+ description: 'Additional headers as a JSON string (e.g. \'{"Accept": "application/json"}\')'
60
+ }
61
+ },
62
+ required: ['app', 'method', 'path'],
63
+ additionalProperties: false
64
+ }
65
+ }
package/src/index.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { tasksTool, tasksReadOnlyTool, tasksFullTool, listTasksTool, validateTaskData, createToolCall } from './tasks-tool.js'
2
2
  export { eventsTool } from './events-tool.js'
3
- export { projectContextTool } from './project-context-tool.js'
4
- export { architectureContextTool } from './architecture-context-tool.js'
3
+ export { agentsContextTool } from './agents-context-tool.js'
4
+ export { teamContextTool } from './team-context-tool.js'
5
+ export { memoryContextTool } from './memory-context-tool.js'
5
6
  export { roleContextTool } from './role-context-tool.js'
6
7
  export {
7
8
  knowledgeTool,
@@ -16,4 +17,5 @@ export type {
16
17
  KnowledgeDocumentMetadata
17
18
  } from './knowledge-tool.js'
18
19
  export { resourcesTool } from './resources-tool.js'
20
+ export { listConnectorsTool, connectorRequestTool, resolveConnectorUrl, CONNECTOR_BASE_URL_MAP } from './connectors-tool.js'
19
21
  export type { MCPTool, MCPToolCall } from './tasks-tool.js'
@@ -77,6 +77,20 @@ describe('normalizeKnowledgeMetadata', () => {
77
77
  expect(result.category).toBe('guides');
78
78
  expect(result.status).toBe('active');
79
79
  });
80
+
81
+ it('should strip undefined values so gray-matter/js-yaml can serialize', () => {
82
+ const result = normalizeKnowledgeMetadata({
83
+ version: '1.0',
84
+ summary: undefined,
85
+ category: undefined,
86
+ owner: undefined,
87
+ status: undefined,
88
+ tags: ['a'],
89
+ } as any);
90
+ expect(result.tags).toEqual(['a']);
91
+ expect(result.type).toBe('knowledge');
92
+ expect(Object.values(result).every(v => v !== undefined)).toBe(true);
93
+ });
80
94
  });
81
95
 
82
96
  describe('buildKnowledgeActionPayload', () => {
@@ -110,9 +110,14 @@ export function createKnowledgeToolCall(operation: string, args: Record<string,
110
110
  }
111
111
  }
112
112
 
113
+ function stripUndefined<T extends Record<string, unknown>>(obj: T): T {
114
+ return Object.fromEntries(
115
+ Object.entries(obj).filter(([, v]) => v !== undefined)
116
+ ) as T
117
+ }
118
+
113
119
  export function normalizeKnowledgeMetadata(metadata?: KnowledgeDocumentMetadata | null): KnowledgeDocumentMetadata {
114
- // Note: 'updated' is now derived from file mtime at read time, not set here
115
- return {
120
+ const raw: KnowledgeDocumentMetadata = {
116
121
  type: 'knowledge',
117
122
  updated: '', // Placeholder - will be overwritten with file mtime when reading
118
123
  ...metadata,
@@ -121,6 +126,7 @@ export function normalizeKnowledgeMetadata(metadata?: KnowledgeDocumentMetadata
121
126
  related: metadata?.related ? [...metadata.related] : [],
122
127
  audience: metadata?.audience ? [...metadata.audience] : []
123
128
  }
129
+ return stripUndefined(raw)
124
130
  }
125
131
 
126
132
  export function buildKnowledgeActionPayload(input: KnowledgeActionPayload): KnowledgeActionPayload {
@@ -1,17 +1,13 @@
1
1
  /**
2
- * Architecture Context tool for MCP - READ + WRITE
3
- * Allows the AI assistant to read and update the architecture document (.nut/context/architecture.md)
2
+ * Memory Context tool for MCP - READ + WRITE
3
+ * Allows the AI assistant to read and update the memory document (.nut/context/memory.md)
4
4
  */
5
5
 
6
6
  import type { MCPTool } from './tasks-tool.js'
7
7
 
8
- /**
9
- * Architecture context tool for AI assistant.
10
- * Read and update the core architecture document.
11
- */
12
- export const architectureContextTool: MCPTool = {
13
- name: "architecture_context",
14
- description: "Read or update the architecture document (.nut/context/architecture.md). This document captures the technical foundation - stack, conventions, systems, and integration points. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users define their architecture, ask about their tech stack, coding conventions, deployment strategy, and system boundaries.",
8
+ export const memoryContextTool: MCPTool = {
9
+ name: "memory_context",
10
+ description: "Read or update the memory document (.nut/context/memory.md). This document stores persistent notes, decisions, preferences, and learned context that should be remembered across conversations. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users manage memory, ask about key decisions, user preferences, recurring patterns, and important context to retain.",
15
11
  parameters: {
16
12
  type: "object",
17
13
  properties: {
@@ -36,4 +32,3 @@ export const architectureContextTool: MCPTool = {
36
32
  required: ["operation"]
37
33
  }
38
34
  }
39
-
@@ -31,7 +31,7 @@ export const resourcesTool: MCPTool = {
31
31
  },
32
32
  model: {
33
33
  type: 'string',
34
- enum: ['nano-banana-pro', 'flux-2-dev', 'flux-2-pro', 'gpt-image-1.5'],
34
+ enum: ['nano-banana-pro', 'nano-banana-2', 'flux-2-dev', 'flux-2-pro', 'gpt-image-1.5'],
35
35
  description: 'AI model for image generation. Default: nano-banana-pro. Use gpt-image-1.5 for transparent backgrounds.'
36
36
  },
37
37
  aspect_ratio: {
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Team Context tool for MCP - READ + WRITE
3
+ * Allows the AI assistant to read and update the team definition document (.nut/context/team.md)
4
+ */
5
+
6
+ import type { MCPTool } from './tasks-tool.js'
7
+
8
+ export const teamContextTool: MCPTool = {
9
+ name: "team_context",
10
+ description: "Read or update the team definition document (.nut/context/team.md). This document captures team members, their roles, responsibilities, and contact information. Use 'get' to read, 'append' to add content at the end, 'replace_section' to edit specific text (PREFERRED for edits), or 'update' to replace the entire document (only for new/small docs). When helping users define their team, ask about team structure, individual roles, areas of ownership, and communication preferences.",
11
+ parameters: {
12
+ type: "object",
13
+ properties: {
14
+ operation: {
15
+ type: "string",
16
+ enum: ["get", "append", "replace_section", "update"],
17
+ description: "Operation: 'get' to read, 'append' to add at end, 'replace_section' to find-and-replace specific text (PREFERRED for edits), 'update' to replace entire document (only for new/small docs)"
18
+ },
19
+ content: {
20
+ type: "string",
21
+ description: "For append: the new section to add. For update: the complete document content. Not used for get/replace_section."
22
+ },
23
+ old_text: {
24
+ type: "string",
25
+ description: "For replace_section: the exact text to find and replace (must match exactly, including whitespace)"
26
+ },
27
+ new_text: {
28
+ type: "string",
29
+ description: "For replace_section: the new text to replace old_text with"
30
+ }
31
+ },
32
+ required: ["operation"]
33
+ }
34
+ }
@@ -1,53 +0,0 @@
1
- /**
2
- * Fetch Tool - Enables the AI to retrieve content from URLs
3
- *
4
- * Security considerations:
5
- * - Only HTTP/HTTPS protocols allowed
6
- * - Blocks private/internal IP ranges
7
- * - Response size limited to prevent memory issues
8
- * - Timeout to prevent hanging requests
9
- */
10
- export declare const fetchTool: {
11
- name: string;
12
- description: string;
13
- parameters: {
14
- type: string;
15
- properties: {
16
- url: {
17
- type: string;
18
- description: string;
19
- };
20
- method: {
21
- type: string;
22
- enum: string[];
23
- description: string;
24
- };
25
- headers: {
26
- type: string;
27
- description: string;
28
- additionalProperties: {
29
- type: string;
30
- };
31
- };
32
- body: {
33
- type: string;
34
- description: string;
35
- };
36
- };
37
- required: string[];
38
- };
39
- };
40
- export declare const FETCH_CONFIG: {
41
- MAX_RESPONSE_SIZE: number;
42
- TIMEOUT_MS: number;
43
- BLOCKED_HOSTNAMES: string[];
44
- BLOCKED_IP_PREFIXES: string[];
45
- };
46
- /**
47
- * Validate that a URL is safe to fetch
48
- */
49
- export declare function validateFetchUrl(url: string): {
50
- valid: boolean;
51
- error?: string;
52
- };
53
- //# sourceMappingURL=fetch-tool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetch-tool.d.ts","sourceRoot":"","sources":["../src/fetch-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BrB,CAAA;AAGD,eAAO,MAAM,YAAY;;;;;CAoBxB,CAAA;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CA0BhF"}
@@ -1,87 +0,0 @@
1
- /**
2
- * Fetch Tool - Enables the AI to retrieve content from URLs
3
- *
4
- * Security considerations:
5
- * - Only HTTP/HTTPS protocols allowed
6
- * - Blocks private/internal IP ranges
7
- * - Response size limited to prevent memory issues
8
- * - Timeout to prevent hanging requests
9
- */
10
- export const fetchTool = {
11
- name: 'fetch_url',
12
- description: 'Fetch content from a URL. Use this to retrieve web pages, API responses, documentation, or any publicly accessible content. Returns the text/HTML/JSON content from the URL.',
13
- parameters: {
14
- type: 'object',
15
- properties: {
16
- url: {
17
- type: 'string',
18
- description: 'The URL to fetch (must be http:// or https://)'
19
- },
20
- method: {
21
- type: 'string',
22
- enum: ['GET', 'POST'],
23
- description: 'HTTP method to use. Defaults to GET.'
24
- },
25
- headers: {
26
- type: 'object',
27
- description: 'Optional HTTP headers to include in the request',
28
- additionalProperties: { type: 'string' }
29
- },
30
- body: {
31
- type: 'string',
32
- description: 'Optional request body for POST requests'
33
- }
34
- },
35
- required: ['url']
36
- }
37
- };
38
- // Configuration constants
39
- export const FETCH_CONFIG = {
40
- MAX_RESPONSE_SIZE: 100000, // 100KB max response
41
- TIMEOUT_MS: 30000, // 30 second timeout
42
- BLOCKED_HOSTNAMES: [
43
- 'localhost',
44
- '127.0.0.1',
45
- '0.0.0.0',
46
- '::1'
47
- ],
48
- BLOCKED_IP_PREFIXES: [
49
- '10.', // Private class A
50
- '172.16.', '172.17.', '172.18.', '172.19.', // Private class B
51
- '172.20.', '172.21.', '172.22.', '172.23.',
52
- '172.24.', '172.25.', '172.26.', '172.27.',
53
- '172.28.', '172.29.', '172.30.', '172.31.',
54
- '192.168.', // Private class C
55
- '169.254.', // Link-local
56
- 'fc00:', 'fd00:', // IPv6 private
57
- 'fe80:' // IPv6 link-local
58
- ]
59
- };
60
- /**
61
- * Validate that a URL is safe to fetch
62
- */
63
- export function validateFetchUrl(url) {
64
- try {
65
- const parsed = new URL(url);
66
- // Only allow HTTP/HTTPS
67
- if (!['http:', 'https:'].includes(parsed.protocol)) {
68
- return { valid: false, error: `Protocol '${parsed.protocol}' not allowed. Only http:// and https:// are supported.` };
69
- }
70
- // Block localhost and loopback
71
- const hostname = parsed.hostname.toLowerCase();
72
- if (FETCH_CONFIG.BLOCKED_HOSTNAMES.includes(hostname)) {
73
- return { valid: false, error: 'Requests to localhost/loopback addresses are not allowed.' };
74
- }
75
- // Block private IP ranges
76
- for (const prefix of FETCH_CONFIG.BLOCKED_IP_PREFIXES) {
77
- if (hostname.startsWith(prefix)) {
78
- return { valid: false, error: 'Requests to private/internal IP addresses are not allowed.' };
79
- }
80
- }
81
- return { valid: true };
82
- }
83
- catch (err) {
84
- return { valid: false, error: `Invalid URL: ${err instanceof Error ? err.message : 'parse error'}` };
85
- }
86
- }
87
- //# sourceMappingURL=fetch-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fetch-tool.js","sourceRoot":"","sources":["../src/fetch-tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,WAAW;IACjB,WAAW,EAAE,8KAA8K;IAC3L,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gDAAgD;aAC9D;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;gBACrB,WAAW,EAAE,sCAAsC;aACpD;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iDAAiD;gBAC9D,oBAAoB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aACzC;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;aACvD;S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EAAE,CAAA;QAC7F,CAAC;QAED,0BAA0B;QAC1B,KAAK,MAAM,MAAM,IAAI,YAAY,CAAC,mBAAmB,EAAE,CAAC;YACtD,IAAI,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;gBAChC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,4DAA4D,EAAE,CAAA;YAC9F,CAAC;QACH,CAAC;QAED,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAA;IACxB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,gBAAgB,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,EAAE,EAAE,CAAA;IACtG,CAAC;AACH,CAAC"}
@@ -1,26 +0,0 @@
1
- import type { ChangeProposal } from '@lovelybunch/types';
2
- export interface MCPTool {
3
- name: string;
4
- description: string;
5
- parameters: {
6
- type: 'object';
7
- properties: Record<string, any>;
8
- required?: string[];
9
- additionalProperties?: boolean;
10
- };
11
- }
12
- export interface MCPToolCall {
13
- name: string;
14
- arguments: Record<string, any>;
15
- }
16
- export declare const listProposalsTool: MCPTool;
17
- export declare const proposalsTool: MCPTool;
18
- /**
19
- * Read-only version of the proposals tool for AI assistant.
20
- * Only exposes list and get operations - no create/update/delete.
21
- * Creating proposals should be done by coding agents (Claude Code, Cursor, etc.) or via the UI.
22
- */
23
- export declare const proposalsReadOnlyTool: MCPTool;
24
- export declare function validateProposalData(data: any): Partial<ChangeProposal>;
25
- export declare function createToolCall(operation: string, args: any): MCPToolCall;
26
- //# sourceMappingURL=proposals-tool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proposals-tool.d.ts","sourceRoot":"","sources":["../src/proposals-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ,CAAA;QACd,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;QAC/B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;QACnB,oBAAoB,CAAC,EAAE,OAAO,CAAA;KAC/B,CAAA;CACF;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B;AAED,eAAO,MAAM,iBAAiB,EAAE,OAiC/B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,OA8J3B,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,OA+CnC,CAAA;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAkBvE;AAED,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,GAAG,WAAW,CAQxE"}
@@ -1,286 +0,0 @@
1
- export const listProposalsTool = {
2
- name: "list_proposals",
3
- description: "List all change proposals with metadata only (title, ID, status, priority, tags)",
4
- parameters: {
5
- type: "object",
6
- properties: {
7
- filters: {
8
- type: "object",
9
- description: "Optional filters for the proposal list",
10
- properties: {
11
- status: {
12
- type: "string",
13
- enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
14
- description: "Filter by proposal status"
15
- },
16
- priority: {
17
- type: "string",
18
- enum: ["low", "medium", "high", "critical"],
19
- description: "Filter by priority level"
20
- },
21
- tags: {
22
- type: "array",
23
- items: { type: "string" },
24
- description: "Filter by tags"
25
- },
26
- search: {
27
- type: "string",
28
- description: "Search query for proposal content"
29
- }
30
- }
31
- }
32
- }
33
- }
34
- };
35
- export const proposalsTool = {
36
- name: "change_proposals",
37
- description: "Manage change proposals - create, read, update, delete proposals. IMPORTANT: When searching for proposals by topic or keyword, always use filters.search to filter results server-side. The returned count reflects filtered results.",
38
- parameters: {
39
- type: "object",
40
- properties: {
41
- operation: {
42
- type: "string",
43
- enum: ["list", "get", "create", "update", "delete"],
44
- description: "The operation to perform on proposals"
45
- },
46
- id: {
47
- type: "string",
48
- description: "Proposal ID (required for get, update, delete operations)"
49
- },
50
- filters: {
51
- type: "object",
52
- description: "Filters for list operation. Use search to find proposals by keyword - results are filtered server-side for accuracy.",
53
- properties: {
54
- status: {
55
- type: "string",
56
- enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
57
- description: "Filter by proposal status"
58
- },
59
- author: {
60
- type: "string",
61
- description: "Filter by author name or email"
62
- },
63
- priority: {
64
- type: "string",
65
- enum: ["low", "medium", "high", "critical"],
66
- description: "Filter by priority level"
67
- },
68
- tags: {
69
- type: "array",
70
- items: { type: "string" },
71
- description: "Filter by tags"
72
- },
73
- search: {
74
- type: "string",
75
- description: "Search query to filter proposals by intent, content, author, or tags. Always use this when looking for proposals about a specific topic."
76
- }
77
- }
78
- },
79
- proposal: {
80
- type: "object",
81
- description: "Proposal data for create/update operations",
82
- properties: {
83
- intent: {
84
- type: "string",
85
- description: "Brief description of what the proposal aims to achieve"
86
- },
87
- content: {
88
- type: "string",
89
- description: "Detailed content of the proposal"
90
- },
91
- author: {
92
- type: "object",
93
- description: "Author information",
94
- properties: {
95
- id: { type: "string" },
96
- name: { type: "string" },
97
- email: { type: "string" },
98
- role: { type: "string" },
99
- type: { type: "string", enum: ["human", "agent"] }
100
- }
101
- },
102
- planSteps: {
103
- type: "array",
104
- description: "Implementation plan steps. Each item may be a string (description) or an object with fields.",
105
- items: {
106
- oneOf: [
107
- { type: "string", description: "Step description" },
108
- {
109
- type: "object",
110
- properties: {
111
- id: { type: "string", description: "Step identifier (optional)" },
112
- description: { type: "string", description: "Human-readable step description" },
113
- status: { type: "string", enum: ["pending", "in-progress", "completed", "failed"], description: "Execution status" },
114
- command: { type: "string", description: "Optional command to execute" },
115
- expectedOutcome: { type: "string", description: "Expected outcome of the step" }
116
- },
117
- required: ["description"]
118
- }
119
- ]
120
- }
121
- },
122
- evidence: {
123
- type: "array",
124
- items: { type: "string" },
125
- description: "Supporting evidence"
126
- },
127
- policies: {
128
- type: "array",
129
- items: { type: "string" },
130
- description: "Related policies"
131
- },
132
- featureFlags: {
133
- type: "array",
134
- items: { type: "string" },
135
- description: "Feature flags needed"
136
- },
137
- experiments: {
138
- type: "array",
139
- items: { type: "string" },
140
- description: "A/B tests or experiments"
141
- },
142
- telemetryContracts: {
143
- type: "array",
144
- items: { type: "string" },
145
- description: "Telemetry contracts"
146
- },
147
- releasePlan: {
148
- type: "object",
149
- description: "Release strategy",
150
- properties: {
151
- strategy: {
152
- type: "string",
153
- enum: ["immediate", "gradual", "scheduled", "gated"]
154
- }
155
- }
156
- },
157
- status: {
158
- type: "string",
159
- enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
160
- description: "Current status of the proposal"
161
- },
162
- metadata: {
163
- type: "object",
164
- description: "Additional metadata",
165
- properties: {
166
- tags: {
167
- type: "array",
168
- items: { type: "string" },
169
- description: "Tags for categorization"
170
- },
171
- priority: {
172
- type: "string",
173
- enum: ["low", "medium", "high", "critical"],
174
- description: "Priority level"
175
- },
176
- reviewers: {
177
- type: "array",
178
- items: { type: "string" },
179
- description: "List of reviewers"
180
- }
181
- }
182
- },
183
- productSpecRef: {
184
- type: "string",
185
- description: "Reference to related product specification"
186
- }
187
- },
188
- required: ["intent", "content"]
189
- }
190
- },
191
- required: ["operation"]
192
- }
193
- };
194
- /**
195
- * Read-only version of the proposals tool for AI assistant.
196
- * Only exposes list and get operations - no create/update/delete.
197
- * Creating proposals should be done by coding agents (Claude Code, Cursor, etc.) or via the UI.
198
- */
199
- export const proposalsReadOnlyTool = {
200
- name: "change_proposals",
201
- description: "READ-ONLY: Search and read change proposals. You can ONLY use 'list' and 'get' operations. You CANNOT create, update, or delete proposals — that should be done by coding agents (Claude Code, Cursor, etc.) which have broader codebase context, or via the Proposals UI.",
202
- parameters: {
203
- type: "object",
204
- properties: {
205
- operation: {
206
- type: "string",
207
- enum: ["list", "get"],
208
- description: "ONLY 'list' or 'get' are allowed. 'list' to search/browse proposals, 'get' to retrieve a specific proposal by ID"
209
- },
210
- id: {
211
- type: "string",
212
- description: "Proposal ID (required for get operation)"
213
- },
214
- filters: {
215
- type: "object",
216
- description: "Filters for list operation. Use search to find proposals by keyword.",
217
- properties: {
218
- status: {
219
- type: "string",
220
- enum: ["draft", "proposed", "in-review", "code-complete", "approved", "merged", "rejected"],
221
- description: "Filter by proposal status"
222
- },
223
- author: {
224
- type: "string",
225
- description: "Filter by author name or email"
226
- },
227
- priority: {
228
- type: "string",
229
- enum: ["low", "medium", "high", "critical"],
230
- description: "Filter by priority level"
231
- },
232
- tags: {
233
- type: "array",
234
- items: { type: "string" },
235
- description: "Filter by tags"
236
- },
237
- search: {
238
- type: "string",
239
- description: "Search query to filter proposals by intent, content, author, or tags"
240
- }
241
- }
242
- }
243
- },
244
- required: ["operation"]
245
- }
246
- };
247
- export function validateProposalData(data) {
248
- const proposal = {};
249
- if (data.intent)
250
- proposal.intent = data.intent;
251
- if (data.content)
252
- proposal.content = data.content;
253
- if (data.author)
254
- proposal.author = data.author;
255
- if (data.planSteps)
256
- proposal.planSteps = data.planSteps;
257
- if (data.evidence)
258
- proposal.evidence = data.evidence;
259
- if (data.policies)
260
- proposal.policies = data.policies;
261
- if (data.featureFlags)
262
- proposal.featureFlags = data.featureFlags;
263
- if (data.experiments)
264
- proposal.experiments = data.experiments;
265
- if (data.telemetryContracts)
266
- proposal.telemetryContracts = data.telemetryContracts;
267
- if (data.releasePlan)
268
- proposal.releasePlan = data.releasePlan;
269
- if (data.status)
270
- proposal.status = data.status;
271
- if (data.metadata)
272
- proposal.metadata = data.metadata;
273
- if (data.productSpecRef)
274
- proposal.productSpecRef = data.productSpecRef;
275
- return proposal;
276
- }
277
- export function createToolCall(operation, args) {
278
- return {
279
- name: "change_proposals",
280
- arguments: {
281
- operation,
282
- ...args
283
- }
284
- };
285
- }
286
- //# sourceMappingURL=proposals-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"proposals-tool.js","sourceRoot":"","sources":["../src/proposals-tool.ts"],"names":[],"mappings":"AAkBA,MAAM,CAAC,MAAM,iBAAiB,GAAY;IACxC,IAAI,EAAE,gBAAgB;IACtB,WAAW,EAAE,kFAAkF;IAC/F,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wCAAwC;gBACrD,UAAU,EAAE;oBACV,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,eAAe,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC;wBAC3F,WAAW,EAAE,2BAA2B;qBACzC;oBACD,QAAQ,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,IAAI,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,CAAC;wBAC3C,WAAW,EAAE,0BAA0B;qBACxC;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACzB,WAAW,EAAE,gBAAgB;qBAC9B;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,mCAAmC;qBACjD;iBACF;aACF;SACF;KACF;CACF,CAAA;AAED,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EAAE,uOAAuO;IACpP,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE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GAAG,IAAI,CAAC,WAAW,CAAA;IAC7D,IAAI,IAAI,CAAC,MAAM;QAAE,QAAQ,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAA;IAC9C,IAAI,IAAI,CAAC,QAAQ;QAAE,QAAQ,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAA;IACpD,IAAI,IAAI,CAAC,cAAc;QAAE,QAAQ,CAAC,cAAc,GAAG,IAAI,CAAC,cAAc,CAAA;IAEtE,OAAO,QAAQ,CAAA;AACjB,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,SAAiB,EAAE,IAAS;IACzD,OAAO;QACL,IAAI,EAAE,kBAAkB;QACxB,SAAS,EAAE;YACT,SAAS;YACT,GAAG,IAAI;SACR;KACF,CAAA;AACH,CAAC"}
@@ -1,7 +0,0 @@
1
- import type { MCPTool } from './proposals-tool.js';
2
- /**
3
- * Tool for fetching and extracting readable content from web URLs.
4
- * This is a read-only tool that retrieves web page content for context.
5
- */
6
- export declare const urlReaderTool: MCPTool;
7
- //# sourceMappingURL=url-reader-tool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"url-reader-tool.d.ts","sourceRoot":"","sources":["../src/url-reader-tool.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAElD;;;GAGG;AACH,eAAO,MAAM,aAAa,EAAE,OAkB3B,CAAA"}
@@ -1,24 +0,0 @@
1
- /**
2
- * Tool for fetching and extracting readable content from web URLs.
3
- * This is a read-only tool that retrieves web page content for context.
4
- */
5
- export const urlReaderTool = {
6
- name: 'read_url',
7
- description: `Fetch and extract readable content from a web URL. Use this when a user shares a URL and wants you to read, summarize, or analyze its content. Returns the page title, main text content, and excerpt.
8
-
9
- IMPORTANT:
10
- - Only use this for publicly accessible web pages
11
- - Content is automatically cleaned and truncated for context limits
12
- - Some sites may block automated access`,
13
- inputSchema: {
14
- type: 'object',
15
- properties: {
16
- url: {
17
- type: 'string',
18
- description: 'The full URL to fetch (must start with http:// or https://)'
19
- }
20
- },
21
- required: ['url']
22
- }
23
- };
24
- //# sourceMappingURL=url-reader-tool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"url-reader-tool.js","sourceRoot":"","sources":["../src/url-reader-tool.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAY;IACpC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE;;;;;wCAKyB;IACtC,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,GAAG,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6DAA6D;aAC3E;SACF;QACD,QAAQ,EAAE,CAAC,KAAK,CAAC;KAClB;CACF,CAAA"}