@drqedwards/pmll 2.0.4
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/LICENSE +21 -0
- package/README.md +26 -0
- package/agent_instructions.md +123 -0
- package/benchmarks/benchmark_retrieval.md +94 -0
- package/benchmarks/contextplus-standalone-speed.md +185 -0
- package/benchmarks/run_retrieval_stub.py +343 -0
- package/benchmarks/speed-test-results.md +163 -0
- package/benchmarks/three-way-speed-comparison.md +238 -0
- package/dist/embeddings.d.ts +32 -0
- package/dist/embeddings.d.ts.map +1 -0
- package/dist/embeddings.js +140 -0
- package/dist/embeddings.js.map +1 -0
- package/dist/graphql.d.ts +81 -0
- package/dist/graphql.d.ts.map +1 -0
- package/dist/graphql.js +389 -0
- package/dist/graphql.js.map +1 -0
- package/dist/index.d.ts +55 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +645 -0
- package/dist/index.js.map +1 -0
- package/dist/kv-store.d.ts +32 -0
- package/dist/kv-store.d.ts.map +1 -0
- package/dist/kv-store.js +103 -0
- package/dist/kv-store.js.map +1 -0
- package/dist/memory-graph.d.ts +122 -0
- package/dist/memory-graph.d.ts.map +1 -0
- package/dist/memory-graph.js +345 -0
- package/dist/memory-graph.js.map +1 -0
- package/dist/peek.d.ts +67 -0
- package/dist/peek.d.ts.map +1 -0
- package/dist/peek.js +61 -0
- package/dist/peek.js.map +1 -0
- package/dist/q-promise-bridge.d.ts +58 -0
- package/dist/q-promise-bridge.d.ts.map +1 -0
- package/dist/q-promise-bridge.js +88 -0
- package/dist/q-promise-bridge.js.map +1 -0
- package/dist/solution-engine.d.ts +54 -0
- package/dist/solution-engine.d.ts.map +1 -0
- package/dist/solution-engine.js +73 -0
- package/dist/solution-engine.js.map +1 -0
- package/package.json +69 -0
package/dist/graphql.js
ADDED
|
@@ -0,0 +1,389 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* graphql.ts — GraphQL execution helper for the PMLL Memory MCP Server.
|
|
3
|
+
*
|
|
4
|
+
* Provides:
|
|
5
|
+
* 1. Pre-built GraphQL operation documents (`GRAPHQL_QUERY`, `GRAPHQL_MUTATION`)
|
|
6
|
+
* that define the full query/mutation API surface.
|
|
7
|
+
* 2. `executeGraphQL()` — a lightweight fetch-based executor that POSTs
|
|
8
|
+
* an operation to a GraphQL endpoint and returns the parsed response.
|
|
9
|
+
*
|
|
10
|
+
* The pre-built operations cover the complete API surface:
|
|
11
|
+
* Query — interviewTemplate, company, companyTestSession, roles, tasks, etc.
|
|
12
|
+
* Mutation — CRUD for interview templates, test sessions, roles, tasks, etc.
|
|
13
|
+
*
|
|
14
|
+
* **Note on selection sets:** The pre-built operations use empty selection
|
|
15
|
+
* sets (`{ }`) as placeholders. These serve as canonical templates that
|
|
16
|
+
* document the available fields and their required variable signatures.
|
|
17
|
+
* Agents should supply a custom `operation` string with the fields they
|
|
18
|
+
* actually need when executing against a real endpoint.
|
|
19
|
+
*
|
|
20
|
+
* **Note on required variables:** All variables in the pre-built operations
|
|
21
|
+
* are declared as required (`!`), matching the API specification. The
|
|
22
|
+
* `GRAPHQL_DEFAULT_VARIABLES` constant provides an all-null baseline; callers
|
|
23
|
+
* must override every variable that the server treats as non-nullable before
|
|
24
|
+
* executing the operation.
|
|
25
|
+
*
|
|
26
|
+
* These constants are available for agents/tools that need a canonical
|
|
27
|
+
* reference to the full operation shape, while `executeGraphQL` is used
|
|
28
|
+
* by the `graphql` MCP tool to execute arbitrary or pre-built operations.
|
|
29
|
+
*/
|
|
30
|
+
// ---------------------------------------------------------------------------
|
|
31
|
+
// Pre-built operation documents
|
|
32
|
+
// ---------------------------------------------------------------------------
|
|
33
|
+
/**
|
|
34
|
+
* Canonical Query operation document.
|
|
35
|
+
*
|
|
36
|
+
* Covers every top-level query field in the API. Variables are typed so
|
|
37
|
+
* callers can supply a subset and leave the rest undefined/null.
|
|
38
|
+
*
|
|
39
|
+
* Selection sets are intentionally empty (`{ }`) — this document is a
|
|
40
|
+
* template/reference. Provide a custom `operation` string with real
|
|
41
|
+
* field selections when executing against a live endpoint.
|
|
42
|
+
*/
|
|
43
|
+
export const GRAPHQL_QUERY = `query Query($interviewTemplateId: ID!, $first: Int!, $offset: Int!, $frameworksFirst2: Int!, $atsCompanyTestSessionsId: String!, $idType: AtsIdType!, $companyTestSessionId: ID!, $companyTestId: ID!, $standardizedTestSessionId: ID!, $key: ID!, $companyTestId2: ID!, $companyTestsFirst2: Int!, $certificationTestsFirst2: Int!, $standardizedTestId: ID!, $liveInterviewId: ID!, $type: AccessType!, $accessQueries: [AccessQueryInput!]!, $taskSetsFirst2: Int!, $testLabelsFirst2: Int!, $aiInterviewersFirst2: Int!, $llmModelCategoriesFirst2: Int!, $taskLevelId: ID!, $taskId: ID!, $name: String!) {
|
|
44
|
+
interviewTemplate(interviewTemplateId: $interviewTemplateId) {
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
interviewTemplates(first: $first, offset: $offset) {
|
|
48
|
+
|
|
49
|
+
}
|
|
50
|
+
company {
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
companies {
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
servicePlans {
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
frameworks(first: $frameworksFirst2) {
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
atsCompanyTestSessions(id: $atsCompanyTestSessionsId, idType: $idType) {
|
|
63
|
+
|
|
64
|
+
}
|
|
65
|
+
companyTestSession(id: $companyTestSessionId) {
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
companyTestSessions(companyTestId: $companyTestId) {
|
|
69
|
+
|
|
70
|
+
}
|
|
71
|
+
standardizedTestSession(id: $standardizedTestSessionId) {
|
|
72
|
+
|
|
73
|
+
}
|
|
74
|
+
companyRoles {
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
systemRoles {
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
role(key: $key) {
|
|
81
|
+
|
|
82
|
+
}
|
|
83
|
+
companyTest(id: $companyTestId2) {
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
companyTests(first: $companyTestsFirst2) {
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
certificationTests(first: $certificationTestsFirst2) {
|
|
90
|
+
|
|
91
|
+
}
|
|
92
|
+
standardizedTest(id: $standardizedTestId) {
|
|
93
|
+
|
|
94
|
+
}
|
|
95
|
+
liveInterview(liveInterviewId: $liveInterviewId) {
|
|
96
|
+
|
|
97
|
+
}
|
|
98
|
+
liveInterviews {
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
hasAccess(type: $type)
|
|
102
|
+
hasAccessList(accessQueries: $accessQueries) {
|
|
103
|
+
|
|
104
|
+
}
|
|
105
|
+
taskSets(first: $taskSetsFirst2) {
|
|
106
|
+
|
|
107
|
+
}
|
|
108
|
+
testLabels(first: $testLabelsFirst2) {
|
|
109
|
+
|
|
110
|
+
}
|
|
111
|
+
user {
|
|
112
|
+
|
|
113
|
+
}
|
|
114
|
+
aiInterviewers(first: $aiInterviewersFirst2) {
|
|
115
|
+
|
|
116
|
+
}
|
|
117
|
+
llmModelCategories(first: $llmModelCategoriesFirst2) {
|
|
118
|
+
|
|
119
|
+
}
|
|
120
|
+
taskLevel(taskLevelId: $taskLevelId) {
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
task(id: $taskId) {
|
|
124
|
+
|
|
125
|
+
}
|
|
126
|
+
codesignalCreatedTasks(name: $name) {
|
|
127
|
+
|
|
128
|
+
}
|
|
129
|
+
}`;
|
|
130
|
+
/**
|
|
131
|
+
* Canonical Mutation operation document.
|
|
132
|
+
*
|
|
133
|
+
* Covers every top-level mutation field in the API. Variables are typed
|
|
134
|
+
* and namespaced to avoid conflicts when multiple mutations share the same
|
|
135
|
+
* logical parameter name.
|
|
136
|
+
*
|
|
137
|
+
* Selection sets are intentionally empty (`{ }`) — this document is a
|
|
138
|
+
* template/reference. Provide a custom `operation` string with real
|
|
139
|
+
* field selections when executing against a live endpoint.
|
|
140
|
+
*/
|
|
141
|
+
export const GRAPHQL_MUTATION = `mutation Mutation($deleteInterviewTemplateInterviewTemplateId2: ID!, $interviewTemplateFields: CreateInterviewTemplateInput!, $editInterviewTemplateInterviewTemplateId2: ID!, $editInterviewTemplateInterviewTemplateFields2: EditInterviewTemplateInput!, $companyId: ID!, $lockdownFrameworkEnabled: Boolean!, $editCompanyPlanSettingsCompanyId2: ID!, $planSettings: CompanyPlanSettingsInput!, $appendCompanyTestSessionVerificationNoteId: ID!, $note: String!, $sessionFields: TestSessionInput!, $deleteCompanyTestSessionId: ID!, $editCompanyTestSessionDurationId: ID!, $customDuration: Float!, $editCompanyTestSessionExpirationId: ID!, $expirationDate: Timestamp!, $setCompanyTestSessionRemindersId: ID!, $reminders: [EmailReminder!]!, $resendCompanyTestSessionId: ID!, $reactivateCompanyTestSessionId: ID!, $gradeCompanyTestResultId: ID!, $gradeCompanyTestResultTaskId2: ID!, $score: Int!, $markCompanyTestResultAsGradedId: ID!, $archiveCompanyTestSessionId: ID!, $unarchiveCompanyTestSessionId: ID!, $saveRoleKey2: ID!, $title: String!, $permissions: [String!]!, $createCompanyRoleTitle2: String!, $createCompanyRolePermissions2: [String!]!, $editCompanyRoleKey2: ID!, $editCompanyRoleTitle2: String!, $editCompanyRolePermissions2: [String!]!, $deleteRoleKey2: ID!, $testFields: CreateCompanyTestInput!, $createCompanyTestFromFrameworkTestFields2: CreateCompanyTestFromFrameworkInput!, $editCompanyTestId: ID!, $editCompanyTestTestFields2: EditCompanyTestInput!, $duplicateCompanyTestId: ID!, $duplicateCompanyTestTestFields2: EditCompanyTestInput!, $editLiveInterviewId: ID!, $interviewFields: LiveInterviewInput!, $deleteLiveInterviewId: ID!, $editTaskSetsInput: EditTaskSetsInput!, $removeTaskFromSetsEditTaskSetsInput2: EditTaskSetsInput!, $setTaskInitialSourceId: ID!, $language: LanguageName!, $source: String!, $unsetTaskInitialSourceId: ID!, $unsetTaskInitialSourceLanguage2: LanguageName!, $taskFields: CreateCodeReviewTaskInput!, $editCodeReviewTaskId: ID!, $editCodeReviewTaskTaskFields2: EditCodeReviewTaskInput!, $createDatabaseTaskTaskFields2: CreateDatabaseTaskInput!, $editDatabaseTaskId: ID!, $editDatabaseTaskTaskFields2: EditDatabaseTaskInput!, $createFreeCodingTaskTaskFields2: CreateFreeCodingTaskInput!, $editFreeCodingTaskId: ID!, $editFreeCodingTaskTaskFields2: EditStandardTaskInput!, $updateFrontendTaskId: ID!, $patch: UpdateFrontendTaskInput!, $createQuizTaskTaskFields2: CreateQuizInput!, $editQuizTaskId: ID!, $editQuizTaskTaskFields2: EditQuizInput!, $createStandardTaskTaskFields2: CreateStandardTaskInput!, $editStandardTaskId: ID!, $editStandardTaskTaskFields2: EditStandardTaskInput!) {
|
|
142
|
+
deleteInterviewTemplate(interviewTemplateId: $deleteInterviewTemplateInterviewTemplateId2)
|
|
143
|
+
createInterviewTemplate(interviewTemplateFields: $interviewTemplateFields) {
|
|
144
|
+
|
|
145
|
+
}
|
|
146
|
+
editInterviewTemplate(interviewTemplateId: $editInterviewTemplateInterviewTemplateId2, interviewTemplateFields: $editInterviewTemplateInterviewTemplateFields2) {
|
|
147
|
+
|
|
148
|
+
}
|
|
149
|
+
updateLockdownFrameworkEnabled(companyId: $companyId, lockdownFrameworkEnabled: $lockdownFrameworkEnabled) {
|
|
150
|
+
|
|
151
|
+
}
|
|
152
|
+
editCompanyPlanSettings(companyId: $editCompanyPlanSettingsCompanyId2, planSettings: $planSettings) {
|
|
153
|
+
|
|
154
|
+
}
|
|
155
|
+
appendCompanyTestSessionVerificationNote(id: $appendCompanyTestSessionVerificationNoteId, note: $note) {
|
|
156
|
+
|
|
157
|
+
}
|
|
158
|
+
createCompanyTestSession(sessionFields: $sessionFields) {
|
|
159
|
+
|
|
160
|
+
}
|
|
161
|
+
deleteCompanyTestSession(id: $deleteCompanyTestSessionId)
|
|
162
|
+
editCompanyTestSessionDuration(id: $editCompanyTestSessionDurationId, customDuration: $customDuration) {
|
|
163
|
+
|
|
164
|
+
}
|
|
165
|
+
editCompanyTestSessionExpiration(id: $editCompanyTestSessionExpirationId, expirationDate: $expirationDate) {
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
setCompanyTestSessionReminders(id: $setCompanyTestSessionRemindersId, reminders: $reminders) {
|
|
169
|
+
|
|
170
|
+
}
|
|
171
|
+
resendCompanyTestSession(id: $resendCompanyTestSessionId) {
|
|
172
|
+
|
|
173
|
+
}
|
|
174
|
+
reactivateCompanyTestSession(id: $reactivateCompanyTestSessionId) {
|
|
175
|
+
|
|
176
|
+
}
|
|
177
|
+
gradeCompanyTestResult(id: $gradeCompanyTestResultId, taskId: $gradeCompanyTestResultTaskId2, score: $score) {
|
|
178
|
+
|
|
179
|
+
}
|
|
180
|
+
markCompanyTestResultAsGraded(id: $markCompanyTestResultAsGradedId) {
|
|
181
|
+
|
|
182
|
+
}
|
|
183
|
+
archiveCompanyTestSession(id: $archiveCompanyTestSessionId) {
|
|
184
|
+
|
|
185
|
+
}
|
|
186
|
+
unarchiveCompanyTestSession(id: $unarchiveCompanyTestSessionId) {
|
|
187
|
+
|
|
188
|
+
}
|
|
189
|
+
saveRole(key: $saveRoleKey2, title: $title, permissions: $permissions) {
|
|
190
|
+
|
|
191
|
+
}
|
|
192
|
+
createCompanyRole(title: $createCompanyRoleTitle2, permissions: $createCompanyRolePermissions2) {
|
|
193
|
+
|
|
194
|
+
}
|
|
195
|
+
editCompanyRole(key: $editCompanyRoleKey2, title: $editCompanyRoleTitle2, permissions: $editCompanyRolePermissions2) {
|
|
196
|
+
|
|
197
|
+
}
|
|
198
|
+
deleteRole(key: $deleteRoleKey2)
|
|
199
|
+
createCompanyTest(testFields: $testFields) {
|
|
200
|
+
|
|
201
|
+
}
|
|
202
|
+
createCompanyTestFromFramework(testFields: $createCompanyTestFromFrameworkTestFields2) {
|
|
203
|
+
|
|
204
|
+
}
|
|
205
|
+
editCompanyTest(id: $editCompanyTestId, testFields: $editCompanyTestTestFields2) {
|
|
206
|
+
|
|
207
|
+
}
|
|
208
|
+
duplicateCompanyTest(id: $duplicateCompanyTestId, testFields: $duplicateCompanyTestTestFields2) {
|
|
209
|
+
|
|
210
|
+
}
|
|
211
|
+
createLiveInterview {
|
|
212
|
+
|
|
213
|
+
}
|
|
214
|
+
editLiveInterview(id: $editLiveInterviewId, interviewFields: $interviewFields) {
|
|
215
|
+
|
|
216
|
+
}
|
|
217
|
+
deleteLiveInterview(id: $deleteLiveInterviewId)
|
|
218
|
+
addTaskToSets(editTaskSetsInput: $editTaskSetsInput) {
|
|
219
|
+
|
|
220
|
+
}
|
|
221
|
+
removeTaskFromSets(editTaskSetsInput: $removeTaskFromSetsEditTaskSetsInput2) {
|
|
222
|
+
|
|
223
|
+
}
|
|
224
|
+
setTaskInitialSource(id: $setTaskInitialSourceId, language: $language, source: $source) {
|
|
225
|
+
|
|
226
|
+
}
|
|
227
|
+
unsetTaskInitialSource(id: $unsetTaskInitialSourceId, language: $unsetTaskInitialSourceLanguage2) {
|
|
228
|
+
|
|
229
|
+
}
|
|
230
|
+
createCodeReviewTask(taskFields: $taskFields) {
|
|
231
|
+
|
|
232
|
+
}
|
|
233
|
+
editCodeReviewTask(id: $editCodeReviewTaskId, taskFields: $editCodeReviewTaskTaskFields2) {
|
|
234
|
+
|
|
235
|
+
}
|
|
236
|
+
createDatabaseTask(taskFields: $createDatabaseTaskTaskFields2) {
|
|
237
|
+
|
|
238
|
+
}
|
|
239
|
+
editDatabaseTask(id: $editDatabaseTaskId, taskFields: $editDatabaseTaskTaskFields2) {
|
|
240
|
+
|
|
241
|
+
}
|
|
242
|
+
createFreeCodingTask(taskFields: $createFreeCodingTaskTaskFields2) {
|
|
243
|
+
|
|
244
|
+
}
|
|
245
|
+
editFreeCodingTask(id: $editFreeCodingTaskId, taskFields: $editFreeCodingTaskTaskFields2) {
|
|
246
|
+
|
|
247
|
+
}
|
|
248
|
+
updateFrontendTask(id: $updateFrontendTaskId, patch: $patch) {
|
|
249
|
+
|
|
250
|
+
}
|
|
251
|
+
createQuizTask(taskFields: $createQuizTaskTaskFields2) {
|
|
252
|
+
|
|
253
|
+
}
|
|
254
|
+
editQuizTask(id: $editQuizTaskId, taskFields: $editQuizTaskTaskFields2) {
|
|
255
|
+
|
|
256
|
+
}
|
|
257
|
+
createStandardTask(taskFields: $createStandardTaskTaskFields2) {
|
|
258
|
+
|
|
259
|
+
}
|
|
260
|
+
editStandardTask(id: $editStandardTaskId, taskFields: $editStandardTaskTaskFields2) {
|
|
261
|
+
|
|
262
|
+
}
|
|
263
|
+
}`;
|
|
264
|
+
/**
|
|
265
|
+
* Default variables object for the pre-built operations.
|
|
266
|
+
*
|
|
267
|
+
* All values are null; callers supply only the variables relevant to their
|
|
268
|
+
* specific sub-operation.
|
|
269
|
+
*/
|
|
270
|
+
export const GRAPHQL_DEFAULT_VARIABLES = {
|
|
271
|
+
first: null,
|
|
272
|
+
offset: null,
|
|
273
|
+
appendCompanyTestSessionVerificationNoteId: null,
|
|
274
|
+
note: null,
|
|
275
|
+
interviewTemplateId: null,
|
|
276
|
+
frameworksFirst2: null,
|
|
277
|
+
atsCompanyTestSessionsId: null,
|
|
278
|
+
idType: null,
|
|
279
|
+
companyTestSessionId: null,
|
|
280
|
+
companyTestId: null,
|
|
281
|
+
standardizedTestSessionId: null,
|
|
282
|
+
key: null,
|
|
283
|
+
companyTestId2: null,
|
|
284
|
+
companyTestsFirst2: null,
|
|
285
|
+
certificationTestsFirst2: null,
|
|
286
|
+
standardizedTestId: null,
|
|
287
|
+
liveInterviewId: null,
|
|
288
|
+
type: null,
|
|
289
|
+
accessQueries: null,
|
|
290
|
+
taskSetsFirst2: null,
|
|
291
|
+
testLabelsFirst2: null,
|
|
292
|
+
aiInterviewersFirst2: null,
|
|
293
|
+
llmModelCategoriesFirst2: null,
|
|
294
|
+
taskLevelId: null,
|
|
295
|
+
taskId: null,
|
|
296
|
+
name: null,
|
|
297
|
+
deleteInterviewTemplateInterviewTemplateId2: null,
|
|
298
|
+
interviewTemplateFields: null,
|
|
299
|
+
editInterviewTemplateInterviewTemplateId2: null,
|
|
300
|
+
editInterviewTemplateInterviewTemplateFields2: null,
|
|
301
|
+
companyId: null,
|
|
302
|
+
lockdownFrameworkEnabled: null,
|
|
303
|
+
editCompanyPlanSettingsCompanyId2: null,
|
|
304
|
+
planSettings: null,
|
|
305
|
+
sessionFields: null,
|
|
306
|
+
deleteCompanyTestSessionId: null,
|
|
307
|
+
editCompanyTestSessionDurationId: null,
|
|
308
|
+
customDuration: null,
|
|
309
|
+
editCompanyTestSessionExpirationId: null,
|
|
310
|
+
expirationDate: null,
|
|
311
|
+
setCompanyTestSessionRemindersId: null,
|
|
312
|
+
reminders: null,
|
|
313
|
+
resendCompanyTestSessionId: null,
|
|
314
|
+
reactivateCompanyTestSessionId: null,
|
|
315
|
+
gradeCompanyTestResultId: null,
|
|
316
|
+
gradeCompanyTestResultTaskId2: null,
|
|
317
|
+
score: null,
|
|
318
|
+
markCompanyTestResultAsGradedId: null,
|
|
319
|
+
archiveCompanyTestSessionId: null,
|
|
320
|
+
unarchiveCompanyTestSessionId: null,
|
|
321
|
+
saveRoleKey2: null,
|
|
322
|
+
title: null,
|
|
323
|
+
permissions: null,
|
|
324
|
+
createCompanyRoleTitle2: null,
|
|
325
|
+
createCompanyRolePermissions2: null,
|
|
326
|
+
editCompanyRoleKey2: null,
|
|
327
|
+
editCompanyRoleTitle2: null,
|
|
328
|
+
editCompanyRolePermissions2: null,
|
|
329
|
+
deleteRoleKey2: null,
|
|
330
|
+
testFields: null,
|
|
331
|
+
createCompanyTestFromFrameworkTestFields2: null,
|
|
332
|
+
editCompanyTestId: null,
|
|
333
|
+
editCompanyTestTestFields2: null,
|
|
334
|
+
duplicateCompanyTestId: null,
|
|
335
|
+
duplicateCompanyTestTestFields2: null,
|
|
336
|
+
editLiveInterviewId: null,
|
|
337
|
+
interviewFields: null,
|
|
338
|
+
deleteLiveInterviewId: null,
|
|
339
|
+
editTaskSetsInput: null,
|
|
340
|
+
removeTaskFromSetsEditTaskSetsInput2: null,
|
|
341
|
+
setTaskInitialSourceId: null,
|
|
342
|
+
language: null,
|
|
343
|
+
source: null,
|
|
344
|
+
unsetTaskInitialSourceId: null,
|
|
345
|
+
unsetTaskInitialSourceLanguage2: null,
|
|
346
|
+
taskFields: null,
|
|
347
|
+
editCodeReviewTaskId: null,
|
|
348
|
+
editCodeReviewTaskTaskFields2: null,
|
|
349
|
+
createDatabaseTaskTaskFields2: null,
|
|
350
|
+
editDatabaseTaskId: null,
|
|
351
|
+
editDatabaseTaskTaskFields2: null,
|
|
352
|
+
createFreeCodingTaskTaskFields2: null,
|
|
353
|
+
editFreeCodingTaskId: null,
|
|
354
|
+
editFreeCodingTaskTaskFields2: null,
|
|
355
|
+
updateFrontendTaskId: null,
|
|
356
|
+
patch: null,
|
|
357
|
+
createQuizTaskTaskFields2: null,
|
|
358
|
+
editQuizTaskId: null,
|
|
359
|
+
editQuizTaskTaskFields2: null,
|
|
360
|
+
createStandardTaskTaskFields2: null,
|
|
361
|
+
editStandardTaskId: null,
|
|
362
|
+
editStandardTaskTaskFields2: null,
|
|
363
|
+
};
|
|
364
|
+
/**
|
|
365
|
+
* Execute a GraphQL operation against `endpoint` via HTTP POST.
|
|
366
|
+
*
|
|
367
|
+
* Uses the built-in `fetch` API (Node.js 18+). Returns the parsed JSON
|
|
368
|
+
* response body. Throws on HTTP-level errors (non-2xx status).
|
|
369
|
+
*
|
|
370
|
+
* @param endpoint Full URL of the GraphQL endpoint.
|
|
371
|
+
* @param operation GraphQL operation document (query or mutation string).
|
|
372
|
+
* @param variables Variables to pass with the operation.
|
|
373
|
+
* @param headers Additional HTTP headers (e.g. Authorization).
|
|
374
|
+
*/
|
|
375
|
+
export async function executeGraphQL(endpoint, operation, variables = {}, headers = {}) {
|
|
376
|
+
const response = await fetch(endpoint, {
|
|
377
|
+
method: "POST",
|
|
378
|
+
headers: {
|
|
379
|
+
"Content-Type": "application/json",
|
|
380
|
+
...headers,
|
|
381
|
+
},
|
|
382
|
+
body: JSON.stringify({ query: operation, variables }),
|
|
383
|
+
});
|
|
384
|
+
if (!response.ok) {
|
|
385
|
+
throw new Error(`GraphQL HTTP error: ${response.status} ${response.statusText}`);
|
|
386
|
+
}
|
|
387
|
+
return response.json();
|
|
388
|
+
}
|
|
389
|
+
//# sourceMappingURL=graphql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graphql.js","sourceRoot":"","sources":["../src/graphql.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,8EAA8E;AAC9E,gCAAgC;AAChC,8EAA8E;AAE9E;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsF3B,CAAC;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0H9B,CAAC;AAEH;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAyB;IAC7D,KAAK,EAAE,IAAI;IACX,MAAM,EAAE,IAAI;IACZ,0CAA0C,EAAE,IAAI;IAChD,IAAI,EAAE,IAAI;IACV,mBAAmB,EAAE,IAAI;IACzB,gBAAgB,EAAE,IAAI;IACtB,wBAAwB,EAAE,IAAI;IAC9B,MAAM,EAAE,IAAI;IACZ,oBAAoB,EAAE,IAAI;IAC1B,aAAa,EAAE,IAAI;IACnB,yBAAyB,EAAE,IAAI;IAC/B,GAAG,EAAE,IAAI;IACT,cAAc,EAAE,IAAI;IACpB,kBAAkB,EAAE,IA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jB,MAAM,IAAI,KAAK,CAAC,uBAAuB,QAAQ,CAAC,MAAM,IAAI,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;IACnF,CAAC;IAED,OAAO,QAAQ,CAAC,IAAI,EAA8B,CAAC;AACrD,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* index.ts — PMLL Memory MCP Server entrypoint.
|
|
4
|
+
*
|
|
5
|
+
* Exposes 15 MCP tools for Claude Sonnet/Opus agents:
|
|
6
|
+
*
|
|
7
|
+
* Short-term KV memory (5 tools):
|
|
8
|
+
* init — Set up the PMLL memory silo and Q-promise chain for a session.
|
|
9
|
+
* peek — Non-destructive context check (core deduplication primitive).
|
|
10
|
+
* set — Store a KV pair in the session's PMLL silo.
|
|
11
|
+
* resolve — Resolve a pending Q-promise continuation.
|
|
12
|
+
* flush — Clear all short-term KV slots at agent task completion.
|
|
13
|
+
*
|
|
14
|
+
* GraphQL (1 tool):
|
|
15
|
+
* graphql — Execute GraphQL queries/mutations against the memory store.
|
|
16
|
+
*
|
|
17
|
+
* Long-term memory graph (6 tools — adapted from Context+ by @ForLoopCodes):
|
|
18
|
+
* upsert_memory_node — Create/update memory nodes with TF-IDF embeddings.
|
|
19
|
+
* create_relation — Create typed edges between nodes.
|
|
20
|
+
* search_memory_graph — Semantic search with graph traversal.
|
|
21
|
+
* prune_stale_links — Remove decayed edges and orphan nodes.
|
|
22
|
+
* add_interlinked_context — Bulk-add nodes with auto-similarity linking.
|
|
23
|
+
* retrieve_with_traversal — Walk outward from a node.
|
|
24
|
+
*
|
|
25
|
+
* Solution engine (3 tools):
|
|
26
|
+
* resolve_context — Unified short-term → long-term context lookup.
|
|
27
|
+
* promote_to_long_term — Promote KV entries to the memory graph.
|
|
28
|
+
* memory_status — Unified memory view across both layers.
|
|
29
|
+
*
|
|
30
|
+
* The server is designed as the **3rd initializer** alongside Playwright and
|
|
31
|
+
* other MCP tools. Agents call `init` once at task start, then use
|
|
32
|
+
* `peek` before any expensive MCP tool invocation to avoid redundant calls.
|
|
33
|
+
*
|
|
34
|
+
* Context+ integration by @ForLoopCodes (https://github.com/ForLoopCodes/contextplus).
|
|
35
|
+
*
|
|
36
|
+
* Architecture:
|
|
37
|
+
* - KV layer → `PMMemoryStore` (mirrors PMLL.c memory_silo_t)
|
|
38
|
+
* - Async layer → `QPromiseRegistry` (mirrors Q_promise_lib QMemNode chain)
|
|
39
|
+
* - Guard function → `peekContext()` (peek.ts)
|
|
40
|
+
* - Long-term → `memory-graph.ts` (adapted from Context+)
|
|
41
|
+
* - Engine → `solution-engine.ts` (bridges short-term + long-term)
|
|
42
|
+
*
|
|
43
|
+
* Usage:
|
|
44
|
+
* npx pmll-memory-mcp # stdio transport
|
|
45
|
+
* node dist/index.js # via compiled output
|
|
46
|
+
*
|
|
47
|
+
* License: MIT
|
|
48
|
+
*/
|
|
49
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
50
|
+
import { QPromiseRegistry } from "./q-promise-bridge.js";
|
|
51
|
+
declare const server: McpServer;
|
|
52
|
+
export declare const _promiseRegistry: QPromiseRegistry;
|
|
53
|
+
export declare const _activeSessions: Map<string, number>;
|
|
54
|
+
export { server };
|
|
55
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAoBzD,QAAA,MAAM,MAAM,WAkBX,CAAC;AAIF,eAAO,MAAM,gBAAgB,kBAAyB,CAAC;AAGvD,eAAO,MAAM,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAa,CAAC;AAorB9D,OAAO,EAAE,MAAM,EAAE,CAAC"}
|