@carbonaitech/ottofiles-mcp 1.1.0-rc.1 → 1.2.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 (88) hide show
  1. package/README.md +60 -12
  2. package/dist/config.js +9 -2
  3. package/dist/config.js.map +1 -1
  4. package/dist/content.js +22 -0
  5. package/dist/content.js.map +1 -0
  6. package/dist/gateway.js +99 -17
  7. package/dist/gateway.js.map +1 -1
  8. package/dist/http.js +549 -0
  9. package/dist/http.js.map +1 -0
  10. package/dist/index.js +75 -227
  11. package/dist/index.js.map +1 -1
  12. package/dist/introspect.js +285 -0
  13. package/dist/introspect.js.map +1 -0
  14. package/dist/readTools.js +130 -0
  15. package/dist/readTools.js.map +1 -0
  16. package/dist/tools/addWorkspaceDocuments.js +4 -4
  17. package/dist/tools/addWorkspaceDocuments.js.map +1 -1
  18. package/dist/tools/addWorkspaceMember.js +3 -3
  19. package/dist/tools/addWorkspaceMember.js.map +1 -1
  20. package/dist/tools/cloneDocument.js +247 -0
  21. package/dist/tools/cloneDocument.js.map +1 -0
  22. package/dist/tools/createDocument.js +14 -5
  23. package/dist/tools/createDocument.js.map +1 -1
  24. package/dist/tools/createWorkspace.js +27 -9
  25. package/dist/tools/createWorkspace.js.map +1 -1
  26. package/dist/tools/deleteWorkspace.js +3 -5
  27. package/dist/tools/deleteWorkspace.js.map +1 -1
  28. package/dist/tools/documentAccessRoster.js +25 -10
  29. package/dist/tools/documentAccessRoster.js.map +1 -1
  30. package/dist/tools/editMetadata.js +2 -2
  31. package/dist/tools/editMetadata.js.map +1 -1
  32. package/dist/tools/exportDocuments.js +264 -0
  33. package/dist/tools/exportDocuments.js.map +1 -0
  34. package/dist/tools/fileTypes.js +21 -0
  35. package/dist/tools/fileTypes.js.map +1 -0
  36. package/dist/tools/getDocument.js +3 -3
  37. package/dist/tools/getDocument.js.map +1 -1
  38. package/dist/tools/getDocumentHistory.js +5 -5
  39. package/dist/tools/getDocumentHistory.js.map +1 -1
  40. package/dist/tools/getDocumentVersions.js +3 -3
  41. package/dist/tools/getDocumentVersions.js.map +1 -1
  42. package/dist/tools/getPolicyStats.js +4 -4
  43. package/dist/tools/getPolicyStats.js.map +1 -1
  44. package/dist/tools/groupDocuments.js +35 -14
  45. package/dist/tools/groupDocuments.js.map +1 -1
  46. package/dist/tools/guarded.js +22 -2
  47. package/dist/tools/guarded.js.map +1 -1
  48. package/dist/tools/listCompanies.js +2 -2
  49. package/dist/tools/listCompanies.js.map +1 -1
  50. package/dist/tools/listPolicies.js +3 -3
  51. package/dist/tools/listPolicies.js.map +1 -1
  52. package/dist/tools/listWorkspaces.js +18 -4
  53. package/dist/tools/listWorkspaces.js.map +1 -1
  54. package/dist/tools/lockDocument.js +1 -1
  55. package/dist/tools/lockDocument.js.map +1 -1
  56. package/dist/tools/manageAccess.js +60 -101
  57. package/dist/tools/manageAccess.js.map +1 -1
  58. package/dist/tools/myAccess.js +5 -5
  59. package/dist/tools/myAccess.js.map +1 -1
  60. package/dist/tools/policyAccessRoster.js +23 -9
  61. package/dist/tools/policyAccessRoster.js.map +1 -1
  62. package/dist/tools/reactivateWorkspace.js +2 -2
  63. package/dist/tools/reactivateWorkspace.js.map +1 -1
  64. package/dist/tools/removeWorkspaceDocument.js +3 -7
  65. package/dist/tools/removeWorkspaceDocument.js.map +1 -1
  66. package/dist/tools/removeWorkspaceMember.js +4 -4
  67. package/dist/tools/removeWorkspaceMember.js.map +1 -1
  68. package/dist/tools/searchContent.js +14 -8
  69. package/dist/tools/searchContent.js.map +1 -1
  70. package/dist/tools/searchDocuments.js +20 -14
  71. package/dist/tools/searchDocuments.js.map +1 -1
  72. package/dist/tools/setStatus.js +3 -3
  73. package/dist/tools/setStatus.js.map +1 -1
  74. package/dist/tools/shareDocument.js +20 -16
  75. package/dist/tools/shareDocument.js.map +1 -1
  76. package/dist/tools/switchCompany.js +1 -2
  77. package/dist/tools/switchCompany.js.map +1 -1
  78. package/dist/tools/unlockDocument.js +2 -2
  79. package/dist/tools/unlockDocument.js.map +1 -1
  80. package/dist/tools/unshareDocument.js +7 -7
  81. package/dist/tools/unshareDocument.js.map +1 -1
  82. package/dist/tools/uploadVersion.js +12 -1
  83. package/dist/tools/uploadVersion.js.map +1 -1
  84. package/package.json +7 -5
  85. package/dist/tools/deleteDocument.js +0 -98
  86. package/dist/tools/deleteDocument.js.map +0 -1
  87. package/dist/tools/restoreDocument.js +0 -101
  88. package/dist/tools/restoreDocument.js.map +0 -1
package/dist/index.js CHANGED
@@ -8,26 +8,17 @@ import { loadConfig } from "./config.js";
8
8
  import { setElicitor } from "./elicit.js";
9
9
  import { TokenProvider } from "./auth.js";
10
10
  import { OAuthTokenProvider } from "./oauth.js";
11
- import { GatewayClient, GatewayError } from "./gateway.js";
12
- import { searchDocumentsInput, runSearchDocuments, } from "./tools/searchDocuments.js";
13
- import { groupDocumentsInput, runGroupDocuments, } from "./tools/groupDocuments.js";
14
- import { listPoliciesInput, runListPolicies } from "./tools/listPolicies.js";
15
- import { getDocumentInput, runGetDocument } from "./tools/getDocument.js";
16
- import { documentAccessRosterInput, runDocumentAccessRoster, } from "./tools/documentAccessRoster.js";
17
- import { getDocumentVersionsInput, runGetDocumentVersions, } from "./tools/getDocumentVersions.js";
18
- import { listWorkspacesInput, runListWorkspaces, } from "./tools/listWorkspaces.js";
19
- import { policyAccessRosterInput, runPolicyAccessRoster, } from "./tools/policyAccessRoster.js";
20
- import { getPolicyStatsInput, runGetPolicyStats } from "./tools/getPolicyStats.js";
21
- import { searchContentInput, runSearchContent } from "./tools/searchContent.js";
22
- import { getDocumentHistoryInput, runGetDocumentHistory, } from "./tools/getDocumentHistory.js";
23
- import { myAccessInput, runMyAccess } from "./tools/myAccess.js";
24
- import { listCompaniesInput, runListCompanies, } from "./tools/listCompanies.js";
11
+ import { GatewayClient } from "./gateway.js";
12
+ import { jsonContent, errorContent } from "./content.js";
13
+ import { registerReadTools } from "./readTools.js";
25
14
  import { switchCompanyInput, runSwitchCompany, } from "./tools/switchCompany.js";
26
15
  import { setStatusInput, runSetStatus } from "./tools/setStatus.js";
27
16
  import { editMetadataInput, runEditMetadata } from "./tools/editMetadata.js";
28
17
  import { manageAccessInput, runManageAccess } from "./tools/manageAccess.js";
29
18
  import { uploadVersionInput, runUploadVersion } from "./tools/uploadVersion.js";
30
19
  import { createDocumentInput, runCreateDocument } from "./tools/createDocument.js";
20
+ import { cloneDocumentInput, runCloneDocument } from "./tools/cloneDocument.js";
21
+ import { exportDocumentsInput, runExportDocuments } from "./tools/exportDocuments.js";
31
22
  import { lockDocumentInput, runLockDocument } from "./tools/lockDocument.js";
32
23
  import { unlockDocumentInput, runUnlockDocument } from "./tools/unlockDocument.js";
33
24
  import { shareDocumentInput, runShareDocument } from "./tools/shareDocument.js";
@@ -39,6 +30,7 @@ import { addWorkspaceMemberInput, runAddWorkspaceMember } from "./tools/addWorks
39
30
  import { removeWorkspaceMemberInput, runRemoveWorkspaceMember } from "./tools/removeWorkspaceMember.js";
40
31
  import { addWorkspaceDocumentsInput, runAddWorkspaceDocuments } from "./tools/addWorkspaceDocuments.js";
41
32
  import { removeWorkspaceDocumentInput, runRemoveWorkspaceDocument } from "./tools/removeWorkspaceDocument.js";
33
+ import { ALLOWED_FILE_ENDINGS_TEXT } from "./tools/fileTypes.js";
42
34
  // The publish workflow stamps package.json's version from the git tag; read it
43
35
  // so the server reports the same version rather than a hardcoded one.
44
36
  function readVersion() {
@@ -50,208 +42,15 @@ function readVersion() {
50
42
  return "0.0.0";
51
43
  }
52
44
  }
53
- function jsonContent(data) {
54
- return {
55
- content: [
56
- { type: "text", text: JSON.stringify(data, null, 2) },
57
- ],
58
- };
59
- }
60
- function errorContent(err) {
61
- let text;
62
- if (err instanceof GatewayError) {
63
- text =
64
- `OttoFiles request failed (HTTP ${err.status}).\n${err.message}` +
65
- (err.body ? `\nResponse: ${err.body.slice(0, 800)}` : "");
66
- }
67
- else if (err instanceof Error) {
68
- text = err.message;
69
- }
70
- else {
71
- text = String(err);
72
- }
73
- return { isError: true, content: [{ type: "text", text }] };
74
- }
75
- async function main() {
76
- const config = loadConfig();
77
- const tokens = config.mode === "interactive"
78
- ? new OAuthTokenProvider(config)
79
- : new TokenProvider(config);
80
- console.error(`ottofiles-mcp: auth mode = ${config.mode}`);
81
- const gateway = new GatewayClient(config, tokens);
45
+ // Builds the full stdio tool surface (read tools plus the stdio-only write tools
46
+ // and switch_company). The hosted HTTP transport registers only the read tools.
47
+ export function buildServer(gateway, config, tokens) {
82
48
  const server = new McpServer({
83
49
  name: "ottofiles-mcp",
84
50
  version: readVersion(),
85
51
  });
86
- server.registerTool("search_documents", {
87
- title: "Search OttoFiles documents",
88
- description: "Search documents across the caller's accessible OttoFiles policies with rich filters, sorting and pagination. Results are scoped by the acting user's tier and ACLs. Use this to find documents by text, number, type, status, policy, or date.",
89
- inputSchema: searchDocumentsInput,
90
- annotations: { readOnlyHint: true },
91
- }, async (args) => {
92
- try {
93
- return jsonContent(await runSearchDocuments(gateway, args));
94
- }
95
- catch (err) {
96
- return errorContent(err);
97
- }
98
- });
99
- server.registerTool("group_documents", {
100
- title: "Group / summarize OttoFiles documents",
101
- description: "Bucket the caller's accessible documents by a field (policyId, statusCodeId, tierId, documentType, or anchor:<Name>) and return per-bucket counts and last-modified dates. Use this for summaries like 'how many documents per status' over the whole corpus, not a page.",
102
- inputSchema: groupDocumentsInput,
103
- annotations: { readOnlyHint: true },
104
- }, async (args) => {
105
- try {
106
- return jsonContent(await runGroupDocuments(gateway, args));
107
- }
108
- catch (err) {
109
- return errorContent(err);
110
- }
111
- });
112
- server.registerTool("list_policies", {
113
- title: "List OttoFiles policies",
114
- description: "List the caller's accessible OttoFiles policies (formerly 'bins') with code, name, description and document count. Filter by search/state, paged. Use this to discover policy ids for scoping document searches.",
115
- inputSchema: listPoliciesInput,
116
- annotations: { readOnlyHint: true },
117
- }, async (args) => {
118
- try {
119
- return jsonContent(await runListPolicies(gateway, args));
120
- }
121
- catch (err) {
122
- return errorContent(err);
123
- }
124
- });
125
- server.registerTool("get_document", {
126
- title: "Get an OttoFiles document",
127
- description: "Fetch full detail for one document by its GUID: title, number, policy, status, version info, file metadata, lock state, and anchor (metadata) values. Subject to the caller's access.",
128
- inputSchema: getDocumentInput,
129
- annotations: { readOnlyHint: true },
130
- }, async (args) => {
131
- try {
132
- return jsonContent(await runGetDocument(gateway, args));
133
- }
134
- catch (err) {
135
- return errorContent(err);
136
- }
137
- });
138
- server.registerTool("document_access_roster", {
139
- title: "Document access roster",
140
- description: "List which users can access a given document and who is denied, with effective tier rank and access/denied counts. Use this to answer 'who can see this document'.",
141
- inputSchema: documentAccessRosterInput,
142
- annotations: { readOnlyHint: true },
143
- }, async (args) => {
144
- try {
145
- return jsonContent(await runDocumentAccessRoster(gateway, args));
146
- }
147
- catch (err) {
148
- return errorContent(err);
149
- }
150
- });
151
- server.registerTool("get_document_versions", {
152
- title: "List a document's versions",
153
- description: "List every version of a document (increment number, version label, file, upload status, who uploaded and when). Use this for version history.",
154
- inputSchema: getDocumentVersionsInput,
155
- annotations: { readOnlyHint: true },
156
- }, async (args) => {
157
- try {
158
- return jsonContent(await runGetDocumentVersions(gateway, args));
159
- }
160
- catch (err) {
161
- return errorContent(err);
162
- }
163
- });
164
- server.registerTool("get_policy_stats", {
165
- title: "Get policy statistics",
166
- description: "Aggregate stats for one policy: document count, storage used, counts by type and status, top contributors, and recent activity. Requires admin, an open published policy, or a Policy.Read grant.",
167
- inputSchema: getPolicyStatsInput,
168
- annotations: { readOnlyHint: true },
169
- }, async (args) => {
170
- try {
171
- return jsonContent(await runGetPolicyStats(gateway, args));
172
- }
173
- catch (err) {
174
- return errorContent(err);
175
- }
176
- });
177
- server.registerTool("list_workspaces", {
178
- title: "List OttoFiles workspaces",
179
- description: "List the caller's accessible workspaces (external document-share spaces) with title, document count, member count, and expiry/revocation state.",
180
- inputSchema: listWorkspacesInput,
181
- annotations: { readOnlyHint: true },
182
- }, async (args) => {
183
- try {
184
- return jsonContent(await runListWorkspaces(gateway, args));
185
- }
186
- catch (err) {
187
- return errorContent(err);
188
- }
189
- });
190
- server.registerTool("policy_access_roster", {
191
- title: "Policy access roster",
192
- description: "List which users can access a given policy and who is denied, with effective tier rank and access/denied counts. Use this to answer 'who can see this policy'.",
193
- inputSchema: policyAccessRosterInput,
194
- annotations: { readOnlyHint: true },
195
- }, async (args) => {
196
- try {
197
- return jsonContent(await runPolicyAccessRoster(gateway, args));
198
- }
199
- catch (err) {
200
- return errorContent(err);
201
- }
202
- });
203
- server.registerTool("search_content", {
204
- title: "Search inside OttoFiles document content",
205
- description: "Search the extracted text of document files (not just title/number/tags). Results include documents matched on metadata or on extracted body text, so totalCount is not a count of content hits; matchedInContent (true) and contentSnippet indicate a body-text hit. Scoped by the caller's tier and ACLs; only documents whose content has been extracted and indexed can match.",
206
- inputSchema: searchContentInput,
207
- annotations: { readOnlyHint: true },
208
- }, async (args) => {
209
- try {
210
- return jsonContent(await runSearchContent(gateway, args));
211
- }
212
- catch (err) {
213
- return errorContent(err);
214
- }
215
- });
216
- server.registerTool("get_document_history", {
217
- title: "Get a document's history",
218
- description: "Audit trail for one document, including version lifecycle events (delete/restore): who did what and when, with before/after values for changed fields. Requires access to the document.",
219
- inputSchema: getDocumentHistoryInput,
220
- annotations: { readOnlyHint: true },
221
- }, async (args) => {
222
- try {
223
- return jsonContent(await runGetDocumentHistory(gateway, args));
224
- }
225
- catch (err) {
226
- return errorContent(err);
227
- }
228
- });
229
- server.registerTool("my_access", {
230
- title: "My OttoFiles access",
231
- description: "The signed-in user's own access footprint: profile and roles, security tier, per-policy tier overrides, and the policies they can see.",
232
- inputSchema: myAccessInput,
233
- annotations: { readOnlyHint: true },
234
- }, async (args) => {
235
- try {
236
- return jsonContent(await runMyAccess(gateway, args));
237
- }
238
- catch (err) {
239
- return errorContent(err);
240
- }
241
- });
242
- server.registerTool("list_companies", {
243
- title: "List my OttoFiles companies",
244
- description: "List the companies (id and name) the signed-in user belongs to. Use the id with switch_company.",
245
- inputSchema: listCompaniesInput,
246
- annotations: { readOnlyHint: true },
247
- }, async (args) => {
248
- try {
249
- return jsonContent(await runListCompanies(gateway, args));
250
- }
251
- catch (err) {
252
- return errorContent(err);
253
- }
254
- });
52
+ // Read-only tools, shared with the hosted HTTP transport (src/http.ts).
53
+ registerReadTools(server, gateway);
255
54
  server.registerTool("switch_company", {
256
55
  title: "Switch active OttoFiles company",
257
56
  description: "STATE-CHANGING. Switch the signed-in user's active company and refresh the OAuth token so all subsequent tools run against that company. This changes the active company for the whole MCP session, and the token cache is shared, so other MCP instances using the same cache are affected too. Interactive OAuth mode only (not supported in headless client_credentials mode). Returns the new active company.",
@@ -292,7 +91,7 @@ async function main() {
292
91
  });
293
92
  server.registerTool("manage_access", {
294
93
  title: "Manage a user's access to a document",
295
- description: "STATE-CHANGING, HIGH IMPACT: changes WHO CAN SEE a single DOCUMENT. Document-scoped only; it does not touch policy-level access or security tiers. Actions: grant (add an explicit per-document grant, level Read or Admin; Admin lets the user edit/manage the document), revoke (remove the user's explicit grants; the user KEEPS access if their security tier already allows it, so revoke may not hide the document: use deny for that), deny (explicit deny; wins over tier and grants, blocks the user entirely, and DESTROYS any existing explicit grant in place), undeny (remove an explicit deny; a prior grant that the deny replaced is NOT restored). Identify the user by exactly one of userEmail (login/username) or userId. Two-step: call with confirm omitted/false for a preview roster delta (current vs proposed access for the target, willChange, who currently has access counts; nothing is written), then call again with confirm:true. Optional expectedFromState (from the preview) aborts if the user's access moved. Revoking or denying YOUR OWN access additionally requires confirmSelfChange:true. Idempotent: if the user is already in the desired state nothing is written. Requires the Administrator role. Grant/revoke are applied by a background job (~15-40s); the tool polls the job and reports pending if it has not landed, in which case do not deny/undeny or re-grant that user until it does. The preview reports the user's current grant levels; granting Admin to a user who holds only Read upgrades them. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
94
+ description: "STATE-CHANGING, HIGH IMPACT: removes or blocks a user's access to a single DOCUMENT. Document-scoped only; it does not touch policy-level access or security tiers. It cannot grant: grants come only from document shares and workspaces, so use share_document to give a user access. Actions: revoke (remove the user's explicit Read/Admin grants; the user KEEPS access if their security tier already allows it, so revoke may not hide the document: use deny for that; a share record the grant came from stays in place, so prefer unshare_document for shared users), deny (explicit deny; wins over tier and grants, blocks the user entirely, and DESTROYS any existing explicit grant in place), undeny (remove an explicit deny; a prior grant that the deny replaced is NOT restored). Identify the user by exactly one of userEmail (login/username) or userId. Two-step: call with confirm omitted/false for a preview (current vs proposed access for the target, their current grant levels, willChange, page-1 roster counts; nothing is written), then call again with confirm:true. Optional expectedFromState (from the preview) aborts if the user's access moved. Revoking or denying YOUR OWN access additionally requires confirmSelfChange:true. Idempotent: if the user is already in the desired state nothing is written. Requires the Administrator role. Revoke is applied by a background job (~15-40s); the tool polls and reports pending if it has not landed, in which case do not deny/undeny that user until it does. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
296
95
  inputSchema: manageAccessInput,
297
96
  annotations: { destructiveHint: true, idempotentHint: true },
298
97
  }, async (args) => {
@@ -305,7 +104,7 @@ async function main() {
305
104
  });
306
105
  server.registerTool("upload_version", {
307
106
  title: "Upload a new version of a document",
308
- description: "STATE-CHANGING. Add a NEW version to an existing document from a file on the local machine (filePath). The version number (incrementNumber) is assigned by the server; an optional versionLabel sets the user-facing version label (e.g. \"A\", \"1.0\"). The new version becomes the document's current version, and the document number may be re-rendered if the policy numbering pattern contains {VER} or {CODE}. NOT idempotent: repeating the call creates ANOTHER version. Two-step: call with confirm omitted/false for a preview (target document, current version, file details; nothing is created), then call again with confirm:true. Pass expectedVersionCount from the preview to abort if the document changed meanwhile. Requires edit permission on the document and that it is not locked by another user. filePath must be under a directory configured in OTTOFILES_UPLOAD_ROOTS (default: none, so uploads are refused). Duplicate-upload guard is in-process only and lost on restart. Interactive OAuth mode only. If a confirmed upload fails partway, the error states whether a pending version may exist; do not blindly retry, check get_document_versions first. Returns the new version and the document number before/after. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
107
+ description: `STATE-CHANGING. Add a NEW version to an existing document from a file on the local machine (filePath). The version number (incrementNumber) is assigned by the server; an optional versionLabel sets the user-facing version label (e.g. \"A\", \"1.0\"). The new version becomes the document's current version, and the document number may be re-rendered if the policy numbering pattern contains {VER} or {CODE}. NOT idempotent: repeating the call creates ANOTHER version. Two-step: call with confirm omitted/false for a preview (target document, current version, file details; nothing is created), then call again with confirm:true. Pass expectedVersionCount from the preview to abort if the document changed meanwhile. Requires edit permission on the document and that it is not locked by another user. filePath must be under a directory configured in OTTOFILES_UPLOAD_ROOTS (default: none, so uploads are refused). Only these file endings can be uploaded (case-insensitive; a file without an ending is refused): ${ALLOWED_FILE_ENDINGS_TEXT}. Duplicate-upload guard is in-process only and lost on restart. Interactive OAuth mode only. If a confirmed upload fails partway, the error states whether a pending version may exist; do not blindly retry, check get_document_versions first. Returns the new version and the document number before/after. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.`,
309
108
  inputSchema: uploadVersionInput,
310
109
  annotations: {
311
110
  readOnlyHint: false,
@@ -323,7 +122,7 @@ async function main() {
323
122
  });
324
123
  server.registerTool("create_document", {
325
124
  title: "Create a new document in a policy",
326
- description: "STATE-CHANGING, additive. Creates a BRAND-NEW document in an EXPLICIT policy (policyId is required; no inference — call list_policies if you don't know it) and uploads a file as its first version. The target policy must be Published (drafts hold no documents and are refused) and you must be able to create in it. You MUST supply a value for every number-forming anchor (an anchor whose name is part of the policy's document-number pattern); other anchors are optional. tierRank defaults to the policy's default document tier (and is REQUIRED when the policy has no default document tier); statusCodeId defaults to the policy's default status code. filePath is an ABSOLUTE path under a directory configured in OTTOFILES_UPLOAD_ROOTS (default none, so uploads are refused). Two-step: call with confirm omitted/false for a preview (target policy, the RENDERED document number, anchor values, tier, status, file; nothing is created), then call again with confirm:true. NOT idempotent across different content; the SAME confirmation (the same previewToken) is de-duplicated, but after a failure whose outcome is unknown a fresh preview may create a duplicate, so check search_documents first; pass allowDuplicate:true to force a second independent document. If the create succeeds but the file upload fails, the response says so — use upload_version to attach the file, do NOT create the document again. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
125
+ description: `STATE-CHANGING, additive. Creates a BRAND-NEW document in an EXPLICIT policy (policyId is required; no inference — call list_policies if you don't know it) and uploads a file as its first version. The target policy must be Published (drafts hold no documents and are refused) and you must be able to create in it. You MUST supply a value for every number-forming anchor (an anchor whose name is part of the policy's document-number pattern); other anchors are optional. tierRank defaults to the policy's default document tier (and is REQUIRED when the policy has no default document tier); statusCodeId defaults to the policy's default status code. filePath is an ABSOLUTE path under a directory configured in OTTOFILES_UPLOAD_ROOTS (default none, so uploads are refused). Only these file endings can be uploaded (case-insensitive; a file without an ending is refused), checked before anything is created: ${ALLOWED_FILE_ENDINGS_TEXT}. Two-step: call with confirm omitted/false for a preview (target policy, the RENDERED document number, anchor values, tier, status, file; nothing is created), then call again with confirm:true. NOT idempotent across different content; the SAME confirmation (the same previewToken) is de-duplicated, but after a failure whose outcome is unknown a fresh preview may create a duplicate, so check search_documents first; pass allowDuplicate:true to force a second independent document. If the create succeeds but the file upload fails, the response says so — use upload_version to attach the file, do NOT create the document again. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.`,
327
126
  inputSchema: createDocumentInput,
328
127
  annotations: {
329
128
  readOnlyHint: false,
@@ -339,6 +138,42 @@ async function main() {
339
138
  return errorContent(err);
340
139
  }
341
140
  });
141
+ server.registerTool("clone_document", {
142
+ title: "Clone an existing document into a new one",
143
+ description: `STATE-CHANGING, additive. Creates a BRAND-NEW document by COPYING an existing document's metadata (policy, title, description, clientNumber, status, security tier and anchor values) and attaching a NEW file (filePath) as its first version. It does NOT copy the source's file and does NOT link the new document to the source — like the app's Clone. The title defaults to the source title + " (Copy)"; override any field with title/policyId/tierRank/statusCodeId/description/clientNumber. anchorOverrides replaces or adds specific anchors (by anchorId or name); anchors you don't list carry over from the source, and an override with no value clears that anchor. Source anchors that the target policy's schema does not have (common on migrated tenants) are dropped from the carry-over and reported as droppedAnchors; an explicit anchorOverride that names a non-policy anchor still errors. The resulting document is created in the target policy (the source's policy unless policyId overrides it), which must be Published and one you can create in; every number-forming anchor must end up with a value. filePath is an ABSOLUTE path under a directory configured in OTTOFILES_UPLOAD_ROOTS (default none, so uploads are refused); only the allowed file endings can be uploaded, checked before anything is created: ${ALLOWED_FILE_ENDINGS_TEXT}. Two-step: call with confirm omitted/false for a preview (the source, the target policy, the RENDERED document number, resolved title/status/tier/anchors and the new file; nothing is created), then call again with confirm:true. NOT idempotent across different content; the SAME confirmation is de-duplicated, but after a failure whose outcome is unknown check search_documents first; pass allowDuplicate:true to force a second independent document. If the create succeeds but the file upload fails, the response says so — use upload_version to attach the file, do NOT clone again. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.`,
144
+ inputSchema: cloneDocumentInput,
145
+ annotations: {
146
+ readOnlyHint: false,
147
+ destructiveHint: false,
148
+ idempotentHint: false,
149
+ openWorldHint: false,
150
+ },
151
+ }, async (args) => {
152
+ try {
153
+ return jsonContent(await runCloneDocument(gateway, config, args));
154
+ }
155
+ catch (err) {
156
+ return errorContent(err);
157
+ }
158
+ });
159
+ server.registerTool("export_documents", {
160
+ title: "Export documents to an Excel (.xlsx) file",
161
+ description: "Exports documents to the app's Excel (.xlsx) workbook (standard columns plus anchor columns and resolved created-by / modified-by names) and SAVES it to a local folder on YOUR machine. Members only: export is restricted to company members (InternalUser); a portal/external user is refused. Scope the export with policyId and/or documentIds (provide at least one — an unscoped whole-company dump is refused); to export a search result, run search_documents, collect the ids and pass them as documentIds (up to 5000, deduped). Optional startDate/endDate filter on the document CREATED date; status is \"Active\" (default) or \"Deleted\". outputDir must be an ABSOLUTE path to an EXISTING folder under a directory configured in OTTOFILES_DOWNLOAD_ROOTS (default none, so exports are refused); the file is NOT created outside those roots and the folder is not auto-created. fileName is optional (defaults to the server's name) and is sanitized to a bare .xlsx file name. Small exports return immediately; large ones (>= 1000 rows) run as an async job that this tool polls until ready, then downloads. This is NOT a preview/confirm tool and writes a file directly, plus a backend export-history row. Returns the saved path, file name, row count (for async exports), size and status. Works in interactive or headless mode as the signed-in member.",
162
+ inputSchema: exportDocumentsInput,
163
+ annotations: {
164
+ readOnlyHint: false,
165
+ destructiveHint: false,
166
+ idempotentHint: false,
167
+ openWorldHint: false,
168
+ },
169
+ }, async (args) => {
170
+ try {
171
+ return jsonContent(await runExportDocuments(gateway, config, args));
172
+ }
173
+ catch (err) {
174
+ return errorContent(err);
175
+ }
176
+ });
342
177
  server.registerTool("lock_document", {
343
178
  title: "Lock (check out) a document",
344
179
  description: "STATE-CHANGING. Lock a document so other users cannot edit it (check-out). Two-step: call with confirm omitted/false for a preview (current lock state, no change), then confirm:true. Idempotent: locking a document you already hold is a no-op. Fails if another user holds the lock. Locks never expire; release with unlock_document. Requires Document.Admin on the document. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
@@ -367,7 +202,7 @@ async function main() {
367
202
  });
368
203
  server.registerTool("share_document", {
369
204
  title: "Share a document with a colleague",
370
- description: "STATE-CHANGING. Share a document with a user in your company: creates a first-class share (appears in the recipient's \"shared with me\", optional message and expiry) AND grants them Read or Admin on the document. Distinct from manage_access, which only edits the raw ACL with no share record or message. Identify the recipient by exactly one of recipientEmail (login) or recipientUserId. Two-step: call with confirm omitted/false for a preview (recipient, current share state, willChange; nothing is written), then confirm:true. Idempotent: already shared at the requested level is a no-op. An existing share cannot change level in place: unshare_document first. Admin lets the recipient edit and manage the document. Requires Document.Admin. Internal in-company shares only (not workspace/portal/external). Reverse with unshare_document. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
205
+ description: "STATE-CHANGING. Share a document with a user in your company: creates a first-class share (appears in the recipient's \"shared with me\", optional message and expiry) AND grants them Read or Admin on the document. This is the way to give an in-company user explicit access to a document; manage_access can only revoke, deny or undeny. Identify the recipient by exactly one of recipientEmail (login) or recipientUserId. Two-step: call with confirm omitted/false for a preview (recipient, current share state, willChange; nothing is written), then confirm:true. Idempotent: already shared at the requested level is a no-op. A Read share asked for Admin is upgraded in place; lowering Admin to Read needs unshare_document first. Admin lets the recipient edit and manage the document. Requires Document.Admin. Internal in-company shares only (not workspace/portal/external). Reverse with unshare_document. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
371
206
  inputSchema: shareDocumentInput,
372
207
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
373
208
  }, async (args) => {
@@ -380,7 +215,7 @@ async function main() {
380
215
  });
381
216
  server.registerTool("unshare_document", {
382
217
  title: "Remove a document share",
383
- description: "STATE-CHANGING. Revoke an internal document share created by share_document: removes the share and ALL explicit Read/Admin grants the recipient holds on the document, including any made via manage_access (they keep access only if their security tier allows it; use manage_access deny to block). An explicit shareId is always attempted even if not in the active list, which clears an expired share. Identify the share by exactly one of shareId, recipientUserId or recipientEmail. Two-step: call with confirm omitted/false for a preview (who loses access and at what level; nothing is written), then confirm:true. Idempotent: no matching share (or already gone) is a no-op. Requires Document.Admin. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
218
+ description: "STATE-CHANGING. Revoke an internal document share created by share_document: removes the share and the recipient's explicit grant at the share's level (they keep access only if their security tier or another grant allows it; use manage_access deny to block). An explicit shareId is always attempted even if not in the active list, which clears an expired share. Identify the share by exactly one of shareId, recipientUserId or recipientEmail. Two-step: call with confirm omitted/false for a preview (who loses access and at what level; nothing is written), then confirm:true. Idempotent: no matching share (or already gone) is a no-op. Requires Document.Admin. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
384
219
  inputSchema: unshareDocumentInput,
385
220
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
386
221
  }, async (args) => {
@@ -406,7 +241,7 @@ async function main() {
406
241
  });
407
242
  server.registerTool("delete_workspace", {
408
243
  title: "Revoke a workspace",
409
- description: "STATE-CHANGING. Revokes (soft-deletes) a workspace, immediately dropping external portal access for all its members; documents are untouched; reversible via reactivate_workspace. NOTE: there is no owner check, so any company user can revoke any workspace in the company: verify it is the intended one. Two-step: call with confirm omitted/false for a preview (member/external counts, nothing changes), then confirm:true. Idempotent: an already-revoked workspace is a no-op. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
244
+ description: "STATE-CHANGING. Revokes (soft-deletes) a workspace, immediately dropping external portal access for all its members; documents are untouched; reversible via reactivate_workspace. Requires the workspace owner or an admin. Two-step: call with confirm omitted/false for a preview (member/external counts, nothing changes), then confirm:true. Idempotent: an already-revoked workspace is a no-op. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
410
245
  inputSchema: deleteWorkspaceInput,
411
246
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
412
247
  }, async (args) => {
@@ -419,7 +254,7 @@ async function main() {
419
254
  });
420
255
  server.registerTool("reactivate_workspace", {
421
256
  title: "Reactivate a revoked workspace",
422
- description: "STATE-CHANGING. Reactivates a revoked workspace, which RESTORES portal access (including for EXTERNAL members) and may re-notify them. Two-step: call with confirm omitted/false for a preview listing the external members (nothing changes), then confirm:true. Refused if the workspace expiry has passed. If any member is external, confirm needs the client's human confirmation or, when the client cannot prompt, confirmedExternalEmails containing EXACTLY the externalMembers from the preview. Idempotent: an already-active workspace is a no-op. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
257
+ description: "STATE-CHANGING. Reactivates a revoked workspace, which RESTORES portal access (including for EXTERNAL members) and may re-notify them. Two-step: call with confirm omitted/false for a preview listing the external members (nothing changes), then confirm:true. Refused if the workspace expiry has passed. If any member is external, confirm needs the client's human confirmation or, when the client cannot prompt, confirmedExternalEmails containing EXACTLY the externalMembers from the preview. Idempotent: an already-active workspace is a no-op. Requires the workspace owner or an admin. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
423
258
  inputSchema: reactivateWorkspaceInput,
424
259
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
425
260
  }, async (args) => {
@@ -432,7 +267,7 @@ async function main() {
432
267
  });
433
268
  server.registerTool("add_workspace_member", {
434
269
  title: "Add a workspace member (can share documents EXTERNALLY)",
435
- description: "STATE-CHANGING, HIGH RISK. Adds a member by email to an active workspace; they get Read on EVERY document currently in it. An email not in your company is EXTERNAL: they receive an email with a portal link and can DOWNLOAD every document in the workspace, an irreversible disclosure (removing them later only stops future access). Two-step: call with confirm omitted/false for a preview (classification, documents exposed, nothing changes), then confirm:true. For an external member, confirm also requires confirmedExternalEmails to contain exactly that email, else it is refused. Idempotent: an existing member is a no-op. Refuses a revoked workspace. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
270
+ description: "STATE-CHANGING, HIGH RISK. Adds a member by email to an active workspace; they get Read on EVERY document currently in it. An email not in your company is EXTERNAL: they receive an email with a portal link and can DOWNLOAD every document in the workspace, an irreversible disclosure (removing them later only stops future access). Two-step: call with confirm omitted/false for a preview (classification, documents exposed, nothing changes), then confirm:true. For an external member, confirm also requires confirmedExternalEmails to contain exactly that email, else it is refused. Idempotent: an existing member is a no-op. Refuses a revoked workspace. Requires the workspace owner or an admin. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
436
271
  inputSchema: addWorkspaceMemberInput,
437
272
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
438
273
  }, async (args) => {
@@ -445,7 +280,7 @@ async function main() {
445
280
  });
446
281
  server.registerTool("remove_workspace_member", {
447
282
  title: "Remove a workspace member",
448
- description: "STATE-CHANGING. Removes a member (by email or memberId) from a workspace and immediately drops their access to all its documents; downloads they already made are not recoverable. Re-adding sends a new invite. Two-step: preview (who loses access, nothing changes), then confirm:true. Idempotent: a non-member is a no-op. No owner check: any company user can do this. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
283
+ description: "STATE-CHANGING. Removes a member (by email or memberId) from a workspace and immediately drops their access to all its documents; downloads they already made are not recoverable. Re-adding sends a new invite. Two-step: preview (who loses access, nothing changes), then confirm:true. Idempotent: a non-member is a no-op. Requires the workspace owner or an admin. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
449
284
  inputSchema: removeWorkspaceMemberInput,
450
285
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
451
286
  }, async (args) => {
@@ -458,7 +293,7 @@ async function main() {
458
293
  });
459
294
  server.registerTool("add_workspace_documents", {
460
295
  title: "Add documents to a workspace (can expose them EXTERNALLY)",
461
- description: "STATE-CHANGING, HIGH RISK. Adds documents to an active workspace, pinning each one's CURRENT active version. EVERY existing member gets Read and is emailed; if the workspace has EXTERNAL members, those outside people can DOWNLOAD the added documents (irreversible disclosure). Two-step: call with confirm omitted/false for a preview (pinned versions, members classified, externalMembers, nothing changes), then confirm:true. When external members exist (the client is asked to confirm; if it cannot, confirm requires confirmedExternalEmails to contain EXACTLY the externalMembers from the preview) else it is refused. Idempotent: documents already present are skipped. Requires Read on each document; refuses a revoked workspace. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
296
+ description: "STATE-CHANGING, HIGH RISK. Adds documents to an active workspace, pinning each one's CURRENT active version. EVERY existing member gets Read and is emailed; if the workspace has EXTERNAL members, those outside people can DOWNLOAD the added documents (irreversible disclosure). Two-step: call with confirm omitted/false for a preview (pinned versions, members classified, externalMembers, nothing changes), then confirm:true. When external members exist (the client is asked to confirm; if it cannot, confirm requires confirmedExternalEmails to contain EXACTLY the externalMembers from the preview) else it is refused. Idempotent: documents already present are skipped. Requires the workspace owner or an admin, and Read on each document; refuses a revoked workspace. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
462
297
  inputSchema: addWorkspaceDocumentsInput,
463
298
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: true },
464
299
  }, async (args) => {
@@ -471,7 +306,7 @@ async function main() {
471
306
  });
472
307
  server.registerTool("remove_workspace_document", {
473
308
  title: "Remove a document from a workspace",
474
- description: "STATE-CHANGING. Removes a document from an active workspace; every member immediately loses access to it (the document itself is not deleted; prior downloads are not recoverable). Reversible via add_workspace_documents. Two-step: preview (who loses access, nothing changes), then confirm:true. Idempotent: a document not in the workspace is a no-op. No owner check: any company user can do this. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
309
+ description: "STATE-CHANGING. Removes a document from an active workspace; every member immediately loses access to it (the document itself is not deleted; prior downloads are not recoverable). Reversible via add_workspace_documents. Two-step: preview (who loses access, nothing changes), then confirm:true. Idempotent: a document not in the workspace is a no-op. Requires the workspace owner or an admin. Interactive OAuth mode only. Confirm requires previewToken: the confirm call must pass the previewToken returned by a preview call with IDENTICAL arguments (expires in ~10 minutes; a changed argument, expiry or missing token is refused). Do not auto-approve this tool; leave it on per-call approval.",
475
310
  inputSchema: removeWorkspaceDocumentInput,
476
311
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true, openWorldHint: false },
477
312
  }, async (args) => {
@@ -482,6 +317,16 @@ async function main() {
482
317
  return errorContent(err);
483
318
  }
484
319
  });
320
+ return server;
321
+ }
322
+ async function main() {
323
+ const config = loadConfig();
324
+ const tokens = config.mode === "interactive"
325
+ ? new OAuthTokenProvider(config)
326
+ : new TokenProvider(config);
327
+ console.error(`ottofiles-mcp: auth mode = ${config.mode}`);
328
+ const gateway = new GatewayClient(config, tokens);
329
+ const server = buildServer(gateway, config, tokens);
485
330
  setElicitor(async (message) => {
486
331
  if (!server.server.getClientCapabilities()?.elicitation)
487
332
  return "unsupported";
@@ -500,8 +345,11 @@ async function main() {
500
345
  // stderr is safe for logging under stdio transport; stdout is the protocol.
501
346
  console.error("ottofiles-mcp: connected over stdio");
502
347
  }
503
- main().catch((err) => {
504
- console.error("ottofiles-mcp: fatal", err);
505
- process.exit(1);
506
- });
348
+ // Only auto-start over stdio when run as the entry point, so tests can import buildServer.
349
+ if (process.argv[1] && fileURLToPath(import.meta.url) === process.argv[1]) {
350
+ main().catch((err) => {
351
+ console.error("ottofiles-mcp: fatal", err);
352
+ process.exit(1);
353
+ });
354
+ }
507
355
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,aAAa,EA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