@henrikogard/auroradocs-mcp 0.1.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/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,3 @@
1
+ AuroraDocs MCP Server
2
+
3
+ Copyright 2026 Henrik Øgård / AuroraDocs
package/README.md ADDED
@@ -0,0 +1,239 @@
1
+ # AuroraDocs MCP Server
2
+
3
+ `@henrikogard/auroradocs-mcp` connects a local MCP client to one AuroraCloud
4
+ workspace. It runs on your computer over stdio and sends authenticated requests
5
+ to `https://api.auroradocs.eu`.
6
+
7
+ The public package is `@henrikogard/auroradocs-mcp`, the executable is
8
+ `aurora-mcp`, and this documentation targets version `0.1.1`.
9
+
10
+ For an end-to-end installation walkthrough, use the dedicated
11
+ [Setup guide](docs/setup.md).
12
+
13
+ ## Requirements
14
+
15
+ - Node.js 20 or newer
16
+ - an AuroraDocs account with an AuroraCloud-backed workspace
17
+ - permission to create an MCP token for that workspace
18
+ - a supported local MCP client: Claude Desktop, Claude Code, Codex, or another
19
+ client that can start a stdio server
20
+
21
+ Browser-only workspaces and Local folders workspaces are not supported. The
22
+ server does not read a browser tab or a folder on your computer.
23
+
24
+ ## Create an MCP key
25
+
26
+ 1. Sign in to AuroraDocs and open the AuroraCloud workspace you want to use.
27
+ 2. Go to **Settings → Workspace → MCP Access**.
28
+ 3. Enter a label that identifies the client, such as `Personal laptop — Codex`.
29
+ 4. Select the minimum scopes the client needs. Start with `read:objects`; add
30
+ `read:content` only when the client must read document bodies.
31
+ 5. Choose a bounded expiry: 30, 60, 90, 180, or 365 days. The default is
32
+ **90 days**. Prefer a bounded expiry even if your role offers a no-expiry
33
+ option.
34
+ 6. Select **Create token**.
35
+ 7. Copy the raw `aur_mcp_` token immediately. It is **shown only once** and
36
+ cannot be recovered later. Store it in the local client configuration or a
37
+ trusted secret manager; never paste it into an issue, pull request, chat, or
38
+ screenshot.
39
+ 8. Copy the workspace ID from the configuration snippet on the same MCP Access
40
+ page. You will use it as `AURORA_WORKSPACE_ID`.
41
+
42
+ Only workspace owners and admins can create tokens. A token is a
43
+ workspace-scoped service credential, not an account-wide API key.
44
+
45
+ ### Choose least-privilege scopes
46
+
47
+ Scopes are independent: `read:objects` does not include `read:content`, and a
48
+ write scope does not imply its read counterpart.
49
+
50
+ | Goal | Start with these scopes |
51
+ | --- | --- |
52
+ | Confirm the connection and list titles | `read:objects` |
53
+ | Read page or Canvas content | `read:objects`, `read:content` |
54
+ | Search and read workspace knowledge | `read:objects`, `read:content`, `search` |
55
+ | Review or update tasks and week planning | `read:objects`, `tasks` |
56
+ | Update task metadata after confirmation | `read:objects`, `tasks`, `write:objects` |
57
+ | Create or rename non-task objects | `read:objects`, `write:objects` |
58
+ | Replace or append document content | `read:objects`, `read:content`, `write:content` |
59
+
60
+ `read:objects` is the practical baseline because the server verifies workspace
61
+ membership at startup and most tools operate on object metadata. Add
62
+ `write:objects` or `write:content` only when you intend to let the client modify
63
+ the workspace. See the complete [scope and tool reference](docs/tools.md).
64
+
65
+ The `tasks` scope permits both reading and writing task metadata. Do not grant
66
+ it to a client that should have strictly read-only access.
67
+
68
+ `search_objects` and its `search` alias search object titles with `read:objects` only.
69
+ `wiki_search` searches workspace knowledge and requires `read:objects` plus `search`.
70
+ Add `read:content` when the workflow will open and read the matching pages, as
71
+ in the knowledge-search recipe above.
72
+
73
+ ## Configure a client
74
+
75
+ All examples below use the production AuroraCloud API and pin package version
76
+ `0.1.1`. Replace `WORKSPACE_ID` and `REDACTED` locally. Do not commit the
77
+ resulting configuration. The examples store the token in the client's saved
78
+ configuration, so protect that file as a credential.
79
+
80
+ The server requires exactly these environment variables:
81
+
82
+ | Variable | Value |
83
+ | --- | --- |
84
+ | `AURORA_API_URL` | `https://api.auroradocs.eu` |
85
+ | `AURORA_WORKSPACE_ID` | the workspace ID shown on the MCP Access page |
86
+ | `AURORA_API_TOKEN` | the one-time `aur_mcp_` token |
87
+
88
+ Do not configure an AuroraDocs email or password. Public onboarding supports
89
+ MCP-token authentication only.
90
+
91
+ ### Claude Desktop
92
+
93
+ Open Claude Desktop's developer settings and edit its MCP configuration. Add
94
+ this server under `mcpServers`, preserving any servers already present:
95
+
96
+ ```json
97
+ {
98
+ "mcpServers": {
99
+ "auroradocs": {
100
+ "command": "npx",
101
+ "args": ["-y", "@henrikogard/auroradocs-mcp@0.1.1"],
102
+ "env": {
103
+ "AURORA_API_URL": "https://api.auroradocs.eu",
104
+ "AURORA_WORKSPACE_ID": "WORKSPACE_ID",
105
+ "AURORA_API_TOKEN": "REDACTED"
106
+ }
107
+ }
108
+ }
109
+ }
110
+ ```
111
+
112
+ Save the file and restart Claude Desktop. Anthropic's current
113
+ [local MCP server guide](https://support.anthropic.com/en/articles/10949351-getting-started-with-local-mcp-servers-on-claude-desktop)
114
+ describes how to reach the configuration screen.
115
+
116
+ ### Claude Code
117
+
118
+ Current Claude Code accepts local stdio servers through `claude mcp add`.
119
+ Options must appear before the server name:
120
+
121
+ ```bash
122
+ claude mcp add --transport stdio --scope user \
123
+ --env AURORA_API_URL=https://api.auroradocs.eu \
124
+ --env AURORA_WORKSPACE_ID=WORKSPACE_ID \
125
+ --env AURORA_API_TOKEN=REDACTED \
126
+ auroradocs -- npx -y @henrikogard/auroradocs-mcp@0.1.1
127
+ ```
128
+
129
+ Run `claude mcp get auroradocs` to inspect the saved entry, then use `/mcp` in
130
+ Claude Code to check its connection. See Anthropic's current
131
+ [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp).
132
+
133
+ ### Codex
134
+
135
+ The installed Codex CLI accepts `--env` for local stdio servers:
136
+
137
+ ```bash
138
+ codex mcp add \
139
+ --env AURORA_API_URL=https://api.auroradocs.eu \
140
+ --env AURORA_WORKSPACE_ID=WORKSPACE_ID \
141
+ --env AURORA_API_TOKEN=REDACTED \
142
+ auroradocs -- npx -y @henrikogard/auroradocs-mcp@0.1.1
143
+ ```
144
+
145
+ Run `codex mcp get auroradocs` to inspect the saved entry.
146
+
147
+ ### Other stdio clients
148
+
149
+ Use this valid generic JSON shape when a client accepts an MCP server object:
150
+
151
+ ```json
152
+ {
153
+ "command": "npx",
154
+ "args": ["-y", "@henrikogard/auroradocs-mcp@0.1.1"],
155
+ "env": {
156
+ "AURORA_API_URL": "https://api.auroradocs.eu",
157
+ "AURORA_WORKSPACE_ID": "WORKSPACE_ID",
158
+ "AURORA_API_TOKEN": "REDACTED"
159
+ }
160
+ }
161
+ ```
162
+
163
+ The client must launch the process locally and communicate over stdio. Do not
164
+ configure `https://api.auroradocs.eu` as an MCP HTTP/SSE URL; it is the API the
165
+ local server calls, not a hosted MCP endpoint.
166
+
167
+ ## Verify read-only access first
168
+
169
+ 1. Mint a token with only `read:objects`.
170
+ 2. Start or restart the client.
171
+ 3. Ask the client to call `list_objects` with a small limit and return only
172
+ object titles and IDs.
173
+ 4. Confirm that the result belongs to the intended workspace.
174
+ 5. Only then mint a replacement token with any additional scopes your workflow
175
+ genuinely needs. Update the client, verify it, and revoke the first token.
176
+
177
+ If the connection fails, see [Troubleshooting](docs/troubleshooting.md). Never
178
+ paste the raw token into logs or bug reports.
179
+
180
+ ## Manage and revoke access
181
+
182
+ Return to **Settings → Workspace → MCP Access** to manage credentials.
183
+
184
+ - Review each token's fingerprint, scopes, expiry, last-used time, status, and
185
+ activity.
186
+ - Open a token's activity view to review allowed requests and denials.
187
+ - Revoke one token when a client is retired, a device is lost, or a replacement
188
+ token is working.
189
+ - Only workspace owners can use **Revoke all active tokens** in the UI.
190
+ - Admins should revoke each affected token individually and contact a workspace owner for emergency bulk revocation.
191
+ - After emergency revocation, create fresh least-privilege tokens only for
192
+ trusted clients.
193
+
194
+ Revocation is immediate. To renew access, create a new token before the old one
195
+ expires, update the local client, verify a read-only request, and then revoke
196
+ the old token. Tokens cannot be extended or recovered.
197
+
198
+ ## Security model
199
+
200
+ - The MCP protocol process is local and stdio-only; AuroraDocs does not provide
201
+ a hosted MCP HTTP, SSE, or OAuth endpoint.
202
+ - AuroraCloud checks workspace membership, token scopes, the member's current
203
+ role, expiry, revocation, rate limits, and audit events on requests.
204
+ - E2EE content that is locked or unavailable is reported that way. The server
205
+ does not return encrypted ciphertext as readable content.
206
+ - The package sends no product telemetry. Network requests are the AuroraCloud
207
+ API calls required by the selected tools.
208
+
209
+ Read [Security boundaries](docs/security.md) before granting write scopes. To
210
+ report a vulnerability, follow [SECURITY.md](SECURITY.md).
211
+
212
+ ## Reference
213
+
214
+ - [Tools and scopes](docs/tools.md)
215
+ - [Security boundaries](docs/security.md)
216
+ - [Troubleshooting](docs/troubleshooting.md)
217
+ - [Contributing](CONTRIBUTING.md)
218
+ - [Code of Conduct](CODE_OF_CONDUCT.md)
219
+
220
+ ## Development
221
+
222
+ ```bash
223
+ pnpm install --frozen-lockfile
224
+ pnpm test
225
+ pnpm check
226
+ ```
227
+
228
+ The live AuroraCloud smoke test is intentionally separate because it requires a
229
+ real workspace and a least-privilege `aur_mcp_` token. Give the smoke token only
230
+ `read:objects`, `read:content`, and `search`; explicitly omit `tasks` because
231
+ that scope authorizes both task reads and task writes. The smoke authenticates,
232
+ checks membership, lists tools, members, and objects, and reads the recent
233
+ knowledge catalog. Every dispatched tool must carry the catalog's authoritative
234
+ read-only classification, and the smoke never creates, updates, or deletes
235
+ workspace data. See [CONTRIBUTING.md](CONTRIBUTING.md) before using it.
236
+
237
+ ## License
238
+
239
+ Apache License 2.0. See [LICENSE](LICENSE) and [NOTICE](NOTICE).
@@ -0,0 +1,165 @@
1
+ /**
2
+ * auroraClient.ts — AuroraCloud client helpers for the MCP server.
3
+ *
4
+ * SECURITY: Every query is scoped to the configured workspace.
5
+ * On authenticate(), the server verifies the caller is a member of
6
+ * that workspace — if not, the process exits.
7
+ */
8
+ export type AuroraObjectRecord = {
9
+ id: string;
10
+ workspace_id: string;
11
+ type: string;
12
+ title: string | null;
13
+ icon: string | null;
14
+ parent_id: string | null;
15
+ is_deleted: boolean;
16
+ is_template: boolean;
17
+ created_at: string;
18
+ updated_at: string;
19
+ };
20
+ export type AuroraContentRecord = {
21
+ id?: string;
22
+ object_id: string;
23
+ content_json: Record<string, unknown> | string | null;
24
+ };
25
+ export type AuroraPropertyRecord = {
26
+ id: string;
27
+ object_id: string;
28
+ key: string;
29
+ value_type: string;
30
+ value_text: string | null;
31
+ value_num: number | null;
32
+ value_date: string | null;
33
+ value_bool: boolean | null;
34
+ value_ref: string | null;
35
+ };
36
+ export type AuroraWorkspaceMember = {
37
+ id: string;
38
+ name: string | null;
39
+ email: string;
40
+ role: string;
41
+ };
42
+ export type AuroraTaskList = {
43
+ id: string;
44
+ name: string;
45
+ default_status: string | null;
46
+ };
47
+ export declare const WORKSPACE_KNOWLEDGE_SOURCE_KINDS: readonly ["object", "content_chunk", "property", "comment", "attachment_metadata", "relationship"];
48
+ export type WorkspaceKnowledgeSourceKind = (typeof WORKSPACE_KNOWLEDGE_SOURCE_KINDS)[number];
49
+ export declare const WORKSPACE_KNOWLEDGE_AVAILABILITY_STATES: readonly ["available", "encrypted_locked", "not_indexed", "unsupported_type", "permission_denied"];
50
+ export type WorkspaceKnowledgeAvailability = (typeof WORKSPACE_KNOWLEDGE_AVAILABILITY_STATES)[number];
51
+ export declare const WORKSPACE_KNOWLEDGE_RELATIONSHIP_TYPES: readonly ["parent", "child", "link", "backlink", "tag", "task_project"];
52
+ export type WorkspaceKnowledgeRelationshipType = (typeof WORKSPACE_KNOWLEDGE_RELATIONSHIP_TYPES)[number];
53
+ export type WorkspaceKnowledgeRelationship = {
54
+ type: WorkspaceKnowledgeRelationshipType;
55
+ objectId: string;
56
+ title: string | null;
57
+ };
58
+ export type WorkspaceKnowledgeSource = {
59
+ sourceId: string;
60
+ workspaceId: string;
61
+ objectId: string;
62
+ kind: WorkspaceKnowledgeSourceKind;
63
+ title: string | null;
64
+ objectType: string;
65
+ icon: string | null;
66
+ breadcrumb: string[];
67
+ deepLink: string;
68
+ snippet: string | null;
69
+ plainText: string | null;
70
+ blockId: string | null;
71
+ updatedAt: string;
72
+ score: number | null;
73
+ matchedFields: Array<'title' | 'content' | 'properties' | 'relationships'>;
74
+ availability: WorkspaceKnowledgeAvailability;
75
+ relationships: WorkspaceKnowledgeRelationship[];
76
+ };
77
+ export type WorkspaceKnowledgeResponse = {
78
+ workspaceId: string;
79
+ query: string | null;
80
+ limit: number;
81
+ items: WorkspaceKnowledgeSource[];
82
+ };
83
+ type AuthRecord = Record<string, unknown> | null;
84
+ type BackendAuthStore = {
85
+ token: string;
86
+ record: AuthRecord;
87
+ save(token: string, record: AuthRecord): void;
88
+ };
89
+ type BackendCollection = {
90
+ list(options?: {
91
+ filter?: string;
92
+ sort?: string;
93
+ expand?: string;
94
+ batch?: number;
95
+ }): Promise<Array<Record<string, unknown>>>;
96
+ get(id: string): Promise<Record<string, unknown>>;
97
+ create(data: Record<string, unknown>): Promise<Record<string, unknown>>;
98
+ update(id: string, data: Record<string, unknown>): Promise<Record<string, unknown>>;
99
+ authWithPassword?(email: string, password: string): Promise<{
100
+ record: Record<string, unknown>;
101
+ token: string;
102
+ }>;
103
+ };
104
+ type BackendClient = {
105
+ authStore: BackendAuthStore;
106
+ filter(template: string, params: Record<string, unknown>): string;
107
+ collection(name: string): BackendCollection;
108
+ request<T = unknown>(path: string, options?: {
109
+ method?: string;
110
+ body?: unknown;
111
+ }): Promise<T>;
112
+ };
113
+ export declare function resetAuroraClientForTests(): void;
114
+ export declare function getAuroraClient(): BackendClient;
115
+ /**
116
+ * Authenticate and verify workspace membership.
117
+ * Exits the process if the user is not a member of the target workspace.
118
+ */
119
+ export declare function authenticate(): Promise<void>;
120
+ export declare function listObjects(workspaceId: string, type?: string): Promise<AuroraObjectRecord[]>;
121
+ export declare function getObject(id: string, workspaceId: string): Promise<AuroraObjectRecord | null>;
122
+ export declare function createObject(workspaceId: string, type: string, title: string): Promise<AuroraObjectRecord>;
123
+ export declare function updateObjectTitle(id: string, title: string, workspaceId: string): Promise<void>;
124
+ export declare function deleteObject(id: string, workspaceId: string): Promise<void>;
125
+ export declare function getContent(objectId: string, workspaceId: string): Promise<string | null>;
126
+ export declare function getContentJson(objectId: string, workspaceId: string): Promise<Record<string, unknown> | null>;
127
+ export declare function searchWorkspaceKnowledgeServer(workspaceId: string, query: string, limit?: number): Promise<WorkspaceKnowledgeSource[]>;
128
+ export declare function getWorkspaceKnowledgeObjectServer(workspaceId: string, objectId: string, includeFullText?: boolean): Promise<WorkspaceKnowledgeSource | null>;
129
+ export declare function listWorkspaceRelatedKnowledgeServer(workspaceId: string, objectId: string, limit?: number): Promise<WorkspaceKnowledgeSource[]>;
130
+ export declare function listWorkspaceRecentKnowledgeServer(workspaceId: string, limit?: number): Promise<WorkspaceKnowledgeSource[]>;
131
+ export declare function setContent(objectId: string, workspaceId: string, contentJson: Record<string, unknown>): Promise<void>;
132
+ export declare function appendContentText(objectId: string, workspaceId: string, text: string): Promise<void>;
133
+ export declare function listProperties(objectIds: string[], workspaceId: string): Promise<AuroraPropertyRecord[]>;
134
+ export declare function upsertProperty(objectId: string, workspaceId: string, key: string, valueType: string, value: string): Promise<void>;
135
+ export declare function listMembers(workspaceId: string): Promise<AuroraWorkspaceMember[]>;
136
+ export declare function listTaskLists(workspaceId: string): Promise<AuroraTaskList[]>;
137
+ export declare function listTaskStatuses(_workspaceId: string): Promise<string[]>;
138
+ export type AuroraTaskProps = {
139
+ status: string | null;
140
+ priority: string | null;
141
+ due_date: string | null;
142
+ assignees: string[];
143
+ labels: string[];
144
+ description: string | null;
145
+ task_list_id: string | null;
146
+ };
147
+ export declare function getTaskProps(objectId: string, workspaceId: string): Promise<AuroraTaskProps>;
148
+ export declare function updateTaskProps(objectId: string, workspaceId: string, patch: Partial<AuroraTaskProps>): Promise<void>;
149
+ export type AuroraPlanningTask = AuroraTaskProps & {
150
+ id: string;
151
+ title: string | null;
152
+ updated_at: string | null;
153
+ };
154
+ export declare function listPlanningTasks(workspaceId: string): Promise<AuroraPlanningTask[]>;
155
+ export declare function readCanvasContent(workspaceId: string, objectId: string): Promise<{
156
+ object: AuroraObjectRecord;
157
+ contentJson: Record<string, unknown> | null;
158
+ } | null>;
159
+ export declare function createPlanningTimeBlock(workspaceId: string, input: {
160
+ title: string;
161
+ dueDate: string;
162
+ labels: string[];
163
+ description: string;
164
+ }): Promise<AuroraObjectRecord>;
165
+ export {};