@roam-research/roam-tools-core 0.5.1 → 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/README.md +23 -8
- package/dist/index.d.ts +3 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/operations/blocks.d.ts +21 -22
- package/dist/operations/blocks.d.ts.map +1 -1
- package/dist/operations/datalog.d.ts +2 -3
- package/dist/operations/datalog.d.ts.map +1 -1
- package/dist/operations/files.d.ts +6 -7
- package/dist/operations/files.d.ts.map +1 -1
- package/dist/operations/navigation.d.ts +9 -10
- package/dist/operations/navigation.d.ts.map +1 -1
- package/dist/operations/pages.d.ts +10 -11
- package/dist/operations/pages.d.ts.map +1 -1
- package/dist/operations/query.d.ts +10 -11
- package/dist/operations/query.d.ts.map +1 -1
- package/dist/operations/search.d.ts +7 -8
- package/dist/operations/search.d.ts.map +1 -1
- package/dist/tools.d.ts +37 -4
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +47 -52
- package/dist/types.d.ts +17 -10
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +9 -0
- package/package.json +7 -10
- package/dist/client.d.ts +0 -34
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -275
- package/dist/connect.d.ts +0 -10
- package/dist/connect.d.ts.map +0 -1
- package/dist/connect.js +0 -475
- package/dist/graph-resolver.d.ts +0 -54
- package/dist/graph-resolver.d.ts.map +0 -1
- package/dist/graph-resolver.js +0 -339
- package/dist/operations/graphs.d.ts +0 -26
- package/dist/operations/graphs.d.ts.map +0 -1
- package/dist/operations/graphs.js +0 -213
- package/dist/roam-api.d.ts +0 -32
- package/dist/roam-api.d.ts.map +0 -1
- package/dist/roam-api.js +0 -50
package/README.md
CHANGED
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
# @roam-research/roam-tools-core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Transport-agnostic core for Roam Research 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
|
+
|
|
7
|
+
## Who is this for?
|
|
8
|
+
|
|
9
|
+
This package is for **hosted MCP transports** that talk to Roam through a different backend (e.g., a WorkOS-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.
|
|
6
10
|
|
|
7
11
|
## What's in here
|
|
8
12
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
13
|
+
- `RoamActionClient` — structural client interface (`call()` + optional `getTokenInfo()`). Bring your own implementation.
|
|
14
|
+
- `routeToolCall(name, args, options)` — central dispatcher. **Requires** `options.resolveGraph` and `options.createClient`. Optional: `tokenInfoMode`, `onTokenStatusUpdate`.
|
|
15
|
+
- `ToolGraph` / `ResolvedGraph` — cross-transport graph identity types.
|
|
16
|
+
- Tool registry: `dataTools` (graph content, reusable across transports), `desktopUiTools` (file ops + window/selection — local-only), `contentTools` (the union), `tools` (alias of contentTools at this layer).
|
|
17
|
+
- Helpers: `defineTool`, `defineStandaloneTool`, `findTool`.
|
|
18
|
+
- Operations: page, block, search, query, datalog, navigation, files (all transport-agnostic — they only call `client.call(...)`).
|
|
19
|
+
- Types and schemas: `GraphConfigSchema`, `RoamMcpConfigSchema`, `RoamError`, `ErrorCodes`, `EXPECTED_API_VERSION`, etc.
|
|
20
|
+
|
|
21
|
+
## What's NOT in here
|
|
22
|
+
|
|
23
|
+
- `RoamClient` — the local Roam Desktop transport, in `@roam-research/roam-tools-local`.
|
|
24
|
+
- `~/.roam-tools.json` reader (`getPort`, `resolveGraph`, `getMcpConfig`, etc.) — also in `@roam-research/roam-tools-local`.
|
|
25
|
+
- `connect` interactive setup — also in `@roam-research/roam-tools-local`.
|
|
26
|
+
- The `list_graphs` and `setup_new_graph` standalone tools — also local.
|
|
27
|
+
|
|
28
|
+
Hosted consumers reimplement these (or substitute their own equivalents — e.g., reading picker grants from a remote store) and inject them via `routeToolCall`'s options.
|
|
14
29
|
|
|
15
30
|
## Documentation
|
|
16
31
|
|
|
17
|
-
See the [main repository](https://github.com/Roam-Research/roam-tools) for full documentation.
|
|
32
|
+
See the [main repository](https://github.com/Roam-Research/roam-tools) for full documentation, including the architecture rationale and the integration pattern.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
export type { CallToolResult, TextContent, ImageContent, GraphType, AccessLevel, GraphConfig, RoamMcpConfig, ResolvedGraph, ErrorCode, RoamApiError, RoamResponse,
|
|
1
|
+
export type { CallToolResult, TextContent, ImageContent, GraphType, AccessLevel, GraphConfig, RoamMcpConfig, ToolGraph, ResolvedGraph, RoamActionClient, ErrorCode, RoamApiError, RoamResponse, Block, Page, BlockLocation, WindowType, SidebarWindow, SidebarWindowInfo, FocusedBlock, SelectedBlock, MainWindowViewType, MainWindowView, SearchResultPath, SearchResult, SearchResponse, RecentlyOpenedBlock, RecentlyOpenedItem, DailyNotePagesViewItem, RecentlyEditedPage, SearchSuggestionsResponse, SearchTemplatesResponse, GetPageResponse, GetBlockResponse, Template, QueryResult, QueryResponse, TokenInfoResponse, TokenInfoResult, } from "./types.js";
|
|
2
2
|
export { GraphConfigSchema, RoamMcpConfigSchema, ErrorCodes, RoamError, CONFIG_VERSION, EXPECTED_API_VERSION, textResult, imageResult, errorResult, getErrorMessage, } from "./types.js";
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export { fetchAvailableGraphs, requestToken, sleep, openRoamApp, slugify } from "./roam-api.js";
|
|
6
|
-
export type { AvailableGraph, GraphsResponse, TokenExchangeResponse } from "./roam-api.js";
|
|
7
|
-
export { tools, findTool, routeToolCall } from "./tools.js";
|
|
8
|
-
export type { ToolDefinition, ClientToolDefinition, StandaloneToolDefinition } from "./tools.js";
|
|
3
|
+
export { tools, findTool, routeToolCall, contentTools, dataTools, desktopUiTools, defineTool, defineStandaloneTool, } from "./tools.js";
|
|
4
|
+
export type { ToolDefinition, ClientToolDefinition, StandaloneToolDefinition, RouteToolCallOptions, } from "./tools.js";
|
|
9
5
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AASA,YAAY,EACV,cAAc,EACd,WAAW,EACX,YAAY,EACZ,SAAS,EACT,WAAW,EACX,WAAW,EACX,aAAa,EACb,SAAS,EACT,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,KAAK,EACL,IAAI,EACJ,aAAa,EACb,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,EACtB,kBAAkB,EAClB,yBAAyB,EACzB,uBAAuB,EACvB,eAAe,EACf,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,SAAS,EACT,cAAc,EACd,oBAAoB,EACpB,UAAU,EACV,WAAW,EACX,WAAW,EACX,eAAe,GAChB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,KAAK,EACL,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,SAAS,EACT,cAAc,EACd,UAAU,EACV,oBAAoB,GACrB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// Barrel export for @roam-research/roam-tools-core
|
|
2
|
+
//
|
|
3
|
+
// Core is transport-agnostic — it does NOT export RoamClient, the
|
|
4
|
+
// ~/.roam-tools.json reader, or the connect command. Those live in
|
|
5
|
+
// @roam-research/roam-tools-local. Hosted MCP transports depend on this
|
|
6
|
+
// package directly and supply their own resolveGraph + createClient via
|
|
7
|
+
// routeToolCall's options.
|
|
2
8
|
export { GraphConfigSchema, RoamMcpConfigSchema, ErrorCodes, RoamError, CONFIG_VERSION, EXPECTED_API_VERSION, textResult, imageResult, errorResult, getErrorMessage, } from "./types.js";
|
|
3
|
-
//
|
|
4
|
-
export {
|
|
5
|
-
// Graph resolution and config management
|
|
6
|
-
export { getPort, resolveGraph, saveGraphToConfig, removeGraphFromConfig, updateGraphTokenStatus, getConfiguredGraphsSafe, getConfiguredGraphs, findGraphConfig, getMcpConfig, getOpenGraphs, } from "./graph-resolver.js";
|
|
7
|
-
// Shared Roam API functions
|
|
8
|
-
export { fetchAvailableGraphs, requestToken, sleep, openRoamApp, slugify } from "./roam-api.js";
|
|
9
|
-
// Tool definitions and routing
|
|
10
|
-
export { tools, findTool, routeToolCall } from "./tools.js";
|
|
9
|
+
// Tool definitions, helpers, and routing
|
|
10
|
+
export { tools, findTool, routeToolCall, contentTools, dataTools, desktopUiTools, defineTool, defineStandaloneTool, } from "./tools.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type {
|
|
3
|
-
import type { CallToolResult } from "../types.js";
|
|
2
|
+
import type { CallToolResult, RoamActionClient } from "../types.js";
|
|
4
3
|
export declare const CreateBlockSchema: z.ZodObject<{
|
|
5
4
|
parentUid: z.ZodOptional<z.ZodString>;
|
|
6
5
|
pageTitle: z.ZodOptional<z.ZodString>;
|
|
@@ -43,16 +42,16 @@ export declare const UpdateBlockSchema: z.ZodObject<{
|
|
|
43
42
|
}, "strip", z.ZodTypeAny, {
|
|
44
43
|
uid: string;
|
|
45
44
|
string?: string | undefined;
|
|
46
|
-
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
47
45
|
open?: boolean | undefined;
|
|
48
46
|
heading?: number | undefined;
|
|
47
|
+
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
49
48
|
textAlign?: "left" | "center" | "right" | "justify" | undefined;
|
|
50
49
|
}, {
|
|
51
50
|
uid: string;
|
|
52
51
|
string?: string | undefined;
|
|
53
|
-
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
54
52
|
open?: boolean | undefined;
|
|
55
53
|
heading?: number | undefined;
|
|
54
|
+
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
56
55
|
textAlign?: "left" | "center" | "right" | "justify" | undefined;
|
|
57
56
|
}>;
|
|
58
57
|
export declare const DeleteBlockSchema: z.ZodObject<{
|
|
@@ -86,25 +85,25 @@ export declare const GetBacklinksSchema: z.ZodObject<{
|
|
|
86
85
|
includePath: z.ZodOptional<z.ZodBoolean>;
|
|
87
86
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
88
87
|
}, "strip", z.ZodTypeAny, {
|
|
89
|
-
title?: string | undefined;
|
|
90
88
|
sort?: "created-date" | "edited-date" | "daily-note-date" | undefined;
|
|
91
|
-
search?: string | undefined;
|
|
92
89
|
uid?: string | undefined;
|
|
93
|
-
|
|
94
|
-
offset?: number | undefined;
|
|
95
|
-
limit?: number | undefined;
|
|
90
|
+
title?: string | undefined;
|
|
96
91
|
sortOrder?: "asc" | "desc" | undefined;
|
|
97
92
|
includePath?: boolean | undefined;
|
|
93
|
+
offset?: number | undefined;
|
|
94
|
+
limit?: number | undefined;
|
|
95
|
+
maxDepth?: number | undefined;
|
|
96
|
+
search?: string | undefined;
|
|
98
97
|
}, {
|
|
99
|
-
title?: string | undefined;
|
|
100
98
|
sort?: "created-date" | "edited-date" | "daily-note-date" | undefined;
|
|
101
|
-
search?: string | undefined;
|
|
102
99
|
uid?: string | undefined;
|
|
103
|
-
|
|
104
|
-
offset?: number | undefined;
|
|
105
|
-
limit?: number | undefined;
|
|
100
|
+
title?: string | undefined;
|
|
106
101
|
sortOrder?: "asc" | "desc" | undefined;
|
|
107
102
|
includePath?: boolean | undefined;
|
|
103
|
+
offset?: number | undefined;
|
|
104
|
+
limit?: number | undefined;
|
|
105
|
+
maxDepth?: number | undefined;
|
|
106
|
+
search?: string | undefined;
|
|
108
107
|
}>;
|
|
109
108
|
export type CreateBlockParams = z.infer<typeof CreateBlockSchema>;
|
|
110
109
|
export type GetBlockParams = z.infer<typeof GetBlockSchema>;
|
|
@@ -127,12 +126,12 @@ export interface GetBacklinksResponse {
|
|
|
127
126
|
total: number;
|
|
128
127
|
results: BacklinkResult[];
|
|
129
128
|
}
|
|
130
|
-
export declare function createBlock(client:
|
|
131
|
-
export declare function getBlock(client:
|
|
132
|
-
export declare function updateBlock(client:
|
|
133
|
-
export declare function deleteBlock(client:
|
|
134
|
-
export declare function moveBlock(client:
|
|
135
|
-
export declare function getBacklinks(client:
|
|
129
|
+
export declare function createBlock(client: RoamActionClient, params: CreateBlockParams): Promise<CallToolResult>;
|
|
130
|
+
export declare function getBlock(client: RoamActionClient, params: GetBlockParams): Promise<CallToolResult>;
|
|
131
|
+
export declare function updateBlock(client: RoamActionClient, params: UpdateBlockParams): Promise<CallToolResult>;
|
|
132
|
+
export declare function deleteBlock(client: RoamActionClient, params: DeleteBlockParams): Promise<CallToolResult>;
|
|
133
|
+
export declare function moveBlock(client: RoamActionClient, params: MoveBlockParams): Promise<CallToolResult>;
|
|
134
|
+
export declare function getBacklinks(client: RoamActionClient, params: GetBacklinksParams): Promise<CallToolResult>;
|
|
136
135
|
export declare const AddCommentSchema: z.ZodObject<{
|
|
137
136
|
blockUid: z.ZodString;
|
|
138
137
|
comment: z.ZodOptional<z.ZodString>;
|
|
@@ -171,6 +170,6 @@ export interface GetCommentsResponse {
|
|
|
171
170
|
total: number;
|
|
172
171
|
comments: CommentResult[];
|
|
173
172
|
}
|
|
174
|
-
export declare function addComment(client:
|
|
175
|
-
export declare function getComments(client:
|
|
173
|
+
export declare function addComment(client: RoamActionClient, params: AddCommentParams): Promise<CallToolResult>;
|
|
174
|
+
export declare function getComments(client: RoamActionClient, params: GetCommentsParams): Promise<CallToolResult>;
|
|
176
175
|
//# sourceMappingURL=blocks.d.ts.map
|
|
@@ -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,
|
|
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;;;;;;;;;;;;;;;;;;;;;EAU5B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;EAE5B,CAAC;AAEH,eAAO,MAAM,eAAe;;;;;;;;;;;;EAM1B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsB7B,CAAC;AAGH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KA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} from "../types.js";
|
|
2
|
+
import type { CallToolResult, RoamActionClient } from "../types.js";
|
|
4
3
|
export declare const DatalogQuerySchema: z.ZodObject<{
|
|
5
4
|
query: z.ZodString;
|
|
6
5
|
inputs: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
|
|
@@ -12,5 +11,5 @@ export declare const DatalogQuerySchema: z.ZodObject<{
|
|
|
12
11
|
inputs?: unknown[] | undefined;
|
|
13
12
|
}>;
|
|
14
13
|
export type DatalogQueryParams = z.infer<typeof DatalogQuerySchema>;
|
|
15
|
-
export declare function datalogQuery(client:
|
|
14
|
+
export declare function datalogQuery(client: RoamActionClient, params: DatalogQueryParams): Promise<CallToolResult>;
|
|
16
15
|
//# sourceMappingURL=datalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datalog.d.ts","sourceRoot":"","sources":["../../src/operations/datalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"datalog.d.ts","sourceRoot":"","sources":["../../src/operations/datalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAGpE,eAAO,MAAM,kBAAkB;;;;;;;;;EAQ7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,wBAAsB,YAAY,CAChC,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,kBAAkB,GACzB,OAAO,CAAC,cAAc,CAAC,CAIzB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type {
|
|
3
|
-
import type { CallToolResult } from "../types.js";
|
|
2
|
+
import type { CallToolResult, RoamActionClient } from "../types.js";
|
|
4
3
|
export declare const FileGetSchema: z.ZodObject<{
|
|
5
4
|
url: z.ZodString;
|
|
6
5
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -16,14 +15,14 @@ export declare const FileUploadSchema: z.ZodObject<{
|
|
|
16
15
|
filename: z.ZodOptional<z.ZodString>;
|
|
17
16
|
}, "strip", z.ZodTypeAny, {
|
|
18
17
|
url?: string | undefined;
|
|
19
|
-
base64?: string | undefined;
|
|
20
18
|
filePath?: string | undefined;
|
|
19
|
+
base64?: string | undefined;
|
|
21
20
|
mimetype?: string | undefined;
|
|
22
21
|
filename?: string | undefined;
|
|
23
22
|
}, {
|
|
24
23
|
url?: string | undefined;
|
|
25
|
-
base64?: string | undefined;
|
|
26
24
|
filePath?: string | undefined;
|
|
25
|
+
base64?: string | undefined;
|
|
27
26
|
mimetype?: string | undefined;
|
|
28
27
|
filename?: string | undefined;
|
|
29
28
|
}>;
|
|
@@ -37,7 +36,7 @@ export declare const FileDeleteSchema: z.ZodObject<{
|
|
|
37
36
|
export type FileGetParams = z.infer<typeof FileGetSchema>;
|
|
38
37
|
export type FileUploadParams = z.infer<typeof FileUploadSchema>;
|
|
39
38
|
export type FileDeleteParams = z.infer<typeof FileDeleteSchema>;
|
|
40
|
-
export declare function getFile(client:
|
|
41
|
-
export declare function uploadFile(client:
|
|
42
|
-
export declare function deleteFile(client:
|
|
39
|
+
export declare function getFile(client: RoamActionClient, params: FileGetParams): Promise<CallToolResult>;
|
|
40
|
+
export declare function uploadFile(client: RoamActionClient, params: FileUploadParams): Promise<CallToolResult>;
|
|
41
|
+
export declare function deleteFile(client: RoamActionClient, params: FileDeleteParams): Promise<CallToolResult>;
|
|
43
42
|
//# sourceMappingURL=files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/operations/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/operations/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpE,eAAO,MAAM,aAAa;;;;;;EAExB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;EAkB3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAGH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AA+GhE,wBAAsB,OAAO,CAC3B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,cAAc,CAAC,CAkBzB;AAED,wBAAsB,UAAU,CAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,cAAc,CAAC,CAiDzB;AAED,wBAAsB,UAAU,CAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,cAAc,CAAC,CAGzB"}
|
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type {
|
|
3
|
-
import type { CallToolResult } from "../types.js";
|
|
2
|
+
import type { CallToolResult, RoamActionClient } from "../types.js";
|
|
4
3
|
export declare const GetOpenWindowsSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
5
4
|
export declare const GetSelectionSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
6
5
|
export declare const OpenMainWindowSchema: z.ZodObject<{
|
|
7
6
|
uid: z.ZodOptional<z.ZodString>;
|
|
8
7
|
title: z.ZodOptional<z.ZodString>;
|
|
9
8
|
}, "strip", z.ZodTypeAny, {
|
|
10
|
-
title?: string | undefined;
|
|
11
9
|
uid?: string | undefined;
|
|
12
|
-
}, {
|
|
13
10
|
title?: string | undefined;
|
|
11
|
+
}, {
|
|
14
12
|
uid?: string | undefined;
|
|
13
|
+
title?: string | undefined;
|
|
15
14
|
}>;
|
|
16
15
|
export declare const OpenSidebarSchema: z.ZodObject<{
|
|
17
16
|
uid: z.ZodString;
|
|
18
17
|
type: z.ZodOptional<z.ZodEnum<["block", "outline", "mentions"]>>;
|
|
19
18
|
}, "strip", z.ZodTypeAny, {
|
|
20
19
|
uid: string;
|
|
21
|
-
type?: "
|
|
20
|
+
type?: "block" | "outline" | "mentions" | undefined;
|
|
22
21
|
}, {
|
|
23
22
|
uid: string;
|
|
24
|
-
type?: "
|
|
23
|
+
type?: "block" | "outline" | "mentions" | undefined;
|
|
25
24
|
}>;
|
|
26
25
|
export type OpenMainWindowParams = z.infer<typeof OpenMainWindowSchema>;
|
|
27
26
|
export type OpenSidebarParams = z.infer<typeof OpenSidebarSchema>;
|
|
28
|
-
export declare function getOpenWindows(client:
|
|
29
|
-
export declare function getSelection(client:
|
|
30
|
-
export declare function openMainWindow(client:
|
|
31
|
-
export declare function openSidebar(client:
|
|
27
|
+
export declare function getOpenWindows(client: RoamActionClient): Promise<CallToolResult>;
|
|
28
|
+
export declare function getSelection(client: RoamActionClient): Promise<CallToolResult>;
|
|
29
|
+
export declare function openMainWindow(client: RoamActionClient, params: OpenMainWindowParams): Promise<CallToolResult>;
|
|
30
|
+
export declare function openSidebar(client: RoamActionClient, params: OpenSidebarParams): Promise<CallToolResult>;
|
|
32
31
|
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/operations/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/operations/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAKV,cAAc,EACd,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAIrB,eAAO,MAAM,oBAAoB,gDAAe,CAAC;AAEjD,eAAO,MAAM,kBAAkB,gDAAe,CAAC;AAE/C,eAAO,MAAM,oBAAoB;;;;;;;;;EAG/B,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;EAM5B,CAAC;AAGH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACxE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAElE,wBAAsB,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,CAStF;AAED,wBAAsB,YAAY,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,CASpF;AAED,wBAAsB,cAAc,CAClC,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,cAAc,CAAC,CAQzB;AAED,wBAAsB,WAAW,CAC/B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,iBAAiB,GACxB,OAAO,CAAC,cAAc,CAAC,CAUzB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type {
|
|
3
|
-
import type { CallToolResult } from "../types.js";
|
|
2
|
+
import type { CallToolResult, RoamActionClient } from "../types.js";
|
|
4
3
|
export declare const CreatePageSchema: z.ZodObject<{
|
|
5
4
|
title: z.ZodString;
|
|
6
5
|
markdown: z.ZodOptional<z.ZodString>;
|
|
@@ -8,13 +7,13 @@ export declare const CreatePageSchema: z.ZodObject<{
|
|
|
8
7
|
childrenViewType: z.ZodOptional<z.ZodEnum<["document", "bullet", "numbered"]>>;
|
|
9
8
|
}, "strip", z.ZodTypeAny, {
|
|
10
9
|
title: string;
|
|
11
|
-
markdown?: string | undefined;
|
|
12
10
|
uid?: string | undefined;
|
|
11
|
+
markdown?: string | undefined;
|
|
13
12
|
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
14
13
|
}, {
|
|
15
14
|
title: string;
|
|
16
|
-
markdown?: string | undefined;
|
|
17
15
|
uid?: string | undefined;
|
|
16
|
+
markdown?: string | undefined;
|
|
18
17
|
childrenViewType?: "bullet" | "numbered" | "document" | undefined;
|
|
19
18
|
}>;
|
|
20
19
|
export declare const GetPageSchema: z.ZodObject<{
|
|
@@ -22,12 +21,12 @@ export declare const GetPageSchema: z.ZodObject<{
|
|
|
22
21
|
uid: z.ZodOptional<z.ZodString>;
|
|
23
22
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
24
23
|
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
title?: string | undefined;
|
|
26
24
|
uid?: string | undefined;
|
|
25
|
+
title?: string | undefined;
|
|
27
26
|
maxDepth?: number | undefined;
|
|
28
27
|
}, {
|
|
29
|
-
title?: string | undefined;
|
|
30
28
|
uid?: string | undefined;
|
|
29
|
+
title?: string | undefined;
|
|
31
30
|
maxDepth?: number | undefined;
|
|
32
31
|
}>;
|
|
33
32
|
export declare const DeletePageSchema: z.ZodObject<{
|
|
@@ -58,9 +57,9 @@ export type CreatePageParams = z.infer<typeof CreatePageSchema>;
|
|
|
58
57
|
export type GetPageParams = z.infer<typeof GetPageSchema>;
|
|
59
58
|
export type DeletePageParams = z.infer<typeof DeletePageSchema>;
|
|
60
59
|
export type UpdatePageParams = z.infer<typeof UpdatePageSchema>;
|
|
61
|
-
export declare function createPage(client:
|
|
62
|
-
export declare function getPage(client:
|
|
63
|
-
export declare function deletePage(client:
|
|
64
|
-
export declare function updatePage(client:
|
|
65
|
-
export declare function getGuidelines(client:
|
|
60
|
+
export declare function createPage(client: RoamActionClient, params: CreatePageParams): Promise<CallToolResult>;
|
|
61
|
+
export declare function getPage(client: RoamActionClient, params: GetPageParams): Promise<CallToolResult>;
|
|
62
|
+
export declare function deletePage(client: RoamActionClient, params: DeletePageParams): Promise<CallToolResult>;
|
|
63
|
+
export declare function updatePage(client: RoamActionClient, params: UpdatePageParams): Promise<CallToolResult>;
|
|
64
|
+
export declare function getGuidelines(client: RoamActionClient): Promise<CallToolResult>;
|
|
66
65
|
//# sourceMappingURL=pages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/operations/pages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"pages.d.ts","sourceRoot":"","sources":["../../src/operations/pages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAmB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIrF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAa3B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;EAOxB,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;EAE3B,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;EAa3B,CAAC;AAEH,eAAO,MAAM,mBAAmB,gDAAe,CAAC;AAGhD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAC1D,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAChE,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEhE,wBAAsB,UAAU,CAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,cAAc,CAAC,CASzB;AAED,wBAAsB,OAAO,CAC3B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,cAAc,CAAC,CAQzB;AAED,wBAAsB,UAAU,CAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,cAAc,CAAC,CAGzB;AAED,wBAAsB,UAAU,CAC9B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,cAAc,CAAC,CAUzB;AAED,wBAAsB,aAAa,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,cAAc,CAAC,CA0BrF"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type {
|
|
3
|
-
import type { CallToolResult } from "../types.js";
|
|
2
|
+
import type { CallToolResult, RoamActionClient } from "../types.js";
|
|
4
3
|
export declare const QuerySchema: z.ZodObject<{
|
|
5
4
|
uid: z.ZodOptional<z.ZodString>;
|
|
6
5
|
query: z.ZodOptional<z.ZodString>;
|
|
@@ -13,22 +12,22 @@ export declare const QuerySchema: z.ZodObject<{
|
|
|
13
12
|
}, "strip", z.ZodTypeAny, {
|
|
14
13
|
sort?: "created-date" | "edited-date" | "daily-note-date" | undefined;
|
|
15
14
|
uid?: string | undefined;
|
|
16
|
-
|
|
17
|
-
offset?: number | undefined;
|
|
18
|
-
limit?: number | undefined;
|
|
15
|
+
query?: string | undefined;
|
|
19
16
|
sortOrder?: "asc" | "desc" | undefined;
|
|
20
17
|
includePath?: boolean | undefined;
|
|
21
|
-
|
|
18
|
+
offset?: number | undefined;
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
maxDepth?: number | undefined;
|
|
22
21
|
}, {
|
|
23
22
|
sort?: "created-date" | "edited-date" | "daily-note-date" | undefined;
|
|
24
23
|
uid?: string | undefined;
|
|
25
|
-
|
|
26
|
-
offset?: number | undefined;
|
|
27
|
-
limit?: number | undefined;
|
|
24
|
+
query?: string | undefined;
|
|
28
25
|
sortOrder?: "asc" | "desc" | undefined;
|
|
29
26
|
includePath?: boolean | undefined;
|
|
30
|
-
|
|
27
|
+
offset?: number | undefined;
|
|
28
|
+
limit?: number | undefined;
|
|
29
|
+
maxDepth?: number | undefined;
|
|
31
30
|
}>;
|
|
32
31
|
export type QueryParams = z.infer<typeof QuerySchema>;
|
|
33
|
-
export declare function query(client:
|
|
32
|
+
export declare function query(client: RoamActionClient, params: QueryParams): Promise<CallToolResult>;
|
|
34
33
|
//# sourceMappingURL=query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/operations/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/operations/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAiB,cAAc,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAKnF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BtB,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD,wBAAsB,KAAK,CACzB,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,cAAc,CAAC,CA2BzB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type {
|
|
3
|
-
import type { CallToolResult } from "../types.js";
|
|
2
|
+
import type { CallToolResult, RoamActionClient } from "../types.js";
|
|
4
3
|
export declare const SearchSchema: z.ZodObject<{
|
|
5
4
|
query: z.ZodString;
|
|
6
5
|
scope: z.ZodOptional<z.ZodEnum<["pages", "blocks", "all"]>>;
|
|
@@ -10,17 +9,17 @@ export declare const SearchSchema: z.ZodObject<{
|
|
|
10
9
|
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
11
10
|
}, "strip", z.ZodTypeAny, {
|
|
12
11
|
query: string;
|
|
13
|
-
|
|
12
|
+
includePath?: boolean | undefined;
|
|
14
13
|
offset?: number | undefined;
|
|
15
14
|
limit?: number | undefined;
|
|
16
|
-
|
|
15
|
+
maxDepth?: number | undefined;
|
|
17
16
|
scope?: "pages" | "blocks" | "all" | undefined;
|
|
18
17
|
}, {
|
|
19
18
|
query: string;
|
|
20
|
-
|
|
19
|
+
includePath?: boolean | undefined;
|
|
21
20
|
offset?: number | undefined;
|
|
22
21
|
limit?: number | undefined;
|
|
23
|
-
|
|
22
|
+
maxDepth?: number | undefined;
|
|
24
23
|
scope?: "pages" | "blocks" | "all" | undefined;
|
|
25
24
|
}>;
|
|
26
25
|
export declare const SearchTemplatesSchema: z.ZodObject<{
|
|
@@ -32,6 +31,6 @@ export declare const SearchTemplatesSchema: z.ZodObject<{
|
|
|
32
31
|
}>;
|
|
33
32
|
export type SearchParams = z.infer<typeof SearchSchema>;
|
|
34
33
|
export type SearchTemplatesParams = z.infer<typeof SearchTemplatesSchema>;
|
|
35
|
-
export declare function search(client:
|
|
36
|
-
export declare function searchTemplates(client:
|
|
34
|
+
export declare function search(client: RoamActionClient, params: SearchParams): Promise<CallToolResult>;
|
|
35
|
+
export declare function searchTemplates(client: RoamActionClient, params: SearchTemplatesParams): Promise<CallToolResult>;
|
|
37
36
|
//# sourceMappingURL=search.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/operations/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/operations/search.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAIV,cAAc,EACd,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAIrB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;EAoBvB,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;EAOhC,CAAC;AAGH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E,wBAAsB,MAAM,CAC1B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,cAAc,CAAC,CAczB;AAED,wBAAsB,eAAe,CACnC,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,cAAc,CAAC,CAKzB"}
|
package/dist/tools.d.ts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import type { CallToolResult } from "./types.js";
|
|
3
|
-
import { RoamClient } from "./client.js";
|
|
2
|
+
import type { CallToolResult, AccessLevel, RoamActionClient, ToolGraph } from "./types.js";
|
|
4
3
|
export interface ClientToolDefinition {
|
|
5
4
|
name: string;
|
|
6
5
|
description: string;
|
|
7
6
|
schema: z.ZodObject<z.ZodRawShape>;
|
|
8
|
-
action: (client:
|
|
7
|
+
action: (client: RoamActionClient, args: unknown) => Promise<CallToolResult>;
|
|
9
8
|
type: "client";
|
|
10
9
|
}
|
|
11
10
|
export interface StandaloneToolDefinition {
|
|
@@ -16,7 +15,41 @@ export interface StandaloneToolDefinition {
|
|
|
16
15
|
type: "standalone";
|
|
17
16
|
}
|
|
18
17
|
export type ToolDefinition = ClientToolDefinition | StandaloneToolDefinition;
|
|
18
|
+
export declare function defineTool<T extends z.ZodRawShape>(name: string, description: string, schema: z.ZodObject<T>, action: (client: RoamActionClient, args: z.infer<z.ZodObject<T>>) => Promise<CallToolResult>): ClientToolDefinition;
|
|
19
|
+
export declare function defineStandaloneTool<T extends z.ZodRawShape>(name: string, description: string, schema: z.ZodObject<T>, action: (args: z.infer<z.ZodObject<T>>) => Promise<CallToolResult>): StandaloneToolDefinition;
|
|
20
|
+
export declare const dataTools: ClientToolDefinition[];
|
|
21
|
+
export declare const desktopUiTools: ClientToolDefinition[];
|
|
22
|
+
export declare const contentTools: ClientToolDefinition[];
|
|
19
23
|
export declare const tools: ToolDefinition[];
|
|
20
24
|
export declare function findTool(name: string): ToolDefinition | undefined;
|
|
21
|
-
export
|
|
25
|
+
export interface RouteToolCallOptions {
|
|
26
|
+
/**
|
|
27
|
+
* Resolve a graph identifier (nickname/name) to a ToolGraph. Required.
|
|
28
|
+
* Local consumers use the resolver from @roam-research/roam-tools-local;
|
|
29
|
+
* hosted consumers wire their own (e.g., reading picker grants from RTDB).
|
|
30
|
+
*/
|
|
31
|
+
resolveGraph: (providedGraph?: string) => Promise<ToolGraph>;
|
|
32
|
+
/**
|
|
33
|
+
* Construct a client for the resolved graph. Required.
|
|
34
|
+
* Local consumers return a RoamClient; hosted consumers return a transport
|
|
35
|
+
* that talks to proxy.api.roamresearch.com.
|
|
36
|
+
*/
|
|
37
|
+
createClient: (graph: ToolGraph) => Promise<RoamActionClient> | RoamActionClient;
|
|
38
|
+
/**
|
|
39
|
+
* "local-sync" runs the desktop token-info side-flow on get_graph_guidelines:
|
|
40
|
+
* parallel getTokenInfo, access-level validation, status writes, and result
|
|
41
|
+
* enrichment. "skip" (default) disables that side-flow entirely. Graph-name
|
|
42
|
+
* prefix (prependGraphInfo) is unaffected by this mode and runs in both.
|
|
43
|
+
*/
|
|
44
|
+
tokenInfoMode?: "local-sync" | "skip";
|
|
45
|
+
/**
|
|
46
|
+
* Only consulted in local-sync mode. Hosted callers may use this to write to
|
|
47
|
+
* their own grant store. If omitted, status changes are not persisted.
|
|
48
|
+
*/
|
|
49
|
+
onTokenStatusUpdate?: (nickname: string, patch: {
|
|
50
|
+
accessLevel?: AccessLevel;
|
|
51
|
+
lastKnownTokenStatus?: "active" | "revoked";
|
|
52
|
+
}) => Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
export declare function routeToolCall(toolName: string, args: Record<string, unknown>, options: RouteToolCallOptions): Promise<CallToolResult>;
|
|
22
55
|
//# sourceMappingURL=tools.d.ts.map
|
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,
|
|
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;AAyEpB,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,I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