@rubytech/create-maxy 1.0.498 → 1.0.500

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 (118) hide show
  1. package/package.json +1 -1
  2. package/payload/platform/plugins/admin/mcp/dist/index.js +34 -4
  3. package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
  4. package/payload/platform/plugins/admin/skills/stream-log-review/SKILL.md +3 -3
  5. package/payload/platform/scripts/logs-read.sh +40 -5
  6. package/payload/platform/templates/agents/admin/IDENTITY.md +1 -1
  7. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/PLUGIN.md +36 -8
  8. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.js +229 -153
  9. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.js.map +1 -1
  10. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.d.ts +19 -1
  11. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.d.ts.map +1 -1
  12. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.js +99 -3
  13. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.js.map +1 -1
  14. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.d.ts +10 -0
  15. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.d.ts.map +1 -0
  16. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.js +24 -0
  17. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.js.map +1 -0
  18. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.d.ts +16 -0
  19. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.d.ts.map +1 -0
  20. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.js +35 -0
  21. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.js.map +1 -0
  22. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.js +1 -1
  23. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.js.map +1 -1
  24. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.d.ts +13 -0
  25. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.d.ts.map +1 -0
  26. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.js +41 -0
  27. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.js.map +1 -0
  28. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.d.ts +9 -0
  29. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.d.ts.map +1 -0
  30. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.js +16 -0
  31. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.js.map +1 -0
  32. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.d.ts +15 -0
  33. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.d.ts.map +1 -0
  34. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.js +11 -0
  35. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.js.map +1 -0
  36. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.d.ts +10 -0
  37. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.d.ts.map +1 -0
  38. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.js +39 -0
  39. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.js.map +1 -0
  40. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.d.ts +9 -0
  41. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.d.ts.map +1 -0
  42. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.js +33 -0
  43. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.js.map +1 -0
  44. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.d.ts +18 -0
  45. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.d.ts.map +1 -0
  46. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.js +59 -0
  47. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.js.map +1 -0
  48. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.d.ts +10 -0
  49. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.d.ts.map +1 -0
  50. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.js +39 -0
  51. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.js.map +1 -0
  52. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.d.ts +12 -0
  53. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.d.ts.map +1 -0
  54. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.js +28 -0
  55. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.js.map +1 -0
  56. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.d.ts +15 -0
  57. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.d.ts.map +1 -0
  58. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.js +11 -0
  59. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.js.map +1 -0
  60. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.d.ts +16 -0
  61. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.d.ts.map +1 -0
  62. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.js +39 -0
  63. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.js.map +1 -0
  64. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.d.ts +13 -0
  65. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.d.ts.map +1 -0
  66. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.js +49 -0
  67. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.js.map +1 -0
  68. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.d.ts +7 -0
  69. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.d.ts.map +1 -0
  70. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.js +15 -0
  71. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.js.map +1 -0
  72. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.d.ts +14 -0
  73. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.d.ts.map +1 -0
  74. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.js +11 -0
  75. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.js.map +1 -0
  76. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.d.ts +9 -0
  77. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.d.ts.map +1 -0
  78. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.js +40 -0
  79. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.js.map +1 -0
  80. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.d.ts +13 -0
  81. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.d.ts.map +1 -0
  82. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.js +34 -0
  83. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.js.map +1 -0
  84. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.d.ts +14 -0
  85. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.d.ts.map +1 -0
  86. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.js +18 -0
  87. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.js.map +1 -0
  88. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/index.ts +335 -158
  89. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/lib/loop-api.ts +140 -3
  90. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/customer-preferences.ts +60 -0
  91. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/feedback.ts +80 -0
  92. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/key-register.ts +1 -1
  93. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/marketing-enquiry.ts +105 -0
  94. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/marketing-match-batch.ts +48 -0
  95. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/marketing-match-request.ts +37 -0
  96. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/marketing-match.ts +78 -0
  97. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/people-detail.ts +63 -0
  98. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/people-search.ts +93 -0
  99. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/property-detail.ts +70 -0
  100. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/property-listed.ts +67 -0
  101. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/property-request.ts +37 -0
  102. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/property-search.ts +80 -0
  103. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/supplier.ts +120 -0
  104. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/team-availability.ts +42 -0
  105. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/viewing-create.ts +36 -0
  106. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/viewing-detail.ts +70 -0
  107. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/viewing-search.ts +74 -0
  108. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/viewing-update.ts +48 -0
  109. package/payload/server/public/assets/{ChatInput-BbMvZgRR.js → ChatInput-Bo9T8v0E.js} +1 -1
  110. package/payload/server/public/assets/{admin-BSHc9LPS.js → admin-CkpknqK7.js} +60 -60
  111. package/payload/server/public/assets/{public-DvDzSq3r.js → public-wDhMuZDR.js} +1 -1
  112. package/payload/server/public/index.html +2 -2
  113. package/payload/server/public/public.html +2 -2
  114. package/payload/server/server.js +89 -2
  115. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/feedback-list.ts +0 -54
  116. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/people-list.ts +0 -52
  117. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/properties-list.ts +0 -52
  118. package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/src/tools/viewings-list.ts +0 -62
@@ -4,205 +4,281 @@ import { z } from "zod";
4
4
  import { keyRegister } from "./tools/key-register.js";
5
5
  import { keyDeregister } from "./tools/key-deregister.js";
6
6
  import { keyList } from "./tools/key-list.js";
7
- import { propertiesList } from "./tools/properties-list.js";
8
- import { peopleList } from "./tools/people-list.js";
9
- import { viewingsList } from "./tools/viewings-list.js";
10
- import { feedbackList } from "./tools/feedback-list.js";
7
+ import { propertySearch } from "./tools/property-search.js";
8
+ import { propertyDetail } from "./tools/property-detail.js";
9
+ import { propertyListed } from "./tools/property-listed.js";
10
+ import { propertyRequest } from "./tools/property-request.js";
11
+ import { peopleSearch } from "./tools/people-search.js";
12
+ import { peopleDetail } from "./tools/people-detail.js";
13
+ import { viewingSearch } from "./tools/viewing-search.js";
14
+ import { viewingDetail } from "./tools/viewing-detail.js";
15
+ import { viewingCreate } from "./tools/viewing-create.js";
16
+ import { viewingUpdate } from "./tools/viewing-update.js";
17
+ import { feedbackGet, feedbackSubmit } from "./tools/feedback.js";
11
18
  import { teamInfo } from "./tools/team-info.js";
19
+ import { teamAvailability } from "./tools/team-availability.js";
20
+ import { marketingMatchDetail } from "./tools/marketing-match.js";
21
+ import { marketingMatchBatch } from "./tools/marketing-match-batch.js";
22
+ import { marketingMatchRequest } from "./tools/marketing-match-request.js";
23
+ import { marketingEnquiry } from "./tools/marketing-enquiry.js";
24
+ import { customerPreferences } from "./tools/customer-preferences.js";
25
+ import { supplier } from "./tools/supplier.js";
12
26
  import { closeDriver } from "./lib/neo4j.js";
13
27
  const server = new McpServer({
14
28
  name: "maxy-real-agency-loop",
15
- version: "0.1.0",
29
+ version: "0.2.0",
16
30
  });
17
31
  const accountId = process.env.ACCOUNT_ID;
18
32
  if (!accountId) {
19
33
  throw new Error("ACCOUNT_ID environment variable is required");
20
34
  }
35
+ const ALL_PERMISSIONS = z.enum([
36
+ "properties", "people", "viewings", "feedback", "team",
37
+ "marketing", "customer", "supplier",
38
+ ]);
21
39
  console.error(`[loop] server started, account=${accountId}`);
40
+ // Helper: wrap a tool function in standard error handling
41
+ function toolHandler(fn) {
42
+ return async (params) => {
43
+ try {
44
+ const text = await fn({ ...params, accountId });
45
+ return { content: [{ type: "text", text }] };
46
+ }
47
+ catch (err) {
48
+ return {
49
+ content: [{
50
+ type: "text",
51
+ text: `Error: ${err instanceof Error ? err.message : String(err)}`,
52
+ }],
53
+ isError: true,
54
+ };
55
+ }
56
+ };
57
+ }
22
58
  // ─────────────────────────────────────────────────────────────────
23
- // Key Management Tools
59
+ // Key Management Tools (3)
24
60
  // ─────────────────────────────────────────────────────────────────
25
61
  server.tool("loop-key-register", "Register a Loop CRM API key for a team. Validates the key against Loop's API, encrypts it, and stores it in the graph. Each key maps to one team.", {
26
62
  teamName: z.string().min(1).describe("Human-readable name for this team (e.g. 'Muvin Main Office')"),
27
63
  apiKey: z.string().min(10).describe("Loop API key (X-Api-Key header value)"),
28
64
  permissions: z
29
- .array(z.enum(["properties", "people", "viewings", "feedback", "team"]))
65
+ .array(ALL_PERMISSIONS)
30
66
  .optional()
31
- .describe("Endpoint groups this key can access (default: all)"),
67
+ .describe("Endpoint groups this key can access (default: all 8 groups)"),
32
68
  }, async (params) => {
33
69
  try {
34
70
  const result = await keyRegister({ ...params, accountId });
35
71
  let text = `Team "${params.teamName}" registered successfully.`;
36
- if (result.warning) {
72
+ if (result.warning)
37
73
  text += `\n\nWarning: ${result.warning}`;
38
- }
39
74
  return { content: [{ type: "text", text }] };
40
75
  }
41
76
  catch (err) {
42
77
  return {
43
- content: [
44
- {
78
+ content: [{
45
79
  type: "text",
46
80
  text: `Failed to register key: ${err instanceof Error ? err.message : String(err)}`,
47
- },
48
- ],
81
+ }],
49
82
  isError: true,
50
83
  };
51
84
  }
52
85
  });
53
- server.tool("loop-key-deregister", "Remove a registered Loop CRM team key. The key is permanently deleted from the graph.", {
54
- teamName: z.string().min(1).describe("Name of the team to remove"),
55
- }, async ({ teamName }) => {
86
+ server.tool("loop-key-deregister", "Remove a registered Loop CRM team key. The key is permanently deleted from the graph.", { teamName: z.string().min(1).describe("Name of the team to remove") }, async ({ teamName }) => {
56
87
  try {
57
88
  await keyDeregister({ teamName, accountId });
58
- return {
59
- content: [
60
- { type: "text", text: `Team "${teamName}" deregistered.` },
61
- ],
62
- };
89
+ return { content: [{ type: "text", text: `Team "${teamName}" deregistered.` }] };
63
90
  }
64
91
  catch (err) {
65
92
  return {
66
- content: [
67
- {
93
+ content: [{
68
94
  type: "text",
69
95
  text: `Failed to deregister: ${err instanceof Error ? err.message : String(err)}`,
70
- },
71
- ],
72
- isError: true,
73
- };
74
- }
75
- });
76
- server.tool("loop-key-list", "List all registered Loop CRM teams for this account. Shows team names, addresses, and permissions. Never reveals API key values.", {}, async () => {
77
- try {
78
- const text = await keyList({ accountId });
79
- return { content: [{ type: "text", text }] };
80
- }
81
- catch (err) {
82
- return {
83
- content: [
84
- {
85
- type: "text",
86
- text: `Failed to list keys: ${err instanceof Error ? err.message : String(err)}`,
87
- },
88
- ],
96
+ }],
89
97
  isError: true,
90
98
  };
91
99
  }
92
100
  });
101
+ server.tool("loop-key-list", "List all registered Loop CRM teams for this account. Shows team names, addresses, and permissions. Never reveals API key values.", {}, toolHandler(async (p) => keyList({ accountId: p.accountId })));
93
102
  // ─────────────────────────────────────────────────────────────────
94
- // Data Query Tools (with cross-team aggregation)
103
+ // People Tools (2) permission: people
95
104
  // ─────────────────────────────────────────────────────────────────
96
- server.tool("loop-properties-list", "List properties from Loop CRM. Aggregates across all registered teams unless a specific team is named. Supports filtering by sale or letting type.", {
97
- type: z
98
- .enum(["sale", "letting", "both"])
99
- .optional()
100
- .describe("Filter by property type (default: both)"),
101
- teamName: z.string().optional().describe("Query a specific team only (omit for all teams)"),
102
- limit: z.number().int().optional().describe("Max results (default 200 across all teams)"),
103
- }, async (params) => {
104
- try {
105
- const text = await propertiesList({ ...params, accountId });
106
- return { content: [{ type: "text", text }] };
107
- }
108
- catch (err) {
109
- return {
110
- content: [
111
- {
112
- type: "text",
113
- text: `Properties query failed: ${err instanceof Error ? err.message : String(err)}`,
114
- },
115
- ],
116
- isError: true,
117
- };
118
- }
119
- });
120
- server.tool("loop-people-list", "List people (contacts) from Loop CRM. Aggregates across all registered teams unless a specific team is named.", {
121
- search: z.string().optional().describe("Search by name or contact details"),
122
- teamName: z.string().optional().describe("Query a specific team only (omit for all teams)"),
123
- limit: z.number().int().optional().describe("Max results (default 200 across all teams)"),
124
- }, async (params) => {
125
- try {
126
- const text = await peopleList({ ...params, accountId });
127
- return { content: [{ type: "text", text }] };
128
- }
129
- catch (err) {
130
- return {
131
- content: [
132
- {
133
- type: "text",
134
- text: `People query failed: ${err instanceof Error ? err.message : String(err)}`,
135
- },
136
- ],
137
- isError: true,
138
- };
139
- }
140
- });
141
- server.tool("loop-viewings-list", "List viewings from Loop CRM. Aggregates across all registered teams unless a specific team is named. Supports sale/letting type and date range filters.", {
142
- type: z
143
- .enum(["sale", "letting", "both"])
144
- .optional()
145
- .describe("Filter by viewing type (default: both)"),
146
- teamName: z.string().optional().describe("Query a specific team only (omit for all teams)"),
147
- dateFrom: z.string().optional().describe("Start date (ISO format, e.g. 2026-04-01)"),
148
- dateTo: z.string().optional().describe("End date (ISO format, e.g. 2026-04-30)"),
149
- limit: z.number().int().optional().describe("Max results (default 200 across all teams)"),
150
- }, async (params) => {
151
- try {
152
- const text = await viewingsList({ ...params, accountId });
153
- return { content: [{ type: "text", text }] };
154
- }
155
- catch (err) {
156
- return {
157
- content: [
158
- {
159
- type: "text",
160
- text: `Viewings query failed: ${err instanceof Error ? err.message : String(err)}`,
161
- },
162
- ],
163
- isError: true,
164
- };
165
- }
166
- });
167
- server.tool("loop-feedback-list", "List viewing feedback from Loop CRM. Aggregates across all registered teams unless a specific team is named.", {
168
- teamName: z.string().optional().describe("Query a specific team only (omit for all teams)"),
169
- limit: z.number().int().optional().describe("Max results (default 200 across all teams)"),
170
- }, async (params) => {
171
- try {
172
- const text = await feedbackList({ ...params, accountId });
173
- return { content: [{ type: "text", text }] };
174
- }
175
- catch (err) {
176
- return {
177
- content: [
178
- {
179
- type: "text",
180
- text: `Feedback query failed: ${err instanceof Error ? err.message : String(err)}`,
181
- },
182
- ],
183
- isError: true,
184
- };
185
- }
186
- });
187
- server.tool("loop-team-info", "Get team details from Loop CRM. Returns team name, address, phone, and email. Aggregates across all registered teams unless a specific team is named.", {
105
+ server.tool("loop-people-search", "Search people in Loop CRM. Without a role, searches all contacts. With a role (buyers/sellers/renters/landlords), returns role-specific results with rich filters.", {
106
+ role: z.enum(["buyers", "sellers", "renters", "landlords"]).optional().describe("Role to search (omit for all people)"),
107
+ searchTerm: z.string().optional().describe("Name or contact search"),
108
+ maxPrice: z.number().optional().describe("Max price (buyers) or max price filter (sellers)"),
109
+ minPrice: z.number().optional().describe("Min price (sellers)"),
110
+ minBeds: z.number().optional().describe("Min bedrooms (buyers/renters)"),
111
+ maxRent: z.number().optional().describe("Max rent (renters only)"),
112
+ searchAreas: z.string().optional().describe("Comma-separated outcodes e.g. 'SN7,OX12' (buyers/renters)"),
113
+ propertyTypes: z.string().optional().describe("Comma-separated property types (buyers/renters)"),
114
+ startDate: z.string().optional().describe("Start date filter (sellers/landlords)"),
115
+ endDate: z.string().optional().describe("End date filter (sellers/landlords)"),
116
+ teamName: z.string().optional().describe("Query a specific team only"),
117
+ limit: z.number().int().optional().describe("Max results (default 200)"),
118
+ }, toolHandler(async (p) => peopleSearch(p)));
119
+ server.tool("loop-people-detail", "Get full details for a specific person by ID. Optionally specify a role (buyers/sellers/renters/landlords) for role-specific detail.", {
120
+ personId: z.number().int().describe("Person ID"),
121
+ role: z.enum(["buyers", "sellers", "renters", "landlords"]).optional().describe("Role for role-specific detail view"),
122
+ teamName: z.string().optional().describe("Query a specific team only"),
123
+ }, toolHandler(async (p) => peopleDetail(p)));
124
+ // ─────────────────────────────────────────────────────────────────
125
+ // Property Tools (4) — permission: properties
126
+ // ─────────────────────────────────────────────────────────────────
127
+ server.tool("loop-property-search", "Search properties in Loop CRM. Queries /property/residential/sales and /property/residential/lettings. Use department to narrow to one type.", {
128
+ department: z.enum(["sales", "lettings", "both"]).optional().describe("Department (default: both)"),
129
+ searchTerm: z.string().optional().describe("Address or keyword search"),
130
+ minPrice: z.number().optional().describe("Minimum price"),
131
+ maxPrice: z.number().optional().describe("Maximum price"),
132
+ minBedrooms: z.number().int().optional().describe("Minimum bedrooms"),
133
+ maxBedrooms: z.number().int().optional().describe("Maximum bedrooms"),
134
+ propertyStatuses: z.string().optional().describe("Comma-separated statuses (e.g. 'forSale,underOffer')"),
135
+ propertyTypes: z.string().optional().describe("Comma-separated property types"),
136
+ teamName: z.string().optional().describe("Query a specific team only"),
137
+ limit: z.number().int().optional().describe("Max results (default 200)"),
138
+ }, toolHandler(async (p) => propertySearch(p)));
139
+ server.tool("loop-property-detail", "Get full details for a specific property by ID and department. Optionally include a preview hash for the public preview.", {
140
+ propertyId: z.number().int().describe("Property ID"),
141
+ department: z.enum(["sales", "lettings"]).describe("sales or lettings"),
142
+ previewHash: z.number().int().optional().describe("Preview hash for public preview URL"),
143
+ teamName: z.string().optional().describe("Query a specific team only"),
144
+ }, toolHandler(async (p) => propertyDetail(p)));
145
+ server.tool("loop-property-listed", "Get properties listed on a specific channel (Rightmove, Zoopla, OnTheMarket, website). Optionally include sold properties.", {
146
+ channel: z.enum(["rightmove", "onTheMarket", "zoopla", "website"]).describe("Listing channel"),
147
+ department: z.enum(["sales", "lettings", "both"]).optional().describe("Department (default: both)"),
148
+ includeSold: z.boolean().optional().describe("Include sold gallery (default: false)"),
149
+ teamName: z.string().optional().describe("Query a specific team only"),
150
+ limit: z.number().int().optional().describe("Max results (default 200)"),
151
+ }, toolHandler(async (p) => propertyListed(p)));
152
+ server.tool("loop-property-request", "Submit a viewing, callback, or information request for a property. Requires a specific team.", {
153
+ teamName: z.string().min(1).describe("Team to submit the request through"),
154
+ propertyId: z.number().int().describe("Property ID"),
155
+ department: z.enum(["sales", "lettings"]).describe("sales or lettings"),
156
+ action: z.enum(["viewing", "call-back", "information"]).describe("Request type"),
157
+ name: z.string().optional().describe("Requester name"),
158
+ email: z.string().optional().describe("Requester email"),
159
+ phone: z.string().optional().describe("Requester phone"),
160
+ message: z.string().optional().describe("Additional message"),
161
+ }, toolHandler(async (p) => propertyRequest(p)));
162
+ // ─────────────────────────────────────────────────────────────────
163
+ // Viewing Tools (4) — permission: viewings
164
+ // ─────────────────────────────────────────────────────────────────
165
+ server.tool("loop-viewing-search", "Search viewings in Loop CRM. Queries /residential/sales/viewings and /residential/lettings/viewings.", {
166
+ department: z.enum(["sales", "lettings", "both"]).optional().describe("Department (default: both)"),
167
+ searchTerm: z.string().optional().describe("Search viewings"),
168
+ appointmentStartDate: z.string().optional().describe("Filter from date (ISO format)"),
169
+ appointmentEndDate: z.string().optional().describe("Filter to date (ISO format)"),
170
+ status: z.string().optional().describe("Viewing status filter"),
171
+ teamName: z.string().optional().describe("Query a specific team only"),
172
+ limit: z.number().int().optional().describe("Max results (default 200)"),
173
+ }, toolHandler(async (p) => viewingSearch(p)));
174
+ server.tool("loop-viewing-detail", "Get full details for a specific viewing by ID and department.", {
175
+ viewingId: z.number().int().describe("Viewing ID"),
176
+ department: z.enum(["sales", "lettings"]).describe("sales or lettings"),
177
+ teamName: z.string().optional().describe("Query a specific team only"),
178
+ }, toolHandler(async (p) => viewingDetail(p)));
179
+ server.tool("loop-viewing-create", "Create a new viewing in Loop CRM. Creates the viewing and associated buyer/renter record.", {
180
+ teamName: z.string().min(1).describe("Team to create the viewing for"),
181
+ department: z.enum(["sales", "lettings"]).describe("sales or lettings"),
182
+ propertyId: z.number().int().describe("Property ID"),
183
+ date: z.string().describe("Viewing date (YYYY-MM-DD)"),
184
+ time: z.string().describe("Viewing time (HH:mm)"),
185
+ attendeeName: z.string().describe("Attendee full name"),
186
+ attendeeEmail: z.string().optional().describe("Attendee email"),
187
+ attendeePhone: z.string().optional().describe("Attendee phone"),
188
+ }, toolHandler(async (p) => viewingCreate(p)));
189
+ server.tool("loop-viewing-update", "Add a note or record feedback for a viewing. For feedback, specify the party: buyer/seller (sales) or renter/landlord (lettings).", {
190
+ teamName: z.string().min(1).describe("Team that owns the viewing"),
191
+ viewingId: z.number().int().describe("Viewing ID"),
192
+ department: z.enum(["sales", "lettings"]).describe("sales or lettings"),
193
+ action: z.enum(["note", "feedback"]).describe("note or feedback"),
194
+ text: z.string().describe("Note text or feedback content"),
195
+ feedbackParty: z.enum(["buyer", "seller", "renter", "landlord"]).optional().describe("Required for feedback: whose feedback"),
196
+ }, toolHandler(async (p) => viewingUpdate(p)));
197
+ // ─────────────────────────────────────────────────────────────────
198
+ // Feedback Tools (2) — permission: feedback
199
+ // ─────────────────────────────────────────────────────────────────
200
+ server.tool("loop-feedback-get", "Get feedback for a specific viewing. Reads from /feedback/residential/{department}/viewings/{id}.", {
201
+ teamName: z.string().min(1).describe("Team that owns the viewing"),
202
+ viewingId: z.number().int().describe("Viewing ID"),
203
+ department: z.enum(["sales", "lettings"]).describe("sales or lettings"),
204
+ }, toolHandler(async (p) => feedbackGet(p)));
205
+ server.tool("loop-feedback-submit", "Submit feedback for a viewing. Writes to /feedback/residential/{department}/viewings/{id}/feedback.", {
206
+ teamName: z.string().min(1).describe("Team that owns the viewing"),
207
+ viewingId: z.number().int().describe("Viewing ID"),
208
+ department: z.enum(["sales", "lettings"]).describe("sales or lettings"),
209
+ feedback: z.string().describe("Feedback text"),
210
+ }, toolHandler(async (p) => feedbackSubmit(p)));
211
+ // ─────────────────────────────────────────────────────────────────
212
+ // Team Tools (2) — permission: team
213
+ // ─────────────────────────────────────────────────────────────────
214
+ server.tool("loop-team-info", "Get team details from Loop CRM. Returns team name, address, phone, and email.", {
188
215
  teamName: z.string().optional().describe("Query a specific team only (omit for all teams)"),
189
- }, async (params) => {
190
- try {
191
- const text = await teamInfo({ ...params, accountId });
192
- return { content: [{ type: "text", text }] };
193
- }
194
- catch (err) {
195
- return {
196
- content: [
197
- {
198
- type: "text",
199
- text: `Team info query failed: ${err instanceof Error ? err.message : String(err)}`,
200
- },
201
- ],
202
- isError: true,
203
- };
204
- }
205
- });
216
+ }, toolHandler(async (p) => teamInfo(p)));
217
+ server.tool("loop-team-availability", "Get available time slots for a specific agent on a given date.", {
218
+ agentId: z.string().describe("Agent GUID identifier"),
219
+ searchDate: z.string().describe("Date to check availability (YYYY-MM-DD)"),
220
+ teamName: z.string().optional().describe("Query a specific team only"),
221
+ }, toolHandler(async (p) => teamAvailability(p)));
222
+ // ─────────────────────────────────────────────────────────────────
223
+ // Marketing Tools (4) — permission: marketing
224
+ // ─────────────────────────────────────────────────────────────────
225
+ server.tool("loop-marketing-match", "Get matching property detail and optionally the team profile for that match.", {
226
+ propertyId: z.number().int().describe("Property ID"),
227
+ department: z.enum(["sales", "lettings"]).describe("sales or lettings"),
228
+ includeTeamProfile: z.boolean().optional().describe("Include the team profile for this match (default: false)"),
229
+ teamName: z.string().optional().describe("Query a specific team only"),
230
+ }, toolHandler(async (p) => marketingMatchDetail(p)));
231
+ server.tool("loop-marketing-match-batch", "Get batch matching results for multiple property IDs.", {
232
+ propertyIds: z.array(z.number().int()).describe("Array of property IDs to match"),
233
+ department: z.enum(["sales", "lettings"]).describe("sales or lettings"),
234
+ teamName: z.string().optional().describe("Query a specific team only"),
235
+ }, toolHandler(async (p) => marketingMatchBatch(p)));
236
+ server.tool("loop-marketing-match-request", "Submit a viewing, information, or callback request for a matching property.", {
237
+ teamName: z.string().min(1).describe("Team to submit the request through"),
238
+ propertyId: z.number().int().describe("Matching property ID"),
239
+ department: z.enum(["sales", "lettings"]).describe("sales or lettings"),
240
+ action: z.enum(["viewing", "information", "callback"]).describe("Request type"),
241
+ name: z.string().optional().describe("Requester name"),
242
+ email: z.string().optional().describe("Requester email"),
243
+ phone: z.string().optional().describe("Requester phone"),
244
+ message: z.string().optional().describe("Additional message"),
245
+ }, toolHandler(async (p) => marketingMatchRequest(p)));
246
+ server.tool("loop-marketing-enquiry", "Marketing enquiry operations: submit seller enquiries, manage auto-responder interactions.", {
247
+ teamName: z.string().min(1).describe("Team to submit through"),
248
+ action: z.enum([
249
+ "seller-enquiry", "autoresponder-get", "autoresponder-answers",
250
+ "autoresponder-details", "autoresponder-refer",
251
+ ]).describe("Enquiry action"),
252
+ sellerEnquiryData: z.record(z.string(), z.unknown()).optional().describe("Seller enquiry request body (for seller-enquiry)"),
253
+ autoResponderId: z.number().int().optional().describe("Auto-responder enquiry ID"),
254
+ autoResponderKey: z.string().optional().describe("Auto-responder key (UUID)"),
255
+ answers: z.array(z.unknown()).optional().describe("Auto-responder answers array"),
256
+ details: z.record(z.string(), z.unknown()).optional().describe("Auto-responder details object"),
257
+ }, toolHandler(async (p) => marketingEnquiry(p)));
258
+ // ─────────────────────────────────────────────────────────────────
259
+ // Customer Tools (1) — permission: customer
260
+ // ─────────────────────────────────────────────────────────────────
261
+ server.tool("loop-customer-preferences", "Read or write customer preferences for a person. Action 'read' returns current preferences, 'write' updates them.", {
262
+ teamName: z.string().min(1).describe("Team for this operation"),
263
+ personCode: z.number().int().describe("Person code (ID)"),
264
+ action: z.enum(["read", "write"]).describe("read or write"),
265
+ preferences: z.record(z.string(), z.unknown()).optional().describe("Preferences object (required for write)"),
266
+ }, toolHandler(async (p) => customerPreferences(p)));
267
+ // ─────────────────────────────────────────────────────────────────
268
+ // Supplier Tools (1) — permission: supplier
269
+ // ─────────────────────────────────────────────────────────────────
270
+ server.tool("loop-supplier", "Supplier operations: maintenance jobs, quotes, board contractor jobs. Supports listing, completing, and quoting.", {
271
+ teamName: z.string().min(1).describe("Team for this operation"),
272
+ action: z.enum([
273
+ "maintenance-jobs", "maintenance-complete", "maintenance-quotes",
274
+ "maintenance-submit-quote", "board-jobs", "board-complete",
275
+ ]).describe("Supplier action"),
276
+ code: z.string().describe("Unique code assigned to the contractor"),
277
+ jobId: z.number().int().optional().describe("Job ID (required for all actions except maintenance-submit-quote)"),
278
+ quoteId: z.number().int().optional().describe("Quote ID (for maintenance-submit-quote)"),
279
+ quoteData: z.record(z.string(), z.unknown()).optional().describe("Quote data (for maintenance-submit-quote)"),
280
+ completionData: z.record(z.string(), z.unknown()).optional().describe("Completion data (for board-complete)"),
281
+ }, toolHandler(async (p) => supplier(p)));
206
282
  // ─────────────────────────────────────────────────────────────────
207
283
  // Lifecycle
208
284
  // ─────────────────────────────────────────────────────────────────
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,WAAW,EAA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AwC,CAAC;IACnE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,mEAAmE,CAAC;IAChH,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IACxF,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAC7G,cAAc,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;CAC9G,EACD,WAAW,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAmC,CAAC,CAAC,CACxE,CAAC;AAEF,oEAAoE;AACpE,YAAY;AACZ,oEAAoE;AAEpE,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;IAC9B,MAAM,WAAW,EAAE,CAAC;IACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC;AAEH,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
@@ -31,11 +31,23 @@ export declare function loadTeamKeys(accountId: string): Promise<LoopTeamKey[]>;
31
31
  * Make a GET request to the Loop API V2.
32
32
  */
33
33
  export declare function loopGet<T>(apiKey: string, path: string, toolName: string, teamName: string): Promise<T>;
34
+ /**
35
+ * Make a POST request to the Loop API V2.
36
+ * For write operations: create viewings, record feedback, submit enquiries, etc.
37
+ * Returns parsed JSON response. Treats 204 as success with empty result.
38
+ */
39
+ export declare function loopPost<T>(apiKey: string, path: string, body: unknown, toolName: string, teamName: string): Promise<T>;
40
+ /**
41
+ * Make a PUT request to the Loop API V2.
42
+ * For update operations: batch matching, submit quotes, update preferences, etc.
43
+ */
44
+ export declare function loopPut<T>(apiKey: string, path: string, body: unknown, toolName: string, teamName: string): Promise<T>;
34
45
  export declare class LoopApiError extends Error {
35
46
  readonly status: number;
36
47
  readonly teamName: string;
37
48
  readonly path: string;
38
- constructor(status: number, teamName: string, path: string);
49
+ readonly responseBody?: string | undefined;
50
+ constructor(status: number, teamName: string, path: string, responseBody?: string | undefined);
39
51
  }
40
52
  /**
41
53
  * Fan out a request across all registered teams for an account, merging results.
@@ -55,6 +67,12 @@ export declare function aggregateAcrossTeams<T>(accountId: string, endpointGroup
55
67
  limitPerTeam?: number;
56
68
  limitTotal?: number;
57
69
  }): Promise<AggregationResult<T>>;
70
+ /**
71
+ * Resolve a single team's API key with permission checking.
72
+ * Handles key loading, decryption, and permission validation.
73
+ * Used for both reads and writes that target a specific team — no fan-out.
74
+ */
75
+ export declare function withTeamKey<T>(accountId: string, teamName: string, endpointGroup: string, toolName: string, execute: (apiKey: string) => Promise<T>): Promise<T>;
58
76
  /**
59
77
  * Format an aggregation result into a human-readable text response.
60
78
  */
@@ -1 +1 @@
1
- {"version":3,"file":"loop-api.d.ts","sourceRoot":"","sources":["../../src/lib/loop-api.ts"],"names":[],"mappings":"AAwBA,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,CAAC,EAAE,CAA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