agent-office 0.6.23 → 0.7.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.
Files changed (58) hide show
  1. package/AGENTS.md +0 -0
  2. package/CONTEXT.md +77 -0
  3. package/README.md +87 -6
  4. package/dist/commands/cron-requests.d.ts +5 -5
  5. package/dist/commands/cron-requests.d.ts.map +1 -1
  6. package/dist/commands/cron-requests.js +9 -14
  7. package/dist/commands/cron-requests.js.map +1 -1
  8. package/dist/commands/crons.d.ts +9 -9
  9. package/dist/commands/crons.d.ts.map +1 -1
  10. package/dist/commands/crons.js +17 -27
  11. package/dist/commands/crons.js.map +1 -1
  12. package/dist/commands/messages.d.ts +6 -6
  13. package/dist/commands/messages.d.ts.map +1 -1
  14. package/dist/commands/messages.js +11 -18
  15. package/dist/commands/messages.js.map +1 -1
  16. package/dist/commands/sessions.d.ts +5 -5
  17. package/dist/commands/sessions.d.ts.map +1 -1
  18. package/dist/commands/sessions.js +10 -16
  19. package/dist/commands/sessions.js.map +1 -1
  20. package/dist/commands/task-columns.d.ts +1 -1
  21. package/dist/commands/task-columns.d.ts.map +1 -1
  22. package/dist/commands/task-columns.js +2 -4
  23. package/dist/commands/task-columns.js.map +1 -1
  24. package/dist/commands/tasks.d.ts +10 -10
  25. package/dist/commands/tasks.d.ts.map +1 -1
  26. package/dist/commands/tasks.js +20 -31
  27. package/dist/commands/tasks.js.map +1 -1
  28. package/dist/contracts/commands.d.ts +38 -0
  29. package/dist/contracts/commands.d.ts.map +1 -0
  30. package/dist/contracts/commands.js +469 -0
  31. package/dist/contracts/commands.js.map +1 -0
  32. package/dist/index.js +1062 -160
  33. package/dist/index.js.map +1 -1
  34. package/dist/lib/input.d.ts +7 -0
  35. package/dist/lib/input.d.ts.map +1 -0
  36. package/dist/lib/input.js +94 -0
  37. package/dist/lib/input.js.map +1 -0
  38. package/dist/lib/mcp.d.ts +36 -0
  39. package/dist/lib/mcp.d.ts.map +1 -0
  40. package/dist/lib/mcp.js +155 -0
  41. package/dist/lib/mcp.js.map +1 -0
  42. package/dist/lib/output.d.ts +9 -1
  43. package/dist/lib/output.d.ts.map +1 -1
  44. package/dist/lib/output.js +59 -4
  45. package/dist/lib/output.js.map +1 -1
  46. package/dist/lib/schema.d.ts +42 -0
  47. package/dist/lib/schema.d.ts.map +1 -0
  48. package/dist/lib/schema.js +1023 -0
  49. package/dist/lib/schema.js.map +1 -0
  50. package/dist/lib/validation.d.ts +15 -0
  51. package/dist/lib/validation.d.ts.map +1 -0
  52. package/dist/lib/validation.js +140 -0
  53. package/dist/lib/validation.js.map +1 -0
  54. package/package.json +5 -2
  55. package/skills/SKILL-create-coworker.md +51 -0
  56. package/skills/SKILL-cron-jobs.md +106 -0
  57. package/skills/SKILL-send-message.md +56 -0
  58. package/skills/SKILL-task-management.md +86 -0
@@ -0,0 +1,1023 @@
1
+ export const commandSchemas = [
2
+ // Coworker Management
3
+ {
4
+ name: 'list-coworkers',
5
+ description: 'List all coworkers (sessions)',
6
+ responseSchema: {
7
+ description: 'Array of coworker objects',
8
+ properties: {
9
+ name: { type: 'string', description: 'Coworker name' },
10
+ coworkerType: { type: 'string', description: 'Role classification' },
11
+ status: { type: 'string', description: 'Current status', readOnly: true },
12
+ description: { type: 'string', description: 'Job description', readOnly: true },
13
+ philosophy: { type: 'string', description: 'Working philosophy', readOnly: true },
14
+ visualDescription: { type: 'string', description: 'Visual appearance description', readOnly: true },
15
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
16
+ },
17
+ },
18
+ examples: ['agent-office --sqlite ./data.db list-coworkers --output json'],
19
+ },
20
+ {
21
+ name: 'create-coworker',
22
+ description: 'Create a new coworker (session)',
23
+ requestSchema: {
24
+ description: 'Request body for creating a coworker',
25
+ properties: {
26
+ name: { type: 'string', description: 'Unique name for the coworker' },
27
+ coworkerType: {
28
+ type: 'string',
29
+ description: 'Role classification (e.g., assistant, developer, manager, reviewer)',
30
+ },
31
+ },
32
+ required: ['name', 'coworkerType'],
33
+ },
34
+ responseSchema: {
35
+ description: 'The newly created coworker',
36
+ properties: {
37
+ id: { type: 'number', description: 'Unique identifier', readOnly: true },
38
+ name: { type: 'string', description: 'Coworker name' },
39
+ coworkerType: { type: 'string', description: 'Role classification' },
40
+ status: { type: 'string', description: 'Current status', readOnly: true },
41
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
42
+ },
43
+ },
44
+ examples: [
45
+ 'agent-office --sqlite ./data.db create-coworker --json \'{\"name\": \"Alice\", \"coworkerType\": \"developer\"}\'',
46
+ ],
47
+ mutating: true,
48
+ },
49
+ {
50
+ name: 'delete-coworker',
51
+ description: 'Delete a coworker (session) and all their data',
52
+ requestSchema: {
53
+ description: 'Request body for deleting a coworker',
54
+ properties: {
55
+ name: { type: 'string', description: 'Name of the coworker to delete' },
56
+ },
57
+ required: ['name'],
58
+ },
59
+ responseSchema: {
60
+ description: 'Success confirmation',
61
+ properties: {
62
+ success: { type: 'boolean', description: 'Whether deletion succeeded' },
63
+ message: { type: 'string', description: 'Status message' },
64
+ },
65
+ },
66
+ examples: ['agent-office --sqlite ./data.db delete-coworker --json \'{\"name\": \"Alice\"}\' --dry-run'],
67
+ mutating: true,
68
+ },
69
+ {
70
+ name: 'update-coworker',
71
+ description: "Update a coworker's information (status, description, philosophy, visual description)",
72
+ requestSchema: {
73
+ description: 'Request body for updating a coworker',
74
+ properties: {
75
+ name: { type: 'string', description: 'Name of the coworker to update (required identifier)' },
76
+ coworkerType: { type: 'string', description: 'New role classification (optional)' },
77
+ status: { type: 'string', description: 'New status (optional, omit to clear)' },
78
+ description: { type: 'string', description: 'New job description (optional, omit to clear)' },
79
+ philosophy: { type: 'string', description: 'New working philosophy (optional, omit to clear)' },
80
+ visualDescription: { type: 'string', description: 'New visual description (optional, omit to clear)' },
81
+ },
82
+ required: ['name'],
83
+ },
84
+ responseSchema: {
85
+ description: 'The updated coworker',
86
+ properties: {
87
+ name: { type: 'string', description: 'Coworker name' },
88
+ coworkerType: { type: 'string', description: 'Role classification' },
89
+ status: { type: 'string', description: 'Current status' },
90
+ description: { type: 'string', description: 'Job description' },
91
+ philosophy: { type: 'string', description: 'Working philosophy' },
92
+ visualDescription: { type: 'string', description: 'Visual appearance description' },
93
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
94
+ },
95
+ },
96
+ examples: [
97
+ 'agent-office --sqlite ./data.db update-coworker --json \'{\"name\": \"Alice\", \"status\": \"busy\", \"description\": \"Senior dev\"}\'',
98
+ ],
99
+ mutating: true,
100
+ },
101
+ {
102
+ name: 'get-coworker-info',
103
+ description: 'Get coworker information (name, description, philosophy)',
104
+ requestSchema: {
105
+ description: 'Request body for getting coworker info',
106
+ properties: {
107
+ name: { type: 'string', description: 'Name of the coworker to retrieve' },
108
+ },
109
+ required: ['name'],
110
+ },
111
+ responseSchema: {
112
+ description: 'Coworker information',
113
+ properties: {
114
+ name: { type: 'string', description: 'Coworker name' },
115
+ coworkerType: { type: 'string', description: 'Role classification' },
116
+ status: { type: 'string', description: 'Current status' },
117
+ description: { type: 'string', description: 'Job description' },
118
+ philosophy: { type: 'string', description: 'Working philosophy' },
119
+ visualDescription: { type: 'string', description: 'Visual appearance description' },
120
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
121
+ },
122
+ },
123
+ examples: [
124
+ 'agent-office --sqlite ./data.db get-coworker-info --json \'{\"name\": \"Alice\"}\' --fields name,status',
125
+ ],
126
+ },
127
+ // Message Commands
128
+ {
129
+ name: 'send-message',
130
+ description: 'Send a message to one or more recipients',
131
+ requestSchema: {
132
+ description: 'Request body for sending a message',
133
+ properties: {
134
+ from: { type: 'string', description: 'Name of the sender (must be an existing coworker)' },
135
+ to: {
136
+ type: 'array',
137
+ description: 'Array of recipient names (must be existing coworkers)',
138
+ items: { type: 'string', description: 'Recipient name' },
139
+ },
140
+ body: { type: 'string', description: 'Message content' },
141
+ },
142
+ required: ['from', 'to', 'body'],
143
+ },
144
+ responseSchema: {
145
+ description: 'Success confirmation',
146
+ properties: {
147
+ success: { type: 'boolean', description: 'Whether message was sent' },
148
+ message: { type: 'string', description: 'Status message' },
149
+ },
150
+ },
151
+ examples: [
152
+ 'agent-office --sqlite ./data.db send-message --json \'{\"from\": \"Alice\", \"to\": [\"Bob\"], \"body\": \"Hello!\"}\'',
153
+ ],
154
+ mutating: true,
155
+ },
156
+ {
157
+ name: 'check-unread-messages',
158
+ description: 'Check if there are unread messages for a coworker',
159
+ requestSchema: {
160
+ description: 'Request body for checking unread messages',
161
+ properties: {
162
+ coworker: { type: 'string', description: 'Name of the coworker to check' },
163
+ },
164
+ required: ['coworker'],
165
+ },
166
+ responseSchema: {
167
+ description: 'Unread message status',
168
+ properties: {
169
+ hasUnread: { type: 'boolean', description: 'Whether there are unread messages' },
170
+ total: { type: 'number', description: 'Total count of unread messages' },
171
+ counts: {
172
+ type: 'object',
173
+ description: 'Breakdown by sender',
174
+ properties: {
175
+ '*': { type: 'number', description: 'Number of messages from this sender' },
176
+ },
177
+ },
178
+ },
179
+ },
180
+ examples: [
181
+ 'agent-office --sqlite ./data.db check-unread-messages --json \'{\"coworker\": \"Bob\"}\' --output json',
182
+ ],
183
+ },
184
+ {
185
+ name: 'get-unread-messages',
186
+ description: 'Get all unread messages for a coworker and mark as read',
187
+ requestSchema: {
188
+ description: 'Request body for getting unread messages',
189
+ properties: {
190
+ coworker: { type: 'string', description: 'Name of the coworker' },
191
+ },
192
+ required: ['coworker'],
193
+ },
194
+ responseSchema: {
195
+ description: 'Array of unread messages',
196
+ properties: {
197
+ id: { type: 'number', description: 'Message ID', readOnly: true },
198
+ fromName: { type: 'string', description: 'Sender name', readOnly: true },
199
+ toName: { type: 'string', description: 'Recipient name', readOnly: true },
200
+ body: { type: 'string', description: 'Message content', readOnly: true },
201
+ read: { type: 'boolean', description: 'Read status', readOnly: true },
202
+ createdAt: { type: 'string', format: 'date-time', description: 'Timestamp', readOnly: true },
203
+ },
204
+ },
205
+ examples: [
206
+ 'agent-office --sqlite ./data.db get-unread-messages --json \'{\"coworker\": \"Bob\"}\' --fields id,from_name,body',
207
+ ],
208
+ mutating: true,
209
+ },
210
+ {
211
+ name: 'list-messages-between',
212
+ description: 'Show all messages between two coworkers',
213
+ requestSchema: {
214
+ description: 'Request body for listing messages between coworkers',
215
+ properties: {
216
+ coworker1: { type: 'string', description: 'First coworker name' },
217
+ coworker2: { type: 'string', description: 'Second coworker name' },
218
+ start: { type: 'string', format: 'date-time', description: 'Start time (ISO 8601 format, optional)' },
219
+ end: { type: 'string', format: 'date-time', description: 'End time (ISO 8601 format, optional)' },
220
+ },
221
+ required: ['coworker1', 'coworker2'],
222
+ },
223
+ responseSchema: {
224
+ description: 'Array of messages',
225
+ properties: {
226
+ id: { type: 'number', description: 'Message ID', readOnly: true },
227
+ fromName: { type: 'string', description: 'Sender name', readOnly: true },
228
+ toName: { type: 'string', description: 'Recipient name', readOnly: true },
229
+ body: { type: 'string', description: 'Message content', readOnly: true },
230
+ createdAt: { type: 'string', format: 'date-time', description: 'Timestamp', readOnly: true },
231
+ },
232
+ },
233
+ examples: [
234
+ 'agent-office --sqlite ./data.db list-messages-between --json \'{\"coworker1\": \"Alice\", \"coworker2\": \"Bob\"}\'',
235
+ ],
236
+ },
237
+ {
238
+ name: 'list-messages-to-notify',
239
+ description: 'List unread messages older than specified hours that have not been notified',
240
+ requestSchema: {
241
+ description: 'Request body for listing messages to notify',
242
+ properties: {
243
+ coworker: { type: 'string', description: 'Coworker name to check' },
244
+ hours: { type: 'number', description: 'Hours threshold for message age' },
245
+ },
246
+ required: ['coworker', 'hours'],
247
+ },
248
+ responseSchema: {
249
+ description: 'Array of messages needing notification',
250
+ properties: {
251
+ id: { type: 'number', description: 'Message ID', readOnly: true },
252
+ fromName: { type: 'string', description: 'Sender name', readOnly: true },
253
+ body: { type: 'string', description: 'Message content', readOnly: true },
254
+ createdAt: { type: 'string', format: 'date-time', description: 'Timestamp', readOnly: true },
255
+ },
256
+ },
257
+ examples: [
258
+ 'agent-office --sqlite ./data.db list-messages-to-notify --json \'{\"coworker\": \"Bob\", \"hours\": 24}\'',
259
+ ],
260
+ },
261
+ {
262
+ name: 'mark-messages-as-notified',
263
+ description: 'Mark specific messages as notified',
264
+ requestSchema: {
265
+ description: 'Request body for marking messages as notified',
266
+ properties: {
267
+ ids: {
268
+ type: 'array',
269
+ description: 'Array of message IDs to mark',
270
+ items: { type: 'number', description: 'Message ID' },
271
+ },
272
+ },
273
+ required: ['ids'],
274
+ },
275
+ responseSchema: {
276
+ description: 'Success confirmation',
277
+ properties: {
278
+ success: { type: 'boolean', description: 'Whether operation succeeded' },
279
+ marked: { type: 'number', description: 'Number of messages marked' },
280
+ },
281
+ },
282
+ examples: ['agent-office --sqlite ./data.db mark-messages-as-notified --json \'{\"ids\": [1, 2, 3]}\' --dry-run'],
283
+ mutating: true,
284
+ },
285
+ // Cron commands
286
+ {
287
+ name: 'list-crons',
288
+ description: 'List all cron jobs for a specific coworker',
289
+ requestSchema: {
290
+ description: 'Request body for listing cron jobs',
291
+ properties: {
292
+ coworker: { type: 'string', description: 'Coworker name' },
293
+ },
294
+ required: ['coworker'],
295
+ },
296
+ responseSchema: {
297
+ description: 'Array of cron jobs',
298
+ properties: {
299
+ id: { type: 'number', description: 'Cron job ID', readOnly: true },
300
+ name: { type: 'string', description: 'Job name', readOnly: true },
301
+ sessionName: { type: 'string', description: 'Coworker name', readOnly: true },
302
+ schedule: { type: 'string', description: 'Cron expression', readOnly: true },
303
+ timezone: { type: 'string', description: 'Timezone', readOnly: true },
304
+ message: { type: 'string', description: 'Task description', readOnly: true },
305
+ enabled: { type: 'boolean', description: 'Whether job is enabled', readOnly: true },
306
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
307
+ lastRun: { type: 'string', format: 'date-time', description: 'Last execution time', readOnly: true },
308
+ },
309
+ },
310
+ examples: [
311
+ 'agent-office --sqlite ./data.db list-crons --json \'{\"coworker\": \"Alice\"}\' --fields name,schedule',
312
+ ],
313
+ },
314
+ {
315
+ name: 'delete-cron',
316
+ description: 'Delete a cron job',
317
+ requestSchema: {
318
+ description: 'Request body for deleting a cron job',
319
+ properties: {
320
+ id: { type: 'number', description: 'Cron job ID' },
321
+ },
322
+ required: ['id'],
323
+ },
324
+ responseSchema: {
325
+ description: 'Success confirmation',
326
+ properties: {
327
+ success: { type: 'boolean', description: 'Whether deletion succeeded' },
328
+ message: { type: 'string', description: 'Status message' },
329
+ },
330
+ },
331
+ examples: ['agent-office --sqlite ./data.db delete-cron --json \'{\"id\": 1}\' --dry-run'],
332
+ mutating: true,
333
+ },
334
+ {
335
+ name: 'enable-cron',
336
+ description: 'Enable a cron job',
337
+ requestSchema: {
338
+ description: 'Request body for enabling a cron job',
339
+ properties: {
340
+ id: { type: 'number', description: 'Cron job ID' },
341
+ },
342
+ required: ['id'],
343
+ },
344
+ responseSchema: {
345
+ description: 'The enabled cron job',
346
+ properties: {
347
+ id: { type: 'number', description: 'Cron job ID', readOnly: true },
348
+ name: { type: 'string', description: 'Job name', readOnly: true },
349
+ enabled: { type: 'boolean', description: 'Enabled status', readOnly: true },
350
+ },
351
+ },
352
+ examples: ['agent-office --sqlite ./data.db enable-cron --json \'{\"id\": 1}\' --dry-run'],
353
+ mutating: true,
354
+ },
355
+ {
356
+ name: 'disable-cron',
357
+ description: 'Disable a cron job',
358
+ requestSchema: {
359
+ description: 'Request body for disabling a cron job',
360
+ properties: {
361
+ id: { type: 'number', description: 'Cron job ID' },
362
+ },
363
+ required: ['id'],
364
+ },
365
+ responseSchema: {
366
+ description: 'The disabled cron job',
367
+ properties: {
368
+ id: { type: 'number', description: 'Cron job ID', readOnly: true },
369
+ name: { type: 'string', description: 'Job name', readOnly: true },
370
+ enabled: { type: 'boolean', description: 'Enabled status', readOnly: true },
371
+ },
372
+ },
373
+ examples: ['agent-office --sqlite ./data.db disable-cron --json \'{\"id\": 1}\' --dry-run'],
374
+ mutating: true,
375
+ },
376
+ {
377
+ name: 'cron-history',
378
+ description: 'Get cron job execution history',
379
+ requestSchema: {
380
+ description: 'Request body for getting cron history',
381
+ properties: {
382
+ id: { type: 'number', description: 'Cron job ID' },
383
+ limit: {
384
+ type: 'number',
385
+ description: 'Maximum number of history entries to return (default: 10)',
386
+ default: 10,
387
+ },
388
+ },
389
+ required: ['id'],
390
+ },
391
+ responseSchema: {
392
+ description: 'Array of execution history entries',
393
+ properties: {
394
+ id: { type: 'number', description: 'History entry ID', readOnly: true },
395
+ cronJobId: { type: 'number', description: 'Cron job ID', readOnly: true },
396
+ executedAt: { type: 'string', format: 'date-time', description: 'Execution timestamp', readOnly: true },
397
+ success: { type: 'boolean', description: 'Whether execution succeeded', readOnly: true },
398
+ output: { type: 'string', description: 'Execution output', readOnly: true },
399
+ errorMessage: { type: 'string', description: 'Error message if failed', readOnly: true },
400
+ },
401
+ },
402
+ examples: ['agent-office --sqlite ./data.db cron-history --json \'{\"id\": 1, \"limit\": 10}\''],
403
+ },
404
+ {
405
+ name: 'check-cron-jobs',
406
+ description: 'Check if there are any active cron jobs for a coworker this minute',
407
+ requestSchema: {
408
+ description: 'Request body for checking active cron jobs',
409
+ properties: {
410
+ coworker: { type: 'string', description: 'Coworker name to check' },
411
+ },
412
+ required: ['coworker'],
413
+ },
414
+ responseSchema: {
415
+ description: 'Active cron job status',
416
+ properties: {
417
+ hasActive: { type: 'boolean', description: 'Whether there are active jobs' },
418
+ count: { type: 'number', description: 'Number of active jobs' },
419
+ },
420
+ },
421
+ examples: ['agent-office --sqlite ./data.db check-cron-jobs --json \'{\"coworker\": \"Alice\"}\''],
422
+ },
423
+ {
424
+ name: 'list-active-cron-actions',
425
+ description: 'List all active cron actions for a specific coworker that should run this minute (for AI execution)',
426
+ requestSchema: {
427
+ description: 'Request body for listing active cron actions',
428
+ properties: {
429
+ coworker: { type: 'string', description: 'Coworker name to check' },
430
+ },
431
+ required: ['coworker'],
432
+ },
433
+ responseSchema: {
434
+ description: 'Array of active cron actions',
435
+ properties: {
436
+ id: { type: 'number', description: 'Cron job ID', readOnly: true },
437
+ action: { type: 'string', description: 'Task description to execute', readOnly: true },
438
+ timezone: { type: 'string', description: 'Timezone', readOnly: true },
439
+ },
440
+ },
441
+ examples: ['agent-office --sqlite ./data.db list-active-cron-actions --json \'{\"coworker\": \"Alice\"}\''],
442
+ },
443
+ {
444
+ name: 'create-cron',
445
+ description: 'Create a new cron job directly',
446
+ requestSchema: {
447
+ description: 'Request body for creating a cron job',
448
+ properties: {
449
+ name: { type: 'string', description: 'Job name' },
450
+ coworker: { type: 'string', description: 'Coworker who will execute this job' },
451
+ schedule: { type: 'string', description: 'Cron expression (e.g., "0 9 * * *" for daily at 9am)' },
452
+ task: { type: 'string', description: 'Description of the task to perform' },
453
+ notify: { type: 'string', description: 'Instructions on who to notify when complete' },
454
+ timezone: { type: 'string', description: 'Timezone for schedule (e.g., "America/New_York")' },
455
+ },
456
+ required: ['name', 'coworker', 'schedule', 'task', 'notify', 'timezone'],
457
+ },
458
+ responseSchema: {
459
+ description: 'The newly created cron job',
460
+ properties: {
461
+ id: { type: 'number', description: 'Cron job ID', readOnly: true },
462
+ name: { type: 'string', description: 'Job name', readOnly: true },
463
+ sessionName: { type: 'string', description: 'Coworker name', readOnly: true },
464
+ schedule: { type: 'string', description: 'Cron expression', readOnly: true },
465
+ timezone: { type: 'string', description: 'Timezone', readOnly: true },
466
+ message: { type: 'string', description: 'Full task description', readOnly: true },
467
+ enabled: { type: 'boolean', description: 'Whether job is enabled', readOnly: true },
468
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
469
+ lastRun: { type: 'string', format: 'date-time', description: 'Last execution time', readOnly: true },
470
+ },
471
+ },
472
+ examples: [
473
+ 'agent-office --sqlite ./data.db create-cron --json \'{\"name\": \"Daily Report\", \"coworker\": \"Alice\", \"schedule\": \"0 9 * * *\", \"task\": \"Send report\", \"notify\": \"Bob\", \"timezone\": \"America/New_York\"}\' --dry-run',
474
+ ],
475
+ mutating: true,
476
+ },
477
+ // Cron request management commands
478
+ {
479
+ name: 'list-cron-requests',
480
+ description: 'List all cron job requests',
481
+ responseSchema: {
482
+ description: 'Array of cron job requests',
483
+ properties: {
484
+ id: { type: 'number', description: 'Request ID', readOnly: true },
485
+ name: { type: 'string', description: 'Job name', readOnly: true },
486
+ sessionName: { type: 'string', description: 'Requester name', readOnly: true },
487
+ schedule: { type: 'string', description: 'Cron expression', readOnly: true },
488
+ timezone: { type: 'string', description: 'Timezone', readOnly: true },
489
+ message: { type: 'string', description: 'Task description', readOnly: true },
490
+ status: { type: 'string', description: 'Request status (pending, approved, rejected)', readOnly: true },
491
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
492
+ },
493
+ },
494
+ examples: ['agent-office --sqlite ./data.db list-cron-requests --output json'],
495
+ },
496
+ {
497
+ name: 'request-cron',
498
+ description: 'Create a new cron job request (requires approval)',
499
+ requestSchema: {
500
+ description: 'Request body for creating a cron request',
501
+ properties: {
502
+ name: { type: 'string', description: 'Job name' },
503
+ coworker: { type: 'string', description: 'Coworker who will execute this job' },
504
+ schedule: { type: 'string', description: 'Cron expression' },
505
+ task: { type: 'string', description: 'Description of the task to perform' },
506
+ notify: { type: 'string', description: 'Instructions on who to notify when complete' },
507
+ timezone: { type: 'string', description: 'Timezone for schedule' },
508
+ },
509
+ required: ['name', 'coworker', 'schedule', 'task', 'notify', 'timezone'],
510
+ },
511
+ responseSchema: {
512
+ description: 'The newly created cron request',
513
+ properties: {
514
+ id: { type: 'number', description: 'Request ID', readOnly: true },
515
+ name: { type: 'string', description: 'Job name', readOnly: true },
516
+ sessionName: { type: 'string', description: 'Requester name', readOnly: true },
517
+ schedule: { type: 'string', description: 'Cron expression', readOnly: true },
518
+ timezone: { type: 'string', description: 'Timezone', readOnly: true },
519
+ message: { type: 'string', description: 'Task description', readOnly: true },
520
+ status: { type: 'string', description: 'Request status', readOnly: true },
521
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
522
+ },
523
+ },
524
+ examples: [
525
+ 'agent-office --sqlite ./data.db request-cron --json \'{\"name\": \"Weekly Report\", \"coworker\": \"Alice\", \"schedule\": \"0 9 * * 1\", \"task\": \"Generate report\", \"notify\": \"Bob\", \"timezone\": \"America/New_York\"}\'',
526
+ ],
527
+ mutating: true,
528
+ },
529
+ {
530
+ name: 'get-cron-request',
531
+ description: 'Get details of a cron job request',
532
+ requestSchema: {
533
+ description: 'Request body for getting a cron request',
534
+ properties: {
535
+ id: { type: 'number', description: 'Request ID' },
536
+ },
537
+ required: ['id'],
538
+ },
539
+ responseSchema: {
540
+ description: 'Cron request details',
541
+ properties: {
542
+ id: { type: 'number', description: 'Request ID', readOnly: true },
543
+ name: { type: 'string', description: 'Job name', readOnly: true },
544
+ sessionName: { type: 'string', description: 'Requester name', readOnly: true },
545
+ schedule: { type: 'string', description: 'Cron expression', readOnly: true },
546
+ timezone: { type: 'string', description: 'Timezone', readOnly: true },
547
+ message: { type: 'string', description: 'Task description', readOnly: true },
548
+ status: { type: 'string', description: 'Request status', readOnly: true },
549
+ reviewedBy: { type: 'string', description: 'Reviewer name', readOnly: true },
550
+ reviewerNotes: { type: 'string', description: 'Reviewer notes', readOnly: true },
551
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
552
+ },
553
+ },
554
+ examples: ['agent-office --sqlite ./data.db get-cron-request --json \'{\"id\": 1}\''],
555
+ },
556
+ {
557
+ name: 'approve-cron-request',
558
+ description: 'Approve a pending cron job request',
559
+ requestSchema: {
560
+ description: 'Request body for approving a cron request',
561
+ properties: {
562
+ id: { type: 'number', description: 'Request ID' },
563
+ reviewer: { type: 'string', description: 'Name of the reviewer' },
564
+ notes: { type: 'string', description: 'Optional reviewer notes' },
565
+ },
566
+ required: ['id', 'reviewer'],
567
+ },
568
+ responseSchema: {
569
+ description: 'The approved cron job',
570
+ properties: {
571
+ id: { type: 'number', description: 'Cron job ID', readOnly: true },
572
+ name: { type: 'string', description: 'Job name', readOnly: true },
573
+ sessionName: { type: 'string', description: 'Coworker name', readOnly: true },
574
+ schedule: { type: 'string', description: 'Cron expression', readOnly: true },
575
+ timezone: { type: 'string', description: 'Timezone', readOnly: true },
576
+ message: { type: 'string', description: 'Task description', readOnly: true },
577
+ enabled: { type: 'boolean', description: 'Enabled status', readOnly: true },
578
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
579
+ },
580
+ },
581
+ examples: [
582
+ 'agent-office --sqlite ./data.db approve-cron-request --json \'{\"id\": 1, \"reviewer\": \"Manager\", \"notes\": \"Approved\"}\' --dry-run',
583
+ ],
584
+ mutating: true,
585
+ },
586
+ {
587
+ name: 'reject-cron-request',
588
+ description: 'Reject a pending cron job request',
589
+ requestSchema: {
590
+ description: 'Request body for rejecting a cron request',
591
+ properties: {
592
+ id: { type: 'number', description: 'Request ID' },
593
+ reviewer: { type: 'string', description: 'Name of the reviewer' },
594
+ notes: { type: 'string', description: 'Optional reviewer notes' },
595
+ },
596
+ required: ['id', 'reviewer'],
597
+ },
598
+ responseSchema: {
599
+ description: 'The rejected cron request',
600
+ properties: {
601
+ id: { type: 'number', description: 'Request ID', readOnly: true },
602
+ name: { type: 'string', description: 'Job name', readOnly: true },
603
+ status: { type: 'string', description: 'Request status', readOnly: true },
604
+ reviewedBy: { type: 'string', description: 'Reviewer name', readOnly: true },
605
+ reviewerNotes: { type: 'string', description: 'Reviewer notes', readOnly: true },
606
+ },
607
+ },
608
+ examples: [
609
+ 'agent-office --sqlite ./data.db reject-cron-request --json \'{\"id\": 1, \"reviewer\": \"Manager\", \"notes\": \"Schedule conflicts\"}\' --dry-run',
610
+ ],
611
+ mutating: true,
612
+ },
613
+ {
614
+ name: 'delete-cron-request',
615
+ description: 'Delete a cron job request',
616
+ requestSchema: {
617
+ description: 'Request body for deleting a cron request',
618
+ properties: {
619
+ id: { type: 'number', description: 'Request ID' },
620
+ },
621
+ required: ['id'],
622
+ },
623
+ responseSchema: {
624
+ description: 'Success confirmation',
625
+ properties: {
626
+ success: { type: 'boolean', description: 'Whether deletion succeeded' },
627
+ message: { type: 'string', description: 'Status message' },
628
+ },
629
+ },
630
+ examples: ['agent-office --sqlite ./data.db delete-cron-request --json \'{\"id\": 1}\' --dry-run'],
631
+ mutating: true,
632
+ },
633
+ // Task board commands
634
+ {
635
+ name: 'add-task',
636
+ description: 'Create a new task',
637
+ requestSchema: {
638
+ description: 'Request body for creating a task',
639
+ properties: {
640
+ title: { type: 'string', description: 'Task title' },
641
+ description: { type: 'string', description: 'Task description (optional)' },
642
+ assignee: { type: 'string', description: 'Assigned coworker name (optional)' },
643
+ column: {
644
+ type: 'string',
645
+ description: 'Initial column (idea, approved idea, working on, blocked, ready for review, done)',
646
+ },
647
+ dependencies: {
648
+ type: 'array',
649
+ description: 'Array of task IDs this task depends on (optional)',
650
+ items: { type: 'number', description: 'Task ID' },
651
+ },
652
+ },
653
+ required: ['title', 'column'],
654
+ },
655
+ responseSchema: {
656
+ description: 'The newly created task',
657
+ properties: {
658
+ id: { type: 'number', description: 'Task ID', readOnly: true },
659
+ title: { type: 'string', description: 'Task title', readOnly: true },
660
+ description: { type: 'string', description: 'Task description', readOnly: true },
661
+ assignee: { type: 'string', description: 'Assigned coworker', readOnly: true },
662
+ column: { type: 'string', description: 'Current column', readOnly: true },
663
+ dependencies: { type: 'array', description: 'Dependency task IDs', readOnly: true },
664
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
665
+ updatedAt: { type: 'string', format: 'date-time', description: 'Last update timestamp', readOnly: true },
666
+ },
667
+ },
668
+ examples: [
669
+ 'agent-office --sqlite ./data.db add-task --json \'{\"title\": \"Implement auth\", \"column\": \"idea\", \"assignee\": \"Alice\"}\' --dry-run',
670
+ ],
671
+ mutating: true,
672
+ },
673
+ {
674
+ name: 'list-tasks',
675
+ description: 'List all tasks',
676
+ requestSchema: {
677
+ description: 'Optional filters for listing tasks',
678
+ properties: {
679
+ assignee: { type: 'string', description: 'Filter by assignee name (optional)' },
680
+ column: { type: 'string', description: 'Filter by column name (optional)' },
681
+ search: { type: 'string', description: 'Search query for title/description (optional)' },
682
+ },
683
+ },
684
+ responseSchema: {
685
+ description: 'Array of tasks',
686
+ properties: {
687
+ id: { type: 'number', description: 'Task ID', readOnly: true },
688
+ title: { type: 'string', description: 'Task title', readOnly: true },
689
+ description: { type: 'string', description: 'Task description', readOnly: true },
690
+ assignee: { type: 'string', description: 'Assigned coworker', readOnly: true },
691
+ column: { type: 'string', description: 'Current column', readOnly: true },
692
+ dependencies: { type: 'array', description: 'Dependency task IDs', readOnly: true },
693
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
694
+ updatedAt: { type: 'string', format: 'date-time', description: 'Last update timestamp', readOnly: true },
695
+ },
696
+ },
697
+ examples: [
698
+ 'agent-office --sqlite ./data.db list-tasks --json \'{\"assignee\": \"Alice\"}\' --fields id,title,column',
699
+ ],
700
+ },
701
+ {
702
+ name: 'get-task',
703
+ description: 'Get a task by ID',
704
+ requestSchema: {
705
+ description: 'Request body for getting a task',
706
+ properties: {
707
+ id: { type: 'number', description: 'Task ID' },
708
+ },
709
+ required: ['id'],
710
+ },
711
+ responseSchema: {
712
+ description: 'Task details',
713
+ properties: {
714
+ id: { type: 'number', description: 'Task ID', readOnly: true },
715
+ title: { type: 'string', description: 'Task title', readOnly: true },
716
+ description: { type: 'string', description: 'Task description', readOnly: true },
717
+ assignee: { type: 'string', description: 'Assigned coworker', readOnly: true },
718
+ column: { type: 'string', description: 'Current column', readOnly: true },
719
+ dependencies: { type: 'array', description: 'Dependency task IDs', readOnly: true },
720
+ createdAt: { type: 'string', format: 'date-time', description: 'Creation timestamp', readOnly: true },
721
+ updatedAt: { type: 'string', format: 'date-time', description: 'Last update timestamp', readOnly: true },
722
+ },
723
+ },
724
+ examples: ['agent-office --sqlite ./data.db get-task --json \'{\"id\": 1}\''],
725
+ },
726
+ {
727
+ name: 'update-task',
728
+ description: 'Update a task',
729
+ requestSchema: {
730
+ description: 'Request body for updating a task',
731
+ properties: {
732
+ id: { type: 'number', description: 'Task ID (required identifier)' },
733
+ title: { type: 'string', description: 'New title (optional)' },
734
+ description: { type: 'string', description: 'New description (optional)' },
735
+ assignee: { type: 'string', description: 'New assignee (optional)' },
736
+ column: { type: 'string', description: 'New column (optional)' },
737
+ dependencies: {
738
+ type: 'array',
739
+ description: 'New dependencies array (optional)',
740
+ items: { type: 'number', description: 'Task ID' },
741
+ },
742
+ },
743
+ required: ['id'],
744
+ },
745
+ responseSchema: {
746
+ description: 'The updated task',
747
+ properties: {
748
+ id: { type: 'number', description: 'Task ID', readOnly: true },
749
+ title: { type: 'string', description: 'Task title', readOnly: true },
750
+ description: { type: 'string', description: 'Task description', readOnly: true },
751
+ assignee: { type: 'string', description: 'Assigned coworker', readOnly: true },
752
+ column: { type: 'string', description: 'Current column', readOnly: true },
753
+ dependencies: { type: 'array', description: 'Dependency task IDs', readOnly: true },
754
+ updatedAt: { type: 'string', format: 'date-time', description: 'Last update timestamp', readOnly: true },
755
+ },
756
+ },
757
+ examples: [
758
+ 'agent-office --sqlite ./data.db update-task --json \'{\"id\": 1, \"title\": \"Updated title\"}\' --dry-run',
759
+ ],
760
+ mutating: true,
761
+ },
762
+ {
763
+ name: 'delete-task',
764
+ description: 'Delete a task',
765
+ requestSchema: {
766
+ description: 'Request body for deleting a task',
767
+ properties: {
768
+ id: { type: 'number', description: 'Task ID' },
769
+ },
770
+ required: ['id'],
771
+ },
772
+ responseSchema: {
773
+ description: 'Success confirmation',
774
+ properties: {
775
+ success: { type: 'boolean', description: 'Whether deletion succeeded' },
776
+ message: { type: 'string', description: 'Status message' },
777
+ },
778
+ },
779
+ examples: ['agent-office --sqlite ./data.db delete-task --json \'{\"id\": 1}\' --dry-run'],
780
+ mutating: true,
781
+ },
782
+ {
783
+ name: 'assign-task',
784
+ description: 'Assign a task to someone',
785
+ requestSchema: {
786
+ description: 'Request body for assigning a task',
787
+ properties: {
788
+ id: { type: 'number', description: 'Task ID' },
789
+ assignee: { type: 'string', description: 'Name of the coworker to assign' },
790
+ },
791
+ required: ['id', 'assignee'],
792
+ },
793
+ responseSchema: {
794
+ description: 'The assigned task',
795
+ properties: {
796
+ id: { type: 'number', description: 'Task ID', readOnly: true },
797
+ title: { type: 'string', description: 'Task title', readOnly: true },
798
+ assignee: { type: 'string', description: 'Assigned coworker', readOnly: true },
799
+ column: { type: 'string', description: 'Current column', readOnly: true },
800
+ },
801
+ },
802
+ examples: ['agent-office --sqlite ./data.db assign-task --json \'{\"id\": 1, \"assignee\": \"Bob\"}\' --dry-run'],
803
+ mutating: true,
804
+ },
805
+ {
806
+ name: 'unassign-task',
807
+ description: 'Remove assignment from a task',
808
+ requestSchema: {
809
+ description: 'Request body for unassigning a task',
810
+ properties: {
811
+ id: { type: 'number', description: 'Task ID' },
812
+ },
813
+ required: ['id'],
814
+ },
815
+ responseSchema: {
816
+ description: 'The unassigned task',
817
+ properties: {
818
+ id: { type: 'number', description: 'Task ID', readOnly: true },
819
+ title: { type: 'string', description: 'Task title', readOnly: true },
820
+ assignee: { type: 'null', description: 'No assignee', readOnly: true },
821
+ column: { type: 'string', description: 'Current column', readOnly: true },
822
+ },
823
+ },
824
+ examples: ['agent-office --sqlite ./data.db unassign-task --json \'{\"id\": 1}\' --dry-run'],
825
+ mutating: true,
826
+ },
827
+ {
828
+ name: 'move-task',
829
+ description: 'Move a task to a different column',
830
+ requestSchema: {
831
+ description: 'Request body for moving a task',
832
+ properties: {
833
+ id: { type: 'number', description: 'Task ID' },
834
+ column: {
835
+ type: 'string',
836
+ description: 'Target column (idea, approved idea, working on, blocked, ready for review, done)',
837
+ },
838
+ },
839
+ required: ['id', 'column'],
840
+ },
841
+ responseSchema: {
842
+ description: 'The moved task',
843
+ properties: {
844
+ id: { type: 'number', description: 'Task ID', readOnly: true },
845
+ title: { type: 'string', description: 'Task title', readOnly: true },
846
+ column: { type: 'string', description: 'New column', readOnly: true },
847
+ updatedAt: { type: 'string', format: 'date-time', description: 'Move timestamp', readOnly: true },
848
+ },
849
+ },
850
+ examples: [
851
+ 'agent-office --sqlite ./data.db move-task --json \'{\"id\": 1, \"column\": \"working on\"}\' --dry-run',
852
+ ],
853
+ mutating: true,
854
+ },
855
+ {
856
+ name: 'task-stats',
857
+ description: 'Show task statistics by column',
858
+ responseSchema: {
859
+ description: 'Array of column statistics',
860
+ properties: {
861
+ column: { type: 'string', description: 'Column name', readOnly: true },
862
+ count: { type: 'number', description: 'Number of tasks in this column', readOnly: true },
863
+ },
864
+ },
865
+ examples: ['agent-office --sqlite ./data.db task-stats --output json'],
866
+ },
867
+ {
868
+ name: 'task-history',
869
+ description: 'Show column transition history for a task with durations',
870
+ requestSchema: {
871
+ description: 'Request body for getting task history',
872
+ properties: {
873
+ id: { type: 'number', description: 'Task ID' },
874
+ },
875
+ required: ['id'],
876
+ },
877
+ responseSchema: {
878
+ description: 'Array of column transitions',
879
+ properties: {
880
+ id: { type: 'number', description: 'History entry ID', readOnly: true },
881
+ taskId: { type: 'number', description: 'Task ID', readOnly: true },
882
+ fromColumn: { type: 'string', description: 'Previous column', readOnly: true },
883
+ toColumn: { type: 'string', description: 'New column', readOnly: true },
884
+ movedAt: { type: 'string', format: 'date-time', description: 'Move timestamp', readOnly: true },
885
+ duration: { type: 'number', description: 'Duration in seconds', readOnly: true },
886
+ },
887
+ },
888
+ examples: ['agent-office --sqlite ./data.db task-history --json \'{\"id\": 1}\''],
889
+ },
890
+ {
891
+ name: 'list-task-columns',
892
+ description: 'List all valid task board columns',
893
+ responseSchema: {
894
+ description: 'Array of valid columns',
895
+ properties: {
896
+ name: { type: 'string', description: 'Column name', readOnly: true },
897
+ description: { type: 'string', description: 'Column purpose', readOnly: true },
898
+ },
899
+ },
900
+ examples: ['agent-office --sqlite ./data.db list-task-columns'],
901
+ },
902
+ // Skill and context commands
903
+ {
904
+ name: 'list-skills',
905
+ description: 'List available agent skills',
906
+ responseSchema: {
907
+ description: 'Array of skill names',
908
+ properties: {
909
+ '*': { type: 'string', description: 'Skill identifier', readOnly: true },
910
+ },
911
+ },
912
+ examples: ['agent-office list-skills --output json'],
913
+ },
914
+ {
915
+ name: 'get-skill',
916
+ description: 'Get the content of a specific agent skill',
917
+ requestSchema: {
918
+ description: 'Request body for getting a skill',
919
+ properties: {
920
+ name: { type: 'string', description: 'Skill name (e.g., create-coworker)' },
921
+ },
922
+ required: ['name'],
923
+ },
924
+ responseSchema: {
925
+ description: 'Raw markdown content of the skill file',
926
+ properties: {
927
+ content: { type: 'string', description: 'Markdown content', readOnly: true },
928
+ },
929
+ },
930
+ examples: ['agent-office get-skill --json \'{\"name\": \"create-coworker\"}\''],
931
+ },
932
+ {
933
+ name: 'context',
934
+ description: 'Show context window discipline guidelines',
935
+ responseSchema: {
936
+ description: 'Raw markdown content',
937
+ properties: {
938
+ content: { type: 'string', description: 'Markdown content', readOnly: true },
939
+ },
940
+ },
941
+ examples: ['agent-office context'],
942
+ },
943
+ {
944
+ name: 'agents',
945
+ description: 'Show agent security guidelines',
946
+ responseSchema: {
947
+ description: 'Raw markdown content',
948
+ properties: {
949
+ content: { type: 'string', description: 'Markdown content', readOnly: true },
950
+ },
951
+ },
952
+ examples: ['agent-office agents'],
953
+ },
954
+ {
955
+ name: 'schema',
956
+ description: 'Show schema for a specific command or all commands',
957
+ arguments: [
958
+ { name: '[command]', description: 'Command name to show schema for (omit for all commands)', required: false },
959
+ ],
960
+ responseSchema: {
961
+ description: 'Command schema or array of all schemas',
962
+ properties: {
963
+ name: { type: 'string', description: 'Command name', readOnly: true },
964
+ description: { type: 'string', description: 'Command description', readOnly: true },
965
+ requestSchema: { type: 'object', description: 'Input schema', readOnly: true },
966
+ responseSchema: { type: 'object', description: 'Output schema', readOnly: true },
967
+ examples: { type: 'array', description: 'Usage examples', readOnly: true },
968
+ mutating: { type: 'boolean', description: 'Whether command modifies data', readOnly: true },
969
+ },
970
+ },
971
+ examples: ['agent-office schema', 'agent-office schema create-coworker'],
972
+ },
973
+ {
974
+ name: 'describe',
975
+ description: 'Describe available commands (alias for schema)',
976
+ arguments: [
977
+ { name: '[command]', description: 'Command name to describe (omit for all commands)', required: false },
978
+ ],
979
+ responseSchema: {
980
+ description: 'Command schema or array of all schemas',
981
+ properties: {
982
+ name: { type: 'string', description: 'Command name', readOnly: true },
983
+ description: { type: 'string', description: 'Command description', readOnly: true },
984
+ requestSchema: { type: 'object', description: 'Input schema', readOnly: true },
985
+ responseSchema: { type: 'object', description: 'Output schema', readOnly: true },
986
+ examples: { type: 'array', description: 'Usage examples', readOnly: true },
987
+ mutating: { type: 'boolean', description: 'Whether command modifies data', readOnly: true },
988
+ },
989
+ },
990
+ examples: ['agent-office describe', 'agent-office describe create-coworker'],
991
+ },
992
+ {
993
+ name: 'mcp',
994
+ description: 'Run as an MCP (Model Context Protocol) server',
995
+ examples: ['agent-office mcp'],
996
+ },
997
+ ];
998
+ export function getSchema(commandName) {
999
+ if (!commandName) {
1000
+ return commandSchemas;
1001
+ }
1002
+ return commandSchemas.find(cmd => cmd.name === commandName) || null;
1003
+ }
1004
+ export function getMutatingCommands() {
1005
+ return commandSchemas.filter(cmd => cmd.mutating).map(cmd => cmd.name);
1006
+ }
1007
+ export function validateCommandParams(commandName, params) {
1008
+ const schema = getSchema(commandName);
1009
+ if (!schema || Array.isArray(schema)) {
1010
+ return { valid: false, errors: [`Unknown command: ${commandName}`] };
1011
+ }
1012
+ const errors = [];
1013
+ // Check required JSON fields if there's a request schema
1014
+ if (schema.requestSchema?.required) {
1015
+ for (const field of schema.requestSchema.required) {
1016
+ if (!(field in params) || params[field] === undefined || params[field] === null) {
1017
+ errors.push(`Missing required field: ${field}`);
1018
+ }
1019
+ }
1020
+ }
1021
+ return { valid: errors.length === 0, errors };
1022
+ }
1023
+ //# sourceMappingURL=schema.js.map