@tacitai/mcp-server 0.6.49 → 0.6.51

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.
@@ -66,19 +66,19 @@ export declare const agentDelegateInputSchema: z.ZodEffects<z.ZodObject<{
66
66
  kind: "task" | "goal" | "schedule";
67
67
  wait: boolean;
68
68
  wait_timeout: number;
69
+ dossier_ids?: string[] | undefined;
69
70
  program_ids?: string[] | undefined;
70
71
  role_slug?: string | undefined;
71
72
  agent_id?: string | undefined;
72
73
  target_ids?: string[] | undefined;
73
- dossier_ids?: string[] | undefined;
74
74
  }, {
75
75
  task: string;
76
+ dossier_ids?: string[] | undefined;
76
77
  program_ids?: string[] | undefined;
77
78
  role_slug?: string | undefined;
78
79
  agent_id?: string | undefined;
79
80
  kind?: "task" | "goal" | "schedule" | undefined;
80
81
  target_ids?: string[] | undefined;
81
- dossier_ids?: string[] | undefined;
82
82
  wait?: boolean | undefined;
83
83
  wait_timeout?: number | undefined;
84
84
  }>, {
@@ -86,19 +86,19 @@ export declare const agentDelegateInputSchema: z.ZodEffects<z.ZodObject<{
86
86
  kind: "task" | "goal" | "schedule";
87
87
  wait: boolean;
88
88
  wait_timeout: number;
89
+ dossier_ids?: string[] | undefined;
89
90
  program_ids?: string[] | undefined;
90
91
  role_slug?: string | undefined;
91
92
  agent_id?: string | undefined;
92
93
  target_ids?: string[] | undefined;
93
- dossier_ids?: string[] | undefined;
94
94
  }, {
95
95
  task: string;
96
+ dossier_ids?: string[] | undefined;
96
97
  program_ids?: string[] | undefined;
97
98
  role_slug?: string | undefined;
98
99
  agent_id?: string | undefined;
99
100
  kind?: "task" | "goal" | "schedule" | undefined;
100
101
  target_ids?: string[] | undefined;
101
- dossier_ids?: string[] | undefined;
102
102
  wait?: boolean | undefined;
103
103
  wait_timeout?: number | undefined;
104
104
  }>;
@@ -154,16 +154,22 @@ export declare const artifactUpdateInputSchema: z.ZodObject<{
154
154
  id: z.ZodString;
155
155
  title: z.ZodOptional<z.ZodString>;
156
156
  content: z.ZodOptional<z.ZodString>;
157
+ file_path: z.ZodOptional<z.ZodString>;
158
+ content_type: z.ZodOptional<z.ZodString>;
157
159
  tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
158
160
  }, "strip", z.ZodTypeAny, {
159
161
  id: string;
160
162
  content?: string | undefined;
161
163
  title?: string | undefined;
164
+ file_path?: string | undefined;
165
+ content_type?: string | undefined;
162
166
  tags?: string[] | undefined;
163
167
  }, {
164
168
  id: string;
165
169
  content?: string | undefined;
166
170
  title?: string | undefined;
171
+ file_path?: string | undefined;
172
+ content_type?: string | undefined;
167
173
  tags?: string[] | undefined;
168
174
  }>;
169
175
  export type ArtifactUpdateInput = z.infer<typeof artifactUpdateInputSchema>;
@@ -185,6 +191,14 @@ export declare const ARTIFACT_UPDATE_TOOL_DEF: {
185
191
  type: string;
186
192
  description: string;
187
193
  };
194
+ file_path: {
195
+ type: string;
196
+ description: string;
197
+ };
198
+ content_type: {
199
+ type: string;
200
+ description: string;
201
+ };
188
202
  tags: {
189
203
  type: string;
190
204
  items: {
@@ -267,14 +281,23 @@ export declare function handleArtifactGet(args: unknown): Promise<{
267
281
  export declare const artifactReviseInputSchema: z.ZodObject<{
268
282
  id: z.ZodString;
269
283
  title: z.ZodOptional<z.ZodString>;
284
+ content: z.ZodOptional<z.ZodString>;
285
+ file_path: z.ZodOptional<z.ZodString>;
286
+ content_type: z.ZodOptional<z.ZodString>;
270
287
  if_match: z.ZodOptional<z.ZodString>;
271
288
  }, "strip", z.ZodTypeAny, {
272
289
  id: string;
290
+ content?: string | undefined;
273
291
  title?: string | undefined;
292
+ file_path?: string | undefined;
293
+ content_type?: string | undefined;
274
294
  if_match?: string | undefined;
275
295
  }, {
276
296
  id: string;
297
+ content?: string | undefined;
277
298
  title?: string | undefined;
299
+ file_path?: string | undefined;
300
+ content_type?: string | undefined;
278
301
  if_match?: string | undefined;
279
302
  }>;
280
303
  export type ArtifactReviseInput = z.infer<typeof artifactReviseInputSchema>;
@@ -292,6 +315,18 @@ export declare const ARTIFACT_REVISE_TOOL_DEF: {
292
315
  type: string;
293
316
  description: string;
294
317
  };
318
+ content: {
319
+ type: string;
320
+ description: string;
321
+ };
322
+ file_path: {
323
+ type: string;
324
+ description: string;
325
+ };
326
+ content_type: {
327
+ type: string;
328
+ description: string;
329
+ };
295
330
  if_match: {
296
331
  type: string;
297
332
  description: string;
@@ -19,6 +19,7 @@
19
19
  import { z } from 'zod';
20
20
  import { getClient } from '../client.js';
21
21
  import { apiErrorResult } from './errors.js';
22
+ import { readGmIngestFile } from './gm.js';
22
23
  // ─── List ────────────────────────────────────────────────────────────────────
23
24
  export const artifactListInputSchema = z.object({
24
25
  q: z.string().optional().describe('Full-text search over title and body (websearch syntax); results include a snippet'),
@@ -159,7 +160,9 @@ export async function handleArtifactCreate(args) {
159
160
  export const artifactUpdateInputSchema = z.object({
160
161
  id: z.string().min(1).describe('Artifact UUID to update'),
161
162
  title: z.string().optional().describe('New title (omit to preserve the current title)'),
162
- content: z.string().optional().describe('New content body'),
163
+ content: z.string().optional().describe('New content body (mutually exclusive with file_path)'),
164
+ file_path: z.string().optional().describe('Absolute path to a local file whose content replaces the artifact body (mutually exclusive with content; stdio transport only)'),
165
+ content_type: z.string().optional().describe('Content MIME type hint'),
163
166
  tags: z.array(z.string()).optional().describe('Updated tags'),
164
167
  });
165
168
  export const ARTIFACT_UPDATE_TOOL_DEF = {
@@ -171,7 +174,9 @@ export const ARTIFACT_UPDATE_TOOL_DEF = {
171
174
  properties: {
172
175
  id: { type: 'string', description: 'Artifact UUID to update' },
173
176
  title: { type: 'string', description: 'New title (omit to preserve the current title)' },
174
- content: { type: 'string', description: 'New content body' },
177
+ content: { type: 'string', description: 'New content body (mutually exclusive with file_path)' },
178
+ file_path: { type: 'string', description: 'Path to file (mutually exclusive with content; stdio only)' },
179
+ content_type: { type: 'string', description: 'MIME type hint' },
175
180
  tags: { type: 'array', items: { type: 'string' }, description: 'Updated tags' },
176
181
  },
177
182
  required: ['id'],
@@ -180,14 +185,27 @@ export const ARTIFACT_UPDATE_TOOL_DEF = {
180
185
  export function buildArtifactUpdateRequest(client, input) {
181
186
  return {
182
187
  async execute() {
183
- const { id, title, content, tags } = input;
188
+ const { id, title, content, file_path, content_type, tags } = input;
189
+ if (content !== undefined && file_path !== undefined) {
190
+ return { content: [{ type: 'text', text: 'provide content or file_path, not both' }], isError: true };
191
+ }
184
192
  try {
193
+ let resolvedContent = content;
194
+ if (file_path !== undefined) {
195
+ const read = readGmIngestFile(file_path);
196
+ if (!read.ok) {
197
+ return { content: [{ type: 'text', text: read.reason }], isError: true };
198
+ }
199
+ resolvedContent = read.content;
200
+ }
185
201
  const body = {};
186
202
  if (title !== undefined)
187
203
  body['title'] = title;
188
204
  // API field is content_body (not content) — map here.
189
- if (content !== undefined)
190
- body['content_body'] = content;
205
+ if (resolvedContent !== undefined)
206
+ body['content_body'] = resolvedContent;
207
+ if (content_type !== undefined)
208
+ body['content_type'] = content_type;
191
209
  if (tags !== undefined)
192
210
  body['tags'] = tags;
193
211
  // PATCH /api/v1/artifacts/:id
@@ -288,6 +306,9 @@ export async function handleArtifactGet(args) {
288
306
  export const artifactReviseInputSchema = z.object({
289
307
  id: z.string().min(1).describe('UUID of the PUBLISHED artifact to revise'),
290
308
  title: z.string().optional().describe('New title (omit to preserve the original title; the version sidebar tracks origin)'),
309
+ content: z.string().optional().describe('New content body for the revision (mutually exclusive with file_path)'),
310
+ file_path: z.string().optional().describe('Absolute path to a local file whose content becomes the revision body (mutually exclusive with content; stdio transport only)'),
311
+ content_type: z.string().optional().describe('Content MIME type hint (e.g. "text/html", "text/markdown"); auto-detected from file extension if omitted'),
291
312
  if_match: z.string().optional().describe('RFC3339 updated_at of the parent (optional concurrency guard)'),
292
313
  });
293
314
  export const ARTIFACT_REVISE_TOOL_DEF = {
@@ -300,6 +321,9 @@ export const ARTIFACT_REVISE_TOOL_DEF = {
300
321
  properties: {
301
322
  id: { type: 'string', description: 'UUID of the PUBLISHED artifact to revise' },
302
323
  title: { type: 'string', description: 'New title (omit to preserve the original)' },
324
+ content: { type: 'string', description: 'New content body (mutually exclusive with file_path)' },
325
+ file_path: { type: 'string', description: 'Path to file (mutually exclusive with content; stdio only)' },
326
+ content_type: { type: 'string', description: 'MIME type hint (auto-detected if omitted)' },
303
327
  if_match: { type: 'string', description: 'RFC3339 updated_at of the parent (optional concurrency guard)' },
304
328
  },
305
329
  required: ['id'],
@@ -308,11 +332,26 @@ export const ARTIFACT_REVISE_TOOL_DEF = {
308
332
  export function buildArtifactReviseRequest(client, input) {
309
333
  return {
310
334
  async execute() {
311
- const { id, title, if_match } = input;
335
+ const { id, title, content, file_path, content_type, if_match } = input;
336
+ if (content !== undefined && file_path !== undefined) {
337
+ return { content: [{ type: 'text', text: 'provide content or file_path, not both' }], isError: true };
338
+ }
312
339
  try {
340
+ let resolvedContent = content;
341
+ if (file_path !== undefined) {
342
+ const read = readGmIngestFile(file_path);
343
+ if (!read.ok) {
344
+ return { content: [{ type: 'text', text: read.reason }], isError: true };
345
+ }
346
+ resolvedContent = read.content;
347
+ }
313
348
  const body = {};
314
349
  if (title !== undefined)
315
350
  body['title'] = title;
351
+ if (resolvedContent !== undefined)
352
+ body['content'] = resolvedContent;
353
+ if (content_type !== undefined)
354
+ body['content_type'] = content_type;
316
355
  // POST /api/v1/artifacts/:id/revise — if_match forwarded as the If-Match header, not the body.
317
356
  const result = await client.post(`/api/v1/artifacts/${id}/revise`, body, if_match !== undefined ? { 'If-Match': if_match } : undefined);
318
357
  return { content: [{ type: 'text', text: JSON.stringify(result) }] };
@@ -444,8 +483,10 @@ export function registerArtifactTools(server, getClientFn) {
444
483
  });
445
484
  server.tool('tacit_artifact_update', 'Update an artifact by id. Route: PATCH /api/v1/artifacts/:id.', {
446
485
  id: z.string().min(1).describe('Artifact UUID to update'),
447
- title: z.string().optional().describe('New title'),
448
- content: z.string().optional().describe('New content body'),
486
+ title: z.string().optional().describe('New title (omit to preserve the current title)'),
487
+ content: z.string().optional().describe('New content body (mutually exclusive with file_path)'),
488
+ file_path: z.string().optional().describe('Path to file (mutually exclusive with content; stdio only)'),
489
+ content_type: z.string().optional().describe('MIME type hint'),
449
490
  tags: z.array(z.string()).optional().describe('Updated tags'),
450
491
  }, async (args) => {
451
492
  const client = await getClientFn();
@@ -465,7 +506,10 @@ export function registerArtifactTools(server, getClientFn) {
465
506
  });
466
507
  server.tool('tacit_artifact_revise', 'Create a new revision of a PUBLISHED artifact. Route: POST /api/v1/artifacts/:id/revise.', {
467
508
  id: z.string().min(1).describe('UUID of the PUBLISHED artifact to revise'),
468
- title: z.string().optional().describe('New title'),
509
+ title: z.string().optional().describe('New title (omit to preserve the original)'),
510
+ content: z.string().optional().describe('New content body (mutually exclusive with file_path)'),
511
+ file_path: z.string().optional().describe('Path to file (mutually exclusive with content; stdio only)'),
512
+ content_type: z.string().optional().describe('MIME type hint (auto-detected if omitted)'),
469
513
  if_match: z.string().optional().describe('RFC3339 updated_at concurrency guard'),
470
514
  }, async (args) => {
471
515
  const client = await getClientFn();
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Capture tools — MV-1537 S3.5: Link Library capture operations exposed as MCP tools.
3
+ *
4
+ * 7 tools:
5
+ * READ: tacit_capture_find, tacit_capture_synthesize
6
+ * WRITE: tacit_capture_save, tacit_capture_remove, tacit_capture_restore,
7
+ * tacit_capture_note, tacit_capture_place
8
+ *
9
+ * All gated on FEATURE_GM_CAPTURE via the backend (returns 404 FEATURE_DISABLED
10
+ * when off). The featureDisabledResult helper surfaces that cleanly.
11
+ */
12
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
13
+ import { TacitClient } from '../client.js';
14
+ export declare function registerCaptureTools(server: McpServer, getClientFn: () => Promise<TacitClient>): void;
@@ -0,0 +1,196 @@
1
+ /**
2
+ * Capture tools — MV-1537 S3.5: Link Library capture operations exposed as MCP tools.
3
+ *
4
+ * 7 tools:
5
+ * READ: tacit_capture_find, tacit_capture_synthesize
6
+ * WRITE: tacit_capture_save, tacit_capture_remove, tacit_capture_restore,
7
+ * tacit_capture_note, tacit_capture_place
8
+ *
9
+ * All gated on FEATURE_GM_CAPTURE via the backend (returns 404 FEATURE_DISABLED
10
+ * when off). The featureDisabledResult helper surfaces that cleanly.
11
+ */
12
+ import { z } from 'zod';
13
+ import { TacitApiError, TokenExpiredError } from '../client.js';
14
+ import { featureDisabledResult } from './errors.js';
15
+ function apiErrorResult(err, toolName) {
16
+ if (err instanceof TokenExpiredError) {
17
+ return { content: [{ type: 'text', text: err.message }], isError: true };
18
+ }
19
+ if (err instanceof TacitApiError) {
20
+ const disabled = featureDisabledResult(err);
21
+ if (disabled)
22
+ return disabled;
23
+ return { content: [{ type: 'text', text: `API error ${err.statusCode} on ${toolName}: ${err.body}` }], isError: true };
24
+ }
25
+ const msg = err instanceof Error ? err.message : String(err);
26
+ return { content: [{ type: 'text', text: `Error: ${msg}` }], isError: true };
27
+ }
28
+ // ─── Schemas ────────────────────────────────────────────────────────────────
29
+ const captureSaveSchema = z.object({
30
+ url: z.string().min(1).describe('URL to save'),
31
+ title: z.string().optional().describe('Title override (auto-fetched if omitted)'),
32
+ note: z.string().optional().describe('Personal note to attach'),
33
+ tags: z.array(z.string()).optional().describe('Tags for categorisation'),
34
+ });
35
+ const captureRemoveSchema = z.object({
36
+ link_id: z.string().uuid().describe('UUID of the saved link to soft-delete'),
37
+ });
38
+ const captureRestoreSchema = z.object({
39
+ link_id: z.string().uuid().describe('UUID of the saved link to restore'),
40
+ });
41
+ const captureNoteSchema = z.object({
42
+ note_id: z.string().uuid().describe('UUID of the note'),
43
+ action: z.enum(['edit', 'remove']).describe('"edit" to update content, "remove" to delete the note'),
44
+ content: z.string().optional().describe('New note content (required for action=edit)'),
45
+ });
46
+ const captureFindSchema = z.object({
47
+ query: z.string().optional().describe('Free-text search query'),
48
+ status: z.enum(['active', 'removed', 'all']).optional().describe('Filter by link status (default: active)'),
49
+ tags: z.array(z.string()).optional().describe('Filter by tags (AND match)'),
50
+ limit: z.number().int().min(1).max(100).optional().describe('Max results (default 20)'),
51
+ offset: z.number().int().min(0).optional().describe('Pagination offset'),
52
+ });
53
+ const capturePlaceSchema = z.object({
54
+ link_id: z.string().uuid().describe('UUID of the saved link to place'),
55
+ kb_collection_ids: z.array(z.string().uuid()).optional().describe('KB collection UUIDs to add the link to'),
56
+ dossier_ids: z.array(z.string().uuid()).optional().describe('Dossier UUIDs to add the link to'),
57
+ remove_from_kb: z.array(z.string().uuid()).optional().describe('KB collection UUIDs to remove the link from'),
58
+ remove_from_dossier: z.array(z.string().uuid()).optional().describe('Dossier UUIDs to remove the link from'),
59
+ });
60
+ const captureSynthesizeSchema = z.object({
61
+ query: z.string().min(1).describe('What to synthesize from saved links'),
62
+ by: z.enum(['me', 'anyone']).optional().describe('Whose saved links to include (default: me)'),
63
+ scope_name: z.string().optional().describe('Scope expression (e.g. "in kb:Sales", "in pyramid")'),
64
+ placement_scope: z.enum(['KB', 'PYRAMID', 'BOTH']).optional().describe('Retrieval scope filter'),
65
+ });
66
+ // ─── Registration ───────────────────────────────────────────────────────────
67
+ export function registerCaptureTools(server, getClientFn) {
68
+ // ── tacit_capture_save ──────────────────────────────────────────────────
69
+ server.tool('tacit_capture_save', 'Save a URL to the link library. Creates a saved_link record, triggers headless enrichment, and indexes for retrieval.', captureSaveSchema.shape, async (args) => {
70
+ try {
71
+ const client = await getClientFn();
72
+ const input = args;
73
+ const body = { url: input.url };
74
+ if (input.title)
75
+ body['title'] = input.title;
76
+ if (input.note)
77
+ body['note'] = input.note;
78
+ if (input.tags)
79
+ body['tags'] = input.tags;
80
+ const res = await client.request('POST', '/api/v1/gm/capture', body);
81
+ return { content: [{ type: 'text', text: JSON.stringify(res, null, 2) }] };
82
+ }
83
+ catch (err) {
84
+ return apiErrorResult(err, 'tacit_capture_save');
85
+ }
86
+ });
87
+ // ── tacit_capture_remove ────────────────────────────────────────────────
88
+ server.tool('tacit_capture_remove', 'Soft-delete a saved link. Removes it from search indexes immediately. Can be restored later.', captureRemoveSchema.shape, async (args) => {
89
+ try {
90
+ const client = await getClientFn();
91
+ const { link_id } = args;
92
+ const res = await client.request('POST', `/api/v1/gm/capture/${link_id}/remove`, {});
93
+ return { content: [{ type: 'text', text: JSON.stringify(res, null, 2) }] };
94
+ }
95
+ catch (err) {
96
+ return apiErrorResult(err, 'tacit_capture_remove');
97
+ }
98
+ });
99
+ // ── tacit_capture_restore ───────────────────────────────────────────────
100
+ server.tool('tacit_capture_restore', 'Restore a previously removed saved link. Re-indexes it for retrieval.', captureRestoreSchema.shape, async (args) => {
101
+ try {
102
+ const client = await getClientFn();
103
+ const { link_id } = args;
104
+ const res = await client.request('POST', `/api/v1/gm/capture/${link_id}/restore`, {});
105
+ return { content: [{ type: 'text', text: JSON.stringify(res, null, 2) }] };
106
+ }
107
+ catch (err) {
108
+ return apiErrorResult(err, 'tacit_capture_restore');
109
+ }
110
+ });
111
+ // ── tacit_capture_note ──────────────────────────────────────────────────
112
+ server.tool('tacit_capture_note', 'Edit or remove a note on a saved link. Use action="edit" with content to update, or action="remove" to delete the note.', captureNoteSchema.shape, async (args) => {
113
+ try {
114
+ const client = await getClientFn();
115
+ const input = args;
116
+ if (input.action === 'edit') {
117
+ if (!input.content) {
118
+ return { content: [{ type: 'text', text: 'Error: content is required for action=edit' }], isError: true };
119
+ }
120
+ const res = await client.request('POST', `/api/v1/gm/capture/notes/${input.note_id}/edit`, { content: input.content });
121
+ return { content: [{ type: 'text', text: JSON.stringify(res, null, 2) }] };
122
+ }
123
+ else {
124
+ const res = await client.request('POST', `/api/v1/gm/capture/notes/${input.note_id}/remove`, {});
125
+ return { content: [{ type: 'text', text: JSON.stringify(res, null, 2) }] };
126
+ }
127
+ }
128
+ catch (err) {
129
+ return apiErrorResult(err, 'tacit_capture_note');
130
+ }
131
+ });
132
+ // ── tacit_capture_find ──────────────────────────────────────────────────
133
+ server.tool('tacit_capture_find', 'Search saved links with optional query, tag, and status filters. Returns grouped results with notes, tags, KB placements, and dossier references.', captureFindSchema.shape, async (args) => {
134
+ try {
135
+ const client = await getClientFn();
136
+ const input = args;
137
+ const body = {};
138
+ if (input.query)
139
+ body['query'] = input.query;
140
+ if (input.status)
141
+ body['status'] = input.status;
142
+ if (input.tags)
143
+ body['tags'] = input.tags;
144
+ if (input.limit !== undefined)
145
+ body['limit'] = input.limit;
146
+ if (input.offset !== undefined)
147
+ body['offset'] = input.offset;
148
+ const res = await client.request('POST', '/api/v1/gm/capture/find', body);
149
+ return { content: [{ type: 'text', text: JSON.stringify(res, null, 2) }] };
150
+ }
151
+ catch (err) {
152
+ return apiErrorResult(err, 'tacit_capture_find');
153
+ }
154
+ });
155
+ // ── tacit_capture_place ─────────────────────────────────────────────────
156
+ server.tool('tacit_capture_place', 'Place a saved link into KB collections and/or dossiers. Can also remove from existing placements.', capturePlaceSchema.shape, async (args) => {
157
+ try {
158
+ const client = await getClientFn();
159
+ const input = args;
160
+ const body = {};
161
+ if (input.kb_collection_ids)
162
+ body['kb_collection_ids'] = input.kb_collection_ids;
163
+ if (input.dossier_ids)
164
+ body['dossier_ids'] = input.dossier_ids;
165
+ if (input.remove_from_kb)
166
+ body['remove_from_kb'] = input.remove_from_kb;
167
+ if (input.remove_from_dossier)
168
+ body['remove_from_dossier'] = input.remove_from_dossier;
169
+ const res = await client.request('POST', `/api/v1/gm/capture/${input.link_id}/place`, body);
170
+ return { content: [{ type: 'text', text: JSON.stringify(res, null, 2) }] };
171
+ }
172
+ catch (err) {
173
+ return apiErrorResult(err, 'tacit_capture_place');
174
+ }
175
+ });
176
+ // ── tacit_capture_synthesize ────────────────────────────────────────────
177
+ server.tool('tacit_capture_synthesize', 'Synthesize an answer from saved links only. Scopes retrieval to the caller\'s saved items (or all workspace saves with by=anyone). Supports scope_name for further filtering.', captureSynthesizeSchema.shape, async (args) => {
178
+ try {
179
+ const client = await getClientFn();
180
+ const input = args;
181
+ const body = {
182
+ query: input.query,
183
+ saved_items: { by: input.by ?? 'me' },
184
+ };
185
+ if (input.scope_name)
186
+ body['scope_name'] = input.scope_name;
187
+ if (input.placement_scope)
188
+ body['placement_scope'] = input.placement_scope;
189
+ const res = await client.request('POST', '/api/v1/synthesize', body);
190
+ return { content: [{ type: 'text', text: JSON.stringify(res, null, 2) }] };
191
+ }
192
+ catch (err) {
193
+ return apiErrorResult(err, 'tacit_capture_synthesize');
194
+ }
195
+ });
196
+ }
@@ -11,14 +11,14 @@ const ROLE_ROUTES = [
11
11
  {
12
12
  slug: 'general_manager',
13
13
  present_as: 'General Manager',
14
- workflow_type: 'gm_operations',
14
+ workflow_type: 'gm_content_placement',
15
15
  keywords: ['file this', 'save this', 'ingest', 'place this', 'store', 'catalog', 'route content', 'gm'],
16
16
  description: 'Routes and places content into the data lake, KB, or pyramid. The default for "do something with this content."',
17
17
  },
18
18
  {
19
19
  slug: 'chief_of_staff',
20
20
  present_as: 'Chief of Staff',
21
- workflow_type: 'cos_operations',
21
+ workflow_type: 'cos_coordination',
22
22
  keywords: ['morning brief', 'daily brief', 'triage', 'email', 'meeting prep', 'agenda', 'schedule', 'priorities'],
23
23
  description: 'Daily operations, briefings, meeting prep, email triage, priority management.',
24
24
  },
@@ -32,45 +32,59 @@ const ROLE_ROUTES = [
32
32
  {
33
33
  slug: 'pyramid_executor',
34
34
  present_as: 'Pyramid Executor',
35
- workflow_type: 'pyramid_operations',
35
+ workflow_type: 'pyr_exec',
36
36
  keywords: ['portfolio', 'program', 'value stream', 'dossier', 'alignment', 'strategic', 'pyramid'],
37
37
  description: 'Manages the organizational pyramid: portfolios, programs, value streams, dossiers.',
38
38
  },
39
39
  {
40
40
  slug: 'cmo_marketer',
41
41
  present_as: 'CMO Marketer',
42
- workflow_type: 'cmo_operations',
42
+ workflow_type: 'cmo_marketing_pipeline',
43
43
  keywords: ['marketing', 'campaign', 'brand', 'content strategy', 'social media', 'positioning', 'messaging'],
44
44
  description: 'Marketing campaigns, brand strategy, content creation, positioning.',
45
45
  },
46
46
  {
47
47
  slug: 'sales_executor',
48
48
  present_as: 'Sales Executor',
49
- workflow_type: 'sales_operations',
49
+ workflow_type: 'sales_full_pipeline',
50
50
  keywords: ['sales', 'pipeline', 'proposal', 'discovery', 'prospect', 'lead', 'deal', 'quote', 'revenue'],
51
51
  description: 'Sales pipeline, proposals, discovery calls, prospecting, deal management.',
52
52
  },
53
53
  {
54
54
  slug: 'researcher',
55
55
  present_as: 'Research Analyst',
56
- workflow_type: 'cos_coordination',
56
+ workflow_type: 'research_deep_dive',
57
57
  keywords: ['research', 'competitors', 'competitive analysis', 'market research', 'industry analysis', 'state of the art', 'benchmark'],
58
58
  description: 'Prepares research briefs using tacit_research_prepare. For deep research topics, competitor analysis, and industry surveys.',
59
59
  },
60
60
  {
61
61
  slug: 'wiki_editor',
62
62
  present_as: 'Wiki Editor',
63
- workflow_type: 'wiki_operations',
63
+ workflow_type: 'wiki_authoring',
64
64
  keywords: ['wiki', 'article', 'publish to wiki', 'documentation', 'wiki write'],
65
65
  description: 'Authors and publishes wiki articles. Wiki writes require approval.',
66
66
  },
67
67
  {
68
68
  slug: 'kb_curator',
69
69
  present_as: 'KB Curator',
70
- workflow_type: 'kb_operations',
70
+ workflow_type: 'kb_management',
71
71
  keywords: ['knowledge base', 'kb article', 'organize knowledge', 'kb collection', 'kb category'],
72
72
  description: 'Manages the knowledge base: articles, collections, categories, source registration.',
73
73
  },
74
+ {
75
+ slug: 'cto_engineer',
76
+ present_as: 'CTO Engineering',
77
+ workflow_type: 'cto_engineering',
78
+ keywords: ['new exec role', 'new executive role', 'create a role', 'design a new workflow', 'engineering architecture', 'new skill', 'role creation', 'enforcement type', 'agentic engineering', 'build a new exec'],
79
+ description: 'Engineering organization: new exec role creation, skill architecture, enforcement type design. Routes to Agentic Engineering Exec.',
80
+ },
81
+ {
82
+ slug: 'secretary',
83
+ present_as: 'Secretary',
84
+ workflow_type: 'secretary_chronicle',
85
+ keywords: ['log decision', 'log meeting', 'meeting notes', 'action items', 'what decisions', 'decision history', 'retro', 'retrospective', 'log blocker', 'status update'],
86
+ description: 'Natural language Chronicle event management: log decisions, meetings, action items, blockers, and recall event history.',
87
+ },
74
88
  {
75
89
  slug: 'lake_operator',
76
90
  present_as: 'Lake Operator',
@@ -110,7 +124,19 @@ function matchRole(request) {
110
124
  }
111
125
  function buildScript(role) {
112
126
  const steps = [];
113
- if (role.workflow_type === 'cos_coordination' && role.slug === 'researcher') {
127
+ if (role.workflow_type === 'cto_engineering') {
128
+ steps.push('CTO routes to the Agentic Engineering Exec. Call tacit_agent_delegate with role_slug="cto_engineer" and describe the engineering request.');
129
+ steps.push('For new role creation: the AE Exec workflow guides through domain analysis → enforcement type selection → registration → verification.');
130
+ steps.push('Check tacit_workflow_prereqs if a tool returns a workflow block — it shows required prior steps.');
131
+ return steps;
132
+ }
133
+ if (role.workflow_type === 'secretary_chronicle') {
134
+ steps.push('Call tacit_secretary_log to record events from natural language, or tacit_secretary_recall to search event history.');
135
+ steps.push('Secretary auto-classifies event types (decision, meeting, action item, blocker, etc.) from your description.');
136
+ steps.push('For decision history: tacit_secretary_recall follows override chains to show how decisions evolved.');
137
+ return steps;
138
+ }
139
+ if (role.workflow_type === 'research_deep_dive' && role.slug === 'researcher') {
114
140
  steps.push('Call tacit_research_prepare with the research topic instead of tacit_agent_delegate.');
115
141
  steps.push('Review the prepared context, then call tacit_research_launch to execute the research.');
116
142
  steps.push('Check tacit_workflow_prereqs if a tool returns a workflow block — it shows required prior steps.');
@@ -118,16 +144,16 @@ function buildScript(role) {
118
144
  }
119
145
  steps.push(`Call tacit_agent_delegate with role_slug="${role.slug}" and your task description.`);
120
146
  steps.push('The delegation returns agent_id and run_id. Use tacit_agent_status with both to check progress and retrieve results.');
121
- if (role.workflow_type === 'gm_operations') {
147
+ if (role.workflow_type === 'gm_content_placement') {
122
148
  steps.push('For content placement: call tacit_gm_ingest first, then tacit_gm_approve to confirm placement.');
123
149
  }
124
- else if (role.workflow_type === 'wiki_operations') {
150
+ else if (role.workflow_type === 'wiki_authoring') {
125
151
  steps.push('Wiki writes require approval. The workflow enforces: draft → review → approve → publish.');
126
152
  }
127
- else if (role.workflow_type === 'pyramid_operations') {
153
+ else if (role.workflow_type === 'pyr_exec') {
128
154
  steps.push('Use tacit_pyramid_list_portfolios to see the current structure before making changes.');
129
155
  }
130
- if (role.workflow_type === 'cos_operations' || role.workflow_type === 'sales_operations') {
156
+ if (role.workflow_type === 'cos_coordination' || role.workflow_type === 'sales_full_pipeline') {
131
157
  steps.push('While synthesizing, emit brief terminal progress updates so the user knows the system is working.');
132
158
  steps.push('Present the final report as a designed HTML artifact — invoke /artifact-design for the appropriate treatment, publish with the Artifact tool, and open it in the browser automatically.');
133
159
  }
@@ -55,9 +55,9 @@ export declare const gmIngestInputSchema: z.ZodObject<{
55
55
  }, "strip", z.ZodTypeAny, {
56
56
  title: string;
57
57
  content?: string | undefined;
58
+ file_path?: string | undefined;
58
59
  source_uri?: string | undefined;
59
60
  content_type?: string | undefined;
60
- file_path?: string | undefined;
61
61
  classification_hints?: {
62
62
  domain?: string | undefined;
63
63
  content_type?: string | undefined;
@@ -66,9 +66,9 @@ export declare const gmIngestInputSchema: z.ZodObject<{
66
66
  }, {
67
67
  title: string;
68
68
  content?: string | undefined;
69
+ file_path?: string | undefined;
69
70
  source_uri?: string | undefined;
70
71
  content_type?: string | undefined;
71
- file_path?: string | undefined;
72
72
  classification_hints?: {
73
73
  domain?: string | undefined;
74
74
  content_type?: string | undefined;
@@ -255,15 +255,15 @@ export declare const createArticleInputSchema: z.ZodObject<{
255
255
  domain_id: z.ZodOptional<z.ZodString>;
256
256
  }, "strip", z.ZodTypeAny, {
257
257
  title: string;
258
- slug: string;
259
258
  collection_id: string;
259
+ slug: string;
260
260
  status?: "DRAFT" | "PUBLISHED" | undefined;
261
261
  content?: string | undefined;
262
262
  domain_id?: string | undefined;
263
263
  }, {
264
264
  title: string;
265
- slug: string;
266
265
  collection_id: string;
266
+ slug: string;
267
267
  status?: "DRAFT" | "PUBLISHED" | undefined;
268
268
  content?: string | undefined;
269
269
  domain_id?: string | undefined;
@@ -399,12 +399,12 @@ export declare const promoteFromArtifactInputSchema: z.ZodObject<{
399
399
  collection_id: z.ZodString;
400
400
  status: z.ZodOptional<z.ZodEnum<["DRAFT", "PUBLISHED"]>>;
401
401
  }, "strip", z.ZodTypeAny, {
402
- artifact_id: string;
403
402
  collection_id: string;
403
+ artifact_id: string;
404
404
  status?: "DRAFT" | "PUBLISHED" | undefined;
405
405
  }, {
406
- artifact_id: string;
407
406
  collection_id: string;
407
+ artifact_id: string;
408
408
  status?: "DRAFT" | "PUBLISHED" | undefined;
409
409
  }>;
410
410
  export type PromoteFromArtifactInput = z.infer<typeof promoteFromArtifactInputSchema>;