@henrikogard/auroradocs-mcp 0.1.1 → 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.
- package/README.md +113 -39
- package/dist/auroraClient.d.ts +145 -15
- package/dist/auroraClient.js +650 -156
- package/dist/contracts.d.ts +121 -0
- package/dist/contracts.js +1 -0
- package/dist/customDatabases.d.ts +122 -0
- package/dist/customDatabases.js +377 -0
- package/dist/errors.d.ts +15 -0
- package/dist/errors.js +105 -0
- package/dist/index.js +17 -33
- package/dist/input.d.ts +24 -0
- package/dist/input.js +28 -0
- package/dist/mcpSurfaces.d.ts +12 -0
- package/dist/mcpSurfaces.js +316 -0
- package/dist/obsidian/analyzer.d.ts +77 -0
- package/dist/obsidian/analyzer.js +228 -0
- package/dist/obsidian/canvasConverter.d.ts +49 -0
- package/dist/obsidian/canvasConverter.js +98 -0
- package/dist/obsidian/config.d.ts +5 -0
- package/dist/obsidian/config.js +20 -0
- package/dist/obsidian/consent.d.ts +42 -0
- package/dist/obsidian/consent.js +60 -0
- package/dist/obsidian/contentConverter.d.ts +18 -0
- package/dist/obsidian/contentConverter.js +217 -0
- package/dist/obsidian/frontmatter.d.ts +9 -0
- package/dist/obsidian/frontmatter.js +59 -0
- package/dist/obsidian/importPlan.d.ts +147 -0
- package/dist/obsidian/importPlan.js +340 -0
- package/dist/obsidian/importer.d.ts +52 -0
- package/dist/obsidian/importer.js +460 -0
- package/dist/obsidian/inference.d.ts +15 -0
- package/dist/obsidian/inference.js +139 -0
- package/dist/obsidian/journal.d.ts +64 -0
- package/dist/obsidian/journal.js +141 -0
- package/dist/obsidian/links.d.ts +14 -0
- package/dist/obsidian/links.js +48 -0
- package/dist/obsidian/markdown.d.ts +10 -0
- package/dist/obsidian/markdown.js +23 -0
- package/dist/obsidian/vaultAccess.d.ts +29 -0
- package/dist/obsidian/vaultAccess.js +158 -0
- package/dist/projectContext.d.ts +18 -0
- package/dist/projectContext.js +281 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.js +71 -0
- package/dist/toolCatalog.d.ts +36 -4
- package/dist/toolCatalog.js +962 -20
- package/dist/tools.d.ts +111 -6
- package/dist/tools.js +1103 -326
- package/docs/agent-guide.md +212 -0
- package/docs/agent-planning-knowledge-roadmap.md +418 -0
- package/docs/agent-profiles.md +72 -0
- package/docs/obsidian-import.md +167 -0
- package/docs/security.md +134 -0
- package/docs/setup.md +239 -0
- package/docs/superpowers/plans/2026-07-14-mcp-runtime-resume-work.md +628 -0
- package/docs/tools.md +135 -0
- package/docs/troubleshooting.md +78 -0
- package/package.json +16 -6
package/README.md
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
# AuroraDocs MCP Server
|
|
2
2
|
|
|
3
|
-
`@henrikogard/auroradocs-mcp` connects a local MCP client to
|
|
4
|
-
|
|
5
|
-
to `https://api.auroradocs.eu`.
|
|
3
|
+
`@henrikogard/auroradocs-mcp` connects a local MCP client to independently
|
|
4
|
+
granted AuroraCloud workspaces. It runs on your computer over stdio and sends
|
|
5
|
+
authenticated requests to `https://api.auroradocs.eu`.
|
|
6
6
|
|
|
7
|
-
The public package is `@henrikogard/auroradocs-mcp
|
|
8
|
-
`aurora-mcp
|
|
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).
|
|
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).
|
|
12
15
|
|
|
13
16
|
## Requirements
|
|
14
17
|
|
|
@@ -18,10 +21,19 @@ For an end-to-end installation walkthrough, use the dedicated
|
|
|
18
21
|
- a supported local MCP client: Claude Desktop, Claude Code, Codex, or another
|
|
19
22
|
client that can start a stdio server
|
|
20
23
|
|
|
21
|
-
Browser-only workspaces and Local folders workspaces are not
|
|
22
|
-
server does not read a browser tab or
|
|
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.
|
|
23
28
|
|
|
24
|
-
## Create an MCP
|
|
29
|
+
## Create an MCP credential
|
|
30
|
+
|
|
31
|
+
New multi-workspace installations should use an `aur_mcp_client_` credential
|
|
32
|
+
with owner-approved, independently revocable workspace grants. Follow the
|
|
33
|
+
[Setup guide](docs/setup.md) for that flow. The workspace-scoped `aur_mcp_`
|
|
34
|
+
steps below remain available during the legacy migration window.
|
|
35
|
+
|
|
36
|
+
### Legacy workspace token
|
|
25
37
|
|
|
26
38
|
1. Sign in to AuroraDocs and open the AuroraCloud workspace you want to use.
|
|
27
39
|
2. Go to **Settings → Workspace → MCP Access**.
|
|
@@ -52,18 +64,21 @@ write scope does not imply its read counterpart.
|
|
|
52
64
|
| Confirm the connection and list titles | `read:objects` |
|
|
53
65
|
| Read page or Canvas content | `read:objects`, `read:content` |
|
|
54
66
|
| Search and read workspace knowledge | `read:objects`, `read:content`, `search` |
|
|
55
|
-
| Review
|
|
56
|
-
| Update task metadata after confirmation | `read:objects`, `tasks`, `write:objects` |
|
|
67
|
+
| Review tasks and week planning | `read:objects`, `read:tasks` |
|
|
68
|
+
| Update task metadata after confirmation | `read:objects`, `read:tasks`, `write:tasks`, `write:objects` |
|
|
57
69
|
| Create or rename non-task objects | `read:objects`, `write:objects` |
|
|
58
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` |
|
|
59
73
|
|
|
60
74
|
`read:objects` is the practical baseline because the server verifies workspace
|
|
61
75
|
membership at startup and most tools operate on object metadata. Add
|
|
62
76
|
`write:objects` or `write:content` only when you intend to let the client modify
|
|
63
77
|
the workspace. See the complete [scope and tool reference](docs/tools.md).
|
|
64
78
|
|
|
65
|
-
|
|
66
|
-
|
|
79
|
+
New client grants use separate `read:tasks` and `write:tasks` scopes. The legacy
|
|
80
|
+
`tasks` scope permits both reading and writing task metadata; it is
|
|
81
|
+
compatibility-only and cannot be selected for new grants.
|
|
67
82
|
|
|
68
83
|
`search_objects` and its `search` alias search object titles with `read:objects` only.
|
|
69
84
|
`wiki_search` searches workspace knowledge and requires `read:objects` plus `search`.
|
|
@@ -72,18 +87,24 @@ in the knowledge-search recipe above.
|
|
|
72
87
|
|
|
73
88
|
## Configure a client
|
|
74
89
|
|
|
75
|
-
All examples below use the production AuroraCloud API
|
|
76
|
-
`0.
|
|
90
|
+
All examples below use the production AuroraCloud API, a new client credential,
|
|
91
|
+
and package version `0.2.1`. Replace `REDACTED` locally. Do not commit the
|
|
77
92
|
resulting configuration. The examples store the token in the client's saved
|
|
78
93
|
configuration, so protect that file as a credential.
|
|
79
94
|
|
|
80
|
-
|
|
95
|
+
New client credentials require these environment variables:
|
|
81
96
|
|
|
82
97
|
| Variable | Value |
|
|
83
98
|
| --- | --- |
|
|
84
99
|
| `AURORA_API_URL` | `https://api.auroradocs.eu` |
|
|
85
|
-
| `
|
|
86
|
-
| `
|
|
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 |
|
|
103
|
+
|
|
104
|
+
Do not set `AURORA_WORKSPACE_ID` for a client credential. The server discovers
|
|
105
|
+
only its owner-approved grants with `list_workspaces`; each data call then
|
|
106
|
+
selects a workspace explicitly. A legacy `aur_mcp_` token still requires
|
|
107
|
+
`AURORA_WORKSPACE_ID` during the migration window.
|
|
87
108
|
|
|
88
109
|
Do not configure an AuroraDocs email or password. Public onboarding supports
|
|
89
110
|
MCP-token authentication only.
|
|
@@ -98,10 +119,9 @@ this server under `mcpServers`, preserving any servers already present:
|
|
|
98
119
|
"mcpServers": {
|
|
99
120
|
"auroradocs": {
|
|
100
121
|
"command": "npx",
|
|
101
|
-
"args": ["-y", "@henrikogard/auroradocs-mcp@0.
|
|
122
|
+
"args": ["-y", "@henrikogard/auroradocs-mcp@0.2.1"],
|
|
102
123
|
"env": {
|
|
103
124
|
"AURORA_API_URL": "https://api.auroradocs.eu",
|
|
104
|
-
"AURORA_WORKSPACE_ID": "WORKSPACE_ID",
|
|
105
125
|
"AURORA_API_TOKEN": "REDACTED"
|
|
106
126
|
}
|
|
107
127
|
}
|
|
@@ -121,9 +141,8 @@ Options must appear before the server name:
|
|
|
121
141
|
```bash
|
|
122
142
|
claude mcp add --transport stdio --scope user \
|
|
123
143
|
--env AURORA_API_URL=https://api.auroradocs.eu \
|
|
124
|
-
--env AURORA_WORKSPACE_ID=WORKSPACE_ID \
|
|
125
144
|
--env AURORA_API_TOKEN=REDACTED \
|
|
126
|
-
auroradocs -- npx -y @henrikogard/auroradocs-mcp@0.
|
|
145
|
+
auroradocs -- npx -y @henrikogard/auroradocs-mcp@0.2.1
|
|
127
146
|
```
|
|
128
147
|
|
|
129
148
|
Run `claude mcp get auroradocs` to inspect the saved entry, then use `/mcp` in
|
|
@@ -137,9 +156,8 @@ The installed Codex CLI accepts `--env` for local stdio servers:
|
|
|
137
156
|
```bash
|
|
138
157
|
codex mcp add \
|
|
139
158
|
--env AURORA_API_URL=https://api.auroradocs.eu \
|
|
140
|
-
--env AURORA_WORKSPACE_ID=WORKSPACE_ID \
|
|
141
159
|
--env AURORA_API_TOKEN=REDACTED \
|
|
142
|
-
auroradocs -- npx -y @henrikogard/auroradocs-mcp@0.
|
|
160
|
+
auroradocs -- npx -y @henrikogard/auroradocs-mcp@0.2.1
|
|
143
161
|
```
|
|
144
162
|
|
|
145
163
|
Run `codex mcp get auroradocs` to inspect the saved entry.
|
|
@@ -151,10 +169,9 @@ Use this valid generic JSON shape when a client accepts an MCP server object:
|
|
|
151
169
|
```json
|
|
152
170
|
{
|
|
153
171
|
"command": "npx",
|
|
154
|
-
"args": ["-y", "@henrikogard/auroradocs-mcp@0.
|
|
172
|
+
"args": ["-y", "@henrikogard/auroradocs-mcp@0.2.1"],
|
|
155
173
|
"env": {
|
|
156
174
|
"AURORA_API_URL": "https://api.auroradocs.eu",
|
|
157
|
-
"AURORA_WORKSPACE_ID": "WORKSPACE_ID",
|
|
158
175
|
"AURORA_API_TOKEN": "REDACTED"
|
|
159
176
|
}
|
|
160
177
|
}
|
|
@@ -164,15 +181,62 @@ The client must launch the process locally and communicate over stdio. Do not
|
|
|
164
181
|
configure `https://api.auroradocs.eu` as an MCP HTTP/SSE URL; it is the API the
|
|
165
182
|
local server calls, not a hosted MCP endpoint.
|
|
166
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
|
+
|
|
167
231
|
## Verify read-only access first
|
|
168
232
|
|
|
169
|
-
1.
|
|
233
|
+
1. Grant the client one workspace with only `read:objects`.
|
|
170
234
|
2. Start or restart the client.
|
|
171
|
-
3. Ask the client to call `
|
|
172
|
-
|
|
173
|
-
4.
|
|
174
|
-
5. Only then
|
|
175
|
-
genuinely needs.
|
|
235
|
+
3. Ask the client to call `list_workspaces` and confirm only the expected grant
|
|
236
|
+
is visible.
|
|
237
|
+
4. Call `get_project_context` for one explicit workspace and project ID.
|
|
238
|
+
5. Only then extend that workspace grant with any optional read scopes the
|
|
239
|
+
workflow genuinely needs.
|
|
176
240
|
|
|
177
241
|
If the connection fails, see [Troubleshooting](docs/troubleshooting.md). Never
|
|
178
242
|
paste the raw token into logs or bug reports.
|
|
@@ -211,7 +275,11 @@ report a vulnerability, follow [SECURITY.md](SECURITY.md).
|
|
|
211
275
|
|
|
212
276
|
## Reference
|
|
213
277
|
|
|
278
|
+
- [Agent guide](docs/agent-guide.md)
|
|
214
279
|
- [Tools and scopes](docs/tools.md)
|
|
280
|
+
- [Obsidian import](docs/obsidian-import.md)
|
|
281
|
+
- [Hermes and OpenClaw agent profiles](docs/agent-profiles.md)
|
|
282
|
+
- [Agent planning and knowledge roadmap](docs/agent-planning-knowledge-roadmap.md)
|
|
215
283
|
- [Security boundaries](docs/security.md)
|
|
216
284
|
- [Troubleshooting](docs/troubleshooting.md)
|
|
217
285
|
- [Contributing](CONTRIBUTING.md)
|
|
@@ -226,13 +294,19 @@ pnpm check
|
|
|
226
294
|
```
|
|
227
295
|
|
|
228
296
|
The live AuroraCloud smoke test is intentionally separate because it requires a
|
|
229
|
-
real
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
297
|
+
real owner-approved workspace grant. Prefer `AURORA_API_TOKEN=aur_mcp_client_...`
|
|
298
|
+
with `AURORA_API_URL`; a legacy `aur_mcp_...` token additionally requires
|
|
299
|
+
`AURORA_WORKSPACE_ID`. Grant only `read:objects`; add `read:content` only when
|
|
300
|
+
the selected project's readable brief or citations must be included.
|
|
301
|
+
|
|
302
|
+
The smoke always calls `list_workspaces`. Set `AURORA_SMOKE_PROJECT_ID` to add
|
|
303
|
+
one bounded `get_project_context` request; omit it to verify discovery without
|
|
304
|
+
guessing a project. When a client credential has multiple grants, also set
|
|
305
|
+
`AURORA_SMOKE_WORKSPACE_ID` for that project check. The dispatcher verifies the
|
|
306
|
+
catalog's authoritative read-only classification and never dispatches a write
|
|
307
|
+
tool. Keep `AURORA_API_TOKEN` out of commands, logs, and committed files by
|
|
308
|
+
providing it through your local secret environment. See
|
|
309
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) before using the smoke.
|
|
236
310
|
|
|
237
311
|
## License
|
|
238
312
|
|
package/dist/auroraClient.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* auroraClient.ts — AuroraCloud client helpers for the MCP server.
|
|
3
3
|
*
|
|
4
|
-
* SECURITY:
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* SECURITY: Client credentials discover only independently granted workspaces.
|
|
5
|
+
* Legacy credentials verify membership in their configured default workspace.
|
|
6
|
+
* Tool execution resolves a granted or verified workspace before data access.
|
|
7
7
|
*/
|
|
8
|
+
import type { AuroraConnectionContext, ContentReadResult, GrantedWorkspace } from './contracts.js';
|
|
9
|
+
import type { CustomDatabaseTemplateDefault, ObjectTypeDef, ObjectTypeSchema, PropertyValueType } from './customDatabases.js';
|
|
8
10
|
export type AuroraObjectRecord = {
|
|
9
11
|
id: string;
|
|
10
12
|
workspace_id: string;
|
|
@@ -33,6 +35,15 @@ export type AuroraPropertyRecord = {
|
|
|
33
35
|
value_bool: boolean | null;
|
|
34
36
|
value_ref: string | null;
|
|
35
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
|
+
};
|
|
36
47
|
export type AuroraWorkspaceMember = {
|
|
37
48
|
id: string;
|
|
38
49
|
name: string | null;
|
|
@@ -44,11 +55,11 @@ export type AuroraTaskList = {
|
|
|
44
55
|
name: string;
|
|
45
56
|
default_status: string | null;
|
|
46
57
|
};
|
|
47
|
-
export declare const WORKSPACE_KNOWLEDGE_SOURCE_KINDS: readonly [
|
|
58
|
+
export declare const WORKSPACE_KNOWLEDGE_SOURCE_KINDS: readonly ['object', 'content_chunk', 'property', 'comment', 'attachment_metadata', 'relationship'];
|
|
48
59
|
export type WorkspaceKnowledgeSourceKind = (typeof WORKSPACE_KNOWLEDGE_SOURCE_KINDS)[number];
|
|
49
|
-
export declare const WORKSPACE_KNOWLEDGE_AVAILABILITY_STATES: readonly [
|
|
60
|
+
export declare const WORKSPACE_KNOWLEDGE_AVAILABILITY_STATES: readonly ['available', 'encrypted_locked', 'not_indexed', 'unsupported_type', 'permission_denied'];
|
|
50
61
|
export type WorkspaceKnowledgeAvailability = (typeof WORKSPACE_KNOWLEDGE_AVAILABILITY_STATES)[number];
|
|
51
|
-
export declare const WORKSPACE_KNOWLEDGE_RELATIONSHIP_TYPES: readonly [
|
|
62
|
+
export declare const WORKSPACE_KNOWLEDGE_RELATIONSHIP_TYPES: readonly ['parent', 'child', 'link', 'backlink', 'tag', 'task_project'];
|
|
52
63
|
export type WorkspaceKnowledgeRelationshipType = (typeof WORKSPACE_KNOWLEDGE_RELATIONSHIP_TYPES)[number];
|
|
53
64
|
export type WorkspaceKnowledgeRelationship = {
|
|
54
65
|
type: WorkspaceKnowledgeRelationshipType;
|
|
@@ -68,7 +79,7 @@ export type WorkspaceKnowledgeSource = {
|
|
|
68
79
|
snippet: string | null;
|
|
69
80
|
plainText: string | null;
|
|
70
81
|
blockId: string | null;
|
|
71
|
-
updatedAt: string;
|
|
82
|
+
updatedAt: string | null;
|
|
72
83
|
score: number | null;
|
|
73
84
|
matchedFields: Array<'title' | 'content' | 'properties' | 'relationships'>;
|
|
74
85
|
availability: WorkspaceKnowledgeAvailability;
|
|
@@ -86,13 +97,21 @@ type BackendAuthStore = {
|
|
|
86
97
|
record: AuthRecord;
|
|
87
98
|
save(token: string, record: AuthRecord): void;
|
|
88
99
|
};
|
|
100
|
+
export type CollectionPage<T> = {
|
|
101
|
+
items: T[];
|
|
102
|
+
page: number;
|
|
103
|
+
perPage: number;
|
|
104
|
+
totalPages: number;
|
|
105
|
+
totalItems: number;
|
|
106
|
+
};
|
|
89
107
|
type BackendCollection = {
|
|
90
|
-
|
|
108
|
+
listPage(options: {
|
|
91
109
|
filter?: string;
|
|
92
110
|
sort?: string;
|
|
93
111
|
expand?: string;
|
|
94
|
-
|
|
95
|
-
|
|
112
|
+
page: number;
|
|
113
|
+
perPage: number;
|
|
114
|
+
}): Promise<CollectionPage<Record<string, unknown>>>;
|
|
96
115
|
get(id: string): Promise<Record<string, unknown>>;
|
|
97
116
|
create(data: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
98
117
|
update(id: string, data: Record<string, unknown>): Promise<Record<string, unknown>>;
|
|
@@ -108,6 +127,8 @@ type BackendClient = {
|
|
|
108
127
|
request<T = unknown>(path: string, options?: {
|
|
109
128
|
method?: string;
|
|
110
129
|
body?: unknown;
|
|
130
|
+
rawBody?: BodyInit;
|
|
131
|
+
headers?: HeadersInit;
|
|
111
132
|
}): Promise<T>;
|
|
112
133
|
};
|
|
113
134
|
export declare function resetAuroraClientForTests(): void;
|
|
@@ -116,25 +137,130 @@ export declare function getAuroraClient(): BackendClient;
|
|
|
116
137
|
* Authenticate and verify workspace membership.
|
|
117
138
|
* Exits the process if the user is not a member of the target workspace.
|
|
118
139
|
*/
|
|
140
|
+
export type AuthenticateOptions = {
|
|
141
|
+
token?: string;
|
|
142
|
+
workspaceId?: string;
|
|
143
|
+
};
|
|
144
|
+
export declare function listGrantedWorkspaces(): Promise<GrantedWorkspace[]>;
|
|
119
145
|
export declare function authenticate(): Promise<void>;
|
|
146
|
+
export declare function authenticate(options: AuthenticateOptions): Promise<AuroraConnectionContext>;
|
|
120
147
|
export declare function listObjects(workspaceId: string, type?: string): Promise<AuroraObjectRecord[]>;
|
|
148
|
+
export declare function listObjectsPage(workspaceId: string, type: string | undefined, page: number, perPage: number, options?: {
|
|
149
|
+
excludeTemplates?: boolean;
|
|
150
|
+
}): Promise<CollectionPage<AuroraObjectRecord>>;
|
|
151
|
+
export declare function searchObjectsPage(workspaceId: string, query: string, limit: number): Promise<WorkspaceKnowledgeSource[]>;
|
|
121
152
|
export declare function getObject(id: string, workspaceId: string): Promise<AuroraObjectRecord | null>;
|
|
122
|
-
export declare function createObject(workspaceId: string, type: string, title: string
|
|
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>;
|
|
123
226
|
export declare function updateObjectTitle(id: string, title: string, workspaceId: string): Promise<void>;
|
|
124
227
|
export declare function deleteObject(id: string, workspaceId: string): Promise<void>;
|
|
125
|
-
export declare function
|
|
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
|
+
*/
|
|
241
|
+
export declare function getContent(objectId: string, workspaceId: string): Promise<ContentReadResult>;
|
|
126
242
|
export declare function getContentJson(objectId: string, workspaceId: string): Promise<Record<string, unknown> | null>;
|
|
127
243
|
export declare function searchWorkspaceKnowledgeServer(workspaceId: string, query: string, limit?: number): Promise<WorkspaceKnowledgeSource[]>;
|
|
128
244
|
export declare function getWorkspaceKnowledgeObjectServer(workspaceId: string, objectId: string, includeFullText?: boolean): Promise<WorkspaceKnowledgeSource | null>;
|
|
129
245
|
export declare function listWorkspaceRelatedKnowledgeServer(workspaceId: string, objectId: string, limit?: number): Promise<WorkspaceKnowledgeSource[]>;
|
|
130
246
|
export declare function listWorkspaceRecentKnowledgeServer(workspaceId: string, limit?: number): Promise<WorkspaceKnowledgeSource[]>;
|
|
131
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>;
|
|
132
256
|
export declare function appendContentText(objectId: string, workspaceId: string, text: string): Promise<void>;
|
|
133
|
-
export declare function listProperties(objectIds: string[], workspaceId: string
|
|
257
|
+
export declare function listProperties(objectIds: string[], workspaceId: string, options?: {
|
|
258
|
+
maxPages?: number;
|
|
259
|
+
}): Promise<AuroraPropertyRecord[]>;
|
|
134
260
|
export declare function upsertProperty(objectId: string, workspaceId: string, key: string, valueType: string, value: string): Promise<void>;
|
|
135
261
|
export declare function listMembers(workspaceId: string): Promise<AuroraWorkspaceMember[]>;
|
|
136
262
|
export declare function listTaskLists(workspaceId: string): Promise<AuroraTaskList[]>;
|
|
137
|
-
export declare function listTaskStatuses(
|
|
263
|
+
export declare function listTaskStatuses(): Promise<string[]>;
|
|
138
264
|
export type AuroraTaskProps = {
|
|
139
265
|
status: string | null;
|
|
140
266
|
priority: string | null;
|
|
@@ -145,12 +271,16 @@ export type AuroraTaskProps = {
|
|
|
145
271
|
task_list_id: string | null;
|
|
146
272
|
};
|
|
147
273
|
export declare function getTaskProps(objectId: string, workspaceId: string): Promise<AuroraTaskProps>;
|
|
148
|
-
export declare function updateTaskProps(objectId: string, workspaceId: string, patch: Partial<AuroraTaskProps
|
|
274
|
+
export declare function updateTaskProps(objectId: string, workspaceId: string, patch: Partial<AuroraTaskProps>, options?: {
|
|
275
|
+
existingObject?: AuroraObjectRecord;
|
|
276
|
+
}): Promise<void>;
|
|
149
277
|
export type AuroraPlanningTask = AuroraTaskProps & {
|
|
150
278
|
id: string;
|
|
151
279
|
title: string | null;
|
|
152
280
|
updated_at: string | null;
|
|
153
281
|
};
|
|
282
|
+
/** Maximum number of tasks listPlanningTasks will fetch + hydrate. */
|
|
283
|
+
export declare const PLANNING_TASKS_MAX = 500;
|
|
154
284
|
export declare function listPlanningTasks(workspaceId: string): Promise<AuroraPlanningTask[]>;
|
|
155
285
|
export declare function readCanvasContent(workspaceId: string, objectId: string): Promise<{
|
|
156
286
|
object: AuroraObjectRecord;
|