@4fu/arbor-tools 0.0.0-stage → 0.1.0

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.
@@ -0,0 +1,121 @@
1
+ /**
2
+ * The code mode modules: `journal`, `windows`, `board`, `notes`, `channels`
3
+ * and `workspace` (docs/tools.md#modules).
4
+ *
5
+ * A module whose backing feature is not configured is absent. The prompt names
6
+ * a module, never a function; how to call one comes from `tool_search` and
7
+ * `tool_describe`, which read the same catalog the window was opened with.
8
+ * `env`, `services` and the MCP servers' own modules are in `./env.ts`.
9
+ */
10
+ import type { CallContext, ModuleSpec, ToolCall, ToolGroup, ToolResult } from "@4fu/arbor-interfaces";
11
+ import type { LiveWindow, ToolServices } from "../host.ts";
12
+ /** `journal`: search, show, around, trace, links. */
13
+ export declare class JournalModuleGroup implements ToolGroup {
14
+ readonly id = "modules.journal";
15
+ private readonly services;
16
+ constructor(services: ToolServices);
17
+ tools(): readonly [];
18
+ modules(): readonly ModuleSpec[];
19
+ call(request: ToolCall, _context: CallContext): Promise<ToolResult>;
20
+ private answer;
21
+ private notOwned;
22
+ }
23
+ /** `windows`: list, show, send, broadcast, inbox. */
24
+ export declare class WindowsModuleGroup implements ToolGroup {
25
+ readonly id = "modules.windows";
26
+ private readonly services;
27
+ constructor(services: ToolServices);
28
+ tools(): readonly [];
29
+ modules(): readonly ModuleSpec[];
30
+ call(request: ToolCall, context: CallContext): Promise<ToolResult>;
31
+ private notOwned;
32
+ }
33
+ /** `board`: list, set, expect, unexpect. */
34
+ export declare class BoardModuleGroup implements ToolGroup {
35
+ readonly id = "modules.board";
36
+ private readonly services;
37
+ constructor(services: ToolServices);
38
+ tools(): readonly [];
39
+ modules(): readonly ModuleSpec[];
40
+ call(request: ToolCall, context: CallContext): Promise<ToolResult>;
41
+ private notOwned;
42
+ }
43
+ /** `notes`: search, read, context, active. Absent without a `NoteStore`. */
44
+ export declare class NotesModuleGroup implements ToolGroup {
45
+ readonly id = "modules.notes";
46
+ private readonly services;
47
+ constructor(services: ToolServices);
48
+ tools(): readonly [];
49
+ modules(): readonly ModuleSpec[];
50
+ call(request: ToolCall, _context: CallContext): Promise<ToolResult>;
51
+ private notOwned;
52
+ }
53
+ /** `channels`: list, get. Absent when no plugin registered a channel. */
54
+ export declare class ChannelsModuleGroup implements ToolGroup {
55
+ readonly id = "modules.channels";
56
+ private readonly services;
57
+ constructor(services: ToolServices);
58
+ tools(): readonly [];
59
+ modules(): readonly ModuleSpec[];
60
+ call(request: ToolCall, _context: CallContext): Promise<ToolResult>;
61
+ /** `channels.list`: every channel, and what is connected on it. */
62
+ private list;
63
+ /** `channels.get(ref)`: one outside message, by its native id. */
64
+ private get;
65
+ /** The channel a native id names, by its prefix: `http:42` is `http`'s. */
66
+ private channelOf;
67
+ private notOwned;
68
+ }
69
+ /** `tasks`: list, show. The tasks the host dispatched (docs/dispatch.md#tasks). */
70
+ export declare class TasksModuleGroup implements ToolGroup {
71
+ readonly id = "modules.tasks";
72
+ private readonly services;
73
+ constructor(services: ToolServices);
74
+ tools(): readonly [];
75
+ modules(): readonly ModuleSpec[];
76
+ call(request: ToolCall, _context: CallContext): Promise<ToolResult>;
77
+ /** One task as one line: its ref, its kind, why it is one, its targets and its time. */
78
+ private line;
79
+ private notOwned;
80
+ }
81
+ /** `schedule`: list, create, update, cancel (docs/dispatch.md#scheduled-tasks). */
82
+ export declare class ScheduleModuleGroup implements ToolGroup {
83
+ readonly id = "modules.schedule";
84
+ private readonly services;
85
+ constructor(services: ToolServices);
86
+ tools(): readonly [];
87
+ modules(): readonly ModuleSpec[];
88
+ call(request: ToolCall, _context: CallContext): Promise<ToolResult>;
89
+ /** `schedule.create`: one new scheduled task, from what the script named. */
90
+ private create;
91
+ /** `schedule.update`: only the fields the script named change. */
92
+ private update;
93
+ /** One repeat rule as one line: only once, a period, or a daily clock time. */
94
+ private repeatText;
95
+ /** One argument the script did not name in a shape this module can read. */
96
+ private badInput;
97
+ private notFound;
98
+ private notOwned;
99
+ }
100
+ /** `workspace`: grep, find, ls. Absent when the host has no workspace. */
101
+ export declare class WorkspaceModuleGroup implements ToolGroup {
102
+ readonly id = "modules.workspace";
103
+ private readonly services;
104
+ constructor(services: ToolServices);
105
+ tools(): readonly [];
106
+ modules(): readonly ModuleSpec[];
107
+ call(request: ToolCall, context: CallContext): Promise<ToolResult>;
108
+ private ls;
109
+ private find;
110
+ private grep;
111
+ /**
112
+ * One lookup inside the workspace. An implementation that owns the execution
113
+ * environment answers with `exec`, because its `path` is not a host path;
114
+ * `null` means the caller walks the host directory itself.
115
+ */
116
+ private runIn;
117
+ private absent;
118
+ private notOwned;
119
+ }
120
+ export { EnvModuleGroup } from "./env.ts";
121
+ export type { LiveWindow };