onlymcp 0.16.4 → 0.19.0

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 (123) hide show
  1. package/LICENSE +33 -17
  2. package/README.md +7 -1
  3. package/dist/bin/cli.js +46 -564
  4. package/dist/bin/mcp.js +45 -66
  5. package/package.json +6 -10
  6. package/dist/apiBaseUrl.d.ts +0 -12
  7. package/dist/apiBaseUrl.js +0 -28
  8. package/dist/apiBaseUrl.js.map +0 -1
  9. package/dist/apiClient.d.ts +0 -296
  10. package/dist/apiClient.js +0 -224
  11. package/dist/apiClient.js.map +0 -1
  12. package/dist/auth/deviceLogin.d.ts +0 -5
  13. package/dist/auth/deviceLogin.js +0 -40
  14. package/dist/auth/deviceLogin.js.map +0 -1
  15. package/dist/auth/keyring.d.ts +0 -5
  16. package/dist/auth/keyring.js +0 -28
  17. package/dist/auth/keyring.js.map +0 -1
  18. package/dist/bin/cli.d.ts +0 -2
  19. package/dist/bin/cli.js.map +0 -1
  20. package/dist/bin/mcp.d.ts +0 -2
  21. package/dist/bin/mcp.js.map +0 -1
  22. package/dist/cache.d.ts +0 -7
  23. package/dist/cache.js +0 -32
  24. package/dist/cache.js.map +0 -1
  25. package/dist/deviceId.d.ts +0 -2
  26. package/dist/deviceId.js +0 -97
  27. package/dist/deviceId.js.map +0 -1
  28. package/dist/export/unpack.d.ts +0 -33
  29. package/dist/export/unpack.js +0 -54
  30. package/dist/export/unpack.js.map +0 -1
  31. package/dist/identity.d.ts +0 -29
  32. package/dist/identity.js +0 -116
  33. package/dist/identity.js.map +0 -1
  34. package/dist/import/collect.d.ts +0 -25
  35. package/dist/import/collect.js +0 -101
  36. package/dist/import/collect.js.map +0 -1
  37. package/dist/import/frontmatter.d.ts +0 -44
  38. package/dist/import/frontmatter.js +0 -93
  39. package/dist/import/frontmatter.js.map +0 -1
  40. package/dist/import/plan.d.ts +0 -74
  41. package/dist/import/plan.js +0 -190
  42. package/dist/import/plan.js.map +0 -1
  43. package/dist/import/prune.d.ts +0 -46
  44. package/dist/import/prune.js +0 -61
  45. package/dist/import/prune.js.map +0 -1
  46. package/dist/import/secrets.d.ts +0 -7
  47. package/dist/import/secrets.js +0 -77
  48. package/dist/import/secrets.js.map +0 -1
  49. package/dist/import/upload.d.ts +0 -21
  50. package/dist/import/upload.js +0 -99
  51. package/dist/import/upload.js.map +0 -1
  52. package/dist/install.d.ts +0 -81
  53. package/dist/install.js +0 -168
  54. package/dist/install.js.map +0 -1
  55. package/dist/instructions.d.ts +0 -4
  56. package/dist/instructions.js +0 -67
  57. package/dist/instructions.js.map +0 -1
  58. package/dist/memoryPath.d.ts +0 -1
  59. package/dist/memoryPath.js +0 -13
  60. package/dist/memoryPath.js.map +0 -1
  61. package/dist/memorySync.d.ts +0 -28
  62. package/dist/memorySync.js +0 -56
  63. package/dist/memorySync.js.map +0 -1
  64. package/dist/paths.d.ts +0 -16
  65. package/dist/paths.js +0 -58
  66. package/dist/paths.js.map +0 -1
  67. package/dist/registry/caveats.d.ts +0 -17
  68. package/dist/registry/caveats.js +0 -74
  69. package/dist/registry/caveats.js.map +0 -1
  70. package/dist/registry/clients.d.ts +0 -17
  71. package/dist/registry/clients.js +0 -402
  72. package/dist/registry/clients.js.map +0 -1
  73. package/dist/registry/index.d.ts +0 -6
  74. package/dist/registry/index.js +0 -7
  75. package/dist/registry/index.js.map +0 -1
  76. package/dist/registry/serverInfo.d.ts +0 -25
  77. package/dist/registry/serverInfo.js +0 -33
  78. package/dist/registry/serverInfo.js.map +0 -1
  79. package/dist/registry/servers.d.ts +0 -58
  80. package/dist/registry/servers.js +0 -259
  81. package/dist/registry/servers.js.map +0 -1
  82. package/dist/registry/toolHints.d.ts +0 -29
  83. package/dist/registry/toolHints.js +0 -41
  84. package/dist/registry/toolHints.js.map +0 -1
  85. package/dist/registry/types.d.ts +0 -71
  86. package/dist/registry/types.js +0 -6
  87. package/dist/registry/types.js.map +0 -1
  88. package/dist/skillFilePath.d.ts +0 -1
  89. package/dist/skillFilePath.js +0 -29
  90. package/dist/skillFilePath.js.map +0 -1
  91. package/dist/stubs.d.ts +0 -7
  92. package/dist/stubs.js +0 -159
  93. package/dist/stubs.js.map +0 -1
  94. package/dist/tools/connections.d.ts +0 -154
  95. package/dist/tools/connections.js +0 -164
  96. package/dist/tools/connections.js.map +0 -1
  97. package/dist/tools/getAgentDefinition.d.ts +0 -26
  98. package/dist/tools/getAgentDefinition.js +0 -29
  99. package/dist/tools/getAgentDefinition.js.map +0 -1
  100. package/dist/tools/getSkill.d.ts +0 -26
  101. package/dist/tools/getSkill.js +0 -26
  102. package/dist/tools/getSkill.js.map +0 -1
  103. package/dist/tools/getSkillFile.d.ts +0 -27
  104. package/dist/tools/getSkillFile.js +0 -39
  105. package/dist/tools/getSkillFile.js.map +0 -1
  106. package/dist/tools/index.d.ts +0 -263
  107. package/dist/tools/index.js +0 -69
  108. package/dist/tools/index.js.map +0 -1
  109. package/dist/tools/lists.d.ts +0 -38
  110. package/dist/tools/lists.js +0 -39
  111. package/dist/tools/lists.js.map +0 -1
  112. package/dist/tools/memoryGraph.d.ts +0 -69
  113. package/dist/tools/memoryGraph.js +0 -128
  114. package/dist/tools/memoryGraph.js.map +0 -1
  115. package/dist/tools/memoryRead.d.ts +0 -25
  116. package/dist/tools/memoryRead.js +0 -33
  117. package/dist/tools/memoryRead.js.map +0 -1
  118. package/dist/tools/memoryWrite.d.ts +0 -27
  119. package/dist/tools/memoryWrite.js +0 -34
  120. package/dist/tools/memoryWrite.js.map +0 -1
  121. package/dist/tools/write.d.ts +0 -166
  122. package/dist/tools/write.js +0 -193
  123. package/dist/tools/write.js.map +0 -1
@@ -1,263 +0,0 @@
1
- import { z } from 'zod';
2
- import type { ApiClient } from '../apiClient.js';
3
- import type { TtlCache } from '../cache.js';
4
- /**
5
- * Every tool the stdio server serves.
6
- *
7
- * Reihenfolge ist die, in der ein Client sie zu sehen bekommt: erst das
8
- * Gedaechtnis (am haeufigsten gebraucht), dann Skills, Agenten, und zuletzt
9
- * die Verwaltung der angebundenen Server.
10
- */
11
- export declare function buildTools(api: ApiClient, cache: TtlCache): ({
12
- name: string;
13
- description: string;
14
- inputSchema: z.ZodObject<{
15
- query: z.ZodString;
16
- types: z.ZodOptional<z.ZodString>;
17
- limit: z.ZodOptional<z.ZodNumber>;
18
- }, z.core.$strip>;
19
- handler(args: z.infer<typeof import("./memoryGraph.js").MemorySearchInput>): Promise<{
20
- content: {
21
- type: "text";
22
- text: string;
23
- }[];
24
- isError?: boolean;
25
- }>;
26
- } | {
27
- name: string;
28
- description: string;
29
- inputSchema: z.ZodObject<{
30
- scope: z.ZodOptional<z.ZodString>;
31
- }, z.core.$strip>;
32
- handler(args: z.infer<typeof import("./memoryGraph.js").MemoryTreeInput>): Promise<{
33
- content: {
34
- type: "text";
35
- text: string;
36
- }[];
37
- isError?: boolean;
38
- }>;
39
- } | {
40
- name: string;
41
- description: string;
42
- inputSchema: z.ZodObject<{
43
- from: z.ZodString;
44
- to: z.ZodString;
45
- updateLinks: z.ZodOptional<z.ZodBoolean>;
46
- }, z.core.$strip>;
47
- handler(args: z.infer<typeof import("./memoryGraph.js").MemoryMoveInput>): Promise<{
48
- content: {
49
- type: "text";
50
- text: string;
51
- }[];
52
- isError?: boolean;
53
- }>;
54
- } | {
55
- name: string;
56
- description: string;
57
- inputSchema: z.ZodObject<{}, z.core.$strip>;
58
- handler: () => Promise<{
59
- content: {
60
- type: "text";
61
- text: string;
62
- }[];
63
- }>;
64
- } | {
65
- name: string;
66
- description: string;
67
- inputSchema: z.ZodObject<{
68
- name: z.ZodString;
69
- slug: z.ZodString;
70
- url: z.ZodString;
71
- transport: z.ZodDefault<z.ZodEnum<{
72
- http: "http";
73
- sse: "sse";
74
- }>>;
75
- authType: z.ZodDefault<z.ZodEnum<{
76
- none: "none";
77
- bearer: "bearer";
78
- header: "header";
79
- }>>;
80
- authHeaderName: z.ZodOptional<z.ZodString>;
81
- secret: z.ZodOptional<z.ZodString>;
82
- teamId: z.ZodOptional<z.ZodString>;
83
- }, z.core.$strip>;
84
- handler: (args: z.infer<typeof import("./connections.js").ConnectionCreateInput>) => Promise<{
85
- content: {
86
- type: "text";
87
- text: string;
88
- }[];
89
- }>;
90
- } | {
91
- name: string;
92
- description: string;
93
- inputSchema: z.ZodObject<{
94
- slug: z.ZodString;
95
- name: z.ZodOptional<z.ZodString>;
96
- url: z.ZodOptional<z.ZodString>;
97
- transport: z.ZodOptional<z.ZodEnum<{
98
- http: "http";
99
- sse: "sse";
100
- }>>;
101
- authType: z.ZodOptional<z.ZodEnum<{
102
- none: "none";
103
- bearer: "bearer";
104
- header: "header";
105
- }>>;
106
- authHeaderName: z.ZodOptional<z.ZodString>;
107
- secret: z.ZodOptional<z.ZodString>;
108
- enabled: z.ZodOptional<z.ZodBoolean>;
109
- }, z.core.$strip>;
110
- handler: (args: z.infer<typeof import("./connections.js").ConnectionUpdateInput>) => Promise<{
111
- content: {
112
- type: "text";
113
- text: string;
114
- }[];
115
- }>;
116
- } | {
117
- name: string;
118
- description: string;
119
- inputSchema: z.ZodObject<{
120
- slug: z.ZodString;
121
- }, z.core.$strip>;
122
- handler: (args: z.infer<typeof import("./connections.js").ConnectionDeleteInput>) => Promise<{
123
- content: {
124
- type: "text";
125
- text: string;
126
- }[];
127
- }>;
128
- } | {
129
- name: string;
130
- description: string;
131
- inputSchema: z.ZodObject<{
132
- slug: z.ZodString;
133
- tool: z.ZodString;
134
- enabled: z.ZodBoolean;
135
- }, z.core.$strip>;
136
- handler: (args: z.infer<typeof import("./connections.js").ConnectionToolToggleInput>) => Promise<{
137
- content: {
138
- type: "text";
139
- text: string;
140
- }[];
141
- }>;
142
- } | {
143
- name: string;
144
- description: string;
145
- inputSchema: z.ZodObject<{
146
- name: z.ZodString;
147
- body: z.ZodString;
148
- }, z.core.$strip>;
149
- handler: (args: z.infer<typeof import("./write.js").SkillWriteInput>) => Promise<{
150
- content: {
151
- type: "text";
152
- text: string;
153
- }[];
154
- }>;
155
- } | {
156
- name: string;
157
- description: string;
158
- inputSchema: z.ZodObject<{
159
- name: z.ZodString;
160
- }, z.core.$strip>;
161
- handler: (args: z.infer<typeof import("./write.js").SkillDeleteInput>) => Promise<{
162
- content: {
163
- type: "text";
164
- text: string;
165
- }[];
166
- }>;
167
- } | {
168
- name: string;
169
- description: string;
170
- inputSchema: z.ZodObject<{
171
- skill: z.ZodString;
172
- }, z.core.$strip>;
173
- handler: (args: z.infer<typeof import("./write.js").ListSkillFilesInput>) => Promise<{
174
- content: {
175
- type: "text";
176
- text: string;
177
- }[];
178
- }>;
179
- } | {
180
- name: string;
181
- description: string;
182
- inputSchema: z.ZodObject<{
183
- skill: z.ZodString;
184
- path: z.ZodString;
185
- content: z.ZodString;
186
- encoding: z.ZodDefault<z.ZodEnum<{
187
- utf8: "utf8";
188
- base64: "base64";
189
- }>>;
190
- }, z.core.$strip>;
191
- handler: (args: z.infer<typeof import("./write.js").SkillFileWriteInput>) => Promise<{
192
- content: {
193
- type: "text";
194
- text: string;
195
- }[];
196
- }>;
197
- } | {
198
- name: string;
199
- description: string;
200
- inputSchema: z.ZodObject<{
201
- skill: z.ZodString;
202
- path: z.ZodString;
203
- }, z.core.$strip>;
204
- handler: (args: z.infer<typeof import("./write.js").SkillFileDeleteInput>) => Promise<{
205
- content: {
206
- type: "text";
207
- text: string;
208
- }[];
209
- }>;
210
- } | {
211
- name: string;
212
- description: string;
213
- inputSchema: z.ZodObject<{
214
- name: z.ZodString;
215
- description: z.ZodString;
216
- body: z.ZodString;
217
- model: z.ZodOptional<z.ZodString>;
218
- tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
219
- }, z.core.$strip>;
220
- handler: (args: z.infer<typeof import("./write.js").AgentWriteInput>) => Promise<{
221
- content: {
222
- type: "text";
223
- text: string;
224
- }[];
225
- }>;
226
- } | {
227
- name: string;
228
- description: string;
229
- inputSchema: z.ZodObject<{
230
- path: z.ZodString;
231
- }, z.core.$strip>;
232
- handler: (args: z.infer<typeof import("./write.js").MemoryDeleteInput>) => Promise<{
233
- content: {
234
- type: "text";
235
- text: string;
236
- }[];
237
- }>;
238
- })[];
239
- /**
240
- * What tools/list answers: name, description and input schema as before, and since the owner-notes round the title and
241
- * annotations of each tool (MCP `Tool.title`, `ToolAnnotations`) from the registry table that the hosted endpoint is
242
- * pinned to as well. A tool the table does not know is a defect of the build, and the listing says so instead of
243
- * offering a tool a client would treat as a destructive writer by default.
244
- */
245
- export declare function listedTools(tools: ReadonlyArray<{
246
- name: string;
247
- description: string;
248
- inputSchema: z.ZodType;
249
- }>): {
250
- name: string;
251
- title: string;
252
- description: string;
253
- inputSchema: {
254
- type: "object";
255
- [key: string]: unknown;
256
- };
257
- annotations: {
258
- readOnlyHint: boolean;
259
- destructiveHint?: boolean;
260
- idempotentHint?: boolean;
261
- openWorldHint: boolean;
262
- };
263
- }[];
@@ -1,69 +0,0 @@
1
- import { z } from 'zod';
2
- import { TOOL_HINTS } from '../registry/index.js';
3
- import { createGetAgentDefinitionTool } from './getAgentDefinition.js';
4
- import { createGetSkillFileTool } from './getSkillFile.js';
5
- import { createGetSkillTool } from './getSkill.js';
6
- import { createListAgentsTool, createListSkillsTool } from './lists.js';
7
- import { createMemoryReadTool } from './memoryRead.js';
8
- import { createMemoryWriteTool } from './memoryWrite.js';
9
- import { createMemoryLinksTool, createMemoryMoveTool, createMemorySearchTool, createMemoryTreeTool, } from './memoryGraph.js';
10
- import { createConnectionCreateTool, createConnectionDeleteTool, createConnectionToolToggleTool, createConnectionToolsTool, createConnectionUpdateTool, createListConnectionsTool, } from './connections.js';
11
- import { createAgentDeleteTool, createAgentWriteTool, createListMemoryTool, createListSkillFilesTool, createMemoryDeleteTool, createSkillDeleteTool, createSkillFileDeleteTool, createSkillFileWriteTool, createSkillWriteTool, } from './write.js';
12
- /**
13
- * Every tool the stdio server serves.
14
- *
15
- * Reihenfolge ist die, in der ein Client sie zu sehen bekommt: erst das
16
- * Gedaechtnis (am haeufigsten gebraucht), dann Skills, Agenten, und zuletzt
17
- * die Verwaltung der angebundenen Server.
18
- */
19
- export function buildTools(api, cache) {
20
- return [
21
- createMemoryReadTool(api),
22
- createMemoryWriteTool(api),
23
- createListMemoryTool(api),
24
- createMemoryDeleteTool(api),
25
- createMemorySearchTool(api),
26
- createMemoryTreeTool(api),
27
- createMemoryMoveTool(api),
28
- createMemoryLinksTool(api),
29
- createListSkillsTool(api),
30
- createGetSkillTool(api, cache),
31
- createSkillWriteTool(api),
32
- createSkillDeleteTool(api),
33
- createListSkillFilesTool(api),
34
- createGetSkillFileTool(api),
35
- createSkillFileWriteTool(api),
36
- createSkillFileDeleteTool(api),
37
- createListAgentsTool(api),
38
- createGetAgentDefinitionTool(api, cache),
39
- createAgentWriteTool(api),
40
- createAgentDeleteTool(api),
41
- createListConnectionsTool(api),
42
- createConnectionCreateTool(api),
43
- createConnectionUpdateTool(api),
44
- createConnectionDeleteTool(api),
45
- createConnectionToolsTool(api),
46
- createConnectionToolToggleTool(api),
47
- ];
48
- }
49
- /**
50
- * What tools/list answers: name, description and input schema as before, and since the owner-notes round the title and
51
- * annotations of each tool (MCP `Tool.title`, `ToolAnnotations`) from the registry table that the hosted endpoint is
52
- * pinned to as well. A tool the table does not know is a defect of the build, and the listing says so instead of
53
- * offering a tool a client would treat as a destructive writer by default.
54
- */
55
- export function listedTools(tools) {
56
- return tools.map((t) => {
57
- const hint = TOOL_HINTS[t.name];
58
- if (!hint)
59
- throw new Error(`No title and annotations in the registry table for the tool ${t.name}`);
60
- return {
61
- name: t.name,
62
- title: hint.title,
63
- description: t.description,
64
- inputSchema: z.toJSONSchema(t.inputSchema),
65
- annotations: hint.annotations,
66
- };
67
- });
68
- }
69
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB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C,GAAG,CAAC;QAC7B,sBAAsB,CAAC,GAAG,CAAC;QAC3B,wBAAwB,CAAC,GAAG,CAAC;QAC7B,yBAAyB,CAAC,GAAG,CAAC;QAE9B,oBAAoB,CAAC,GAAG,CAAC;QACzB,4BAA4B,CAAC,GAAG,EAAE,KAAK,CAAC;QACxC,oBAAoB,CAAC,GAAG,CAAC;QACzB,qBAAqB,CAAC,GAAG,CAAC;QAE1B,yBAAyB,CAAC,GAAG,CAAC;QAC9B,0BAA0B,CAAC,GAAG,CAAC;QAC/B,0BAA0B,CAAC,GAAG,CAAC;QAC/B,0BAA0B,CAAC,GAAG,CAAC;QAC/B,yBAAyB,CAAC,GAAG,CAAC;QAC9B,8BAA8B,CAAC,GAAG,CAAC;KACpC,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,WAAW,CAAC,KAAmF;IAC7G,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;QACrB,MAAM,IAAI,GAAG,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;QACpG,OAAO;YACL,IAAI,EAAE,CAAC,CAAC,IAAI;YACZ,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,WAAW,EAAE,CAAC,CAAC,WAAW;YAC1B,WAAW,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,WAAW,CAA+C;YACxF,WAAW,EAAE,IAAI,CAAC,WAAW;SAC9B,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,38 +0,0 @@
1
- import { z } from 'zod';
2
- import type { ApiClient } from '../apiClient.js';
3
- export declare function createListSkillsTool(api: ApiClient): {
4
- name: string;
5
- description: string;
6
- inputSchema: z.ZodObject<{}, z.core.$strip>;
7
- handler(): Promise<{
8
- content: {
9
- type: "text";
10
- text: string;
11
- }[];
12
- isError?: undefined;
13
- } | {
14
- content: {
15
- type: "text";
16
- text: string;
17
- }[];
18
- isError: boolean;
19
- }>;
20
- };
21
- export declare function createListAgentsTool(api: ApiClient): {
22
- name: string;
23
- description: string;
24
- inputSchema: z.ZodObject<{}, z.core.$strip>;
25
- handler(): Promise<{
26
- content: {
27
- type: "text";
28
- text: string;
29
- }[];
30
- isError?: undefined;
31
- } | {
32
- content: {
33
- type: "text";
34
- text: string;
35
- }[];
36
- isError: boolean;
37
- }>;
38
- };
@@ -1,39 +0,0 @@
1
- import { z } from 'zod';
2
- import { ApiError } from '../apiClient.js';
3
- const empty = z.object({});
4
- export function createListSkillsTool(api) {
5
- return {
6
- name: 'list_skills',
7
- description: 'List every skill name available to this user. Use when a skill you need is not named in the server instructions.',
8
- inputSchema: empty,
9
- async handler() {
10
- try {
11
- const { skills } = await api.listSkills();
12
- return { content: [{ type: 'text', text: skills.map((s) => s.name).join('\n') }] };
13
- }
14
- catch (e) {
15
- const code = e instanceof ApiError ? e.code : 'errors.UNKNOWN';
16
- return { content: [{ type: 'text', text: code }], isError: true };
17
- }
18
- },
19
- };
20
- }
21
- export function createListAgentsTool(api) {
22
- return {
23
- name: 'list_agents',
24
- description: 'List every agent available to this user, with its description. Use when this client has no agent files of its own.',
25
- inputSchema: empty,
26
- async handler() {
27
- try {
28
- const { agents } = await api.listAgents();
29
- const text = agents.map((a) => `${a.name}: ${a.description}`).join('\n');
30
- return { content: [{ type: 'text', text }] };
31
- }
32
- catch (e) {
33
- const code = e instanceof ApiError ? e.code : 'errors.UNKNOWN';
34
- return { content: [{ type: 'text', text: code }], isError: true };
35
- }
36
- },
37
- };
38
- }
39
- //# sourceMappingURL=lists.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lists.js","sourceRoot":"","sources":["../../src/tools/lists.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,QAAQ,EAAE,MAAM,i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AAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBACzE,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC;YACxD,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,MAAM,IAAI,GAAG,CAAC,YAAY,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB,CAAC;gBAC/D,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;YAC7E,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,69 +0,0 @@
1
- import { z } from 'zod';
2
- import type { ApiClient } from '../apiClient.js';
3
- /**
4
- * Die vier Werkzeuge aus Paket 03 Aufgabe 14: suchen, Baum, verschieben,
5
- * Links. Dieselben vier wie auf der gehosteten Oberflaeche (Spec 7), hier
6
- * ueber die REST-API statt ueber die Datenbank - damit eine Rangfolge, ein
7
- * Baum und eine Umbenennung nicht davon abhaengen, welcher Server gefragt
8
- * wurde.
9
- */
10
- type Result = {
11
- content: {
12
- type: 'text';
13
- text: string;
14
- }[];
15
- isError?: boolean;
16
- };
17
- export declare const MemorySearchInput: z.ZodObject<{
18
- query: z.ZodString;
19
- types: z.ZodOptional<z.ZodString>;
20
- limit: z.ZodOptional<z.ZodNumber>;
21
- }, z.core.$strip>;
22
- export declare function createMemorySearchTool(api: ApiClient): {
23
- name: string;
24
- description: string;
25
- inputSchema: z.ZodObject<{
26
- query: z.ZodString;
27
- types: z.ZodOptional<z.ZodString>;
28
- limit: z.ZodOptional<z.ZodNumber>;
29
- }, z.core.$strip>;
30
- handler(args: z.infer<typeof MemorySearchInput>): Promise<Result>;
31
- };
32
- export declare const MemoryTreeInput: z.ZodObject<{
33
- scope: z.ZodOptional<z.ZodString>;
34
- }, z.core.$strip>;
35
- export declare function createMemoryTreeTool(api: ApiClient): {
36
- name: string;
37
- description: string;
38
- inputSchema: z.ZodObject<{
39
- scope: z.ZodOptional<z.ZodString>;
40
- }, z.core.$strip>;
41
- handler(args: z.infer<typeof MemoryTreeInput>): Promise<Result>;
42
- };
43
- export declare const MemoryMoveInput: z.ZodObject<{
44
- from: z.ZodString;
45
- to: z.ZodString;
46
- updateLinks: z.ZodOptional<z.ZodBoolean>;
47
- }, z.core.$strip>;
48
- export declare function createMemoryMoveTool(api: ApiClient): {
49
- name: string;
50
- description: string;
51
- inputSchema: z.ZodObject<{
52
- from: z.ZodString;
53
- to: z.ZodString;
54
- updateLinks: z.ZodOptional<z.ZodBoolean>;
55
- }, z.core.$strip>;
56
- handler(args: z.infer<typeof MemoryMoveInput>): Promise<Result>;
57
- };
58
- export declare const MemoryLinksInput: z.ZodObject<{
59
- path: z.ZodString;
60
- }, z.core.$strip>;
61
- export declare function createMemoryLinksTool(api: ApiClient): {
62
- name: string;
63
- description: string;
64
- inputSchema: z.ZodObject<{
65
- path: z.ZodString;
66
- }, z.core.$strip>;
67
- handler(args: z.infer<typeof MemoryLinksInput>): Promise<Result>;
68
- };
69
- export {};
@@ -1,128 +0,0 @@
1
- import { z } from 'zod';
2
- import { ApiError } from '../apiClient.js';
3
- import { isSafeMemoryPath } from '../memoryPath.js';
4
- const text = (s) => ({ content: [{ type: 'text', text: s }] });
5
- const failure = (s) => ({ content: [{ type: 'text', text: s }], isError: true });
6
- function codeOf(e) {
7
- return e instanceof ApiError ? e.code : 'errors.UNKNOWN';
8
- }
9
- export const MemorySearchInput = z.object({
10
- query: z.string().min(1).max(200),
11
- types: z.string().max(64).optional(),
12
- limit: z.number().int().min(1).max(50).optional(),
13
- });
14
- export function createMemorySearchTool(api) {
15
- return {
16
- name: 'memory_search',
17
- description: 'Full-text search across memory, skills and agents. Delivers the best hits with a short snippet each.',
18
- inputSchema: MemorySearchInput,
19
- async handler(args) {
20
- try {
21
- const { hits } = await api.searchContent(args.query, {
22
- types: args.types?.split(',').map((t) => t.trim()).filter((t) => t !== ''),
23
- limit: args.limit,
24
- });
25
- if (hits.length === 0)
26
- return text(`Nothing found for ${args.query}`);
27
- // Die Adresse zuerst: der naechste Aufruf ist memory_read(path) oder
28
- // get_skill(name), und was dafuer gebraucht wird, darf nicht im
29
- // Ausschnitt untergehen.
30
- return text(hits
31
- .map((h) => `${h.kind} ${h.path ?? h.name}${h.scope === 'team' ? ' (team)' : ''}\n ${h.snippet}`)
32
- .join('\n'));
33
- }
34
- catch (e) {
35
- return failure(codeOf(e));
36
- }
37
- },
38
- };
39
- }
40
- export const MemoryTreeInput = z.object({ scope: z.string().max(96).optional() });
41
- export function createMemoryTreeTool(api) {
42
- return {
43
- name: 'memory_tree',
44
- description: 'This account\'s folder structure: every folder, empty ones included, and the files in it.',
45
- inputSchema: MemoryTreeInput,
46
- async handler(args) {
47
- try {
48
- const { nodes } = await api.memoryTree(args.scope ?? 'all');
49
- if (nodes.length === 0)
50
- return text('(empty)');
51
- return text(nodes
52
- .map((n) => {
53
- const depth = n.path.split('/').length - 1;
54
- const label = n.kind === 'folder' ? `${n.name}/` : n.name;
55
- return `${' '.repeat(depth)}${label}${n.scope === 'team' ? ' (team)' : ''}`;
56
- })
57
- .join('\n'));
58
- }
59
- catch (e) {
60
- return failure(codeOf(e));
61
- }
62
- },
63
- };
64
- }
65
- export const MemoryMoveInput = z.object({
66
- from: z.string().min(3).max(256),
67
- to: z.string().min(3).max(256),
68
- updateLinks: z.boolean().optional(),
69
- });
70
- /** "1 file", "2 files": the move answers in files. */
71
- function files(count) {
72
- return `${count} ${count === 1 ? 'file' : 'files'}`;
73
- }
74
- export function createMemoryMoveTool(api) {
75
- return {
76
- name: 'memory_move',
77
- description: "Moves or renames a memory file. Every [[link]] that would no longer find it follows along, by name or by path, unless turned off.",
78
- inputSchema: MemoryMoveInput,
79
- async handler(args) {
80
- // Beide Pfade hier geprueft und nicht erst am Server: siehe
81
- // memoryPath.ts - encodeURIComponent laesst ".." als zwei Punkte durch.
82
- if (!isSafeMemoryPath(args.from) || !isSafeMemoryPath(args.to))
83
- return failure('errors.INVALID_PATH');
84
- const updateLinks = args.updateLinks ?? true;
85
- try {
86
- const r = await api.moveMemory(args.from, args.to, updateLinks);
87
- return text(`${r.from} moved to ${r.to}` +
88
- // The counts are files, not links: a file with three links to the moved one is one.
89
- (updateLinks ? `, links updated in ${files(r.rewritten)}, ${files(r.skipped)} left unchanged` : ''));
90
- }
91
- catch (e) {
92
- return failure(codeOf(e));
93
- }
94
- },
95
- };
96
- }
97
- export const MemoryLinksInput = z.object({ path: z.string().min(3).max(256) });
98
- export function createMemoryLinksTool(api) {
99
- return {
100
- name: 'memory_links',
101
- description: "A memory file's [[links]], split between the ones that point somewhere and the ones that point nowhere.",
102
- inputSchema: MemoryLinksInput,
103
- async handler(args) {
104
- if (!isSafeMemoryPath(args.path))
105
- return failure('errors.INVALID_PATH');
106
- try {
107
- const file = await api.readMemory(args.path);
108
- const { resolved, unresolved } = file.links;
109
- if (resolved.length === 0 && unresolved.length === 0) {
110
- return text(`${args.path} does not link to anything.`);
111
- }
112
- // Eine offene Verknuepfung ist kein Fehler und wird nicht versteckt:
113
- // sie ist eine Notiz, die jemand schreiben wollte und noch nicht
114
- // geschrieben hat. Genau dafuer gibt es die Trennung (Spec 4.3).
115
- return text([
116
- resolved.length > 0 ? `Resolved: ${resolved.join(', ')}` : '',
117
- unresolved.length > 0 ? `Open (no file with this name yet): ${unresolved.join(', ')}` : '',
118
- ]
119
- .filter((line) => line !== '')
120
- .join('\n'));
121
- }
122
- catch (e) {
123
- return failure(codeOf(e));
124
- }
125
- },
126
- };
127
- }
128
- //# sourceMappingURL=memoryGraph.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memoryGraph.js","sourceRoot":"","sources":["../../src/tools/memoryGraph.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,O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YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;YAC5B,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,25 +0,0 @@
1
- import { z } from 'zod';
2
- import type { ApiClient } from '../apiClient.js';
3
- export declare const MemoryReadInput: z.ZodObject<{
4
- path: z.ZodString;
5
- }, z.core.$strip>;
6
- export declare function createMemoryReadTool(api: ApiClient): {
7
- name: string;
8
- description: string;
9
- inputSchema: z.ZodObject<{
10
- path: z.ZodString;
11
- }, z.core.$strip>;
12
- handler(args: z.infer<typeof MemoryReadInput>): Promise<{
13
- content: {
14
- type: "text";
15
- text: string;
16
- }[];
17
- isError: boolean;
18
- } | {
19
- content: {
20
- type: "text";
21
- text: string;
22
- }[];
23
- isError?: undefined;
24
- }>;
25
- };