@henrikogard/auroradocs-mcp 0.2.0 → 0.2.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 (47) hide show
  1. package/README.md +68 -11
  2. package/dist/auroraClient.d.ts +119 -6
  3. package/dist/auroraClient.js +490 -75
  4. package/dist/customDatabases.d.ts +122 -0
  5. package/dist/customDatabases.js +377 -0
  6. package/dist/mcpSurfaces.d.ts +7 -1
  7. package/dist/mcpSurfaces.js +225 -6
  8. package/dist/obsidian/analyzer.d.ts +77 -0
  9. package/dist/obsidian/analyzer.js +228 -0
  10. package/dist/obsidian/canvasConverter.d.ts +49 -0
  11. package/dist/obsidian/canvasConverter.js +98 -0
  12. package/dist/obsidian/config.d.ts +5 -0
  13. package/dist/obsidian/config.js +20 -0
  14. package/dist/obsidian/consent.d.ts +42 -0
  15. package/dist/obsidian/consent.js +60 -0
  16. package/dist/obsidian/contentConverter.d.ts +18 -0
  17. package/dist/obsidian/contentConverter.js +217 -0
  18. package/dist/obsidian/frontmatter.d.ts +9 -0
  19. package/dist/obsidian/frontmatter.js +59 -0
  20. package/dist/obsidian/importPlan.d.ts +147 -0
  21. package/dist/obsidian/importPlan.js +340 -0
  22. package/dist/obsidian/importer.d.ts +52 -0
  23. package/dist/obsidian/importer.js +460 -0
  24. package/dist/obsidian/inference.d.ts +15 -0
  25. package/dist/obsidian/inference.js +139 -0
  26. package/dist/obsidian/journal.d.ts +64 -0
  27. package/dist/obsidian/journal.js +141 -0
  28. package/dist/obsidian/links.d.ts +14 -0
  29. package/dist/obsidian/links.js +48 -0
  30. package/dist/obsidian/markdown.d.ts +10 -0
  31. package/dist/obsidian/markdown.js +23 -0
  32. package/dist/obsidian/vaultAccess.d.ts +29 -0
  33. package/dist/obsidian/vaultAccess.js +158 -0
  34. package/dist/server.js +27 -8
  35. package/dist/toolCatalog.d.ts +8 -0
  36. package/dist/toolCatalog.js +458 -19
  37. package/dist/tools.d.ts +91 -2
  38. package/dist/tools.js +643 -31
  39. package/docs/agent-guide.md +212 -0
  40. package/docs/agent-planning-knowledge-roadmap.md +13 -19
  41. package/docs/obsidian-import.md +167 -0
  42. package/docs/security.md +37 -0
  43. package/docs/setup.md +25 -5
  44. package/docs/superpowers/plans/2026-07-14-mcp-runtime-resume-work.md +1 -1
  45. package/docs/tools.md +51 -2
  46. package/docs/troubleshooting.md +12 -1
  47. package/package.json +13 -4
package/README.md CHANGED
@@ -4,12 +4,14 @@
4
4
  granted AuroraCloud workspaces. It runs on your computer over stdio and sends
5
5
  authenticated requests to `https://api.auroradocs.eu`.
6
6
 
7
- The public package is `@henrikogard/auroradocs-mcp`, the executable is
8
- `aurora-mcp`, and this documentation targets version `0.2.0`.
7
+ The public package is `@henrikogard/auroradocs-mcp` and the executable is
8
+ `aurora-mcp`. The latest published package and current source version are
9
+ `0.2.1`.
9
10
 
10
11
  For an end-to-end installation walkthrough, use the dedicated
11
- [Setup guide](docs/setup.md). Hermes and OpenClaw users should also apply the
12
- bounded [read-only agent profiles](docs/agent-profiles.md).
12
+ [Setup guide](docs/setup.md). AI assistants and client integrators should start
13
+ with the [Agent guide](docs/agent-guide.md); Hermes and OpenClaw users should
14
+ also apply the bounded [read-only agent profiles](docs/agent-profiles.md).
13
15
 
14
16
  ## Requirements
15
17
 
@@ -19,8 +21,10 @@ bounded [read-only agent profiles](docs/agent-profiles.md).
19
21
  - a supported local MCP client: Claude Desktop, Claude Code, Codex, or another
20
22
  client that can start a stdio server
21
23
 
22
- Browser-only workspaces and Local folders workspaces are not supported. The
23
- server does not read a browser tab or a folder on your computer.
24
+ Browser-only workspaces and Local folders workspaces are not AuroraCloud MCP
25
+ destinations. By default the server does not read a browser tab or local
26
+ folder. The optional Obsidian importer reads only one explicitly configured
27
+ vault root for analysis and import; it never turns that folder into a workspace.
24
28
 
25
29
  ## Create an MCP credential
26
30
 
@@ -64,6 +68,8 @@ write scope does not imply its read counterpart.
64
68
  | Update task metadata after confirmation | `read:objects`, `read:tasks`, `write:tasks`, `write:objects` |
65
69
  | Create or rename non-task objects | `read:objects`, `write:objects` |
66
70
  | Replace or append document content | `read:objects`, `read:content`, `write:content` |
71
+ | Design custom types and reusable templates | `read:objects`; add `write:objects` and `write:content` only for an approved apply |
72
+ | Import an authorized Obsidian vault | `read:objects`, `write:objects`, `write:content` |
67
73
 
68
74
  `read:objects` is the practical baseline because the server verifies workspace
69
75
  membership at startup and most tools operate on object metadata. Add
@@ -82,7 +88,7 @@ in the knowledge-search recipe above.
82
88
  ## Configure a client
83
89
 
84
90
  All examples below use the production AuroraCloud API, a new client credential,
85
- and package version `0.2.0`. Replace `REDACTED` locally. Do not commit the
91
+ and package version `0.2.1`. Replace `REDACTED` locally. Do not commit the
86
92
  resulting configuration. The examples store the token in the client's saved
87
93
  configuration, so protect that file as a credential.
88
94
 
@@ -92,6 +98,8 @@ New client credentials require these environment variables:
92
98
  | --- | --- |
93
99
  | `AURORA_API_URL` | `https://api.auroradocs.eu` |
94
100
  | `AURORA_API_TOKEN` | the one-time `aur_mcp_client_` credential |
101
+ | `AURORA_OBSIDIAN_VAULT_ROOT` | optional absolute path authorizing read-only analysis of one Obsidian vault |
102
+ | `AURORA_MCP_STATE_DIR` | optional private plan/journal directory outside that vault |
95
103
 
96
104
  Do not set `AURORA_WORKSPACE_ID` for a client credential. The server discovers
97
105
  only its owner-approved grants with `list_workspaces`; each data call then
@@ -111,7 +119,7 @@ this server under `mcpServers`, preserving any servers already present:
111
119
  "mcpServers": {
112
120
  "auroradocs": {
113
121
  "command": "npx",
114
- "args": ["-y", "@henrikogard/auroradocs-mcp@0.2.0"],
122
+ "args": ["-y", "@henrikogard/auroradocs-mcp@0.2.1"],
115
123
  "env": {
116
124
  "AURORA_API_URL": "https://api.auroradocs.eu",
117
125
  "AURORA_API_TOKEN": "REDACTED"
@@ -134,7 +142,7 @@ Options must appear before the server name:
134
142
  claude mcp add --transport stdio --scope user \
135
143
  --env AURORA_API_URL=https://api.auroradocs.eu \
136
144
  --env AURORA_API_TOKEN=REDACTED \
137
- auroradocs -- npx -y @henrikogard/auroradocs-mcp@0.2.0
145
+ auroradocs -- npx -y @henrikogard/auroradocs-mcp@0.2.1
138
146
  ```
139
147
 
140
148
  Run `claude mcp get auroradocs` to inspect the saved entry, then use `/mcp` in
@@ -149,7 +157,7 @@ The installed Codex CLI accepts `--env` for local stdio servers:
149
157
  codex mcp add \
150
158
  --env AURORA_API_URL=https://api.auroradocs.eu \
151
159
  --env AURORA_API_TOKEN=REDACTED \
152
- auroradocs -- npx -y @henrikogard/auroradocs-mcp@0.2.0
160
+ auroradocs -- npx -y @henrikogard/auroradocs-mcp@0.2.1
153
161
  ```
154
162
 
155
163
  Run `codex mcp get auroradocs` to inspect the saved entry.
@@ -161,7 +169,7 @@ Use this valid generic JSON shape when a client accepts an MCP server object:
161
169
  ```json
162
170
  {
163
171
  "command": "npx",
164
- "args": ["-y", "@henrikogard/auroradocs-mcp@0.2.0"],
172
+ "args": ["-y", "@henrikogard/auroradocs-mcp@0.2.1"],
165
173
  "env": {
166
174
  "AURORA_API_URL": "https://api.auroradocs.eu",
167
175
  "AURORA_API_TOKEN": "REDACTED"
@@ -173,6 +181,53 @@ The client must launch the process locally and communicate over stdio. Do not
173
181
  configure `https://api.auroradocs.eu` as an MCP HTTP/SSE URL; it is the API the
174
182
  local server calls, not a hosted MCP endpoint.
175
183
 
184
+ ## Agent discovery and recovery
185
+
186
+ The server sends initialization instructions, exposes machine-readable workflow
187
+ recipes with approval/write/stop/result contracts, and advertises MCP
188
+ completions for authorized workspace, project, object-type, recipe, and template
189
+ prompt/resource arguments. The `template_instantiation` prompt guides an exact
190
+ template selection before creation. `restore_object` recovers an explicitly
191
+ identified soft-deleted object and safely reports when it was already active.
192
+
193
+ MCP completions apply to prompt and resource-template arguments; direct tool
194
+ inputs continue to use the bounded discovery tools documented in the
195
+ [Agent guide](docs/agent-guide.md).
196
+
197
+ ## Custom databases and templates
198
+
199
+ AuroraDocs MCP can discover existing object types/templates, offer starter
200
+ recipes for contacts, interests, equipment, subscriptions, and expenses, and
201
+ plan an arbitrary special-purpose schema. Use `plan_custom_database` first,
202
+ review the exact plan ID/hash, then call `apply_custom_database_plan` only after
203
+ approval. Updates are additive: they cannot remove a property, change its value
204
+ type or storage mapping, weaken requiredness, or silently retarget relations.
205
+
206
+ The `custom_database_design` prompt teaches the same recipe-first,
207
+ plan-before-apply flow. Templates can include a starter body and schema-declared
208
+ defaults, but should never contain real credentials, payment data, or sensitive
209
+ personal records.
210
+
211
+ ## Obsidian vault import
212
+
213
+ Set `AURORA_OBSIDIAN_VAULT_ROOT` to one absolute local vault path only when you
214
+ want to authorize read-only analysis. Import is a separate action: the server
215
+ first returns a reviewable plan, then asks through MCP form elicitation when the
216
+ client supports it. A compatibility client must wait for a later user message
217
+ and send the exact plan ID/hash with `confirmed: true`. Decline, cancel,
218
+ malformed confirmation, stale source state, missing scopes, viewer access, and
219
+ E2EE all stop before AuroraDocs writes.
220
+
221
+ Imports run in resume-safe batches, keep private plan metadata plus a
222
+ content-free progress journal outside the vault, survive MCP process restarts,
223
+ and never modify the source. Back up both systems first and start
224
+ with a small test workspace. See [Obsidian import](docs/obsidian-import.md) for
225
+ configuration, mapping, consent, recovery, and fidelity limits.
226
+
227
+ Analysis rejects more than 256 MiB of eligible Markdown/Canvas source files,
228
+ and hidden, plugin, Git, cache, trash, and other ignored paths cannot be read as
229
+ attachments even when vault content links to them.
230
+
176
231
  ## Verify read-only access first
177
232
 
178
233
  1. Grant the client one workspace with only `read:objects`.
@@ -220,7 +275,9 @@ report a vulnerability, follow [SECURITY.md](SECURITY.md).
220
275
 
221
276
  ## Reference
222
277
 
278
+ - [Agent guide](docs/agent-guide.md)
223
279
  - [Tools and scopes](docs/tools.md)
280
+ - [Obsidian import](docs/obsidian-import.md)
224
281
  - [Hermes and OpenClaw agent profiles](docs/agent-profiles.md)
225
282
  - [Agent planning and knowledge roadmap](docs/agent-planning-knowledge-roadmap.md)
226
283
  - [Security boundaries](docs/security.md)
@@ -6,6 +6,7 @@
6
6
  * Tool execution resolves a granted or verified workspace before data access.
7
7
  */
8
8
  import type { AuroraConnectionContext, ContentReadResult, GrantedWorkspace } from './contracts.js';
9
+ import type { CustomDatabaseTemplateDefault, ObjectTypeDef, ObjectTypeSchema, PropertyValueType } from './customDatabases.js';
9
10
  export type AuroraObjectRecord = {
10
11
  id: string;
11
12
  workspace_id: string;
@@ -34,6 +35,15 @@ export type AuroraPropertyRecord = {
34
35
  value_bool: boolean | null;
35
36
  value_ref: string | null;
36
37
  };
38
+ export type AuroraTemplateInput = {
39
+ workspaceId: string;
40
+ objectId?: string;
41
+ type: string;
42
+ title: string;
43
+ icon?: string | null;
44
+ body?: string;
45
+ defaults?: CustomDatabaseTemplateDefault[];
46
+ };
37
47
  export type AuroraWorkspaceMember = {
38
48
  id: string;
39
49
  name: string | null;
@@ -69,7 +79,7 @@ export type WorkspaceKnowledgeSource = {
69
79
  snippet: string | null;
70
80
  plainText: string | null;
71
81
  blockId: string | null;
72
- updatedAt: string;
82
+ updatedAt: string | null;
73
83
  score: number | null;
74
84
  matchedFields: Array<'title' | 'content' | 'properties' | 'relationships'>;
75
85
  availability: WorkspaceKnowledgeAvailability;
@@ -117,6 +127,8 @@ type BackendClient = {
117
127
  request<T = unknown>(path: string, options?: {
118
128
  method?: string;
119
129
  body?: unknown;
130
+ rawBody?: BodyInit;
131
+ headers?: HeadersInit;
120
132
  }): Promise<T>;
121
133
  };
122
134
  export declare function resetAuroraClientForTests(): void;
@@ -133,12 +145,99 @@ export declare function listGrantedWorkspaces(): Promise<GrantedWorkspace[]>;
133
145
  export declare function authenticate(): Promise<void>;
134
146
  export declare function authenticate(options: AuthenticateOptions): Promise<AuroraConnectionContext>;
135
147
  export declare function listObjects(workspaceId: string, type?: string): Promise<AuroraObjectRecord[]>;
136
- export declare function listObjectsPage(workspaceId: string, type: string | undefined, page: number, perPage: number): Promise<CollectionPage<AuroraObjectRecord>>;
148
+ export declare function listObjectsPage(workspaceId: string, type: string | undefined, page: number, perPage: number, options?: {
149
+ excludeTemplates?: boolean;
150
+ }): Promise<CollectionPage<AuroraObjectRecord>>;
137
151
  export declare function searchObjectsPage(workspaceId: string, query: string, limit: number): Promise<WorkspaceKnowledgeSource[]>;
138
152
  export declare function getObject(id: string, workspaceId: string): Promise<AuroraObjectRecord | null>;
139
- export declare function createObject(workspaceId: string, type: string, title: string): Promise<AuroraObjectRecord>;
153
+ export declare function createObject(workspaceId: string, type: string, title: string, options?: {
154
+ id?: string;
155
+ icon?: string | null;
156
+ parentId?: string | null;
157
+ isTemplate?: boolean;
158
+ }): Promise<AuroraObjectRecord>;
159
+ export declare function createAuroraObjectStable(workspaceId: string, input: {
160
+ id: string;
161
+ type: string;
162
+ title: string;
163
+ icon?: string | null;
164
+ parentId?: string | null;
165
+ isTemplate?: boolean;
166
+ }): Promise<AuroraObjectRecord>;
167
+ export declare function listAuroraObjectTypes(workspaceId: string): Promise<ObjectTypeDef[]>;
168
+ export declare function createAuroraObjectType(workspaceId: string, input: {
169
+ id: string;
170
+ name: string;
171
+ icon: string | null;
172
+ color: string | null;
173
+ schema: ObjectTypeSchema[];
174
+ }): Promise<ObjectTypeDef>;
175
+ export declare function updateAuroraObjectType(workspaceId: string, id: string, changes: {
176
+ name?: string;
177
+ icon?: string | null;
178
+ color?: string | null;
179
+ schema?: ObjectTypeSchema[];
180
+ }): Promise<ObjectTypeDef>;
181
+ export declare function listAuroraTemplates(workspaceId: string, type?: string): Promise<AuroraObjectRecord[]>;
182
+ export declare function listAuroraTemplatesPage(workspaceId: string, type?: string): Promise<CollectionPage<AuroraObjectRecord>>;
183
+ export declare function upsertAuroraPropertyStable(objectId: string, workspaceId: string, key: string, valueType: PropertyValueType, value: string | number | boolean | null): Promise<void>;
184
+ export declare function createAuroraTemplate(input: AuroraTemplateInput): Promise<AuroraObjectRecord>;
185
+ export declare function createAuroraObjectFromTemplate(workspaceId: string, templateId: string, objectId?: string): Promise<string>;
186
+ export declare function setAuroraContentStable(workspaceId: string, objectId: string, content: Record<string, unknown>): Promise<void>;
187
+ export type AuroraImportCapabilities = {
188
+ workspaceId: string;
189
+ role: string;
190
+ scopes: string[];
191
+ e2ee: {
192
+ enabled: boolean;
193
+ importBlocked: boolean;
194
+ reason: string | null;
195
+ };
196
+ upload: {
197
+ maxBytes: number;
198
+ mimePolicy: unknown;
199
+ limitBytes: number;
200
+ usedBytes: number;
201
+ remainingBytes: number;
202
+ };
203
+ storage: {
204
+ available: boolean;
205
+ backend: string;
206
+ };
207
+ };
208
+ export declare function getAuroraImportCapabilities(workspaceId: string): Promise<AuroraImportCapabilities>;
209
+ export type AuroraAttachmentUpload = {
210
+ id: string;
211
+ workspaceId: string;
212
+ objectId: string;
213
+ fileName: string;
214
+ mimeType: string;
215
+ sizeBytes: number;
216
+ url: string;
217
+ };
218
+ export declare function uploadAuroraMcpAttachment(input: {
219
+ workspaceId: string;
220
+ objectId: string;
221
+ fileName: string;
222
+ mimeType: string;
223
+ bytes: Buffer;
224
+ idempotencyKey: string;
225
+ }): Promise<AuroraAttachmentUpload>;
140
226
  export declare function updateObjectTitle(id: string, title: string, workspaceId: string): Promise<void>;
141
227
  export declare function deleteObject(id: string, workspaceId: string): Promise<void>;
228
+ export declare function restoreObject(id: string, workspaceId: string): Promise<boolean>;
229
+ /** Sentinel returned by getContent when content is E2EE-encrypted. */
230
+ export declare const E2EE_LOCKED_SENTINEL = "<<E2EE_LOCKED>>";
231
+ /**
232
+ * Read an object's content as plain text.
233
+ *
234
+ * Returns distinct availability states:
235
+ * - `not_found` — the object does not exist in this workspace
236
+ * - `empty` — the object exists but has no content record or empty content
237
+ * - `encrypted_locked` — content is end-to-end encrypted (cannot be read)
238
+ * - `permission_denied` — the token lacks `read:content` scope
239
+ * - `available` — content was read successfully
240
+ */
142
241
  export declare function getContent(objectId: string, workspaceId: string): Promise<ContentReadResult>;
143
242
  export declare function getContentJson(objectId: string, workspaceId: string): Promise<Record<string, unknown> | null>;
144
243
  export declare function searchWorkspaceKnowledgeServer(workspaceId: string, query: string, limit?: number): Promise<WorkspaceKnowledgeSource[]>;
@@ -146,12 +245,22 @@ export declare function getWorkspaceKnowledgeObjectServer(workspaceId: string, o
146
245
  export declare function listWorkspaceRelatedKnowledgeServer(workspaceId: string, objectId: string, limit?: number): Promise<WorkspaceKnowledgeSource[]>;
147
246
  export declare function listWorkspaceRecentKnowledgeServer(workspaceId: string, limit?: number): Promise<WorkspaceKnowledgeSource[]>;
148
247
  export declare function setContent(objectId: string, workspaceId: string, contentJson: Record<string, unknown>): Promise<void>;
248
+ /**
249
+ * Check whether an object's content is E2EE-encrypted, without fetching the
250
+ * full content payload. Returns `null` if the object or its content record
251
+ * is missing. Used to pre-check before mixed write operations (e.g. updating
252
+ * both title and content) so the operation fails atomically instead of
253
+ * leaving a half-applied update.
254
+ */
255
+ export declare function getObjectE2eeStatus(objectId: string, workspaceId: string): Promise<boolean | null>;
149
256
  export declare function appendContentText(objectId: string, workspaceId: string, text: string): Promise<void>;
150
- export declare function listProperties(objectIds: string[], workspaceId: string): Promise<AuroraPropertyRecord[]>;
257
+ export declare function listProperties(objectIds: string[], workspaceId: string, options?: {
258
+ maxPages?: number;
259
+ }): Promise<AuroraPropertyRecord[]>;
151
260
  export declare function upsertProperty(objectId: string, workspaceId: string, key: string, valueType: string, value: string): Promise<void>;
152
261
  export declare function listMembers(workspaceId: string): Promise<AuroraWorkspaceMember[]>;
153
262
  export declare function listTaskLists(workspaceId: string): Promise<AuroraTaskList[]>;
154
- export declare function listTaskStatuses(_workspaceId: string): Promise<string[]>;
263
+ export declare function listTaskStatuses(): Promise<string[]>;
155
264
  export type AuroraTaskProps = {
156
265
  status: string | null;
157
266
  priority: string | null;
@@ -162,12 +271,16 @@ export type AuroraTaskProps = {
162
271
  task_list_id: string | null;
163
272
  };
164
273
  export declare function getTaskProps(objectId: string, workspaceId: string): Promise<AuroraTaskProps>;
165
- export declare function updateTaskProps(objectId: string, workspaceId: string, patch: Partial<AuroraTaskProps>): Promise<void>;
274
+ export declare function updateTaskProps(objectId: string, workspaceId: string, patch: Partial<AuroraTaskProps>, options?: {
275
+ existingObject?: AuroraObjectRecord;
276
+ }): Promise<void>;
166
277
  export type AuroraPlanningTask = AuroraTaskProps & {
167
278
  id: string;
168
279
  title: string | null;
169
280
  updated_at: string | null;
170
281
  };
282
+ /** Maximum number of tasks listPlanningTasks will fetch + hydrate. */
283
+ export declare const PLANNING_TASKS_MAX = 500;
171
284
  export declare function listPlanningTasks(workspaceId: string): Promise<AuroraPlanningTask[]>;
172
285
  export declare function readCanvasContent(workspaceId: string, objectId: string): Promise<{
173
286
  object: AuroraObjectRecord;