@rubytech/create-maxy 1.0.771 → 1.0.773
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.
- package/package.json +1 -1
- package/payload/platform/plugins/admin/PLUGIN.md +2 -1
- package/payload/platform/plugins/admin/mcp/dist/index.js +131 -20
- package/payload/platform/plugins/admin/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/admin/skills/business-profile/SKILL.md +5 -6
- package/payload/platform/plugins/admin/skills/onboarding/SKILL.md +5 -6
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.d.ts.map +1 -1
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js +21 -6
- package/payload/platform/plugins/memory/mcp/dist/tools/profile-read.js.map +1 -1
- package/payload/platform/templates/agents/admin/IDENTITY.md +3 -2
- package/payload/server/{chunk-TKYZ7AEB.js → chunk-2HBD6IRL.js} +105 -5
- package/payload/server/{chunk-IO2WQEY4.js → chunk-PIMJJCOQ.js} +2 -1
- package/payload/server/{client-pool-5V5GX3UT.js → client-pool-U3A5YUO7.js} +1 -1
- package/payload/server/maxy-edge.js +2 -2
- package/payload/server/public/assets/{admin-CaXX8wc3.js → admin-C4CTVtBu.js} +6 -6
- package/payload/server/public/index.html +1 -1
- package/payload/server/server.js +81 -15
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.d.ts +0 -61
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.d.ts.map +0 -1
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.js +0 -266
- package/payload/platform/plugins/memory/mcp/dist/lib/semantic-chunker.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.d.ts +0 -2
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.js +0 -293
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/index.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.js +0 -88
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/crypto.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.d.ts +0 -80
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.js +0 -355
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.d.ts +0 -5
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.js +0 -34
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.js +0 -24
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/customer-preferences.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.d.ts +0 -6
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.js +0 -18
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.d.ts +0 -16
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.js +0 -35
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.d.ts +0 -5
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.js +0 -19
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-deregister.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.d.ts +0 -4
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.js +0 -14
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.js +0 -60
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-register.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.d.ts +0 -13
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.js +0 -41
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-enquiry.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.js +0 -16
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-batch.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.d.ts +0 -15
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.js +0 -11
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match-request.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.js +0 -39
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/marketing-match.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.js +0 -125
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-detail.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.d.ts +0 -7
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.js +0 -16
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-list.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.d.ts +0 -18
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.js +0 -87
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/people-search.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.d.ts +0 -7
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.js +0 -19
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/properties-list.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.d.ts +0 -10
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.js +0 -82
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-detail.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.d.ts +0 -12
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.js +0 -32
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-listed.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.d.ts +0 -15
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.js +0 -11
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-request.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.d.ts +0 -16
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.js +0 -41
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/property-search.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.d.ts +0 -13
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.js +0 -49
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/supplier.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.d.ts +0 -7
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.js +0 -19
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-availability.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.d.ts +0 -5
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.js +0 -32
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/team-info.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.d.ts +0 -14
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.js +0 -11
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-create.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.js +0 -85
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-detail.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.d.ts +0 -13
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.js +0 -44
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-search.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.d.ts +0 -14
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.js +0 -18
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewing-update.js.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.d.ts +0 -9
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.d.ts.map +0 -1
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.js +0 -25
- package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/viewings-list.js.map +0 -1
- package/payload/server/chunk-26QT2HEQ.js +0 -9483
- package/payload/server/chunk-2T4RRIJK.js +0 -9462
- package/payload/server/chunk-2W7O63CK.js +0 -3052
- package/payload/server/chunk-32ZHQJNX.js +0 -11395
- package/payload/server/chunk-3KDVGWPQ.js +0 -2920
- package/payload/server/chunk-3RBKKDHC.js +0 -783
- package/payload/server/chunk-3VVHVJK2.js +0 -11405
- package/payload/server/chunk-43JK6WNK.js +0 -3057
- package/payload/server/chunk-5YIXIF6C.js +0 -726
- package/payload/server/chunk-7ODDM7L4.js +0 -12370
- package/payload/server/chunk-A5K3CFMI.js +0 -12297
- package/payload/server/chunk-AIWWYOBH.js +0 -9439
- package/payload/server/chunk-B54KBAK4.js +0 -72
- package/payload/server/chunk-BIOIXN5A.js +0 -12165
- package/payload/server/chunk-D53LK5YC.js +0 -12171
- package/payload/server/chunk-EIQT6QDH.js +0 -9562
- package/payload/server/chunk-FM5JMRED.js +0 -12033
- package/payload/server/chunk-HPU24BXP.js +0 -12173
- package/payload/server/chunk-HU5FSQYA.js +0 -12186
- package/payload/server/chunk-IAIGB5WN.js +0 -11406
- package/payload/server/chunk-JDT3MGUY.js +0 -12165
- package/payload/server/chunk-JLVVVQN7.js +0 -9447
- package/payload/server/chunk-K7GQ5RMN.js +0 -12172
- package/payload/server/chunk-LQ5GSMEW.js +0 -12036
- package/payload/server/chunk-MPWGVFU2.js +0 -12340
- package/payload/server/chunk-O2FWENOD.js +0 -11530
- package/payload/server/chunk-PE76FPYP.js +0 -12040
- package/payload/server/chunk-PQ6LDXZ4.js +0 -2997
- package/payload/server/chunk-Q6NDXCM6.js +0 -11448
- package/payload/server/chunk-QXAUMZXQ.js +0 -9512
- package/payload/server/chunk-S3M2NZMA.js +0 -3136
- package/payload/server/chunk-SGBNY4NP.js +0 -9540
- package/payload/server/chunk-SKXO42T6.js +0 -2934
- package/payload/server/chunk-SPTD7L7Z.js +0 -9474
- package/payload/server/chunk-TXPEEAV6.js +0 -2997
- package/payload/server/chunk-U3W5YIXU.js +0 -11450
- package/payload/server/chunk-U5JPRUYZ.js +0 -12298
- package/payload/server/chunk-UFLV7I6N.js +0 -11678
- package/payload/server/chunk-ULVR2RRY.js +0 -9439
- package/payload/server/chunk-VOD2IZ6J.js +0 -2934
- package/payload/server/chunk-VS7CRH4M.js +0 -9439
- package/payload/server/chunk-W6ZUNLLS.js +0 -9446
- package/payload/server/chunk-WW464F23.js +0 -9512
- package/payload/server/chunk-Y57ACANQ.js +0 -12292
- package/payload/server/chunk-ZK3VNR7Y.js +0 -9510
- package/payload/server/chunk-ZL2A4ROK.js +0 -11416
- package/payload/server/client-pool-67NUIL7H.js +0 -28
- package/payload/server/client-pool-CX2MFW75.js +0 -28
- package/payload/server/client-pool-DQBHSKAF.js +0 -28
- package/payload/server/client-pool-I5TCP7WI.js +0 -28
- package/payload/server/client-pool-ISMYJXCU.js +0 -28
- package/payload/server/client-pool-SGPHSYLK.js +0 -28
- package/payload/server/client-pool-TCKGDZLE.js +0 -28
- package/payload/server/client-pool-TULUIO6M.js +0 -28
- package/payload/server/upgrade-progress-server.js +0 -83
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.js
DELETED
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
import { getSession } from "./neo4j.js";
|
|
2
|
-
import { decrypt } from "./crypto.js";
|
|
3
|
-
// ─────────────────────────────────────────────────────────────────
|
|
4
|
-
// Loop API V2 HTTP Client + Cross-Team Aggregation Engine
|
|
5
|
-
//
|
|
6
|
-
// ┌─ Load LoopTeamKey nodes (Neo4j) ─┐
|
|
7
|
-
// │ │
|
|
8
|
-
// ▼ │
|
|
9
|
-
// For each key: │
|
|
10
|
-
// 1. Decrypt API key │
|
|
11
|
-
// 2. Check permissions │
|
|
12
|
-
// 3. HTTP GET/POST/PUT → Loop API V2 │
|
|
13
|
-
// │ │
|
|
14
|
-
// ▼ │
|
|
15
|
-
// Promise.allSettled → merge results │
|
|
16
|
-
// Log aggregate summary │
|
|
17
|
-
// ─────────────────────────────────────────────────────────────────
|
|
18
|
-
const LOOP_BASE_URL = "https://api.loop.software";
|
|
19
|
-
const REQUEST_TIMEOUT_MS = 10_000;
|
|
20
|
-
const DEFAULT_LIMIT_PER_TEAM = 50;
|
|
21
|
-
const DEFAULT_LIMIT_TOTAL = 200;
|
|
22
|
-
function isEnvelope(val) {
|
|
23
|
-
return (val !== null &&
|
|
24
|
-
typeof val === "object" &&
|
|
25
|
-
!Array.isArray(val) &&
|
|
26
|
-
"statusCode" in val &&
|
|
27
|
-
"httpResponseCode" in val &&
|
|
28
|
-
"data" in val);
|
|
29
|
-
}
|
|
30
|
-
function unwrapEnvelope(parsed, toolName, teamName) {
|
|
31
|
-
if (!isEnvelope(parsed)) {
|
|
32
|
-
return parsed;
|
|
33
|
-
}
|
|
34
|
-
if (parsed.statusCode !== "success") {
|
|
35
|
-
const errMsg = parsed.errors?.length
|
|
36
|
-
? parsed.errors.join("; ")
|
|
37
|
-
: `statusCode=${parsed.statusCode}`;
|
|
38
|
-
throw new Error(`Loop API error for team=${teamName} tool=${toolName}: ${errMsg} (httpResponseCode=${parsed.httpResponseCode})`);
|
|
39
|
-
}
|
|
40
|
-
if (parsed.warnings?.length) {
|
|
41
|
-
console.error(`[loop] ${toolName} team=${teamName} warnings: ${parsed.warnings.join("; ")}`);
|
|
42
|
-
}
|
|
43
|
-
return parsed.data;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Load all LoopTeamKey nodes for an account from Neo4j.
|
|
47
|
-
*/
|
|
48
|
-
export async function loadTeamKeys(accountId) {
|
|
49
|
-
const session = getSession();
|
|
50
|
-
try {
|
|
51
|
-
const result = await session.run(`MATCH (k:LoopTeamKey {accountId: $accountId})
|
|
52
|
-
RETURN k.teamName AS teamName, k.encryptedKey AS encryptedKey,
|
|
53
|
-
k.teamAddress AS teamAddress, k.agentId AS agentId,
|
|
54
|
-
k.permissions AS permissions, k.createdAt AS createdAt,
|
|
55
|
-
k.updatedAt AS updatedAt
|
|
56
|
-
ORDER BY k.teamName`, { accountId });
|
|
57
|
-
return result.records.map((r) => ({
|
|
58
|
-
teamName: r.get("teamName"),
|
|
59
|
-
encryptedKey: r.get("encryptedKey"),
|
|
60
|
-
teamAddress: r.get("teamAddress") ?? "",
|
|
61
|
-
agentId: r.get("agentId") ?? "",
|
|
62
|
-
permissions: r.get("permissions") ?? [],
|
|
63
|
-
createdAt: r.get("createdAt") ?? "",
|
|
64
|
-
updatedAt: r.get("updatedAt") ?? "",
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
finally {
|
|
68
|
-
await session.close();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Make a GET request to the Loop API V2.
|
|
73
|
-
*/
|
|
74
|
-
export async function loopGet(apiKey, path, toolName, teamName) {
|
|
75
|
-
const url = `${LOOP_BASE_URL}${path}`;
|
|
76
|
-
const start = Date.now();
|
|
77
|
-
const response = await fetch(url, {
|
|
78
|
-
headers: { "X-Api-Key": apiKey, "Accept": "application/json" },
|
|
79
|
-
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
|
|
80
|
-
});
|
|
81
|
-
const duration = Date.now() - start;
|
|
82
|
-
console.error(`[loop] ${toolName} team=${teamName} endpoint=GET ${path} status=${response.status} duration=${duration}ms`);
|
|
83
|
-
if (response.status === 204) {
|
|
84
|
-
return [];
|
|
85
|
-
}
|
|
86
|
-
if (!response.ok) {
|
|
87
|
-
throw new LoopApiError(response.status, teamName, path);
|
|
88
|
-
}
|
|
89
|
-
const text = await response.text();
|
|
90
|
-
try {
|
|
91
|
-
const parsed = JSON.parse(text);
|
|
92
|
-
return unwrapEnvelope(parsed, toolName, teamName);
|
|
93
|
-
}
|
|
94
|
-
catch (err) {
|
|
95
|
-
if (err instanceof SyntaxError) {
|
|
96
|
-
throw new Error(`Loop returned non-JSON response for team=${teamName} path=${path} ` +
|
|
97
|
-
`(status=${response.status}, length=${text.length})`);
|
|
98
|
-
}
|
|
99
|
-
throw err;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Make a POST request to the Loop API V2.
|
|
104
|
-
* For write operations: create viewings, record feedback, submit enquiries, etc.
|
|
105
|
-
* Returns parsed JSON response. Treats 204 as success with empty result.
|
|
106
|
-
*/
|
|
107
|
-
export async function loopPost(apiKey, path, body, toolName, teamName) {
|
|
108
|
-
const url = `${LOOP_BASE_URL}${path}`;
|
|
109
|
-
const start = Date.now();
|
|
110
|
-
const response = await fetch(url, {
|
|
111
|
-
method: "POST",
|
|
112
|
-
headers: {
|
|
113
|
-
"X-Api-Key": apiKey,
|
|
114
|
-
"Accept": "application/json",
|
|
115
|
-
"Content-Type": "application/json",
|
|
116
|
-
},
|
|
117
|
-
body: JSON.stringify(body),
|
|
118
|
-
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
|
|
119
|
-
});
|
|
120
|
-
const duration = Date.now() - start;
|
|
121
|
-
console.error(`[loop] WRITE ${toolName} team=${teamName} endpoint=POST ${path} status=${response.status} duration=${duration}ms`);
|
|
122
|
-
if (response.status === 204) {
|
|
123
|
-
return { success: true };
|
|
124
|
-
}
|
|
125
|
-
if (!response.ok) {
|
|
126
|
-
const errorBody = await response.text().catch(() => "");
|
|
127
|
-
throw new LoopApiError(response.status, teamName, path, errorBody);
|
|
128
|
-
}
|
|
129
|
-
const text = await response.text();
|
|
130
|
-
try {
|
|
131
|
-
const parsed = JSON.parse(text);
|
|
132
|
-
return unwrapEnvelope(parsed, toolName, teamName);
|
|
133
|
-
}
|
|
134
|
-
catch (err) {
|
|
135
|
-
if (err instanceof SyntaxError) {
|
|
136
|
-
throw new Error(`Loop returned non-JSON response for team=${teamName} path=${path} ` +
|
|
137
|
-
`(status=${response.status}, length=${text.length})`);
|
|
138
|
-
}
|
|
139
|
-
throw err;
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Make a PUT request to the Loop API V2.
|
|
144
|
-
* For update operations: batch matching, submit quotes, update preferences, etc.
|
|
145
|
-
*/
|
|
146
|
-
export async function loopPut(apiKey, path, body, toolName, teamName) {
|
|
147
|
-
const url = `${LOOP_BASE_URL}${path}`;
|
|
148
|
-
const start = Date.now();
|
|
149
|
-
const response = await fetch(url, {
|
|
150
|
-
method: "PUT",
|
|
151
|
-
headers: {
|
|
152
|
-
"X-Api-Key": apiKey,
|
|
153
|
-
"Accept": "application/json",
|
|
154
|
-
"Content-Type": "application/json",
|
|
155
|
-
},
|
|
156
|
-
body: JSON.stringify(body),
|
|
157
|
-
signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
|
|
158
|
-
});
|
|
159
|
-
const duration = Date.now() - start;
|
|
160
|
-
console.error(`[loop] WRITE ${toolName} team=${teamName} endpoint=PUT ${path} status=${response.status} duration=${duration}ms`);
|
|
161
|
-
if (response.status === 204) {
|
|
162
|
-
return { success: true };
|
|
163
|
-
}
|
|
164
|
-
if (!response.ok) {
|
|
165
|
-
const errorBody = await response.text().catch(() => "");
|
|
166
|
-
throw new LoopApiError(response.status, teamName, path, errorBody);
|
|
167
|
-
}
|
|
168
|
-
const text = await response.text();
|
|
169
|
-
try {
|
|
170
|
-
const parsed = JSON.parse(text);
|
|
171
|
-
return unwrapEnvelope(parsed, toolName, teamName);
|
|
172
|
-
}
|
|
173
|
-
catch (err) {
|
|
174
|
-
if (err instanceof SyntaxError) {
|
|
175
|
-
throw new Error(`Loop returned non-JSON response for team=${teamName} path=${path} ` +
|
|
176
|
-
`(status=${response.status}, length=${text.length})`);
|
|
177
|
-
}
|
|
178
|
-
throw err;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
export class LoopApiError extends Error {
|
|
182
|
-
status;
|
|
183
|
-
teamName;
|
|
184
|
-
path;
|
|
185
|
-
responseBody;
|
|
186
|
-
constructor(status, teamName, path, responseBody) {
|
|
187
|
-
const detail = responseBody ? ` — ${responseBody.slice(0, 200)}` : "";
|
|
188
|
-
super(`Loop API returned ${status} for team=${teamName} path=${path}${detail}`);
|
|
189
|
-
this.status = status;
|
|
190
|
-
this.teamName = teamName;
|
|
191
|
-
this.path = path;
|
|
192
|
-
this.responseBody = responseBody;
|
|
193
|
-
this.name = "LoopApiError";
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Fan out a request across all registered teams for an account, merging results.
|
|
198
|
-
*
|
|
199
|
-
* Each tool provides a `buildRequest` function that takes a decrypted API key
|
|
200
|
-
* and returns the data for that team. The aggregation engine handles:
|
|
201
|
-
* - Key loading and decryption
|
|
202
|
-
* - Permission checking
|
|
203
|
-
* - Concurrent fan-out via Promise.allSettled
|
|
204
|
-
* - Result merging with teamName tags
|
|
205
|
-
* - Aggregate logging
|
|
206
|
-
*
|
|
207
|
-
* When `teamName` is provided, only that team is queried (no fan-out).
|
|
208
|
-
*/
|
|
209
|
-
export async function aggregateAcrossTeams(accountId, endpointGroup, toolName, buildRequest, options) {
|
|
210
|
-
const allKeys = await loadTeamKeys(accountId);
|
|
211
|
-
if (allKeys.length === 0) {
|
|
212
|
-
return { results: [], failures: [], skipped: [], totalTeams: 0 };
|
|
213
|
-
}
|
|
214
|
-
// Filter to specific team if requested
|
|
215
|
-
const keys = options?.teamName
|
|
216
|
-
? allKeys.filter((k) => k.teamName === options.teamName)
|
|
217
|
-
: allKeys;
|
|
218
|
-
if (keys.length === 0 && options?.teamName) {
|
|
219
|
-
return {
|
|
220
|
-
results: [],
|
|
221
|
-
failures: [{ teamName: options.teamName, reason: "Team not found" }],
|
|
222
|
-
skipped: [],
|
|
223
|
-
totalTeams: allKeys.length,
|
|
224
|
-
};
|
|
225
|
-
}
|
|
226
|
-
const limitPerTeam = options?.limitPerTeam ?? DEFAULT_LIMIT_PER_TEAM;
|
|
227
|
-
const limitTotal = options?.limitTotal ?? DEFAULT_LIMIT_TOTAL;
|
|
228
|
-
const results = [];
|
|
229
|
-
const failures = [];
|
|
230
|
-
const skipped = [];
|
|
231
|
-
// Check permissions and build request promises
|
|
232
|
-
const tasks = [];
|
|
233
|
-
for (const key of keys) {
|
|
234
|
-
if (!key.permissions.includes(endpointGroup)) {
|
|
235
|
-
console.error(`[loop] ${toolName} team=${key.teamName} — permission denied (requires: ${endpointGroup})`);
|
|
236
|
-
skipped.push({
|
|
237
|
-
teamName: key.teamName,
|
|
238
|
-
reason: `No ${endpointGroup} permission`,
|
|
239
|
-
});
|
|
240
|
-
continue;
|
|
241
|
-
}
|
|
242
|
-
let apiKey;
|
|
243
|
-
try {
|
|
244
|
-
apiKey = decrypt(key.encryptedKey);
|
|
245
|
-
}
|
|
246
|
-
catch (err) {
|
|
247
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
248
|
-
console.error(`[loop] decrypt failed for team=${key.teamName}: ${msg}`);
|
|
249
|
-
failures.push({ teamName: key.teamName, reason: `Decryption failed` });
|
|
250
|
-
continue;
|
|
251
|
-
}
|
|
252
|
-
tasks.push({ key, promise: buildRequest(apiKey, key.teamName) });
|
|
253
|
-
}
|
|
254
|
-
// Fan out concurrent requests
|
|
255
|
-
const settled = await Promise.allSettled(tasks.map((t) => t.promise));
|
|
256
|
-
for (let i = 0; i < settled.length; i++) {
|
|
257
|
-
const outcome = settled[i];
|
|
258
|
-
const teamName = tasks[i].key.teamName;
|
|
259
|
-
if (outcome.status === "fulfilled") {
|
|
260
|
-
const data = Array.isArray(outcome.value)
|
|
261
|
-
? outcome.value.slice(0, limitPerTeam)
|
|
262
|
-
: [];
|
|
263
|
-
results.push({ teamName, data });
|
|
264
|
-
}
|
|
265
|
-
else {
|
|
266
|
-
const reason = outcome.reason instanceof LoopApiError
|
|
267
|
-
? `HTTP ${outcome.reason.status}`
|
|
268
|
-
: outcome.reason instanceof Error
|
|
269
|
-
? outcome.reason.message
|
|
270
|
-
: String(outcome.reason);
|
|
271
|
-
console.error(`[loop] ${toolName} team=${teamName} failed: ${reason}`);
|
|
272
|
-
failures.push({ teamName, reason });
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
// Apply total limit across all teams
|
|
276
|
-
let totalItems = 0;
|
|
277
|
-
for (const r of results) {
|
|
278
|
-
const remaining = limitTotal - totalItems;
|
|
279
|
-
if (remaining <= 0) {
|
|
280
|
-
r.data = [];
|
|
281
|
-
}
|
|
282
|
-
else if (r.data.length > remaining) {
|
|
283
|
-
r.data = r.data.slice(0, remaining);
|
|
284
|
-
}
|
|
285
|
-
totalItems += r.data.length;
|
|
286
|
-
}
|
|
287
|
-
console.error(`[loop] aggregate tool=${toolName} teams=${keys.length} ` +
|
|
288
|
-
`succeeded=${results.length} failed=${failures.length} skipped=${skipped.length}`);
|
|
289
|
-
return { results, failures, skipped, totalTeams: allKeys.length };
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Resolve a single team's API key with permission checking.
|
|
293
|
-
* Handles key loading, decryption, and permission validation.
|
|
294
|
-
* Used for both reads and writes that target a specific team — no fan-out.
|
|
295
|
-
*/
|
|
296
|
-
export async function withTeamKey(accountId, teamName, endpointGroup, toolName, execute) {
|
|
297
|
-
const allKeys = await loadTeamKeys(accountId);
|
|
298
|
-
if (allKeys.length === 0) {
|
|
299
|
-
throw new Error("No Loop teams registered. Use loop-key-register to add team API keys.");
|
|
300
|
-
}
|
|
301
|
-
const key = allKeys.find((k) => k.teamName === teamName);
|
|
302
|
-
if (!key) {
|
|
303
|
-
const available = allKeys.map((k) => k.teamName).join(", ");
|
|
304
|
-
throw new Error(`Team "${teamName}" not found. Available teams: ${available}`);
|
|
305
|
-
}
|
|
306
|
-
if (!key.permissions.includes(endpointGroup)) {
|
|
307
|
-
throw new Error(`Team "${teamName}" does not have ${endpointGroup} permission. ` +
|
|
308
|
-
`Current permissions: ${key.permissions.join(", ")}`);
|
|
309
|
-
}
|
|
310
|
-
const apiKey = decrypt(key.encryptedKey);
|
|
311
|
-
return execute(apiKey);
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Format an aggregation result into a human-readable text response.
|
|
315
|
-
*/
|
|
316
|
-
export function formatAggregationResult(result, formatItem, entityName) {
|
|
317
|
-
if (result.totalTeams === 0) {
|
|
318
|
-
return "No Loop teams registered. Use loop-key-register to add team API keys.";
|
|
319
|
-
}
|
|
320
|
-
const allSkippedOrFailed = result.results.length === 0 && result.failures.length + result.skipped.length > 0;
|
|
321
|
-
if (allSkippedOrFailed) {
|
|
322
|
-
const reasons = [
|
|
323
|
-
...result.failures.map((f) => `${f.teamName}: ${f.reason}`),
|
|
324
|
-
...result.skipped.map((s) => `${s.teamName}: ${s.reason}`),
|
|
325
|
-
];
|
|
326
|
-
return `All teams failed or were skipped:\n${reasons.join("\n")}`;
|
|
327
|
-
}
|
|
328
|
-
const lines = [];
|
|
329
|
-
let totalItems = 0;
|
|
330
|
-
for (const teamResult of result.results) {
|
|
331
|
-
if (teamResult.data.length === 0)
|
|
332
|
-
continue;
|
|
333
|
-
totalItems += teamResult.data.length;
|
|
334
|
-
lines.push(`\n## ${teamResult.teamName}`);
|
|
335
|
-
for (const item of teamResult.data) {
|
|
336
|
-
lines.push(formatItem(item, teamResult.teamName));
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
if (totalItems === 0) {
|
|
340
|
-
const teamCount = result.results.length === 1
|
|
341
|
-
? result.results[0].teamName
|
|
342
|
-
: `${result.results.length} teams`;
|
|
343
|
-
return `No ${entityName} found across ${teamCount}.`;
|
|
344
|
-
}
|
|
345
|
-
let header = `${totalItems} ${entityName} across ${result.results.length} team(s):`;
|
|
346
|
-
const parts = [header, ...lines];
|
|
347
|
-
if (result.failures.length > 0) {
|
|
348
|
-
parts.push(`\n---\nNote: ${result.failures.length} team(s) failed — check server.log for details.`);
|
|
349
|
-
}
|
|
350
|
-
if (result.skipped.length > 0) {
|
|
351
|
-
parts.push(`Note: ${result.skipped.length} team(s) skipped (insufficient permissions).`);
|
|
352
|
-
}
|
|
353
|
-
return parts.join("\n");
|
|
354
|
-
}
|
|
355
|
-
//# sourceMappingURL=loop-api.js.map
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/loop-api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"loop-api.js","sourceRoot":"","sources":["../../src/lib/loop-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,oEAAoE;AACpE,0DAA0D;AAC1D,EAAE;AACF,yCAAyC;AACzC,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,2CAA2C;AAC3C,oEAAoE;AAEpE,MAAM,aAAa,GAAG,2BAA2B,CAAC;AAClD,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAClC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAsBhC,SAAS,UAAU,CAAC,GAAY;IAC9B,OAAO,CACL,GAAG,KAAK,IAAI;QACZ,OAAO,GAAG,KAAK,QAAQ;QACvB,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC;QACnB,YAAY,IAAI,GAAG;QACnB,kBAAkB,IAAI,GAAG;QACzB,MAAM,IAAI,GAAG,CACd,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAI,MAAe,EAAE,QAAgB,EAAE,QAAgB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GAAG,KAAK,CAAC,CAAC;IAE3C,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/B,KAAK,CAAC,IAAI,CACR,gBAAgB,MAAM,CAAC,QAAQ,CAAC,MAAM,iDAAiD,CACxF,CAAC;IACJ,CAAC;IACD,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC9B,KAAK,CAAC,IAAI,CACR,SAAS,MAAM,CAAC,OAAO,CAAC,MAAM,8CAA8C,CAC7E,CAAC;IACJ,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"neo4j.d.ts","sourceRoot":"","sources":["../../src/lib/neo4j.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAuBtD,wBAAgB,SAAS,IAAI,MAAM,CAQlC;AAED,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAKjD"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import neo4j from "neo4j-driver";
|
|
2
|
-
import { readFileSync } from "node:fs";
|
|
3
|
-
import { resolve } from "node:path";
|
|
4
|
-
let driver = null;
|
|
5
|
-
function readPassword() {
|
|
6
|
-
if (process.env.NEO4J_PASSWORD)
|
|
7
|
-
return process.env.NEO4J_PASSWORD;
|
|
8
|
-
const passwordFile = resolve(process.env.PLATFORM_ROOT ?? resolve(import.meta.dirname, "../../../.."), "config/.neo4j-password");
|
|
9
|
-
try {
|
|
10
|
-
return readFileSync(passwordFile, "utf-8").trim();
|
|
11
|
-
}
|
|
12
|
-
catch {
|
|
13
|
-
throw new Error(`Neo4j password not found. Expected at ${passwordFile} or in NEO4J_PASSWORD env var.`);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export function getDriver() {
|
|
17
|
-
if (!driver) {
|
|
18
|
-
const uri = process.env.NEO4J_URI ?? "bolt://localhost:7687";
|
|
19
|
-
const user = process.env.NEO4J_USER ?? "neo4j";
|
|
20
|
-
const password = readPassword();
|
|
21
|
-
driver = neo4j.driver(uri, neo4j.auth.basic(user, password));
|
|
22
|
-
}
|
|
23
|
-
return driver;
|
|
24
|
-
}
|
|
25
|
-
export function getSession() {
|
|
26
|
-
return getDriver().session();
|
|
27
|
-
}
|
|
28
|
-
export async function closeDriver() {
|
|
29
|
-
if (driver) {
|
|
30
|
-
await driver.close();
|
|
31
|
-
driver = null;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=neo4j.js.map
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/lib/neo4j.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"neo4j.js","sourceRoot":"","sources":["../../src/lib/neo4j.ts"],"names":[],"mappings":"AAAA,OAAO,KAA0B,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,IAAI,MAAM,GAAkB,IAAI,CAAC;AAEjC,SAAS,YAAY;IACnB,IAAI,OAAO,CAAC,GAAG,CAAC,cAAc;QAAE,OAAO,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;IAElE,MAAM,YAAY,GAAG,OAAO,CAC1B,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,EACxE,wBAAwB,CACzB,CAAC;IAEF,IAAI,CAAC;QACH,OAAO,YAAY,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IACpD,CAAC;IAAC,MAAM,CAAC;QACP,MAAM,IAAI,KAAK,CACb,yCAAyC,YAAY,gCAAgC,CACtF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,SAAS;IACvB,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,uBAAuB,CAAC;QAC7D,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,OAAO,CAAC;QAC/C,MAAM,QAAQ,GAAG,YAAY,EAAE,CAAC;QAChC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC/D,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,OAAO,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC;AAC/B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW;IAC/B,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,MAAM,GAAG,IAAI,CAAC;IAChB,CAAC;AACH,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type PreferencesAction = "read" | "write";
|
|
2
|
-
export declare function customerPreferences(params: {
|
|
3
|
-
accountId: string;
|
|
4
|
-
teamName: string;
|
|
5
|
-
personCode: number;
|
|
6
|
-
action: PreferencesAction;
|
|
7
|
-
preferences?: Record<string, unknown>;
|
|
8
|
-
}): Promise<string>;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=customer-preferences.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"customer-preferences.d.ts","sourceRoot":"","sources":["../../src/tools/customer-preferences.ts"],"names":[],"mappings":"AAEA,KAAK,iBAAiB,GAAG,MAAM,GAAG,OAAO,CAAC;AAmB1C,wBAAsB,mBAAmB,CAAC,MAAM,EAAE;IAChD,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,GAAG,OAAO,CAAC,MAAM,CAAC,CAsClB"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { loopGet, loopPost, withTeamKey } from "../lib/loop-api.js";
|
|
2
|
-
export async function customerPreferences(params) {
|
|
3
|
-
const { accountId, teamName, personCode, action } = params;
|
|
4
|
-
if (action === "read") {
|
|
5
|
-
const result = await withTeamKey(accountId, teamName, "customer", "loop-customer-preferences", async (apiKey) => {
|
|
6
|
-
return loopGet(apiKey, `/customer/preferences/${personCode}`, "loop-customer-preferences", teamName);
|
|
7
|
-
});
|
|
8
|
-
if (!result || (Array.isArray(result) && result.length === 0)) {
|
|
9
|
-
return `No preferences found for person ${personCode} via team "${teamName}".`;
|
|
10
|
-
}
|
|
11
|
-
return JSON.stringify(result, null, 2);
|
|
12
|
-
}
|
|
13
|
-
if (action === "write") {
|
|
14
|
-
if (!params.preferences) {
|
|
15
|
-
throw new Error("preferences object is required when action is 'write'.");
|
|
16
|
-
}
|
|
17
|
-
await withTeamKey(accountId, teamName, "customer", "loop-customer-preferences", async (apiKey) => {
|
|
18
|
-
return loopPost(apiKey, `/customer/preferences/${personCode}`, params.preferences, "loop-customer-preferences", teamName);
|
|
19
|
-
});
|
|
20
|
-
return `Preferences updated for person ${personCode} via team "${teamName}".`;
|
|
21
|
-
}
|
|
22
|
-
throw new Error(`Unknown action: ${action}. Use "read" or "write".`);
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=customer-preferences.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"customer-preferences.js","sourceRoot":"","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AO,kCAAkC,UAAU,cAAc,QAAQ,IAAI,CAAC;IAChF,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,mBAAmB,MAAM,0BAA0B,CAAC,CAAC;AACvE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-list.d.ts","sourceRoot":"","sources":["../../src/tools/feedback-list.ts"],"names":[],"mappings":"AAiBA,wBAAsB,YAAY,CAAC,MAAM,EAAE;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,MAAM,CAAC,CAgClB"}
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback-list.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { aggregateAcrossTeams, formatAggregationResult, loopGet, } from "../lib/loop-api.js";
|
|
2
|
-
export async function feedbackList(params) {
|
|
3
|
-
const { accountId, teamName, limit } = params;
|
|
4
|
-
const result = await aggregateAcrossTeams(accountId, "feedback", "loop-feedback-list", async (apiKey, team) => {
|
|
5
|
-
const data = await loopGet(apiKey, "/feedback", "loop-feedback-list", team);
|
|
6
|
-
return Array.isArray(data) ? data : [];
|
|
7
|
-
}, { teamName, limitPerTeam: limit ?? 50, limitTotal: limit ?? 200 });
|
|
8
|
-
return formatAggregationResult(result, (f) => {
|
|
9
|
-
const addr = f.propertyAddress ?? "Unknown property";
|
|
10
|
-
const date = f.viewingDate ?? "";
|
|
11
|
-
const attendee = f.attendeeName ? ` (${f.attendeeName})` : "";
|
|
12
|
-
const rating = f.rating != null ? ` ★${f.rating}` : "";
|
|
13
|
-
const text = f.feedback ? `: "${f.feedback}"` : "";
|
|
14
|
-
const status = f.status ? ` [${f.status}]` : "";
|
|
15
|
-
return `- ${addr} ${date}${attendee}${rating}${status}${text}`;
|
|
16
|
-
}, "feedback");
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=feedback-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feedback-list.js","sourceRoot":"","sources":["../../src/tools/feedback-list.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,OAAO,GACR,MAAM,oBAAoB,CAAC;AAa5B,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAIlC;IACC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,MAAM,CAAC;IAE9C,MAAM,MAAM,GAAG,MAAM,oBAAoB,CACvC,SAAS,EACT,UAAU,EACV,oBAAoB,EACpB,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;QACrB,MAAM,IAAI,GAAG,MAAM,OAAO,CACxB,MAAM,EACN,WAAW,EACX,oBAAoB,EACpB,IAAI,CACL,CAAC;QACF,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;IACzC,CAAC,EACD,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,IAAI,EAAE,EAAE,UAAU,EAAE,KAAK,IAAI,GAAG,EAAE,CAClE,CAAC;IAEF,OAAO,uBAAuB,CAC5B,MAAM,EACN,CAAC,CAAC,EAAE,EAAE;QACJ,MAAM,IAAI,GAAG,CAAC,CAAC,eAAe,IAAI,kBAAkB,CAAC;QACrD,MAAM,IAAI,GAAG,CAAC,CAAC,WAAW,IAAI,EAAE,CAAC;QACjC,MAAM,QAAQ,GAAG,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9D,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvD,MAAM,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACnD,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAChD,OAAO,KAAK,IAAI,IAAI,IAAI,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,CAAC;IACjE,CAAC,EACD,UAAU,CACX,CAAC;AACJ,CAAC"}
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
type Department = "sales" | "lettings";
|
|
2
|
-
export declare function feedbackGet(params: {
|
|
3
|
-
accountId: string;
|
|
4
|
-
teamName: string;
|
|
5
|
-
viewingId: number;
|
|
6
|
-
department: Department;
|
|
7
|
-
}): Promise<string>;
|
|
8
|
-
export declare function feedbackSubmit(params: {
|
|
9
|
-
accountId: string;
|
|
10
|
-
teamName: string;
|
|
11
|
-
viewingId: number;
|
|
12
|
-
department: Department;
|
|
13
|
-
feedback: string;
|
|
14
|
-
}): Promise<string>;
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=feedback.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feedback.d.ts","sourceRoot":"","sources":["../../src/tools/feedback.ts"],"names":[],"mappings":"AAMA,KAAK,UAAU,GAAG,OAAO,GAAG,UAAU,CAAC;AAwBvC,wBAAsB,WAAW,CAAC,MAAM,EAAE;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;CACxB,GAAG,OAAO,CAAC,MAAM,CAAC,CA2BlB;AAED,wBAAsB,cAAc,CAAC,MAAM,EAAE;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,OAAO,CAAC,MAAM,CAAC,CAelB"}
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { loopGet, loopPost, withTeamKey, } from "../lib/loop-api.js";
|
|
2
|
-
export async function feedbackGet(params) {
|
|
3
|
-
const { accountId, teamName, viewingId, department } = params;
|
|
4
|
-
const result = await withTeamKey(accountId, teamName, "feedback", "loop-feedback-get", async (apiKey) => {
|
|
5
|
-
const path = `/feedback/residential/${department}/viewings/${viewingId}`;
|
|
6
|
-
return loopGet(apiKey, path, "loop-feedback-get", teamName);
|
|
7
|
-
});
|
|
8
|
-
if (!result || (Array.isArray(result) && result.length === 0)) {
|
|
9
|
-
return `No feedback found for viewing ${viewingId} (${department}) via team "${teamName}".`;
|
|
10
|
-
}
|
|
11
|
-
const f = result;
|
|
12
|
-
const lines = [`**Feedback for viewing ${viewingId}**`];
|
|
13
|
-
if (f.propertyAddress)
|
|
14
|
-
lines.push(`Property: ${f.propertyAddress}`);
|
|
15
|
-
if (f.date)
|
|
16
|
-
lines.push(`Date: ${f.date}`);
|
|
17
|
-
if (f.attendeeName)
|
|
18
|
-
lines.push(`Attendee: ${f.attendeeName}`);
|
|
19
|
-
if (f.rating != null)
|
|
20
|
-
lines.push(`Rating: ★${f.rating}`);
|
|
21
|
-
if (f.status)
|
|
22
|
-
lines.push(`Status: ${f.status}`);
|
|
23
|
-
if (f.feedback)
|
|
24
|
-
lines.push(`Feedback: ${f.feedback}`);
|
|
25
|
-
return lines.join("\n");
|
|
26
|
-
}
|
|
27
|
-
export async function feedbackSubmit(params) {
|
|
28
|
-
const { accountId, teamName, viewingId, department, feedback } = params;
|
|
29
|
-
await withTeamKey(accountId, teamName, "feedback", "loop-feedback-submit", async (apiKey) => {
|
|
30
|
-
const path = `/feedback/residential/${department}/viewings/${viewingId}/feedback`;
|
|
31
|
-
return loopPost(apiKey, path, { result: feedback }, "loop-feedback-submit", teamName);
|
|
32
|
-
});
|
|
33
|
-
return `Feedback submitted for viewing ${viewingId} (${department}) via team "${teamName}".`;
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=feedback.js.map
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/feedback.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feedback.js","sourceRoot":"","sources":["../../src/tools/feedback.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,WAAW,GACZ,MAAM,oBAAoB,CAAC;AA0B5B,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,MAKjC;IACC,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,CAAC;IAE9D,MAAM,MAAM,GAAG,MAAM,WAAW,CAC9B,SAAS,EACT,QAAQ,EACR,UAAU,EACV,mBAAmB,EACnB,KAAK,EAAE,MAAM,EAAE,EAAE;QACf,MAAM,IAAI,GAAG,yBAAyB,UAAU,aAAa,SAAS,EAAE,CAAC;QACzE,OAAO,OAAO,CAAsB,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,QAAQ,CAAC,CAAC;IACnF,CAAC,CACF,CAAC;IAEF,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE,CAAC;QAC9D,OAAO,iCAAiC,SAAS,KAAK,UAAU,eAAe,QAAQ,IAAI,CAAC;IAC9F,CAAC;IAED,MAAM,CAAC,GAAG,MAAM,CAAC;IACjB,MAAM,KAAK,GAAG,CAAC,0BAA0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AI,CAAC;AAC/F,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key-deregister.d.ts","sourceRoot":"","sources":["../../src/tools/key-deregister.ts"],"names":[],"mappings":"AAEA,wBAAsB,aAAa,CAAC,MAAM,EAAE;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBhB"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getSession } from "../lib/neo4j.js";
|
|
2
|
-
export async function keyDeregister(params) {
|
|
3
|
-
const { teamName, accountId } = params;
|
|
4
|
-
const session = getSession();
|
|
5
|
-
try {
|
|
6
|
-
const result = await session.run(`MATCH (k:LoopTeamKey {teamName: $teamName, accountId: $accountId})
|
|
7
|
-
DELETE k
|
|
8
|
-
RETURN count(k) AS deleted`, { teamName, accountId });
|
|
9
|
-
const deleted = result.records[0]?.get("deleted")?.toNumber?.() ?? 0;
|
|
10
|
-
if (deleted === 0) {
|
|
11
|
-
throw new Error(`Team "${teamName}" not found.`);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
finally {
|
|
15
|
-
await session.close();
|
|
16
|
-
}
|
|
17
|
-
console.error(`[loop] key-deregister team=${teamName} account=${accountId}`);
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=key-deregister.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key-deregister.js","sourceRoot":"","sources":["../../src/tools/key-deregister.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,MAGnC;IACC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAEvC,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,GAAG,CAC9B;;kCAE4B,EAC5B,EAAE,QAAQ,EAAE,SAAS,EAAE,CACxB,CAAC;QAEF,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC;QACrE,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,SAAS,QAAQ,cAAc,CAAC,CAAC;QACnD,CAAC;IACH,CAAC;YAAS,CAAC;QACT,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,8BAA8B,QAAQ,YAAY,SAAS,EAAE,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key-list.d.ts","sourceRoot":"","sources":["../../src/tools/key-list.ts"],"names":[],"mappings":"AAEA,wBAAsB,OAAO,CAAC,MAAM,EAAE;IACpC,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,OAAO,CAAC,MAAM,CAAC,CAclB"}
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { loadTeamKeys } from "../lib/loop-api.js";
|
|
2
|
-
export async function keyList(params) {
|
|
3
|
-
const keys = await loadTeamKeys(params.accountId);
|
|
4
|
-
if (keys.length === 0) {
|
|
5
|
-
return "No Loop teams registered. Use loop-key-register to add team API keys.";
|
|
6
|
-
}
|
|
7
|
-
const lines = keys.map((k) => {
|
|
8
|
-
const perms = k.permissions.join(", ");
|
|
9
|
-
const addr = k.teamAddress ? ` — ${k.teamAddress}` : "";
|
|
10
|
-
return `- **${k.teamName}**${addr} (permissions: ${perms}, registered: ${k.createdAt})`;
|
|
11
|
-
});
|
|
12
|
-
return `${keys.length} Loop team(s) registered:\n\n${lines.join("\n")}`;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=key-list.js.map
|
package/payload/premium-plugins/real-agency/plugins/real-agency-loop/mcp/dist/tools/key-list.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"key-list.js","sourceRoot":"","sources":["../../src/tools/key-list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,MAE7B;IACC,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAElD,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACtB,OAAO,uEAAuE,CAAC;IACjF,CAAC;IAED,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxD,OAAO,OAAO,CAAC,CAAC,QAAQ,KAAK,IAAI,kBAAkB,KAAK,iBAAiB,CAAC,CAAC,SAAS,GAAG,CAAC;IAC1F,CAAC,CAAC,CAAC;IAEH,OAAO,GAAG,IAAI,CAAC,MAAM,gCAAgC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;AAC1E,CAAC"}
|