@roam-research/roam-tools-core 0.6.3 → 0.6.5
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 +3 -3
- package/dist/operations/blocks.d.ts +12 -12
- package/dist/operations/blocks.d.ts.map +1 -1
- package/dist/operations/blocks.js +4 -1
- package/dist/operations/files.d.ts +2 -2
- package/dist/operations/navigation.d.ts +4 -4
- package/dist/operations/pages.d.ts +4 -4
- package/dist/operations/query.d.ts +8 -8
- package/dist/operations/search.d.ts +4 -4
- package/dist/tools.d.ts +2 -2
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +5 -4
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -5
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# @roam-research/roam-tools-core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The official transport-agnostic core for Roam Research's MCP and CLI tools. Provides the tool registry, schemas, operation functions, and dispatch — but no transport.
|
|
4
4
|
|
|
5
5
|
> **Most users don't want this package directly.** If you want to connect an AI assistant to Roam, install [`@roam-research/roam-mcp`](https://www.npmjs.com/package/@roam-research/roam-mcp). For the command line, install [`@roam-research/roam-cli`](https://www.npmjs.com/package/@roam-research/roam-cli). Both wrap the local Roam Desktop transport ([`@roam-research/roam-tools-local`](https://www.npmjs.com/package/@roam-research/roam-tools-local)) which depends on this package.
|
|
6
6
|
|
|
7
7
|
## Who is this for?
|
|
8
8
|
|
|
9
|
-
This package is for **hosted MCP transports** that talk to Roam through a different backend (e.g.,
|
|
9
|
+
This package is for **hosted MCP transports** that talk to Roam through a different backend (e.g., an authenticated proxy) and want to reuse the same tool registry, Zod schemas, and operation functions without dragging in the local Roam Desktop client or the `~/.roam-tools.json` config reader.
|
|
10
10
|
|
|
11
11
|
## What's in here
|
|
12
12
|
|
|
@@ -25,7 +25,7 @@ This package is for **hosted MCP transports** that talk to Roam through a differ
|
|
|
25
25
|
- `connect` interactive setup — also in `@roam-research/roam-tools-local`.
|
|
26
26
|
- The `list_graphs` and `setup_new_graph` standalone tools — also local.
|
|
27
27
|
|
|
28
|
-
Hosted consumers reimplement these (or substitute their own equivalents — e.g., reading
|
|
28
|
+
Hosted consumers reimplement these (or substitute their own equivalents — e.g., reading grants from a remote store) and inject them via `routeToolCall`'s options.
|
|
29
29
|
|
|
30
30
|
## Documentation
|
|
31
31
|
|
|
@@ -42,16 +42,16 @@ export declare const UpdateBlockSchema: z.ZodObject<{
|
|
|
42
42
|
}, "strip", z.ZodTypeAny, {
|
|
43
43
|
uid: string;
|
|
44
44
|
string?: string | undefined;
|
|
45
|
+
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
45
46
|
open?: boolean | undefined;
|
|
46
47
|
heading?: number | undefined;
|
|
47
|
-
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
48
48
|
textAlign?: "left" | "center" | "right" | "justify" | undefined;
|
|
49
49
|
}, {
|
|
50
50
|
uid: string;
|
|
51
51
|
string?: string | undefined;
|
|
52
|
+
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
52
53
|
open?: boolean | undefined;
|
|
53
54
|
heading?: number | undefined;
|
|
54
|
-
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
55
55
|
textAlign?: "left" | "center" | "right" | "justify" | undefined;
|
|
56
56
|
}>;
|
|
57
57
|
export declare const DeleteBlockSchema: z.ZodObject<{
|
|
@@ -85,25 +85,25 @@ export declare const GetBacklinksSchema: z.ZodObject<{
|
|
|
85
85
|
includePath: z.ZodOptional<z.ZodBoolean>;
|
|
86
86
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
87
87
|
}, "strip", z.ZodTypeAny, {
|
|
88
|
+
title?: string | undefined;
|
|
88
89
|
sort?: "created-date" | "edited-date" | "daily-note-date" | undefined;
|
|
90
|
+
search?: string | undefined;
|
|
89
91
|
uid?: string | undefined;
|
|
90
|
-
|
|
91
|
-
sortOrder?: "asc" | "desc" | undefined;
|
|
92
|
-
includePath?: boolean | undefined;
|
|
92
|
+
maxDepth?: number | undefined;
|
|
93
93
|
offset?: number | undefined;
|
|
94
94
|
limit?: number | undefined;
|
|
95
|
-
|
|
96
|
-
|
|
95
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
96
|
+
includePath?: boolean | undefined;
|
|
97
97
|
}, {
|
|
98
|
+
title?: string | undefined;
|
|
98
99
|
sort?: "created-date" | "edited-date" | "daily-note-date" | undefined;
|
|
100
|
+
search?: string | undefined;
|
|
99
101
|
uid?: string | undefined;
|
|
100
|
-
|
|
101
|
-
sortOrder?: "asc" | "desc" | undefined;
|
|
102
|
-
includePath?: boolean | undefined;
|
|
102
|
+
maxDepth?: number | undefined;
|
|
103
103
|
offset?: number | undefined;
|
|
104
104
|
limit?: number | undefined;
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
106
|
+
includePath?: boolean | undefined;
|
|
107
107
|
}>;
|
|
108
108
|
export type CreateBlockParams = z.infer<typeof CreateBlockSchema>;
|
|
109
109
|
export type GetBlockParams = z.infer<typeof GetBlockSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/operations/blocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAoB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAItF,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;EA+B5B,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;;;;;EAMzB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../src/operations/blocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE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,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B;AAED,wBAAsB,UAAU,CAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,cAAc,CAAC,CA0BzB;AAED,wBAAsB,WAAW,CAC/B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,cAAc,CAAC,CAMzB"}
|
|
@@ -34,7 +34,10 @@ export const GetBlockSchema = z.object({
|
|
|
34
34
|
});
|
|
35
35
|
export const UpdateBlockSchema = z.object({
|
|
36
36
|
uid: z.string().describe("Block UID"),
|
|
37
|
-
string: z
|
|
37
|
+
string: z
|
|
38
|
+
.string()
|
|
39
|
+
.optional()
|
|
40
|
+
.describe("New literal text for this block (the Roam block string, including inline markup like **bold**, [[links]], ((refs))). Set as-is — NOT parsed into nested child blocks. Updates this one block only."),
|
|
38
41
|
open: z.boolean().optional().describe("Collapse state"),
|
|
39
42
|
heading: z.coerce.number().optional().describe("Heading level (0-3)"),
|
|
40
43
|
childrenViewType: z
|
|
@@ -15,14 +15,14 @@ export declare const FileUploadSchema: z.ZodObject<{
|
|
|
15
15
|
filename: z.ZodOptional<z.ZodString>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
17
|
url?: string | undefined;
|
|
18
|
-
filePath?: string | undefined;
|
|
19
18
|
base64?: string | undefined;
|
|
19
|
+
filePath?: string | undefined;
|
|
20
20
|
mimetype?: string | undefined;
|
|
21
21
|
filename?: string | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
url?: string | undefined;
|
|
24
|
-
filePath?: string | undefined;
|
|
25
24
|
base64?: string | undefined;
|
|
25
|
+
filePath?: string | undefined;
|
|
26
26
|
mimetype?: string | undefined;
|
|
27
27
|
filename?: string | undefined;
|
|
28
28
|
}>;
|
|
@@ -6,21 +6,21 @@ export declare const OpenMainWindowSchema: z.ZodObject<{
|
|
|
6
6
|
uid: z.ZodOptional<z.ZodString>;
|
|
7
7
|
title: z.ZodOptional<z.ZodString>;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
|
-
uid?: string | undefined;
|
|
10
9
|
title?: string | undefined;
|
|
11
|
-
}, {
|
|
12
10
|
uid?: string | undefined;
|
|
11
|
+
}, {
|
|
13
12
|
title?: string | undefined;
|
|
13
|
+
uid?: string | undefined;
|
|
14
14
|
}>;
|
|
15
15
|
export declare const OpenSidebarSchema: z.ZodObject<{
|
|
16
16
|
uid: z.ZodString;
|
|
17
17
|
type: z.ZodOptional<z.ZodEnum<["block", "outline", "mentions"]>>;
|
|
18
18
|
}, "strip", z.ZodTypeAny, {
|
|
19
19
|
uid: string;
|
|
20
|
-
type?: "
|
|
20
|
+
type?: "mentions" | "block" | "outline" | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
uid: string;
|
|
23
|
-
type?: "
|
|
23
|
+
type?: "mentions" | "block" | "outline" | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
export type OpenMainWindowParams = z.infer<typeof OpenMainWindowSchema>;
|
|
26
26
|
export type OpenSidebarParams = z.infer<typeof OpenSidebarSchema>;
|
|
@@ -7,13 +7,13 @@ export declare const CreatePageSchema: z.ZodObject<{
|
|
|
7
7
|
childrenViewType: z.ZodOptional<z.ZodEnum<["document", "bullet", "numbered"]>>;
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
9
|
title: string;
|
|
10
|
-
uid?: string | undefined;
|
|
11
10
|
markdown?: string | undefined;
|
|
11
|
+
uid?: string | undefined;
|
|
12
12
|
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
13
13
|
}, {
|
|
14
14
|
title: string;
|
|
15
|
-
uid?: string | undefined;
|
|
16
15
|
markdown?: string | undefined;
|
|
16
|
+
uid?: string | undefined;
|
|
17
17
|
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
18
18
|
}>;
|
|
19
19
|
export declare const GetPageSchema: z.ZodObject<{
|
|
@@ -21,12 +21,12 @@ export declare const GetPageSchema: z.ZodObject<{
|
|
|
21
21
|
uid: z.ZodOptional<z.ZodString>;
|
|
22
22
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
uid?: string | undefined;
|
|
25
24
|
title?: string | undefined;
|
|
25
|
+
uid?: string | undefined;
|
|
26
26
|
maxDepth?: number | undefined;
|
|
27
27
|
}, {
|
|
28
|
-
uid?: string | undefined;
|
|
29
28
|
title?: string | undefined;
|
|
29
|
+
uid?: string | undefined;
|
|
30
30
|
maxDepth?: number | undefined;
|
|
31
31
|
}>;
|
|
32
32
|
export declare const DeletePageSchema: z.ZodObject<{
|
|
@@ -12,21 +12,21 @@ export declare const QuerySchema: z.ZodObject<{
|
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
13
|
sort?: "created-date" | "edited-date" | "daily-note-date" | undefined;
|
|
14
14
|
uid?: string | undefined;
|
|
15
|
-
|
|
16
|
-
sortOrder?: "asc" | "desc" | undefined;
|
|
17
|
-
includePath?: boolean | undefined;
|
|
15
|
+
maxDepth?: number | undefined;
|
|
18
16
|
offset?: number | undefined;
|
|
19
17
|
limit?: number | undefined;
|
|
20
|
-
|
|
18
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
19
|
+
includePath?: boolean | undefined;
|
|
20
|
+
query?: string | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
sort?: "created-date" | "edited-date" | "daily-note-date" | undefined;
|
|
23
23
|
uid?: string | undefined;
|
|
24
|
-
|
|
25
|
-
sortOrder?: "asc" | "desc" | undefined;
|
|
26
|
-
includePath?: boolean | undefined;
|
|
24
|
+
maxDepth?: number | undefined;
|
|
27
25
|
offset?: number | undefined;
|
|
28
26
|
limit?: number | undefined;
|
|
29
|
-
|
|
27
|
+
sortOrder?: "asc" | "desc" | undefined;
|
|
28
|
+
includePath?: boolean | undefined;
|
|
29
|
+
query?: string | undefined;
|
|
30
30
|
}>;
|
|
31
31
|
export type QueryParams = z.infer<typeof QuerySchema>;
|
|
32
32
|
export declare function query(client: RoamActionClient, params: QueryParams): Promise<CallToolResult>;
|
|
@@ -9,17 +9,17 @@ export declare const SearchSchema: z.ZodObject<{
|
|
|
9
9
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
query: string;
|
|
12
|
-
|
|
12
|
+
maxDepth?: number | undefined;
|
|
13
13
|
offset?: number | undefined;
|
|
14
14
|
limit?: number | undefined;
|
|
15
|
-
|
|
15
|
+
includePath?: boolean | undefined;
|
|
16
16
|
scope?: "pages" | "blocks" | "all" | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
query: string;
|
|
19
|
-
|
|
19
|
+
maxDepth?: number | undefined;
|
|
20
20
|
offset?: number | undefined;
|
|
21
21
|
limit?: number | undefined;
|
|
22
|
-
|
|
22
|
+
includePath?: boolean | undefined;
|
|
23
23
|
scope?: "pages" | "blocks" | "all" | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
export declare const SearchTemplatesSchema: z.ZodObject<{
|
package/dist/tools.d.ts
CHANGED
|
@@ -26,13 +26,13 @@ export interface RouteToolCallOptions {
|
|
|
26
26
|
/**
|
|
27
27
|
* Resolve a graph identifier (nickname/name) to a ToolGraph. Required.
|
|
28
28
|
* Local consumers use the resolver from @roam-research/roam-tools-local;
|
|
29
|
-
* hosted consumers wire their own (e.g., reading
|
|
29
|
+
* hosted consumers wire their own (e.g., reading grants from their own store).
|
|
30
30
|
*/
|
|
31
31
|
resolveGraph: (providedGraph?: string) => Promise<ToolGraph>;
|
|
32
32
|
/**
|
|
33
33
|
* Construct a client for the resolved graph. Required.
|
|
34
34
|
* Local consumers return a RoamClient; hosted consumers return a transport
|
|
35
|
-
* that talks to
|
|
35
|
+
* that talks to their own backend.
|
|
36
36
|
*/
|
|
37
37
|
createClient: (graph: ToolGraph) => Promise<RoamActionClient> | RoamActionClient;
|
|
38
38
|
/**
|
package/dist/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,cAAc,EAEd,WAAW,EACX,gBAAgB,EAChB,SAAS,EAEV,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EACV,cAAc,EAEd,WAAW,EACX,gBAAgB,EAChB,SAAS,EAEV,MAAM,YAAY,CAAC;AA2EpB,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IACnC,MAAM,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7E,IAAI,EAAE,QAAQ,CAAC;CAChB;AAGD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC;IACnC,MAAM,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;IACnD,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG,wBAAwB,CAAC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AG,MAAM,CAAC;IACtC;;;OAGG;IACH,mBAAmB,CAAC,EAAE,CACpB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE;QAAE,WAAW,CAAC,EAAE,WAAW,CAAC;QAAC,oBAAoB,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;KAAE,KAC9E,OAAO,CAAC,IAAI,CAAC,CAAC;CACpB;AAED,wBAAsB,aAAa,CACjC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,EAAE,oBAAoB,GAC5B,OAAO,CAAC,cAAc,CAAC,CAqIzB"}
|
package/dist/tools.js
CHANGED
|
@@ -12,7 +12,7 @@ const GraphSchema = z.object({
|
|
|
12
12
|
graph: z
|
|
13
13
|
.string()
|
|
14
14
|
.optional()
|
|
15
|
-
.describe("Graph nickname or name
|
|
15
|
+
.describe("Graph to act on, by nickname or name. Optional — if only one graph is available, it is used automatically."),
|
|
16
16
|
});
|
|
17
17
|
// Helper to extend any schema with graph parameter
|
|
18
18
|
function withGraph(schema) {
|
|
@@ -39,14 +39,15 @@ export function defineStandaloneTool(name, description, schema, action) {
|
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
41
|
// Note appended to all client tool descriptions
|
|
42
|
-
const GUIDELINES_NOTE = "\n\
|
|
42
|
+
const GUIDELINES_NOTE = "\n\n(If you haven't fetched this graph's guidelines yet, call get_graph_guidelines — they may change how to handle this operation.)";
|
|
43
43
|
// Data Tools (require graph/client; reusable across local + hosted MCP transports)
|
|
44
44
|
export const dataTools = [
|
|
45
|
-
defineTool("get_graph_guidelines", "
|
|
45
|
+
defineTool("get_graph_guidelines", "Returns this graph's agent-facing setup: naming conventions, structural preferences, orientation actions, and any constraints the user has explicitly recorded for AI agents. Call once per graph per session before reading or writing content — skipping it means operating on assumptions the user has already overridden, so your work will likely need to be redone. The `nextSteps` field in the response lists orientation actions to take before proceeding.", GetGuidelinesSchema, getGuidelines),
|
|
46
46
|
defineTool("create_page", "Create a new page in Roam, optionally with markdown content." + GUIDELINES_NOTE, CreatePageSchema, createPage),
|
|
47
47
|
defineTool("create_block", "Create blocks from markdown content. Target by parentUid, pageTitle, or dailyNotePage (page created if needed). Use nestUnder to insert under a specific child block. Supports nested bulleted lists via markdown indentation." +
|
|
48
48
|
GUIDELINES_NOTE, CreateBlockSchema, createBlock),
|
|
49
|
-
defineTool("update_block", "Update
|
|
49
|
+
defineTool("update_block", "Update a single existing block's text and display properties (heading, collapse, alignment, children view type). Affects only the block with `uid`: `string` sets that block's literal text — it is NOT expanded into child blocks (unlike create_block/create_page), and the block's existing children are left untouched. To add or restructure children, use create_block / move_block / delete_block." +
|
|
50
|
+
GUIDELINES_NOTE, UpdateBlockSchema, updateBlock),
|
|
50
51
|
defineTool("delete_block", "Delete a block and all its children." + GUIDELINES_NOTE, DeleteBlockSchema, deleteBlock),
|
|
51
52
|
defineTool("move_block", "Move a block to a new location." + GUIDELINES_NOTE, MoveBlockSchema, moveBlock),
|
|
52
53
|
defineTool("add_comment", "Add a comment to a block (comment thread, NOT a child block). Prefer `comment` for simple text; use `commentMarkdown` for structured content. Same-day calls on the same block append to your existing comment." +
|
package/dist/types.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export declare const GraphConfigSchema: z.ZodObject<{
|
|
|
14
14
|
accessLevel: z.ZodOptional<z.ZodEnum<["read-only", "read-append", "full"]>>;
|
|
15
15
|
lastKnownTokenStatus: z.ZodOptional<z.ZodEnum<["active", "revoked"]>>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
name: string;
|
|
18
17
|
type: "hosted" | "offline";
|
|
18
|
+
name: string;
|
|
19
19
|
token: string;
|
|
20
20
|
nickname: string;
|
|
21
21
|
accessLevel?: "read-only" | "read-append" | "full" | undefined;
|
|
@@ -39,8 +39,8 @@ export declare const RoamMcpConfigSchema: z.ZodObject<{
|
|
|
39
39
|
accessLevel: z.ZodOptional<z.ZodEnum<["read-only", "read-append", "full"]>>;
|
|
40
40
|
lastKnownTokenStatus: z.ZodOptional<z.ZodEnum<["active", "revoked"]>>;
|
|
41
41
|
}, "strip", z.ZodTypeAny, {
|
|
42
|
-
name: string;
|
|
43
42
|
type: "hosted" | "offline";
|
|
43
|
+
name: string;
|
|
44
44
|
token: string;
|
|
45
45
|
nickname: string;
|
|
46
46
|
accessLevel?: "read-only" | "read-append" | "full" | undefined;
|
|
@@ -55,8 +55,8 @@ export declare const RoamMcpConfigSchema: z.ZodObject<{
|
|
|
55
55
|
}>, "many">;
|
|
56
56
|
}, "strip", z.ZodTypeAny, {
|
|
57
57
|
graphs: {
|
|
58
|
-
name: string;
|
|
59
58
|
type: "hosted" | "offline";
|
|
59
|
+
name: string;
|
|
60
60
|
token: string;
|
|
61
61
|
nickname: string;
|
|
62
62
|
accessLevel?: "read-only" | "read-append" | "full" | undefined;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACpG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,wBAAgB,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAGzD;AAGD,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,cAAc,CAE1E;AAGD,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAE3D;AAOD,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,CAAC;AAG7C,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,MAAM,CAAC;AAM/D,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;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EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,YAAY,CAAC,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC;CAC3C"}
|
package/dist/types.js
CHANGED
|
@@ -71,11 +71,10 @@ export const ErrorCodes = {
|
|
|
71
71
|
GRAPH_NOT_SELECTED: "GRAPH_NOT_SELECTED",
|
|
72
72
|
CONNECTION_FAILED: "CONNECTION_FAILED",
|
|
73
73
|
CONFIG_TOO_NEW: "CONFIG_TOO_NEW",
|
|
74
|
-
// Cloud-transport codes — emitted by
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
|
|
78
|
-
INSUFFICIENT_PERMISSION: "INSUFFICIENT_PERMISSION", // 403 — Picker grant existed in RTDB but Roam-side graph access has been revoked since (firebase.graph/readable? or writeable? returned false). Distinct from TOKEN_NOT_FOUND ("never authorized"): INSUFFICIENT_PERMISSION = "ask user to re-grant"; TOKEN_NOT_FOUND = "pick a different graph or grant fresh access".
|
|
74
|
+
// Cloud-transport codes — emitted by the hosted client against its own
|
|
75
|
+
// backend. Local does not emit these today.
|
|
76
|
+
MISSING_AUTH: "MISSING_AUTH", // 401 — Hosted auth gate failed (no token, malformed token, or invalid signature/issuer/audience). Same agent semantics as MISSING_TOKEN; distinct for operational telemetry across transports.
|
|
77
|
+
INSUFFICIENT_PERMISSION: "INSUFFICIENT_PERMISSION", // 403 — A prior grant existed but Roam-side graph access has been revoked since. Distinct from TOKEN_NOT_FOUND ("never authorized"): INSUFFICIENT_PERMISSION = "ask user to re-grant"; TOKEN_NOT_FOUND = "pick a different graph or grant fresh access".
|
|
79
78
|
NOT_IMPLEMENTED: "NOT_IMPLEMENTED", // 501 — Action recognized in dispatch but handler not yet wired (Phase 3 backlog). Distinct from ACTION_NOT_AVAILABLE: NOT_IMPLEMENTED implies "will work eventually"; ACTION_NOT_AVAILABLE implies "not available on this transport, period".
|
|
80
79
|
GRAPH_UNSUPPORTED: "GRAPH_UNSUPPORTED", // 400 — Encrypted graph rejection (backend can't decrypt). Agent should not retry; instruct user the graph type isn't supported via cloud transport.
|
|
81
80
|
ACTION_NOT_AVAILABLE: "ACTION_NOT_AVAILABLE", // 501 — Action symbol absent from cloud's dispatch entirely (typo OR action like file.upload that's local-only and intentionally not on cloud). Same agent semantics as UNKNOWN_ACTION (which is local-API 404); distinct for operational telemetry across transports.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roam-research/roam-tools-core",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.6.5",
|
|
4
|
+
"description": "Official transport-agnostic core for Roam Research MCP and CLI tools",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/Roam-Research/roam-tools.git",
|