@roam-research/roam-tools-core 0.6.0 → 0.6.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/dist/operations/blocks.d.ts +12 -12
- 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/types.d.ts +9 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +9 -0
- package/package.json +1 -1
|
@@ -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;
|
|
46
45
|
open?: boolean | undefined;
|
|
47
46
|
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;
|
|
53
52
|
open?: boolean | undefined;
|
|
54
53
|
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;
|
|
89
88
|
sort?: "created-date" | "edited-date" | "daily-note-date" | undefined;
|
|
90
|
-
search?: string | undefined;
|
|
91
89
|
uid?: string | undefined;
|
|
92
|
-
|
|
93
|
-
offset?: number | undefined;
|
|
94
|
-
limit?: number | undefined;
|
|
90
|
+
title?: string | undefined;
|
|
95
91
|
sortOrder?: "asc" | "desc" | undefined;
|
|
96
92
|
includePath?: boolean | undefined;
|
|
93
|
+
offset?: number | undefined;
|
|
94
|
+
limit?: number | undefined;
|
|
95
|
+
maxDepth?: number | undefined;
|
|
96
|
+
search?: string | undefined;
|
|
97
97
|
}, {
|
|
98
|
-
title?: string | undefined;
|
|
99
98
|
sort?: "created-date" | "edited-date" | "daily-note-date" | undefined;
|
|
100
|
-
search?: string | undefined;
|
|
101
99
|
uid?: string | undefined;
|
|
102
|
-
|
|
103
|
-
offset?: number | undefined;
|
|
104
|
-
limit?: number | undefined;
|
|
100
|
+
title?: string | undefined;
|
|
105
101
|
sortOrder?: "asc" | "desc" | undefined;
|
|
106
102
|
includePath?: boolean | undefined;
|
|
103
|
+
offset?: number | undefined;
|
|
104
|
+
limit?: number | undefined;
|
|
105
|
+
maxDepth?: number | undefined;
|
|
106
|
+
search?: string | undefined;
|
|
107
107
|
}>;
|
|
108
108
|
export type CreateBlockParams = z.infer<typeof CreateBlockSchema>;
|
|
109
109
|
export type GetBlockParams = z.infer<typeof GetBlockSchema>;
|
|
@@ -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
|
-
base64?: string | undefined;
|
|
19
18
|
filePath?: string | undefined;
|
|
19
|
+
base64?: string | undefined;
|
|
20
20
|
mimetype?: string | undefined;
|
|
21
21
|
filename?: string | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
url?: string | undefined;
|
|
24
|
-
base64?: string | undefined;
|
|
25
24
|
filePath?: string | undefined;
|
|
25
|
+
base64?: 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
|
-
title?: string | undefined;
|
|
10
9
|
uid?: string | undefined;
|
|
11
|
-
}, {
|
|
12
10
|
title?: string | undefined;
|
|
11
|
+
}, {
|
|
13
12
|
uid?: string | undefined;
|
|
13
|
+
title?: 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?: "block" | "outline" | "mentions" | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
uid: string;
|
|
23
|
-
type?: "
|
|
23
|
+
type?: "block" | "outline" | "mentions" | 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
|
-
markdown?: string | undefined;
|
|
11
10
|
uid?: string | undefined;
|
|
11
|
+
markdown?: string | undefined;
|
|
12
12
|
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
13
13
|
}, {
|
|
14
14
|
title: string;
|
|
15
|
-
markdown?: string | undefined;
|
|
16
15
|
uid?: string | undefined;
|
|
16
|
+
markdown?: 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
|
-
title?: string | undefined;
|
|
25
24
|
uid?: string | undefined;
|
|
25
|
+
title?: string | undefined;
|
|
26
26
|
maxDepth?: number | undefined;
|
|
27
27
|
}, {
|
|
28
|
-
title?: string | undefined;
|
|
29
28
|
uid?: string | undefined;
|
|
29
|
+
title?: 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
|
-
offset?: number | undefined;
|
|
17
|
-
limit?: number | undefined;
|
|
15
|
+
query?: string | undefined;
|
|
18
16
|
sortOrder?: "asc" | "desc" | undefined;
|
|
19
17
|
includePath?: boolean | undefined;
|
|
20
|
-
|
|
18
|
+
offset?: number | undefined;
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
maxDepth?: number | undefined;
|
|
21
21
|
}, {
|
|
22
22
|
sort?: "created-date" | "edited-date" | "daily-note-date" | undefined;
|
|
23
23
|
uid?: string | undefined;
|
|
24
|
-
|
|
25
|
-
offset?: number | undefined;
|
|
26
|
-
limit?: number | undefined;
|
|
24
|
+
query?: string | undefined;
|
|
27
25
|
sortOrder?: "asc" | "desc" | undefined;
|
|
28
26
|
includePath?: boolean | undefined;
|
|
29
|
-
|
|
27
|
+
offset?: number | undefined;
|
|
28
|
+
limit?: number | undefined;
|
|
29
|
+
maxDepth?: number | 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
|
+
includePath?: boolean | undefined;
|
|
13
13
|
offset?: number | undefined;
|
|
14
14
|
limit?: number | undefined;
|
|
15
|
-
|
|
15
|
+
maxDepth?: number | undefined;
|
|
16
16
|
scope?: "pages" | "blocks" | "all" | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
query: string;
|
|
19
|
-
|
|
19
|
+
includePath?: boolean | undefined;
|
|
20
20
|
offset?: number | undefined;
|
|
21
21
|
limit?: number | undefined;
|
|
22
|
-
|
|
22
|
+
maxDepth?: number | undefined;
|
|
23
23
|
scope?: "pages" | "blocks" | "all" | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
export declare const SearchTemplatesSchema: z.ZodObject<{
|
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
|
-
type: "hosted" | "offline";
|
|
18
17
|
name: string;
|
|
18
|
+
type: "hosted" | "offline";
|
|
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
|
-
type: "hosted" | "offline";
|
|
43
42
|
name: string;
|
|
43
|
+
type: "hosted" | "offline";
|
|
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
|
-
type: "hosted" | "offline";
|
|
59
58
|
name: string;
|
|
59
|
+
type: "hosted" | "offline";
|
|
60
60
|
token: string;
|
|
61
61
|
nickname: string;
|
|
62
62
|
accessLevel?: "read-only" | "read-append" | "full" | undefined;
|
|
@@ -107,6 +107,12 @@ export declare const ErrorCodes: {
|
|
|
107
107
|
readonly GRAPH_NOT_SELECTED: "GRAPH_NOT_SELECTED";
|
|
108
108
|
readonly CONNECTION_FAILED: "CONNECTION_FAILED";
|
|
109
109
|
readonly CONFIG_TOO_NEW: "CONFIG_TOO_NEW";
|
|
110
|
+
readonly MISSING_AUTH: "MISSING_AUTH";
|
|
111
|
+
readonly INSUFFICIENT_PERMISSION: "INSUFFICIENT_PERMISSION";
|
|
112
|
+
readonly NOT_IMPLEMENTED: "NOT_IMPLEMENTED";
|
|
113
|
+
readonly GRAPH_UNSUPPORTED: "GRAPH_UNSUPPORTED";
|
|
114
|
+
readonly ACTION_NOT_AVAILABLE: "ACTION_NOT_AVAILABLE";
|
|
115
|
+
readonly PEER_NOT_READY: "PEER_NOT_READY";
|
|
110
116
|
};
|
|
111
117
|
export type ErrorCode = (typeof ErrorCodes)[keyof typeof ErrorCodes];
|
|
112
118
|
export declare class RoamError extends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AS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,aAAa,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,MAAM,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAGD,MAAM,MAAM,eAAe,GACvB;IAAE,MAAM,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,iBAAiB,CAAA;CAAE,GAC7C;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,GACrB;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,CAAC;AAO1B,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,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,6 +71,15 @@ 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 RoamCloudClient (relemma/functions_v2)
|
|
75
|
+
// against the AWS Clojure backend at proxy.api.roamresearch.com. Local does
|
|
76
|
+
// not emit these today.
|
|
77
|
+
MISSING_AUTH: "MISSING_AUTH", // 401 — WorkOS auth gate failed (no token, malformed token, or signature/issuer/audience invalid). Same agent semantics as MISSING_TOKEN; distinct for operational telemetry across transports.
|
|
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".
|
|
79
|
+
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
|
+
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
|
+
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.
|
|
82
|
+
PEER_NOT_READY: "PEER_NOT_READY", // 503 — Backend peer instance starting up. Always retryable; reads use exponential backoff (200/400/800ms × 3 attempts) before surfacing; writes throw immediately (non-idempotent).
|
|
74
83
|
};
|
|
75
84
|
// Custom error class with error code and optional context
|
|
76
85
|
export class RoamError extends Error {
|