@adaptic/maestro 1.1.0 → 1.1.2
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/.claude/commands/init-maestro.md +292 -29
- package/.gitignore +29 -0
- package/README.md +228 -344
- package/bin/maestro.mjs +462 -7
- package/docs/guides/agent-persona-setup.md +1 -1
- package/lib/action-executor.js +225 -0
- package/lib/index.js +16 -0
- package/lib/singleton.js +116 -0
- package/lib/tool-definitions.js +510 -0
- package/package.json +10 -1
- package/scaffold/CLAUDE.md +207 -0
- package/scripts/daemon/maestro-daemon.mjs +37 -0
- package/scripts/local-triggers/generate-plists.sh +235 -0
- package/scripts/local-triggers/install-all.sh +18 -12
- package/scripts/setup/init-agent.sh +58 -27
- package/scripts/slack-events-server.mjs +10 -0
- package/scripts/local-triggers/plists/ai.adaptic.slack-events-server.plist +0 -45
|
@@ -0,0 +1,510 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maestro — Comprehensive Tool Definitions
|
|
3
|
+
*
|
|
4
|
+
* Reusable tool schemas for Claude API tool_use, scoped by access level.
|
|
5
|
+
* Covers all operational capabilities an autonomous agent in an
|
|
6
|
+
* organisation like Adaptic might need.
|
|
7
|
+
*
|
|
8
|
+
* Categories:
|
|
9
|
+
* 1. Communication — Slack, Email, WhatsApp, SMS
|
|
10
|
+
* 2. Search / RAG — Email, Calendar, Files, Meetings, Slack, Web
|
|
11
|
+
* 3. Knowledge — Decisions, People, Regulatory, Strategy
|
|
12
|
+
* 4. Operations — Queues, Action Items, Scheduling
|
|
13
|
+
* 5. Analysis — Financial, Pipeline, Engineering Health
|
|
14
|
+
* 6. Document Generation — Memos, Briefs, Reports
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
* import { getToolsForAccessLevel } from "@adaptic/maestro/lib/tool-definitions.js";
|
|
18
|
+
* const tools = getToolsForAccessLevel("ceo");
|
|
19
|
+
* // Pass to Claude API: { tools }
|
|
20
|
+
*
|
|
21
|
+
* @module tool-definitions
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
// ============================================================================
|
|
25
|
+
// 1. COMMUNICATION TOOLS
|
|
26
|
+
// ============================================================================
|
|
27
|
+
|
|
28
|
+
const slackSend = {
|
|
29
|
+
name: "slack_send",
|
|
30
|
+
description:
|
|
31
|
+
"Send a Slack message to a team member or channel. Confirm recipient and content before invoking.",
|
|
32
|
+
input_schema: {
|
|
33
|
+
type: "object",
|
|
34
|
+
properties: {
|
|
35
|
+
recipient: { type: "string", description: "Person or channel (e.g. 'Hootan', '#engineering')" },
|
|
36
|
+
message: { type: "string", description: "Message content" },
|
|
37
|
+
thread_ts: { type: "string", description: "Thread timestamp to reply in-thread (optional)" },
|
|
38
|
+
urgent: { type: "boolean", description: "Whether urgent (affects formatting)" },
|
|
39
|
+
},
|
|
40
|
+
required: ["recipient", "message"],
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const draftEmail = {
|
|
45
|
+
name: "draft_email",
|
|
46
|
+
description:
|
|
47
|
+
"Draft or send an email. Drafts are saved for review; set urgency to 'immediate' to send now.",
|
|
48
|
+
input_schema: {
|
|
49
|
+
type: "object",
|
|
50
|
+
properties: {
|
|
51
|
+
to: { type: "string", description: "Recipient name or email" },
|
|
52
|
+
subject: { type: "string", description: "Subject line" },
|
|
53
|
+
body: { type: "string", description: "Email body" },
|
|
54
|
+
cc: { type: "string", description: "CC recipients (comma-separated)" },
|
|
55
|
+
voice: { type: "string", enum: ["agent", "principal"], description: "Whose voice (default: agent)" },
|
|
56
|
+
urgency: { type: "string", enum: ["routine", "urgent", "immediate"], description: "Urgency level" },
|
|
57
|
+
},
|
|
58
|
+
required: ["to", "subject", "body"],
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const whatsappSend = {
|
|
63
|
+
name: "whatsapp_send",
|
|
64
|
+
description: "Send a WhatsApp message to a registered contact.",
|
|
65
|
+
input_schema: {
|
|
66
|
+
type: "object",
|
|
67
|
+
properties: {
|
|
68
|
+
recipient: { type: "string", description: "Person name" },
|
|
69
|
+
message: { type: "string", description: "Message content" },
|
|
70
|
+
},
|
|
71
|
+
required: ["recipient", "message"],
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
const smsSend = {
|
|
76
|
+
name: "sms_send",
|
|
77
|
+
description: "Send an SMS text message via Twilio.",
|
|
78
|
+
input_schema: {
|
|
79
|
+
type: "object",
|
|
80
|
+
properties: {
|
|
81
|
+
recipient: { type: "string", description: "Person name or phone number (E.164)" },
|
|
82
|
+
message: { type: "string", description: "Message content (160 char limit for single SMS)" },
|
|
83
|
+
},
|
|
84
|
+
required: ["recipient", "message"],
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// ============================================================================
|
|
89
|
+
// 2. SEARCH / RAG TOOLS
|
|
90
|
+
// ============================================================================
|
|
91
|
+
|
|
92
|
+
const searchEmail = {
|
|
93
|
+
name: "search_email",
|
|
94
|
+
description:
|
|
95
|
+
"Search Gmail for emails. Use for finding correspondence, checking what someone sent, recalling email threads.",
|
|
96
|
+
input_schema: {
|
|
97
|
+
type: "object",
|
|
98
|
+
properties: {
|
|
99
|
+
query: { type: "string", description: "Natural language or Gmail search syntax (e.g. 'from:hootan DFSA this week')" },
|
|
100
|
+
max_results: { type: "number", description: "Max results (default: 5)" },
|
|
101
|
+
},
|
|
102
|
+
required: ["query"],
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const searchCalendar = {
|
|
107
|
+
name: "search_calendar",
|
|
108
|
+
description:
|
|
109
|
+
"Look up calendar events — meetings, availability, schedule. Returns titles, times, attendees.",
|
|
110
|
+
input_schema: {
|
|
111
|
+
type: "object",
|
|
112
|
+
properties: {
|
|
113
|
+
query: { type: "string", description: "What to find (e.g. 'meetings tomorrow', 'next call with Shayan', 'free time Thursday')" },
|
|
114
|
+
time_range: { type: "string", description: "'today', 'tomorrow', 'this week', 'next week', or specific date" },
|
|
115
|
+
},
|
|
116
|
+
required: ["query"],
|
|
117
|
+
},
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const searchFiles = {
|
|
121
|
+
name: "search_files",
|
|
122
|
+
description:
|
|
123
|
+
"Search the agent's knowledge base, documents, and operational files. Covers knowledge/, config/, state/, docs/, outputs/.",
|
|
124
|
+
input_schema: {
|
|
125
|
+
type: "object",
|
|
126
|
+
properties: {
|
|
127
|
+
query: { type: "string", description: "What to search for (e.g. 'DFSA submission status', 'rollup targets')" },
|
|
128
|
+
scope: { type: "string", enum: ["all", "knowledge", "config", "state", "docs", "outputs"], description: "Scope (default: all)" },
|
|
129
|
+
},
|
|
130
|
+
required: ["query"],
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
const searchMeetings = {
|
|
135
|
+
name: "search_meetings",
|
|
136
|
+
description:
|
|
137
|
+
"Search past meeting notes and transcripts. Use for recalling discussions, decisions, and action items from meetings.",
|
|
138
|
+
input_schema: {
|
|
139
|
+
type: "object",
|
|
140
|
+
properties: {
|
|
141
|
+
query: { type: "string", description: "What to find in meeting notes (e.g. 'board meeting decisions', 'hiring discussion')" },
|
|
142
|
+
date_range: { type: "string", description: "Date range (e.g. 'last week', 'March 2026')" },
|
|
143
|
+
},
|
|
144
|
+
required: ["query"],
|
|
145
|
+
},
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const searchSlack = {
|
|
149
|
+
name: "search_slack",
|
|
150
|
+
description:
|
|
151
|
+
"Search Slack message history across channels. Find conversations, decisions made in Slack, mentions.",
|
|
152
|
+
input_schema: {
|
|
153
|
+
type: "object",
|
|
154
|
+
properties: {
|
|
155
|
+
query: { type: "string", description: "Search query (e.g. 'Nima deployment', 'DFSA in #legal')" },
|
|
156
|
+
channel: { type: "string", description: "Limit to channel (optional)" },
|
|
157
|
+
},
|
|
158
|
+
required: ["query"],
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
const searchWeb = {
|
|
163
|
+
name: "search_web",
|
|
164
|
+
description:
|
|
165
|
+
"Search the web for current information. Use for market data, competitor intel, regulatory updates, news.",
|
|
166
|
+
input_schema: {
|
|
167
|
+
type: "object",
|
|
168
|
+
properties: {
|
|
169
|
+
query: { type: "string", description: "Web search query" },
|
|
170
|
+
max_results: { type: "number", description: "Max results (default: 5)" },
|
|
171
|
+
},
|
|
172
|
+
required: ["query"],
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const searchDocuments = {
|
|
177
|
+
name: "search_documents",
|
|
178
|
+
description:
|
|
179
|
+
"Search shared documents in Google Drive, Confluence, or other document stores. Find reports, proposals, specs.",
|
|
180
|
+
input_schema: {
|
|
181
|
+
type: "object",
|
|
182
|
+
properties: {
|
|
183
|
+
query: { type: "string", description: "What to find (e.g. 'investor deck Q1', 'board pack March')" },
|
|
184
|
+
doc_type: { type: "string", enum: ["all", "docs", "sheets", "slides", "pdf"], description: "Filter by type" },
|
|
185
|
+
},
|
|
186
|
+
required: ["query"],
|
|
187
|
+
},
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
// ============================================================================
|
|
191
|
+
// 3. KNOWLEDGE / INSTITUTIONAL MEMORY TOOLS
|
|
192
|
+
// ============================================================================
|
|
193
|
+
|
|
194
|
+
const searchDecisions = {
|
|
195
|
+
name: "search_decisions",
|
|
196
|
+
description:
|
|
197
|
+
"Search the decision archive — past decisions, their rationale, who made them, and outcomes.",
|
|
198
|
+
input_schema: {
|
|
199
|
+
type: "object",
|
|
200
|
+
properties: {
|
|
201
|
+
query: { type: "string", description: "What decision to find (e.g. 'hiring freeze rationale', 'Singapore entity structure')" },
|
|
202
|
+
},
|
|
203
|
+
required: ["query"],
|
|
204
|
+
},
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const lookupPerson = {
|
|
208
|
+
name: "lookup_person",
|
|
209
|
+
description:
|
|
210
|
+
"Look up information about a person — role, contact details, reporting line, recent activity, communication preferences.",
|
|
211
|
+
input_schema: {
|
|
212
|
+
type: "object",
|
|
213
|
+
properties: {
|
|
214
|
+
name: { type: "string", description: "Person's name" },
|
|
215
|
+
info_type: { type: "string", enum: ["all", "contact", "role", "activity", "preferences"], description: "What to look up" },
|
|
216
|
+
},
|
|
217
|
+
required: ["name"],
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
const searchRegulatory = {
|
|
222
|
+
name: "search_regulatory",
|
|
223
|
+
description:
|
|
224
|
+
"Search regulatory and compliance information — licence status, submission deadlines, compliance requirements, legal obligations.",
|
|
225
|
+
input_schema: {
|
|
226
|
+
type: "object",
|
|
227
|
+
properties: {
|
|
228
|
+
query: { type: "string", description: "Regulatory query (e.g. 'DFSA licence gaps', 'CIMA submission deadline', 'FCA requirements')" },
|
|
229
|
+
jurisdiction: { type: "string", description: "Jurisdiction filter (e.g. 'DIFC', 'Cayman', 'UK')" },
|
|
230
|
+
},
|
|
231
|
+
required: ["query"],
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
const searchStrategy = {
|
|
236
|
+
name: "search_strategy",
|
|
237
|
+
description:
|
|
238
|
+
"Search strategic context — priorities, OKRs, initiative status, strategic memos, competitive intelligence.",
|
|
239
|
+
input_schema: {
|
|
240
|
+
type: "object",
|
|
241
|
+
properties: {
|
|
242
|
+
query: { type: "string", description: "Strategic query (e.g. 'Project Aether status', 'Q2 priorities', 'competitive landscape')" },
|
|
243
|
+
},
|
|
244
|
+
required: ["query"],
|
|
245
|
+
},
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
const searchPrecedents = {
|
|
249
|
+
name: "search_precedents",
|
|
250
|
+
description:
|
|
251
|
+
"Search operational precedents — how similar situations were handled before, templates, playbooks.",
|
|
252
|
+
input_schema: {
|
|
253
|
+
type: "object",
|
|
254
|
+
properties: {
|
|
255
|
+
query: { type: "string", description: "Situation to find precedent for (e.g. 'investor objection handling', 'candidate rejection template')" },
|
|
256
|
+
},
|
|
257
|
+
required: ["query"],
|
|
258
|
+
},
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
// ============================================================================
|
|
262
|
+
// 4. OPERATIONS TOOLS
|
|
263
|
+
// ============================================================================
|
|
264
|
+
|
|
265
|
+
const queueUpdate = {
|
|
266
|
+
name: "queue_update",
|
|
267
|
+
description:
|
|
268
|
+
"Update status or priority of an item in operational queues (action-stack, follow-ups, decision-queue).",
|
|
269
|
+
input_schema: {
|
|
270
|
+
type: "object",
|
|
271
|
+
properties: {
|
|
272
|
+
search_term: { type: "string", description: "Text to search in item titles (fuzzy match)" },
|
|
273
|
+
new_status: { type: "string", enum: ["open", "in_progress", "blocked", "resolved", "closed"] },
|
|
274
|
+
new_priority: { type: "string", enum: ["critical", "high", "medium", "low"] },
|
|
275
|
+
note: { type: "string", description: "Note to add to the item's history" },
|
|
276
|
+
},
|
|
277
|
+
required: ["search_term", "new_status"],
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
const createActionItem = {
|
|
282
|
+
name: "create_action_item",
|
|
283
|
+
description:
|
|
284
|
+
"Create a new action item, follow-up, or decision in the operational queues.",
|
|
285
|
+
input_schema: {
|
|
286
|
+
type: "object",
|
|
287
|
+
properties: {
|
|
288
|
+
title: { type: "string", description: "Brief title" },
|
|
289
|
+
queue: { type: "string", enum: ["action-stack", "follow-ups", "decision-queue", "tech-debt"], description: "Queue (default: action-stack)" },
|
|
290
|
+
priority: { type: "string", enum: ["critical", "high", "medium", "low"] },
|
|
291
|
+
due_date: { type: "string", description: "Due date YYYY-MM-DD" },
|
|
292
|
+
owner: { type: "string", description: "Responsible person (default: agent)" },
|
|
293
|
+
context: { type: "string", description: "Background context" },
|
|
294
|
+
blocked_by: { type: "string", description: "What blocks this item" },
|
|
295
|
+
},
|
|
296
|
+
required: ["title"],
|
|
297
|
+
},
|
|
298
|
+
};
|
|
299
|
+
|
|
300
|
+
const scheduleMeeting = {
|
|
301
|
+
name: "schedule_meeting",
|
|
302
|
+
description:
|
|
303
|
+
"Schedule a meeting on Google Calendar. Checks availability and sends invites.",
|
|
304
|
+
input_schema: {
|
|
305
|
+
type: "object",
|
|
306
|
+
properties: {
|
|
307
|
+
title: { type: "string", description: "Meeting title" },
|
|
308
|
+
attendees: { type: "string", description: "Attendee names or emails (comma-separated)" },
|
|
309
|
+
date: { type: "string", description: "Date (YYYY-MM-DD or 'tomorrow', 'next Monday')" },
|
|
310
|
+
time: { type: "string", description: "Time (HH:MM in agent timezone, or 'morning', 'afternoon')" },
|
|
311
|
+
duration: { type: "string", description: "Duration (e.g. '30m', '1h', default: 30m)" },
|
|
312
|
+
description: { type: "string", description: "Meeting description/agenda" },
|
|
313
|
+
location: { type: "string", description: "Location or video link" },
|
|
314
|
+
},
|
|
315
|
+
required: ["title", "attendees", "date"],
|
|
316
|
+
},
|
|
317
|
+
};
|
|
318
|
+
|
|
319
|
+
const createReminder = {
|
|
320
|
+
name: "create_reminder",
|
|
321
|
+
description:
|
|
322
|
+
"Set a reminder for the agent or principal. Fires via Slack DM at the specified time.",
|
|
323
|
+
input_schema: {
|
|
324
|
+
type: "object",
|
|
325
|
+
properties: {
|
|
326
|
+
message: { type: "string", description: "Reminder message" },
|
|
327
|
+
when: { type: "string", description: "When to remind (e.g. 'in 2 hours', 'tomorrow 9am', '2026-04-10 14:00')" },
|
|
328
|
+
for_whom: { type: "string", description: "Who to remind (default: principal)" },
|
|
329
|
+
},
|
|
330
|
+
required: ["message", "when"],
|
|
331
|
+
},
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
// ============================================================================
|
|
335
|
+
// 5. ANALYSIS TOOLS
|
|
336
|
+
// ============================================================================
|
|
337
|
+
|
|
338
|
+
const searchFinancial = {
|
|
339
|
+
name: "search_financial",
|
|
340
|
+
description:
|
|
341
|
+
"Look up financial data — runway, burn rate, capital readiness, fundraising pipeline, AUM figures.",
|
|
342
|
+
input_schema: {
|
|
343
|
+
type: "object",
|
|
344
|
+
properties: {
|
|
345
|
+
query: { type: "string", description: "Financial query (e.g. 'current runway', 'fundraising status', 'AUM pipeline')" },
|
|
346
|
+
},
|
|
347
|
+
required: ["query"],
|
|
348
|
+
},
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
const searchPipeline = {
|
|
352
|
+
name: "search_pipeline",
|
|
353
|
+
description:
|
|
354
|
+
"Search the commercial/relationship pipeline — deal stages, partner status, investor conversations.",
|
|
355
|
+
input_schema: {
|
|
356
|
+
type: "object",
|
|
357
|
+
properties: {
|
|
358
|
+
query: { type: "string", description: "Pipeline query (e.g. 'acquisition targets status', 'investor conversations this month')" },
|
|
359
|
+
stage: { type: "string", enum: ["all", "prospecting", "engaged", "diligence", "closing", "closed"], description: "Filter by stage" },
|
|
360
|
+
},
|
|
361
|
+
required: ["query"],
|
|
362
|
+
},
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
const searchEngineering = {
|
|
366
|
+
name: "search_engineering",
|
|
367
|
+
description:
|
|
368
|
+
"Search engineering health data — repo activity, PR status, delivery confidence, tech debt, deployment status.",
|
|
369
|
+
input_schema: {
|
|
370
|
+
type: "object",
|
|
371
|
+
properties: {
|
|
372
|
+
query: { type: "string", description: "Engineering query (e.g. 'adaptic-engine PR status', 'deployment blockers', 'tech debt priority')" },
|
|
373
|
+
repo: { type: "string", description: "Specific repository name (optional)" },
|
|
374
|
+
},
|
|
375
|
+
required: ["query"],
|
|
376
|
+
},
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
const searchHiring = {
|
|
380
|
+
name: "search_hiring",
|
|
381
|
+
description:
|
|
382
|
+
"Search hiring pipeline — open roles, candidate status, interview pipeline, offer tracking.",
|
|
383
|
+
input_schema: {
|
|
384
|
+
type: "object",
|
|
385
|
+
properties: {
|
|
386
|
+
query: { type: "string", description: "Hiring query (e.g. 'open engineering roles', 'candidates for CFO', 'offers pending')" },
|
|
387
|
+
status: { type: "string", enum: ["all", "open", "screening", "interviewing", "offer", "filled"], description: "Filter by status" },
|
|
388
|
+
},
|
|
389
|
+
required: ["query"],
|
|
390
|
+
},
|
|
391
|
+
};
|
|
392
|
+
|
|
393
|
+
const searchRisk = {
|
|
394
|
+
name: "search_risk",
|
|
395
|
+
description:
|
|
396
|
+
"Search the enterprise risk register — active risks, mitigations, severity, ownership.",
|
|
397
|
+
input_schema: {
|
|
398
|
+
type: "object",
|
|
399
|
+
properties: {
|
|
400
|
+
query: { type: "string", description: "Risk query (e.g. 'critical risks', 'regulatory risks', 'unmitigated risks')" },
|
|
401
|
+
severity: { type: "string", enum: ["all", "critical", "high", "medium", "low"], description: "Filter by severity" },
|
|
402
|
+
},
|
|
403
|
+
required: ["query"],
|
|
404
|
+
},
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
// ============================================================================
|
|
408
|
+
// 6. DOCUMENT GENERATION TOOLS
|
|
409
|
+
// ============================================================================
|
|
410
|
+
|
|
411
|
+
const generateMemo = {
|
|
412
|
+
name: "generate_memo",
|
|
413
|
+
description:
|
|
414
|
+
"Generate a branded PDF memo or brief. Saved to outputs/drafts/ and optionally shared via Slack.",
|
|
415
|
+
input_schema: {
|
|
416
|
+
type: "object",
|
|
417
|
+
properties: {
|
|
418
|
+
title: { type: "string", description: "Document title" },
|
|
419
|
+
content: { type: "string", description: "Memo content (markdown)" },
|
|
420
|
+
type: { type: "string", enum: ["memo", "brief", "board-pack", "letter", "investor"], description: "Document type" },
|
|
421
|
+
share_to: { type: "string", description: "Slack channel or person to share with (optional)" },
|
|
422
|
+
},
|
|
423
|
+
required: ["title", "content"],
|
|
424
|
+
},
|
|
425
|
+
};
|
|
426
|
+
|
|
427
|
+
const generateReport = {
|
|
428
|
+
name: "generate_report",
|
|
429
|
+
description:
|
|
430
|
+
"Generate an analytical report by aggregating data from dashboards, queues, and operational state.",
|
|
431
|
+
input_schema: {
|
|
432
|
+
type: "object",
|
|
433
|
+
properties: {
|
|
434
|
+
report_type: {
|
|
435
|
+
type: "string",
|
|
436
|
+
enum: ["executive-summary", "engineering-health", "hiring-pipeline", "strategy-scorecard", "leadership-accountability", "risk-register", "custom"],
|
|
437
|
+
description: "Report type",
|
|
438
|
+
},
|
|
439
|
+
custom_query: { type: "string", description: "For custom reports — what to analyse" },
|
|
440
|
+
time_range: { type: "string", description: "Time range (default: current)" },
|
|
441
|
+
},
|
|
442
|
+
required: ["report_type"],
|
|
443
|
+
},
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
// ============================================================================
|
|
447
|
+
// ACCESS LEVEL SCOPING
|
|
448
|
+
// ============================================================================
|
|
449
|
+
|
|
450
|
+
// All lookup/search tools (read-only, safe for any authorised user)
|
|
451
|
+
const lookupTools = [
|
|
452
|
+
searchEmail, searchCalendar, searchFiles, searchMeetings, searchSlack,
|
|
453
|
+
searchWeb, searchDocuments, searchDecisions, lookupPerson, searchRegulatory,
|
|
454
|
+
searchStrategy, searchPrecedents, searchFinancial, searchPipeline,
|
|
455
|
+
searchEngineering, searchHiring, searchRisk,
|
|
456
|
+
];
|
|
457
|
+
|
|
458
|
+
// Write tools (require higher access)
|
|
459
|
+
const writeToolsCeo = [
|
|
460
|
+
slackSend, draftEmail, whatsappSend, smsSend,
|
|
461
|
+
queueUpdate, createActionItem, scheduleMeeting, createReminder,
|
|
462
|
+
generateMemo, generateReport,
|
|
463
|
+
];
|
|
464
|
+
|
|
465
|
+
const writeToolsLeadership = [
|
|
466
|
+
slackSend, draftEmail,
|
|
467
|
+
queueUpdate, createActionItem, scheduleMeeting, createReminder,
|
|
468
|
+
];
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Get tools available for a caller's access level.
|
|
472
|
+
* @param {string} accessLevel - "ceo", "leadership", or "default"
|
|
473
|
+
* @returns {Array<object>} Claude API tool schemas
|
|
474
|
+
*/
|
|
475
|
+
export function getToolsForAccessLevel(accessLevel) {
|
|
476
|
+
switch (accessLevel) {
|
|
477
|
+
case "ceo":
|
|
478
|
+
return [...writeToolsCeo, ...lookupTools];
|
|
479
|
+
case "leadership":
|
|
480
|
+
return [...writeToolsLeadership, ...lookupTools];
|
|
481
|
+
case "default":
|
|
482
|
+
return [...lookupTools]; // Read-only — search and lookup only
|
|
483
|
+
default:
|
|
484
|
+
return [];
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
/**
|
|
489
|
+
* Get tool names for an access level.
|
|
490
|
+
* @param {string} accessLevel
|
|
491
|
+
* @returns {string[]}
|
|
492
|
+
*/
|
|
493
|
+
export function getToolNamesForAccessLevel(accessLevel) {
|
|
494
|
+
return getToolsForAccessLevel(accessLevel).map((t) => t.name);
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/**
|
|
498
|
+
* Get all tool definitions (for documentation / init-maestro generation).
|
|
499
|
+
* @returns {{ communication: object[], search: object[], knowledge: object[], operations: object[], analysis: object[], documents: object[] }}
|
|
500
|
+
*/
|
|
501
|
+
export function getAllToolsByCategory() {
|
|
502
|
+
return {
|
|
503
|
+
communication: [slackSend, draftEmail, whatsappSend, smsSend],
|
|
504
|
+
search: [searchEmail, searchCalendar, searchFiles, searchMeetings, searchSlack, searchWeb, searchDocuments],
|
|
505
|
+
knowledge: [searchDecisions, lookupPerson, searchRegulatory, searchStrategy, searchPrecedents],
|
|
506
|
+
operations: [queueUpdate, createActionItem, scheduleMeeting, createReminder],
|
|
507
|
+
analysis: [searchFinancial, searchPipeline, searchEngineering, searchHiring, searchRisk],
|
|
508
|
+
documents: [generateMemo, generateReport],
|
|
509
|
+
};
|
|
510
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptic/maestro",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Maestro — Autonomous AI agent operating system. Deploy AI employees on dedicated Mac minis.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"maestro": "./bin/maestro.mjs"
|
|
8
8
|
},
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./lib/index.js",
|
|
11
|
+
"./tools": "./lib/tool-definitions.js",
|
|
12
|
+
"./executor": "./lib/action-executor.js",
|
|
13
|
+
"./singleton": "./lib/singleton.js",
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
9
16
|
"files": [
|
|
10
17
|
"bin/",
|
|
18
|
+
"lib/",
|
|
11
19
|
"scaffold/",
|
|
12
20
|
"scripts/",
|
|
13
21
|
"agents/",
|
|
@@ -24,6 +32,7 @@
|
|
|
24
32
|
".claude/commands/",
|
|
25
33
|
".claude/settings.json",
|
|
26
34
|
".env.example",
|
|
35
|
+
".gitignore",
|
|
27
36
|
"README.md"
|
|
28
37
|
],
|
|
29
38
|
"publishConfig": {
|