@engramprotocol/mcp-server 0.9.1 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +48 -37
  2. package/package.json +5 -3
  3. package/templates/hooks/session_start_boot.sh +63 -0
  4. package/templates/hooks/user_prompt_submit_reminder.sh +78 -0
  5. package/dist/cli.d.ts +0 -3
  6. package/dist/cli.d.ts.map +0 -1
  7. package/dist/cli.js +0 -79
  8. package/dist/cli.js.map +0 -1
  9. package/dist/http-client.d.ts +0 -33
  10. package/dist/http-client.d.ts.map +0 -1
  11. package/dist/http-client.js +0 -106
  12. package/dist/http-client.js.map +0 -1
  13. package/dist/server.d.ts +0 -18
  14. package/dist/server.d.ts.map +0 -1
  15. package/dist/server.js +0 -18
  16. package/dist/server.js.map +0 -1
  17. package/dist/tools/_helpers.d.ts +0 -18
  18. package/dist/tools/_helpers.d.ts.map +0 -1
  19. package/dist/tools/_helpers.js +0 -37
  20. package/dist/tools/_helpers.js.map +0 -1
  21. package/dist/tools/boot.d.ts +0 -4
  22. package/dist/tools/boot.d.ts.map +0 -1
  23. package/dist/tools/boot.js +0 -18
  24. package/dist/tools/boot.js.map +0 -1
  25. package/dist/tools/confirm-review.d.ts +0 -4
  26. package/dist/tools/confirm-review.d.ts.map +0 -1
  27. package/dist/tools/confirm-review.js +0 -18
  28. package/dist/tools/confirm-review.js.map +0 -1
  29. package/dist/tools/context.d.ts +0 -4
  30. package/dist/tools/context.d.ts.map +0 -1
  31. package/dist/tools/context.js +0 -30
  32. package/dist/tools/context.js.map +0 -1
  33. package/dist/tools/decide.d.ts +0 -13
  34. package/dist/tools/decide.d.ts.map +0 -1
  35. package/dist/tools/decide.js +0 -59
  36. package/dist/tools/decide.js.map +0 -1
  37. package/dist/tools/entity.d.ts +0 -11
  38. package/dist/tools/entity.d.ts.map +0 -1
  39. package/dist/tools/entity.js +0 -54
  40. package/dist/tools/entity.js.map +0 -1
  41. package/dist/tools/epistemic.d.ts +0 -4
  42. package/dist/tools/epistemic.d.ts.map +0 -1
  43. package/dist/tools/epistemic.js +0 -31
  44. package/dist/tools/epistemic.js.map +0 -1
  45. package/dist/tools/get.d.ts +0 -4
  46. package/dist/tools/get.d.ts.map +0 -1
  47. package/dist/tools/get.js +0 -24
  48. package/dist/tools/get.js.map +0 -1
  49. package/dist/tools/index.d.ts +0 -26
  50. package/dist/tools/index.d.ts.map +0 -1
  51. package/dist/tools/index.js +0 -67
  52. package/dist/tools/index.js.map +0 -1
  53. package/dist/tools/list.d.ts +0 -4
  54. package/dist/tools/list.d.ts.map +0 -1
  55. package/dist/tools/list.js +0 -41
  56. package/dist/tools/list.js.map +0 -1
  57. package/dist/tools/note.d.ts +0 -15
  58. package/dist/tools/note.d.ts.map +0 -1
  59. package/dist/tools/note.js +0 -47
  60. package/dist/tools/note.js.map +0 -1
  61. package/dist/tools/projects.d.ts +0 -9
  62. package/dist/tools/projects.d.ts.map +0 -1
  63. package/dist/tools/projects.js +0 -63
  64. package/dist/tools/projects.js.map +0 -1
  65. package/dist/tools/recall.d.ts +0 -4
  66. package/dist/tools/recall.d.ts.map +0 -1
  67. package/dist/tools/recall.js +0 -19
  68. package/dist/tools/recall.js.map +0 -1
  69. package/dist/tools/relate.d.ts +0 -4
  70. package/dist/tools/relate.d.ts.map +0 -1
  71. package/dist/tools/relate.js +0 -31
  72. package/dist/tools/relate.js.map +0 -1
  73. package/dist/tools/set-status.d.ts +0 -13
  74. package/dist/tools/set-status.d.ts.map +0 -1
  75. package/dist/tools/set-status.js +0 -48
  76. package/dist/tools/set-status.js.map +0 -1
  77. package/dist/tools/show.d.ts +0 -11
  78. package/dist/tools/show.d.ts.map +0 -1
  79. package/dist/tools/show.js +0 -25
  80. package/dist/tools/show.js.map +0 -1
  81. package/dist/tools/stats.d.ts +0 -11
  82. package/dist/tools/stats.d.ts.map +0 -1
  83. package/dist/tools/stats.js +0 -21
  84. package/dist/tools/stats.js.map +0 -1
  85. package/dist/tools/track-task.d.ts +0 -10
  86. package/dist/tools/track-task.d.ts.map +0 -1
  87. package/dist/tools/track-task.js +0 -56
  88. package/dist/tools/track-task.js.map +0 -1
  89. package/dist/tools/update.d.ts +0 -4
  90. package/dist/tools/update.d.ts.map +0 -1
  91. package/dist/tools/update.js +0 -25
  92. package/dist/tools/update.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"_helpers.js","sourceRoot":"","sources":["../../src/tools/_helpers.ts"],"names":[],"mappings":";;AAYA,4BAuBC;AAnCD,gDAA4C;AAE5C;;;;;;;;;GASG;AACI,KAAK,UAAU,QAAQ,CAAI,EAAoB;IAIpD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,EAAE,EAAE,CAAA;QACzB,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAA;IAC/E,CAAC;IAAC,OAAO,GAAY,EAAE,CAAC;QACtB,IAAI,GAAG,YAAY,yBAAW,EAAE,CAAC;YAC/B,OAAO;gBACL,OAAO,EAAE,IAAI;gBACb,OAAO,EAAE,CAAC;wBACR,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,uBAAuB,GAAG,CAAC,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE;qBAC3D,CAAC;aACH,CAAA;QACH,CAAC;QACD,MAAM,CAAC,GAAG,GAAY,CAAA;QACtB,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,0BAA0B,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC;SACzE,CAAA;IACH,CAAC;AACH,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { HttpClient } from '../http-client';
3
- export declare function registerBootTool(server: McpServer, http: HttpClient): void;
4
- //# sourceMappingURL=boot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../../src/tools/boot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAkB1E"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerBootTool = registerBootTool;
4
- const zod_1 = require("zod");
5
- const _helpers_1 = require("./_helpers");
6
- function registerBootTool(server, http) {
7
- server.registerTool('eml_boot', {
8
- title: 'Boot Brain',
9
- description: 'Loads the brain boot view: identity (profile/rule), current status, ' +
10
- 'open tasks, recent logs, brain-hygiene reviews. Call at session start ' +
11
- 'to load context — the returned markdown is suitable for direct ' +
12
- 'injection into the context window.',
13
- inputSchema: {
14
- agent: zod_1.z.string().optional().describe('Agent ID (e.g. "motti", "default"). If omitted, the server uses the brain name as default.'),
15
- },
16
- }, async (args) => (0, _helpers_1.callTool)(() => http.post('/boot', { agent: args.agent })));
17
- }
18
- //# sourceMappingURL=boot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"boot.js","sourceRoot":"","sources":["../../src/tools/boot.ts"],"names":[],"mappings":";;AAKA,4CAkBC;AAvBD,6BAAuB;AAGvB,yCAAqC;AAErC,SAAgB,gBAAgB,CAAC,MAAiB,EAAE,IAAgB;IAClE,MAAM,CAAC,YAAY,CACjB,UAAU,EACV;QACE,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,sEAAsE;YACtE,wEAAwE;YACxE,iEAAiE;YACjE,oCAAoC;QACtC,WAAW,EAAE;YACX,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACnC,4FAA4F,CAC7F;SACF;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAC1E,CAAA;AACH,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { HttpClient } from '../http-client';
3
- export declare function registerConfirmReviewTool(server: McpServer, http: HttpClient): void;
4
- //# sourceMappingURL=confirm-review.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"confirm-review.d.ts","sourceRoot":"","sources":["../../src/tools/confirm-review.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAiBnF"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerConfirmReviewTool = registerConfirmReviewTool;
4
- const zod_1 = require("zod");
5
- const _helpers_1 = require("./_helpers");
6
- function registerConfirmReviewTool(server, http) {
7
- server.registerTool('eml_confirm_review', {
8
- title: 'Confirm Review',
9
- description: 'Resettet review_due_at für ein decision/rule/profile-Engram (Brain-Hygiene). ' +
10
- 'Boot zeigt overdue-Engrams an; nach Review-Bestätigung verschwinden sie aus ' +
11
- 'der Liste. Default-Verlängerungen: decision 60d, rule 90d, profile 180d.',
12
- inputSchema: {
13
- id: zod_1.z.string().describe('Engram-ID. Nur für decision/rule/profile gültig.'),
14
- caller: zod_1.z.string().optional(),
15
- },
16
- }, async (args) => (0, _helpers_1.callTool)(() => http.post(`/engram/${args.id}/confirm-review`, args.caller ? { caller: args.caller } : {})));
17
- }
18
- //# sourceMappingURL=confirm-review.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"confirm-review.js","sourceRoot":"","sources":["../../src/tools/confirm-review.ts"],"names":[],"mappings":";;AAKA,8DAiBC;AAtBD,6BAAuB;AAGvB,yCAAqC;AAErC,SAAgB,yBAAyB,CAAC,MAAiB,EAAE,IAAgB;IAC3E,MAAM,CAAC,YAAY,CACjB,oBAAoB,EACpB;QACE,KAAK,EAAE,gBAAgB;QACvB,WAAW,EACT,+EAA+E;YAC/E,8EAA8E;YAC9E,0EAA0E;QAC5E,WAAW,EAAE;YACX,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kDAAkD,CAAC;YAC3E,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC9B;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,EAAE,iBAAiB,EAC1E,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAC/C,CAAA;AACH,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { HttpClient } from '../http-client';
3
- export declare function registerContextStoreTool(server: McpServer, http: HttpClient): void;
4
- //# sourceMappingURL=context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/tools/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAKhD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CA+BlF"}
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerContextStoreTool = registerContextStoreTool;
4
- const zod_1 = require("zod");
5
- const _helpers_1 = require("./_helpers");
6
- const CONTEXT_TYPES = ['decision', 'rule', 'profile', 'status', 'task', 'event', 'log', 'reference'];
7
- function registerContextStoreTool(server, http) {
8
- server.registerTool('eml_context_store', {
9
- title: 'Store Context Engram',
10
- description: 'Schreibt ein Engram im context-Mode (Handlungsrahmen): ' +
11
- 'decision, rule, profile, status, task, event, log, reference. ' +
12
- 'Status-Engrams brauchen properties.state (Kurzphrase). ' +
13
- 'decision/rule/profile bekommen automatisch review_due_at-Default (60/90/180d).',
14
- inputSchema: {
15
- content: zod_1.z.string(),
16
- type: zod_1.z.enum(CONTEXT_TYPES),
17
- scope: zod_1.z.string().describe('Scope-Pattern: global | project.<id> | agent.<id> | user.<id> | entity.<id>.'),
18
- subject: zod_1.z.string().optional(),
19
- status: zod_1.z.enum(['planned', 'active', 'superseded', 'invalidated', 'expired', 'resolved']).optional(),
20
- significance: zod_1.z.enum(['critical', 'high', 'normal', 'low', 'trivial']).optional(),
21
- properties: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional().describe('Type-spezifische Felder + provenance. Required pro Type: ' +
22
- 'rule→enforcement; status→state; event→occurred_at+change_type. ' +
23
- 'Plus source_id+source_type immer.'),
24
- ingestion_method: zod_1.z.enum(['hook', 'direct', 'bulk', 'other']).optional(),
25
- session_id: zod_1.z.string().optional(),
26
- caller: zod_1.z.string().optional(),
27
- },
28
- }, async (args) => (0, _helpers_1.callTool)(() => http.post('/context', args)));
29
- }
30
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/tools/context.ts"],"names":[],"mappings":";;AAOA,4DA+BC;AAtCD,6BAAuB;AAGvB,yCAAqC;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YACjC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SAC9B;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAC5D,CAAA;AACH,CAAC"}
@@ -1,13 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { HttpClient } from '../http-client';
3
- /**
4
- * v0.9 Cluster 4 step 3: typed write tool for decision engrams.
5
- *
6
- * Properties (decision_type/rationale/alternatives/expires_at/review_due_at)
7
- * are exposed as top-level tool params, packed into a `properties` object
8
- * by the tool, and posted to /context.
9
- *
10
- * review_due_at: server default is 60d if unset (brain hygiene).
11
- */
12
- export declare function registerDecideTool(server: McpServer, http: HttpClient): void;
13
- //# sourceMappingURL=decide.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"decide.d.ts","sourceRoot":"","sources":["../../src/tools/decide.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAOhD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAwC5E"}
@@ -1,59 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerDecideTool = registerDecideTool;
4
- const zod_1 = require("zod");
5
- const _helpers_1 = require("./_helpers");
6
- const DECISION_TYPES = ['strategic', 'architectural', 'operational', 'roadmap'];
7
- const SIGNIFICANCE = ['critical', 'high', 'normal', 'low', 'trivial'];
8
- const STATUSES = ['planned', 'active', 'superseded', 'invalidated', 'expired', 'resolved'];
9
- /**
10
- * v0.9 Cluster 4 step 3: typed write tool for decision engrams.
11
- *
12
- * Properties (decision_type/rationale/alternatives/expires_at/review_due_at)
13
- * are exposed as top-level tool params, packed into a `properties` object
14
- * by the tool, and posted to /context.
15
- *
16
- * review_due_at: server default is 60d if unset (brain hygiene).
17
- */
18
- function registerDecideTool(server, http) {
19
- server.registerTool('eml_decide', {
20
- title: 'Record Decision',
21
- description: 'Records a deliberate, documented decision. Trigger: explicit ' +
22
- '"we decide X", "Decision: Y" — NOT for speculation or open ' +
23
- 'questions. Decisions are the backbone of brain memory.',
24
- inputSchema: {
25
- content: zod_1.z.string().describe('The decision itself (1-3 sentences, what was decided).'),
26
- scope: zod_1.z.string().describe('global | project.<id> | entity.<id> | agent.<id> | user.<id>'),
27
- subject: zod_1.z.string().optional().describe('Slug for the decision (for later recall).'),
28
- decision_type: zod_1.z.enum(DECISION_TYPES).optional(),
29
- rationale: zod_1.z.string().optional().describe('Why this was decided.'),
30
- alternatives: zod_1.z.array(zod_1.z.string()).optional().describe('Rejected alternatives.'),
31
- expires_at: zod_1.z.string().optional().describe('ISO date: hard lifecycle, obsolete from then on.'),
32
- review_due_at: zod_1.z.string().optional().describe('ISO date: next review (server default 60d).'),
33
- significance: zod_1.z.enum(SIGNIFICANCE).optional(),
34
- status: zod_1.z.enum(STATUSES).optional().describe('Default "active".'),
35
- },
36
- }, async (args) => (0, _helpers_1.callTool)(() => {
37
- const properties = {};
38
- if (args.decision_type !== undefined)
39
- properties.decision_type = args.decision_type;
40
- if (args.rationale !== undefined)
41
- properties.rationale = args.rationale;
42
- if (args.alternatives !== undefined)
43
- properties.alternatives = args.alternatives;
44
- if (args.expires_at !== undefined)
45
- properties.expires_at = args.expires_at;
46
- if (args.review_due_at !== undefined)
47
- properties.review_due_at = args.review_due_at;
48
- return http.post('/context', {
49
- content: args.content,
50
- type: 'decision',
51
- scope: args.scope,
52
- subject: args.subject,
53
- status: args.status,
54
- significance: args.significance,
55
- properties: Object.keys(properties).length > 0 ? properties : undefined,
56
- });
57
- }));
58
- }
59
- //# sourceMappingURL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AC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;SACxE,CAAC,CAAA;IACJ,CAAC,CAAC,CACH,CAAA;AACH,CAAC"}
@@ -1,11 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { HttpClient } from '../http-client';
3
- /**
4
- * v0.9 Cluster 4 step 3: list all entities, optionally filtered by kind.
5
- * Replaces the earlier `eml_entity_list` with clearer naming + symmetry to
6
- * `eml_projects` (container inventory).
7
- */
8
- export declare function registerEntitiesTool(server: McpServer, http: HttpClient): void;
9
- export declare function registerEntityCreateTool(server: McpServer, http: HttpClient): void;
10
- export declare function registerEntityUpdateTool(server: McpServer, http: HttpClient): void;
11
- //# sourceMappingURL=entity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity.d.ts","sourceRoot":"","sources":["../../src/tools/entity.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAKhD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAe9E;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAkBlF;AAED,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAkBlF"}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerEntitiesTool = registerEntitiesTool;
4
- exports.registerEntityCreateTool = registerEntityCreateTool;
5
- exports.registerEntityUpdateTool = registerEntityUpdateTool;
6
- const zod_1 = require("zod");
7
- const _helpers_1 = require("./_helpers");
8
- const ENTITY_KINDS = ['person', 'org', 'asset', 'subject'];
9
- /**
10
- * v0.9 Cluster 4 step 3: list all entities, optionally filtered by kind.
11
- * Replaces the earlier `eml_entity_list` with clearer naming + symmetry to
12
- * `eml_projects` (container inventory).
13
- */
14
- function registerEntitiesTool(server, http) {
15
- server.registerTool('eml_entities', {
16
- title: 'List Entities',
17
- description: 'Lists all entities in the brain (external persons / organisations / ' +
18
- 'assets / subjects), optionally filtered by kind. For "which external ' +
19
- 'persons / orgs are in the brain?".',
20
- inputSchema: {
21
- kind: zod_1.z.enum(ENTITY_KINDS).optional().describe('Default: all.'),
22
- },
23
- }, async (args) => (0, _helpers_1.callTool)(() => http.get('/entities', args.kind ? { kind: args.kind } : undefined)));
24
- }
25
- function registerEntityCreateTool(server, http) {
26
- server.registerTool('eml_entity_create', {
27
- title: 'Create Entity',
28
- description: 'Registers an entity (external person / organisation / asset / subject). ' +
29
- 'Required BEFORE the first engram with scope=entity.<id> — otherwise ' +
30
- 'the scope-existence check fails.',
31
- inputSchema: {
32
- id: zod_1.z.string().describe('Slug-style ID, e.g. "lasse" or "anthropic".'),
33
- name: zod_1.z.string(),
34
- kind: zod_1.z.enum(ENTITY_KINDS),
35
- description: zod_1.z.string().optional(),
36
- },
37
- }, async (args) => (0, _helpers_1.callTool)(() => http.post('/entity', args)));
38
- }
39
- function registerEntityUpdateTool(server, http) {
40
- server.registerTool('eml_entity_update', {
41
- title: 'Update Entity',
42
- description: 'Patch entity fields (name/kind/description).',
43
- inputSchema: {
44
- id: zod_1.z.string(),
45
- name: zod_1.z.string().optional(),
46
- kind: zod_1.z.enum(ENTITY_KINDS).optional(),
47
- description: zod_1.z.string().optional(),
48
- },
49
- }, async (args) => (0, _helpers_1.callTool)(() => {
50
- const { id, ...patch } = args;
51
- return http.put(`/entity/${id}`, patch);
52
- }));
53
- }
54
- //# sourceMappingURL=entity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity.js","sourceRoot":"","sources":["../../src/tools/entity.ts"],"names":[],"mappings":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AAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAC3D,CAAA;AACH,CAAC;AAED,SAAgB,wBAAwB,CAAC,MAAiB,EAAE,IAAgB;IAC1E,MAAM,CAAC,YAAY,CACjB,mBAAmB,EACnB;QACE,KAAK,EAAE,eAAe;QACtB,WAAW,EAAE,8CAA8C;QAC3D,WAAW,EAAE;YACX,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;YACd,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC3B,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,QAAQ,EAAE;YACrC,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;SACnC;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,GAAG,EAAE;QAC5B,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAA;QAC7B,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,EAAE,KAAK,CAAC,CAAA;IACzC,CAAC,CAAC,CACH,CAAA;AACH,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { HttpClient } from '../http-client';
3
- export declare function registerEpistemicStoreTool(server: McpServer, http: HttpClient): void;
4
- //# sourceMappingURL=epistemic.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"epistemic.d.ts","sourceRoot":"","sources":["../../src/tools/epistemic.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAKhD,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAgCpF"}
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerEpistemicStoreTool = registerEpistemicStoreTool;
4
- const zod_1 = require("zod");
5
- const _helpers_1 = require("./_helpers");
6
- const EPISTEMIC_TYPES = ['observation', 'hypothesis', 'assessment', 'prediction', 'pattern'];
7
- function registerEpistemicStoreTool(server, http) {
8
- server.registerTool('eml_epistemic_store', {
9
- title: 'Store Epistemic Engram',
10
- description: 'Schreibt ein Engram im epistemic-Mode: ' +
11
- 'observation (Beobachtung), hypothesis (Vermutung), assessment (Bewertung), ' +
12
- 'prediction (Vorhersage), pattern (wiederkehrende Struktur). ' +
13
- 'Source-Felder MÜSSEN in properties.source_id + properties.source_type stehen.',
14
- inputSchema: {
15
- content: zod_1.z.string().describe('Engram-Inhalt (frei-text, kein Markup-Zwang).'),
16
- type: zod_1.z.enum(EPISTEMIC_TYPES),
17
- scope: zod_1.z.string().describe('Scope-Pattern: global | project.<id> | agent.<id> | user.<id> | entity.<id>. ' +
18
- 'Externe Personen/Orgs/Assets als entity.<id>; vorher via eml_entity_create anlegen.'),
19
- subject: zod_1.z.string().optional(),
20
- significance: zod_1.z.enum(['critical', 'high', 'normal', 'low', 'trivial']).optional(),
21
- properties: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional().describe('Type-spezifische Felder + provenance. Required pro Type: ' +
22
- 'observation→observation_type; hypothesis→reasoning; ' +
23
- 'assessment→assessment_type+reasoning; prediction→prediction_type+probability+resolution_date+reasoning; ' +
24
- 'pattern→observed_count. Plus source_id+source_type immer.'),
25
- ingestion_method: zod_1.z.enum(['hook', 'direct', 'bulk', 'other']).optional(),
26
- session_id: zod_1.z.string().optional(),
27
- caller: zod_1.z.string().optional(),
28
- },
29
- }, async (args) => (0, _helpers_1.callTool)(() => http.post('/epistemic', args)));
30
- }
31
- //# sourceMappingURL=epistemic.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"epistemic.js","sourceRoot":"","sources":["../../src/tools/epistemic.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AAQ,EAAE;SAC9B;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC,CAC9D,CAAA;AACH,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { HttpClient } from '../http-client';
3
- export declare function registerGetTool(server: McpServer, http: HttpClient): void;
4
- //# sourceMappingURL=get.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../src/tools/get.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAGhD,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAuBzE"}
package/dist/tools/get.js DELETED
@@ -1,24 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerGetTool = registerGetTool;
4
- const zod_1 = require("zod");
5
- const _helpers_1 = require("./_helpers");
6
- function registerGetTool(server, http) {
7
- server.registerTool('eml_get', {
8
- title: 'Get Engram',
9
- description: 'Fetch a single engram by ID, optionally with relations. Mode-specific ' +
10
- 'paths (/epistemic/:id, /context/:id) enforce mode-consistent lookups.',
11
- inputSchema: {
12
- id: zod_1.z.string().describe('Engram ID (UUID).'),
13
- mode: zod_1.z.enum(['epistemic', 'context']).optional().describe('When set: lookup via mode-specific endpoint (404 on mode mismatch).'),
14
- with_relations: zod_1.z.boolean().optional().describe('Default true.'),
15
- },
16
- }, async (args) => (0, _helpers_1.callTool)(() => {
17
- const path = args.mode ? `/${args.mode}/${args.id}` : `/engram/${args.id}`;
18
- const params = {};
19
- if (args.with_relations !== undefined)
20
- params.with_relations = String(args.with_relations);
21
- return http.get(path, params);
22
- }));
23
- }
24
- //# sourceMappingURL=get.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get.js","sourceRoot":"","sources":["../../src/tools/get.ts"],"names":[],"mappings":";;AAKA,0CAuBC;AA5BD,6BAAuB;AAGvB,yCAAqC;AAErC,SAAgB,eAAe,CAAC,MAAiB,EAAE,IAAgB;IACjE,MAAM,CAAC,YAAY,CACjB,SAAS,EACT;QACE,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,wEAAwE;YACxE,uEAAuE;QACzE,WAAW,EAAE;YACX,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC;YAC5C,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CACxD,qEAAqE,CACtE;YACD,cAAc,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC;SACjE;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,GAAG,EAAE;QAC5B,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,EAAE,EAAE,CAAA;QAC1E,MAAM,MAAM,GAAgD,EAAE,CAAA;QAC9D,IAAI,IAAI,CAAC,cAAc,KAAK,SAAS;YAAE,MAAM,CAAC,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,CAAA;QAC1F,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAC/B,CAAC,CAAC,CACH,CAAA;AACH,CAAC"}
@@ -1,26 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { HttpClient } from '../http-client';
3
- /**
4
- * v0.9.1 — 17-tool set.
5
- *
6
- * Tool categories:
7
- * - Boot/Recall (2): eml_boot, eml_recall
8
- * - Typed write (4): eml_decide, eml_set_status, eml_track_task, eml_note
9
- * - Read/Find (5): eml_show, eml_list, eml_get, eml_projects, eml_entities
10
- * - Self-awareness (1): eml_stats
11
- * - Edit (1): eml_update
12
- * - Project CRUD (2): eml_project_create, eml_project_update
13
- * - Entity CRUD (2): eml_entity_create, eml_entity_update
14
- *
15
- * Intentionally not exposed in v0.9.1:
16
- * - eml_relate (HTTP-only power use)
17
- * - eml_confirm_review (brain-hygiene cluster, post-v0.9.1)
18
- * - eml_session_get (→ v0.9.2 with cross-session awareness)
19
- * - eml_epistemic_store / eml_context_store (replaced by typed tools)
20
- *
21
- * Order is not semantic — only affects the `tools/list` ordering.
22
- * Boot/Recall come first because they're the most-used.
23
- */
24
- export declare function registerAllTools(server: McpServer, http: HttpClient): void;
25
- export declare const TOOL_NAMES: readonly ["eml_boot", "eml_recall", "eml_decide", "eml_set_status", "eml_track_task", "eml_note", "eml_show", "eml_list", "eml_get", "eml_projects", "eml_entities", "eml_stats", "eml_update", "eml_project_create", "eml_project_update", "eml_entity_create", "eml_entity_update"];
26
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAwBhD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAkB1E;AAED,eAAO,MAAM,UAAU,uRAQb,CAAA"}
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TOOL_NAMES = void 0;
4
- exports.registerAllTools = registerAllTools;
5
- const boot_1 = require("./boot");
6
- const recall_1 = require("./recall");
7
- const list_1 = require("./list");
8
- const get_1 = require("./get");
9
- const update_1 = require("./update");
10
- const show_1 = require("./show");
11
- const stats_1 = require("./stats");
12
- const decide_1 = require("./decide");
13
- const set_status_1 = require("./set-status");
14
- const track_task_1 = require("./track-task");
15
- const note_1 = require("./note");
16
- const entity_1 = require("./entity");
17
- const projects_1 = require("./projects");
18
- /**
19
- * v0.9.1 — 17-tool set.
20
- *
21
- * Tool categories:
22
- * - Boot/Recall (2): eml_boot, eml_recall
23
- * - Typed write (4): eml_decide, eml_set_status, eml_track_task, eml_note
24
- * - Read/Find (5): eml_show, eml_list, eml_get, eml_projects, eml_entities
25
- * - Self-awareness (1): eml_stats
26
- * - Edit (1): eml_update
27
- * - Project CRUD (2): eml_project_create, eml_project_update
28
- * - Entity CRUD (2): eml_entity_create, eml_entity_update
29
- *
30
- * Intentionally not exposed in v0.9.1:
31
- * - eml_relate (HTTP-only power use)
32
- * - eml_confirm_review (brain-hygiene cluster, post-v0.9.1)
33
- * - eml_session_get (→ v0.9.2 with cross-session awareness)
34
- * - eml_epistemic_store / eml_context_store (replaced by typed tools)
35
- *
36
- * Order is not semantic — only affects the `tools/list` ordering.
37
- * Boot/Recall come first because they're the most-used.
38
- */
39
- function registerAllTools(server, http) {
40
- (0, boot_1.registerBootTool)(server, http);
41
- (0, recall_1.registerRecallTool)(server, http);
42
- (0, decide_1.registerDecideTool)(server, http);
43
- (0, set_status_1.registerSetStatusTool)(server, http);
44
- (0, track_task_1.registerTrackTaskTool)(server, http);
45
- (0, note_1.registerNoteTool)(server, http);
46
- (0, show_1.registerShowTool)(server, http);
47
- (0, list_1.registerListTool)(server, http);
48
- (0, get_1.registerGetTool)(server, http);
49
- (0, projects_1.registerProjectsTool)(server, http);
50
- (0, entity_1.registerEntitiesTool)(server, http);
51
- (0, stats_1.registerStatsTool)(server, http);
52
- (0, update_1.registerUpdateTool)(server, http);
53
- (0, projects_1.registerProjectCreateTool)(server, http);
54
- (0, projects_1.registerProjectUpdateTool)(server, http);
55
- (0, entity_1.registerEntityCreateTool)(server, http);
56
- (0, entity_1.registerEntityUpdateTool)(server, http);
57
- }
58
- exports.TOOL_NAMES = [
59
- 'eml_boot', 'eml_recall',
60
- 'eml_decide', 'eml_set_status', 'eml_track_task', 'eml_note',
61
- 'eml_show', 'eml_list', 'eml_get',
62
- 'eml_projects', 'eml_entities', 'eml_stats',
63
- 'eml_update',
64
- 'eml_project_create', 'eml_project_update',
65
- 'eml_entity_create', 'eml_entity_update',
66
- ];
67
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":";;;AA8CA,4CAkBC;AA7DD,iCAAyC;AACzC,qCAA6C;AAC7C,iCAAyC;AACzC,+BAAuC;AACvC,qCAA6C;AAC7C,iCAAyC;AACzC,mCAA2C;AAC3C,qCAA6C;AAC7C,6CAAoD;AACpD,6CAAoD;AACpD,iCAAyC;AACzC,qCAIiB;AACjB,yCAImB;AAEnB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,SAAgB,gBAAgB,CAAC,MAAiB,EAAE,IAAgB;IAClE,IAAA,uBAAgB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAC9B,IAAA,2BAAkB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAChC,IAAA,2BAAkB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAChC,IAAA,kCAAqB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACnC,IAAA,kCAAqB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACnC,IAAA,uBAAgB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAC9B,IAAA,uBAAgB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAC9B,IAAA,uBAAgB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAC9B,IAAA,qBAAe,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAC7B,IAAA,+BAAoB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAClC,IAAA,6BAAoB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAClC,IAAA,yBAAiB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAC/B,IAAA,2BAAkB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IAChC,IAAA,oCAAyB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACvC,IAAA,oCAAyB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACvC,IAAA,iCAAwB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;IACtC,IAAA,iCAAwB,EAAC,MAAM,EAAE,IAAI,CAAC,CAAA;AACxC,CAAC;AAEY,QAAA,UAAU,GAAG;IACxB,UAAU,EAAE,YAAY;IACxB,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,UAAU;IAC5D,UAAU,EAAE,UAAU,EAAE,SAAS;IACjC,cAAc,EAAE,cAAc,EAAE,WAAW;IAC3C,YAAY;IACZ,oBAAoB,EAAE,oBAAoB;IAC1C,mBAAmB,EAAE,mBAAmB;CAChC,CAAA"}
@@ -1,4 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { HttpClient } from '../http-client';
3
- export declare function registerListTool(server: McpServer, http: HttpClient): void;
4
- //# sourceMappingURL=list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/tools/list.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAQhD,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAoC1E"}
@@ -1,41 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerListTool = registerListTool;
4
- const zod_1 = require("zod");
5
- const _helpers_1 = require("./_helpers");
6
- const ENGRAM_TYPES = [
7
- 'observation', 'hypothesis', 'assessment', 'prediction', 'pattern',
8
- 'decision', 'rule', 'profile', 'status', 'task', 'event', 'log', 'reference',
9
- ];
10
- function registerListTool(server, http) {
11
- server.registerTool('eml_list', {
12
- title: 'List Engrams',
13
- description: 'List engrams with filters (type/scope/significance/status/search/etc.). ' +
14
- 'Has three endpoint variants: all modes (default), epistemic-only, context-only.',
15
- inputSchema: {
16
- mode: zod_1.z.enum(['epistemic', 'context']).optional().describe('When set: filter on a single mode (uses /list/epistemic or /list/context).'),
17
- type: zod_1.z.enum(ENGRAM_TYPES).optional(),
18
- scope: zod_1.z.string().optional(),
19
- subject: zod_1.z.string().optional(),
20
- status: zod_1.z.enum(['planned', 'active', 'superseded', 'invalidated', 'expired', 'resolved']).optional(),
21
- significance: zod_1.z.enum(['critical', 'high', 'normal', 'low', 'trivial']).optional(),
22
- search: zod_1.z.string().optional().describe('FTS5 search over content/subject.'),
23
- order_by: zod_1.z.enum(['created_at', 'updated_at', 'significance', 'score']).optional(),
24
- limit: zod_1.z.number().int().positive().max(200).optional(),
25
- offset: zod_1.z.number().int().nonnegative().optional(),
26
- has_relations: zod_1.z.boolean().optional(),
27
- },
28
- }, async (args) => (0, _helpers_1.callTool)(() => {
29
- const { mode, ...query } = args;
30
- const path = mode ? `/list/${mode}` : '/list';
31
- // Strip undefined + booleanify has_relations as flag-or-omit
32
- const params = {};
33
- for (const [k, v] of Object.entries(query)) {
34
- if (v === undefined)
35
- continue;
36
- params[k] = typeof v === 'boolean' ? String(v) : v;
37
- }
38
- return http.get(path, params);
39
- }));
40
- }
41
- //# sourceMappingURL=list.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/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,CAAC,CAAC,CAAC,QAAQ,EAAE;YAClF,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;YACtD,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;YACjD,aAAa,EAAE,OAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;SACtC;KACF,EACD,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,IAAA,mBAAQ,EAAC,GAAG,EAAE;QAC5B,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,GAAG,IAAI,CAAA;QAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAA;QAC7C,6DAA6D;QAC7D,MAAM,MAAM,GAAgD,EAAE,CAAA;QAC9D,KAAK,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3C,IAAI,CAAC,KAAK,SAAS;gBAAE,SAAQ;YAC7B,MAAM,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAoB,CAAA;QACvE,CAAC;QACD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IAC/B,CAAC,CAAC,CACH,CAAA;AACH,CAAC"}
@@ -1,15 +0,0 @@
1
- import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import type { HttpClient } from '../http-client';
3
- /**
4
- * v0.9 Cluster 4 step 3: catch-all tool for secondary context types.
5
- *
6
- * Used for the five less-frequent types (rule/profile/event/reference/log).
7
- * Properties are kind-specific — passed through as a generic object and
8
- * validated server-side (validateProperties() checks required fields per type:
9
- * - event: occurred_at + change_type required
10
- * - rule: enforcement required
11
- * - other: no required fields
12
- * ).
13
- */
14
- export declare function registerNoteTool(server: McpServer, http: HttpClient): void;
15
- //# sourceMappingURL=note.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"note.d.ts","sourceRoot":"","sources":["../../src/tools/note.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAA;AACxE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAOhD;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,GAAG,IAAI,CAiC1E"}
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.registerNoteTool = registerNoteTool;
4
- const zod_1 = require("zod");
5
- const _helpers_1 = require("./_helpers");
6
- const NOTE_KINDS = ['rule', 'profile', 'event', 'reference', 'log'];
7
- const SIGNIFICANCE = ['critical', 'high', 'normal', 'low', 'trivial'];
8
- const STATUSES = ['planned', 'active', 'superseded', 'invalidated', 'expired', 'resolved'];
9
- /**
10
- * v0.9 Cluster 4 step 3: catch-all tool for secondary context types.
11
- *
12
- * Used for the five less-frequent types (rule/profile/event/reference/log).
13
- * Properties are kind-specific — passed through as a generic object and
14
- * validated server-side (validateProperties() checks required fields per type:
15
- * - event: occurred_at + change_type required
16
- * - rule: enforcement required
17
- * - other: no required fields
18
- * ).
19
- */
20
- function registerNoteTool(server, http) {
21
- server.registerTool('eml_note', {
22
- title: 'Write Note',
23
- description: 'Catch-all for secondary engram types: rule (convention/constraint), ' +
24
- 'profile (identity facet), event (immutable system event), reference ' +
25
- '(external pointer), log (narrative entry). For the more frequent types ' +
26
- 'use the typed tools: eml_decide, eml_set_status, eml_track_task.',
27
- inputSchema: {
28
- kind: zod_1.z.enum(NOTE_KINDS).describe('Which type — dictates required properties.'),
29
- content: zod_1.z.string(),
30
- scope: zod_1.z.string().describe('global | project.<id> | entity.<id> | agent.<id> | user.<id>'),
31
- subject: zod_1.z.string().optional(),
32
- status: zod_1.z.enum(STATUSES).optional(),
33
- significance: zod_1.z.enum(SIGNIFICANCE).optional(),
34
- properties: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional().describe('Type-specific properties. Required: event needs occurred_at + change_type; ' +
35
- 'rule needs enforcement (mandatory|recommended|advisory).'),
36
- },
37
- }, async (args) => (0, _helpers_1.callTool)(() => http.post('/context', {
38
- content: args.content,
39
- type: args.kind,
40
- scope: args.scope,
41
- subject: args.subject,
42
- status: args.status,
43
- significance: args.significance,
44
- properties: args.properties,
45
- })));
46
- }
47
- //# sourceMappingURL=note.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"note.js","sourceRoot":"","sources":["../../src/tools/note.ts"],"names":[],"mappings":";;AAoBA,4CAiCC;AArDD,6BAAuB;AAGvB,yCAAqC;AAErC,MAAM,UAAU,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,CAAU,CAAA;AAC5E,MAAM,YAAY,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,CAAU,CAAA;AAC9E,MAAM,QAAQ,GAAG,CAAC,SAAS,EAAE,QAAQ,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,CAAU,CAAA;AAEnG;;;;;;;;;;GAUG;AACH,SAAgB,gBAAgB,CAAC,MAAiB,EAAE,IAAgB;IAClE,MAAM,CAAC,YAAY,CACjB,UAAU,EACV;QACE,KAAK,EAAE,YAAY;QACnB,WAAW,EACT,sEAAsE;YACtE,sEAAsE;YACtE,yEAAyE;YACzE,kEAAkE;QACpE,WAAW,EAAE;YACX,IAAI,EAAE,OAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,4CAA4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