@tacitai/mcp-server 0.6.50 → 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.
package/dist/index.js CHANGED
@@ -57,6 +57,7 @@ import { registerPeopleTools } from './tools/people.js';
57
57
  import { registerLakeStructureTools } from './tools/lake-structure.js';
58
58
  import { registerResearchTools } from './tools/research.js';
59
59
  import { registerGmTools } from './tools/gm.js';
60
+ import { registerCaptureTools } from './tools/capture.js';
60
61
  import { registerSkillTools } from './tools/skills.js';
61
62
  import { registerWikiTools } from './tools/wiki.js';
62
63
  import { registerVoiceTools } from './tools/voice.js';
@@ -65,6 +66,7 @@ import { registerWorkflowTools } from './tools/workflow.js';
65
66
  import { registerWorkflowTypeTools } from './tools/workflow-types.js';
66
67
  import { registerWorkflowPrereqsTool } from './tools/workflow-prereqs.js';
67
68
  import { registerCmoTools } from './tools/cmo.js';
69
+ import { registerSecretaryTools } from './tools/secretary.js';
68
70
  import { registerPrompts } from './prompts.js';
69
71
  import { getRequestPrincipal, ensureAutonomy, resolveProfileOptions } from './client.js';
70
72
  // Setup wizard (MV-1057h / W5)
@@ -123,6 +125,8 @@ const GUIDANCE_MAP = {
123
125
  WIKI_AUTHORING: 'Wiki authoring active. Follow: classify → validate → author. Write/override require approval.',
124
126
  KB_MANAGEMENT: 'KB management active. Browse the KB structure first, then curate content.',
125
127
  LAKE_OPERATIONS: 'Data lake operations active. Explore catalog first, then ingest/classify, then propose structure.',
128
+ CTO_ENGINEERING: 'CTO Engineering active. Routes engineering requests to sub-execs (Agentic Engineering Exec). Describe the engineering need.',
129
+ SECRETARY_CHRONICLE: 'Secretary active. Use tacit_secretary_log to record events, tacit_secretary_recall to search history.',
126
130
  };
127
131
  function expandGuidance(raw, _typeName, phase) {
128
132
  const expanded = GUIDANCE_MAP[raw];
@@ -295,6 +299,8 @@ async function run() {
295
299
  '- "research", "competitors", "SOTA", "survey" → researcher (or use tacit_research_prepare directly)',
296
300
  '- "wiki article", "publish to wiki" → wiki_editor',
297
301
  '- "knowledge base", "KB article", "organize knowledge" → kb_curator',
302
+ '- "new exec role", "role creation", "engineering architecture" → cto_engineer',
303
+ '- "log decision", "meeting notes", "action items", "decision history" → secretary',
298
304
  '- "data sources", "data lake", "classify", "taxonomy" → lake_operator',
299
305
  '',
300
306
  'HOW TO START:',
@@ -378,6 +384,7 @@ async function run() {
378
384
  registerPeopleTools(server, getClient);
379
385
  registerLakeStructureTools(server, getClient);
380
386
  registerGmTools(server, getClient, gate);
387
+ registerCaptureTools(server, getClient);
381
388
  registerResearchTools(server, getClient, getRequestPrincipal);
382
389
  registerSkillTools(server, getClient);
383
390
  registerWikiTools(server, getClient);
@@ -387,6 +394,7 @@ async function run() {
387
394
  registerWorkflowTypeTools(server, getClient, gate.getRegistry());
388
395
  registerWorkflowPrereqsTool(server, gate.getRegistry());
389
396
  registerCmoTools(server);
397
+ registerSecretaryTools(server, getClient);
390
398
  registerExecRouteTool(server);
391
399
  registerPrompts(server, getClient);
392
400
  if (process.env['MCP_TRANSPORT'] === 'http') {
@@ -87,7 +87,10 @@ const FALLBACK_TEMPLATES = [
87
87
  { slug: 'coo_operator', display_name: 'COO Operator', description: 'Handles operational workflows.', icon: 'settings', default_capabilities: ['operations_management'], workflow_types: ['coo_operations'] },
88
88
  { slug: 'cmo_marketer', display_name: 'CMO Marketer', description: 'Manages marketing pipeline.', icon: 'megaphone', default_capabilities: ['marketing_pipeline'], workflow_types: ['cmo_marketing_pipeline'] },
89
89
  { slug: 'sales_executor', display_name: 'Sales Executor', description: 'Manages sales pipeline.', icon: 'trending_up', default_capabilities: ['pipeline_management'], workflow_types: ['sales_full_pipeline'] },
90
+ { slug: 'researcher', display_name: 'Research Analyst', description: 'Prepares research briefs, competitor analysis, SOTA surveys, and industry benchmarks.', icon: 'search', default_capabilities: ['search', 'recall', 'synthesize'], workflow_types: ['research_deep_dive'] },
90
91
  { slug: 'wiki_editor', display_name: 'Wiki Editor', description: 'Authors and maintains wiki content with structured classification and validation workflows.', icon: 'book', default_capabilities: ['wiki_authoring', 'content_classification', 'content_validation'], workflow_types: ['wiki_authoring'] },
91
92
  { slug: 'kb_curator', display_name: 'KB Curator', description: 'Curates knowledge base articles, collections, and source integrations.', icon: 'library', default_capabilities: ['kb_management', 'article_curation', 'source_administration'], workflow_types: ['kb_management'] },
93
+ { slug: 'cto_engineer', display_name: 'CTO Engineering', description: 'Engineering organization — routes to sub-execs for role creation and skill architecture.', icon: 'cpu', default_capabilities: ['engineering_routing', 'role_creation'], workflow_types: ['cto_engineering'] },
94
+ { slug: 'secretary', display_name: 'Secretary', description: 'Natural language Chronicle event management — logs decisions, meetings, action items, recalls history.', icon: 'calendar', default_capabilities: ['event_logging', 'event_recall', 'decision_tracking'], workflow_types: ['secretary_chronicle'] },
92
95
  { slug: 'lake_operator', display_name: 'Lake Operator', description: 'Manages data lake ingestion, classification, taxonomy, and structure proposals.', icon: 'database', default_capabilities: ['lake_ingestion', 'classification', 'taxonomy_management', 'structure_proposals'], workflow_types: ['lake_operations'] },
93
96
  ];
@@ -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
  }>;
@@ -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
  }
@@ -257,22 +257,22 @@ export declare const createDossierInputSchema: z.ZodObject<{
257
257
  }, "strip", z.ZodTypeAny, {
258
258
  name: string;
259
259
  status?: string | undefined;
260
+ document_ids?: string[] | undefined;
260
261
  portfolio_id?: string | undefined;
261
262
  program_id?: string | undefined;
262
263
  weight?: number | undefined;
263
264
  target_starts_at?: string | undefined;
264
265
  target_ends_at?: string | undefined;
265
- document_ids?: string[] | undefined;
266
266
  dossier_kind?: string | undefined;
267
267
  }, {
268
268
  name: string;
269
269
  status?: string | undefined;
270
+ document_ids?: string[] | undefined;
270
271
  portfolio_id?: string | undefined;
271
272
  program_id?: string | undefined;
272
273
  weight?: number | undefined;
273
274
  target_starts_at?: string | undefined;
274
275
  target_ends_at?: string | undefined;
275
- document_ids?: string[] | undefined;
276
276
  dossier_kind?: string | undefined;
277
277
  }>;
278
278
  export type CreateDossierInput = z.infer<typeof createDossierInputSchema>;
@@ -347,22 +347,22 @@ export declare const updateDossierInputSchema: z.ZodObject<{
347
347
  dossier_id: string;
348
348
  name?: string | undefined;
349
349
  status?: string | undefined;
350
+ document_ids?: string[] | undefined;
350
351
  portfolio_id?: string | undefined;
351
352
  program_id?: string | undefined;
352
353
  weight?: number | undefined;
353
354
  target_starts_at?: string | null | undefined;
354
355
  target_ends_at?: string | null | undefined;
355
- document_ids?: string[] | undefined;
356
356
  }, {
357
357
  dossier_id: string;
358
358
  name?: string | undefined;
359
359
  status?: string | undefined;
360
+ document_ids?: string[] | undefined;
360
361
  portfolio_id?: string | undefined;
361
362
  program_id?: string | undefined;
362
363
  weight?: number | undefined;
363
364
  target_starts_at?: string | null | undefined;
364
365
  target_ends_at?: string | null | undefined;
365
- document_ids?: string[] | undefined;
366
366
  }>;
367
367
  export type UpdateDossierInput = z.infer<typeof updateDossierInputSchema>;
368
368
  export declare const UPDATE_DOSSIER_TOOL_DEF: {
@@ -519,11 +519,11 @@ export declare const assignProgramToVSInputSchema: z.ZodObject<{
519
519
  value_stream_id: z.ZodString;
520
520
  program_id: z.ZodString;
521
521
  }, "strip", z.ZodTypeAny, {
522
- program_id: string;
523
522
  value_stream_id: string;
524
- }, {
525
523
  program_id: string;
524
+ }, {
526
525
  value_stream_id: string;
526
+ program_id: string;
527
527
  }>;
528
528
  export type AssignProgramToVSInput = z.infer<typeof assignProgramToVSInputSchema>;
529
529
  export declare const ASSIGN_PROGRAM_TO_VS_TOOL_DEF: {
@@ -105,6 +105,9 @@ const READ_TOOLS = [
105
105
  'tacit_web_url',
106
106
  'tacit_wiki_classify',
107
107
  'tacit_wiki_validate',
108
+ 'tacit_secretary_recall',
109
+ 'tacit_capture_find',
110
+ 'tacit_capture_synthesize',
108
111
  ];
109
112
  const DISPATCH_TOOLS = [
110
113
  'tacit_agent_delegate',
@@ -184,6 +187,12 @@ const WRITE_TOOLS = [
184
187
  'tacit_workflow_type_create',
185
188
  'tacit_workflow_type_list',
186
189
  'tacit_workflow_type_update',
190
+ 'tacit_secretary_log',
191
+ 'tacit_capture_save',
192
+ 'tacit_capture_remove',
193
+ 'tacit_capture_restore',
194
+ 'tacit_capture_note',
195
+ 'tacit_capture_place',
187
196
  ];
188
197
  function build() {
189
198
  const map = new Map();
@@ -210,8 +219,8 @@ function build() {
210
219
  if (!exclusive.has(n))
211
220
  add(n, classOf(n), 'https', false);
212
221
  }
213
- if (map.size !== 166)
214
- throw new Error(`tool registry expected 166 tools, got ${map.size}`);
222
+ if (map.size !== 175)
223
+ throw new Error(`tool registry expected 175 tools, got ${map.size}`);
215
224
  return map;
216
225
  }
217
226
  export const TOOL_REGISTRY = build();
@@ -10,19 +10,16 @@ export declare const searchInputSchema: z.ZodObject<{
10
10
  query: z.ZodString;
11
11
  limit: z.ZodOptional<z.ZodNumber>;
12
12
  source_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
13
- entity_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
14
13
  origin: z.ZodOptional<z.ZodString>;
15
14
  }, "strip", z.ZodTypeAny, {
16
15
  query: string;
17
16
  limit?: number | undefined;
18
17
  source_types?: string[] | undefined;
19
- entity_types?: string[] | undefined;
20
18
  origin?: string | undefined;
21
19
  }, {
22
20
  query: string;
23
21
  limit?: number | undefined;
24
22
  source_types?: string[] | undefined;
25
- entity_types?: string[] | undefined;
26
23
  origin?: string | undefined;
27
24
  }>;
28
25
  export type SearchInput = z.infer<typeof searchInputSchema>;
@@ -47,13 +44,6 @@ export declare const SEARCH_TOOL_DEF: {
47
44
  };
48
45
  description: string;
49
46
  };
50
- entity_types: {
51
- type: string;
52
- items: {
53
- type: string;
54
- };
55
- description: string;
56
- };
57
47
  origin: {
58
48
  type: string;
59
49
  description: string;
@@ -10,7 +10,6 @@ export const searchInputSchema = z.object({
10
10
  query: z.string().min(1).describe('Search query string'),
11
11
  limit: z.number().int().positive().optional().describe('Maximum results to return'),
12
12
  source_types: z.array(z.string()).optional().describe('Filter by source types (e.g. ["artifact","chronicle"])'),
13
- entity_types: z.array(z.string()).optional().describe('Filter by entity types'),
14
13
  origin: z.string().optional().describe('Optional origin filter (e.g., PYRAMID, LAKE_SYNC, MANUAL) to scope results'),
15
14
  });
16
15
  export const SEARCH_TOOL_DEF = {
@@ -22,7 +21,6 @@ export const SEARCH_TOOL_DEF = {
22
21
  query: { type: 'string', description: 'Search query string' },
23
22
  limit: { type: 'number', description: 'Maximum results to return' },
24
23
  source_types: { type: 'array', items: { type: 'string' }, description: 'Filter by source types' },
25
- entity_types: { type: 'array', items: { type: 'string' }, description: 'Filter by entity types' },
26
24
  origin: { type: 'string', description: 'Optional origin filter (e.g., PYRAMID, LAKE_SYNC, MANUAL) to scope results' },
27
25
  },
28
26
  required: ['query'],
@@ -35,15 +33,13 @@ export const SEARCH_TOOL_DEF = {
35
33
  export function buildSearchRequest(client, input) {
36
34
  return {
37
35
  async execute() {
38
- const { query, limit, source_types, entity_types, origin } = input;
36
+ const { query, limit, source_types, origin } = input;
39
37
  try {
40
38
  const params = { q: query };
41
39
  if (limit !== undefined)
42
40
  params['limit'] = limit;
43
41
  if (source_types && source_types.length > 0)
44
42
  params['source_types'] = source_types.join(',');
45
- if (entity_types && entity_types.length > 0)
46
- params['entity_types'] = entity_types.join(',');
47
43
  if (origin !== undefined)
48
44
  params['origin'] = origin;
49
45
  // GET /api/v1/search?q=<term>
@@ -73,7 +69,6 @@ export function registerSearchTools(server, getClientFn) {
73
69
  query: z.string().min(1).describe('Search query string'),
74
70
  limit: z.number().int().positive().optional().describe('Maximum results to return'),
75
71
  source_types: z.array(z.string()).optional().describe('Filter by source types (e.g. ["artifact","chronicle"])'),
76
- entity_types: z.array(z.string()).optional().describe('Filter by entity types'),
77
72
  origin: z.string().optional().describe('Optional origin filter (e.g., PYRAMID, LAKE_SYNC, MANUAL) to scope results'),
78
73
  }, async (args) => {
79
74
  const client = await getClientFn();
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import type { TacitClient } from '../client.js';
3
+ export declare function registerSecretaryTools(server: McpServer, getClient: () => Promise<TacitClient>): void;
@@ -0,0 +1,165 @@
1
+ import { z } from 'zod';
2
+ import { TacitApiError } from '../client.js';
3
+ import { success, error, featureDisabledResult } from './errors.js';
4
+ /**
5
+ * NL→EventType keyword table (longest-match-first).
6
+ * Each entry: [keyword_phrase, chronicle_event_type].
7
+ * Sorted by phrase length descending so "status update" matches before "status".
8
+ */
9
+ const EVENT_TYPE_KEYWORDS = [
10
+ // Multi-word first (longest match)
11
+ ['status update', 'status_update'],
12
+ ['action item', 'action_item'],
13
+ ['follow up', 'action_item'],
14
+ ['next step', 'action_item'],
15
+ ['kicked off', 'milestone'],
16
+ ['signed off', 'decision'],
17
+ ['agreed to', 'decision'],
18
+ ['wrapped up', 'milestone'],
19
+ ['checked in', 'meeting_note'],
20
+ ['caught up', 'meeting_note'],
21
+ // Single-word
22
+ ['decided', 'decision'],
23
+ ['decision', 'decision'],
24
+ ['approved', 'decision'],
25
+ ['rejected', 'decision'],
26
+ ['met', 'meeting_note'],
27
+ ['meeting', 'meeting_note'],
28
+ ['call', 'meeting_note'],
29
+ ['sync', 'meeting_note'],
30
+ ['standup', 'meeting_note'],
31
+ ['milestone', 'milestone'],
32
+ ['launched', 'milestone'],
33
+ ['shipped', 'milestone'],
34
+ ['completed', 'milestone'],
35
+ ['released', 'milestone'],
36
+ ['deployed', 'milestone'],
37
+ ['blocker', 'blocker'],
38
+ ['blocked', 'blocker'],
39
+ ['stuck', 'blocker'],
40
+ ['risk', 'risk'],
41
+ ['concern', 'risk'],
42
+ ['warning', 'risk'],
43
+ ['note', 'note'],
44
+ ['noticed', 'note'],
45
+ ['observed', 'note'],
46
+ ['fyi', 'note'],
47
+ ['idea', 'insight'],
48
+ ['insight', 'insight'],
49
+ ['realized', 'insight'],
50
+ ['learned', 'insight'],
51
+ ['discovery', 'insight'],
52
+ ['todo', 'action_item'],
53
+ ['task', 'action_item'],
54
+ ['assign', 'action_item'],
55
+ ];
56
+ function classifyEventType(text, hint) {
57
+ if (hint)
58
+ return hint;
59
+ const lower = text.toLowerCase();
60
+ for (const [phrase, eventType] of EVENT_TYPE_KEYWORDS) {
61
+ if (lower.includes(phrase))
62
+ return eventType;
63
+ }
64
+ return 'note';
65
+ }
66
+ export function registerSecretaryTools(server, getClient) {
67
+ server.tool('tacit_secretary_log', 'Log an event to Chronicle using natural language. Classifies the event type automatically from your description, or accepts an explicit event_hint override. Examples: "Decided to use Postgres for the queue", "Met with the design team about onboarding", "Blocker: CI pipeline broken".', {
68
+ description: z.string().describe('Natural language description of the event'),
69
+ event_hint: z
70
+ .enum([
71
+ 'decision',
72
+ 'meeting_note',
73
+ 'milestone',
74
+ 'blocker',
75
+ 'risk',
76
+ 'note',
77
+ 'insight',
78
+ 'action_item',
79
+ 'status_update',
80
+ ])
81
+ .optional()
82
+ .describe('Override automatic classification with an explicit event type'),
83
+ title: z
84
+ .string()
85
+ .optional()
86
+ .describe('Short title (auto-generated from first 80 chars if omitted)'),
87
+ project_id: z.string().uuid().optional().describe('Scope to a specific project'),
88
+ chapter_id: z.string().uuid().optional().describe('Scope to a specific chapter'),
89
+ participants: z
90
+ .string()
91
+ .optional()
92
+ .describe('Comma-separated participant names or emails'),
93
+ }, async (args) => {
94
+ try {
95
+ const client = await getClient();
96
+ const eventType = classifyEventType(args.description, args.event_hint);
97
+ const title = args.title ??
98
+ (args.description.length > 80
99
+ ? args.description.slice(0, 77) + '...'
100
+ : args.description);
101
+ const payload = {
102
+ event_type: eventType,
103
+ title,
104
+ raw_payload: args.description,
105
+ metadata: {},
106
+ };
107
+ if (args.project_id)
108
+ payload['project_id'] = args.project_id;
109
+ if (args.chapter_id)
110
+ payload['chapter_id'] = args.chapter_id;
111
+ if (args.participants) {
112
+ payload['metadata']['participants'] = args.participants
113
+ .split(',')
114
+ .map((p) => p.trim());
115
+ }
116
+ const data = await client.request('POST', '/api/v1/events', payload);
117
+ return success({
118
+ logged: true,
119
+ classified_as: eventType,
120
+ event: data,
121
+ });
122
+ }
123
+ catch (e) {
124
+ if (e instanceof TacitApiError)
125
+ return featureDisabledResult(e) ?? error(e.message);
126
+ return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
127
+ }
128
+ });
129
+ server.tool('tacit_secretary_recall', 'Search Chronicle history with natural language. Finds events matching your query across all event types, with optional date filtering. Examples: "decisions about auth", "meetings last week", "blockers this sprint".', {
130
+ query: z.string().describe('Natural language search query'),
131
+ from: z.string().optional().describe('RFC 3339 lower bound (inclusive)'),
132
+ to: z.string().optional().describe('RFC 3339 upper bound (inclusive)'),
133
+ event_types: z
134
+ .string()
135
+ .optional()
136
+ .describe('Comma-separated event types to filter (e.g. "decision,milestone")'),
137
+ limit: z.number().int().optional().describe('Max results (default 20, cap 100)'),
138
+ project_id: z.string().uuid().optional().describe('Scope to a specific project'),
139
+ }, async (args) => {
140
+ try {
141
+ const client = await getClient();
142
+ const params = new URLSearchParams();
143
+ params.set('q', args.query);
144
+ if (args.from)
145
+ params.set('from', args.from);
146
+ if (args.to)
147
+ params.set('to', args.to);
148
+ if (args.event_types)
149
+ params.set('event_types', args.event_types);
150
+ if (args.limit !== undefined)
151
+ params.set('limit', String(args.limit));
152
+ if (args.project_id)
153
+ params.set('project_id', args.project_id);
154
+ params.set('full_content', 'true');
155
+ const qs = params.toString();
156
+ const data = await client.request('GET', `/api/v1/chronicle/events/recent?${qs}`);
157
+ return success(data);
158
+ }
159
+ catch (e) {
160
+ if (e instanceof TacitApiError)
161
+ return featureDisabledResult(e) ?? error(e.message);
162
+ return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
163
+ }
164
+ });
165
+ }
@@ -12,11 +12,26 @@ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
12
12
  import { TacitClient } from '../client.js';
13
13
  export declare const synthesizeInputSchema: z.ZodObject<{
14
14
  query: z.ZodString;
15
- scope: z.ZodOptional<z.ZodString>;
16
15
  stream: z.ZodOptional<z.ZodBoolean>;
17
16
  workspace_id: z.ZodOptional<z.ZodString>;
17
+ document_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
18
+ saved_items: z.ZodOptional<z.ZodObject<{
19
+ by: z.ZodEnum<["me", "anyone"]>;
20
+ }, "strip", z.ZodTypeAny, {
21
+ by: "me" | "anyone";
22
+ }, {
23
+ by: "me" | "anyone";
24
+ }>>;
25
+ portfolio_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
26
+ value_stream_id: z.ZodOptional<z.ZodString>;
27
+ value_stream_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
28
+ dossier_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
29
+ active_dossier_id: z.ZodOptional<z.ZodString>;
18
30
  collection_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
19
31
  program_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
32
+ placement_scope: z.ZodOptional<z.ZodEnum<["KB", "PYRAMID", "BOTH"]>>;
33
+ mentioned_ids: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
34
+ scope_name: z.ZodOptional<z.ZodString>;
20
35
  origin: z.ZodOptional<z.ZodString>;
21
36
  synthesis_mode: z.ZodOptional<z.ZodEnum<["burst", "orbit", "crew_compose"]>>;
22
37
  max_turns: z.ZodOptional<z.ZodNumber>;
@@ -25,11 +40,22 @@ export declare const synthesizeInputSchema: z.ZodObject<{
25
40
  }, "strip", z.ZodTypeAny, {
26
41
  query: string;
27
42
  workspace_id?: string | undefined;
28
- scope?: string | undefined;
29
43
  stream?: boolean | undefined;
30
44
  origin?: string | undefined;
45
+ document_ids?: string[] | undefined;
46
+ saved_items?: {
47
+ by: "me" | "anyone";
48
+ } | undefined;
49
+ portfolio_ids?: string[] | undefined;
50
+ value_stream_id?: string | undefined;
51
+ value_stream_ids?: string[] | undefined;
52
+ dossier_ids?: string[] | undefined;
53
+ active_dossier_id?: string | undefined;
31
54
  collection_ids?: string[] | undefined;
32
55
  program_ids?: string[] | undefined;
56
+ placement_scope?: "KB" | "PYRAMID" | "BOTH" | undefined;
57
+ mentioned_ids?: string[] | undefined;
58
+ scope_name?: string | undefined;
33
59
  synthesis_mode?: "burst" | "orbit" | "crew_compose" | undefined;
34
60
  max_turns?: number | undefined;
35
61
  voice_mode?: "voice_on" | "voice_off" | "voice_only" | undefined;
@@ -37,11 +63,22 @@ export declare const synthesizeInputSchema: z.ZodObject<{
37
63
  }, {
38
64
  query: string;
39
65
  workspace_id?: string | undefined;
40
- scope?: string | undefined;
41
66
  stream?: boolean | undefined;
42
67
  origin?: string | undefined;
68
+ document_ids?: string[] | undefined;
69
+ saved_items?: {
70
+ by: "me" | "anyone";
71
+ } | undefined;
72
+ portfolio_ids?: string[] | undefined;
73
+ value_stream_id?: string | undefined;
74
+ value_stream_ids?: string[] | undefined;
75
+ dossier_ids?: string[] | undefined;
76
+ active_dossier_id?: string | undefined;
43
77
  collection_ids?: string[] | undefined;
44
78
  program_ids?: string[] | undefined;
79
+ placement_scope?: "KB" | "PYRAMID" | "BOTH" | undefined;
80
+ mentioned_ids?: string[] | undefined;
81
+ scope_name?: string | undefined;
45
82
  synthesis_mode?: "burst" | "orbit" | "crew_compose" | undefined;
46
83
  max_turns?: number | undefined;
47
84
  voice_mode?: "voice_on" | "voice_off" | "voice_only" | undefined;
@@ -58,15 +95,57 @@ export declare const SYNTHESIZE_TOOL_DEF: {
58
95
  type: string;
59
96
  description: string;
60
97
  };
61
- scope: {
98
+ stream: {
62
99
  type: string;
63
100
  description: string;
64
101
  };
65
- stream: {
102
+ workspace_id: {
66
103
  type: string;
67
104
  description: string;
68
105
  };
69
- workspace_id: {
106
+ document_ids: {
107
+ type: string;
108
+ items: {
109
+ type: string;
110
+ };
111
+ description: string;
112
+ };
113
+ saved_items: {
114
+ type: string;
115
+ properties: {
116
+ by: {
117
+ type: string;
118
+ enum: string[];
119
+ };
120
+ };
121
+ description: string;
122
+ };
123
+ portfolio_ids: {
124
+ type: string;
125
+ items: {
126
+ type: string;
127
+ };
128
+ description: string;
129
+ };
130
+ value_stream_id: {
131
+ type: string;
132
+ description: string;
133
+ };
134
+ value_stream_ids: {
135
+ type: string;
136
+ items: {
137
+ type: string;
138
+ };
139
+ description: string;
140
+ };
141
+ dossier_ids: {
142
+ type: string;
143
+ items: {
144
+ type: string;
145
+ };
146
+ description: string;
147
+ };
148
+ active_dossier_id: {
70
149
  type: string;
71
150
  description: string;
72
151
  };
@@ -84,6 +163,22 @@ export declare const SYNTHESIZE_TOOL_DEF: {
84
163
  };
85
164
  description: string;
86
165
  };
166
+ placement_scope: {
167
+ type: string;
168
+ enum: string[];
169
+ description: string;
170
+ };
171
+ mentioned_ids: {
172
+ type: string;
173
+ items: {
174
+ type: string;
175
+ };
176
+ description: string;
177
+ };
178
+ scope_name: {
179
+ type: string;
180
+ description: string;
181
+ };
87
182
  origin: {
88
183
  type: string;
89
184
  description: string;
@@ -11,12 +11,22 @@ import { z } from 'zod';
11
11
  import { getClient, TacitApiError, TokenExpiredError } from '../client.js';
12
12
  export const synthesizeInputSchema = z.object({
13
13
  query: z.string().min(1).describe('Question or synthesis prompt'),
14
- scope: z.string().optional().describe('Optional scope filter (e.g. portfolio or program id)'),
15
14
  stream: z.boolean().optional().describe('If true, use SSE stream variant (/mind/synthesize/stream)'),
16
15
  workspace_id: z.string().optional().describe('Optional workspace UUID'),
17
- collection_ids: z.array(z.string()).optional().describe('Optional collection UUIDs to scope synthesis to'),
18
- program_ids: z.array(z.string()).optional().describe('Optional program UUIDs to scope synthesis to'),
19
- origin: z.string().optional().describe('Optional origin filter (e.g., PYRAMID, LAKE_SYNC, MANUAL) to scope results'),
16
+ document_ids: z.array(z.string()).max(500).optional().describe('Whitelist of artifact UUIDs (max 500) — overrides other scope'),
17
+ saved_items: z.object({ by: z.enum(['me', 'anyone']) }).optional()
18
+ .describe('Filter to saved links. by:"me" = caller only, by:"anyone" = workspace-wide'),
19
+ portfolio_ids: z.array(z.string()).optional().describe('Portfolio UUIDs for pyramid scope'),
20
+ value_stream_id: z.string().optional().describe('Single value-stream UUID (legacy compat)'),
21
+ value_stream_ids: z.array(z.string()).optional().describe('Value-stream UUIDs for pyramid scope'),
22
+ dossier_ids: z.array(z.string()).optional().describe('Dossier UUIDs for dossier scope'),
23
+ active_dossier_id: z.string().optional().describe('Active dossier UUID — sets dossier context without scoping'),
24
+ collection_ids: z.array(z.string()).optional().describe('KB collection UUIDs to scope synthesis to'),
25
+ program_ids: z.array(z.string()).optional().describe('Program UUIDs to scope synthesis to'),
26
+ placement_scope: z.enum(['KB', 'PYRAMID', 'BOTH']).optional().describe('Placement scope filter'),
27
+ mentioned_ids: z.array(z.string()).optional().describe('Mentioned artifact UUIDs from @-mentions'),
28
+ scope_name: z.string().optional().describe('Human-readable scope name (e.g. "in program:Assistant Platform")'),
29
+ origin: z.string().optional().describe('Artifact origin filter (PYRAMID, LAKE_SYNC, MANUAL, CAPTURE)'),
20
30
  synthesis_mode: z.enum(['burst', 'orbit', 'crew_compose']).optional().describe('Synthesis mode: burst (fast retrieval), orbit (agentic multi-turn), crew_compose (crew artifact generation). Default: burst.'),
21
31
  max_turns: z.number().int().min(1).optional().describe('Max agentic loop iterations for orbit/crew_compose mode (1-12 for orbit, 1-54 for crew_compose).'),
22
32
  voice_mode: z.enum(['voice_on', 'voice_off', 'voice_only']).optional()
@@ -33,16 +43,25 @@ export const SYNTHESIZE_TOOL_DEF = {
33
43
  type: 'object',
34
44
  properties: {
35
45
  query: { type: 'string', description: 'Question or synthesis prompt' },
36
- scope: { type: 'string', description: 'Optional scope filter' },
37
46
  stream: { type: 'boolean', description: 'Use SSE stream variant if true' },
38
47
  workspace_id: { type: 'string', description: 'Optional workspace UUID' },
39
- collection_ids: { type: 'array', items: { type: 'string' }, description: 'Optional collection UUIDs to scope synthesis to' },
40
- program_ids: { type: 'array', items: { type: 'string' }, description: 'Optional program UUIDs to scope synthesis to' },
41
- origin: { type: 'string', description: 'Optional origin filter (e.g., PYRAMID, LAKE_SYNC, MANUAL) to scope results' },
48
+ document_ids: { type: 'array', items: { type: 'string' }, description: 'Whitelist of artifact UUIDs (max 500)' },
49
+ saved_items: { type: 'object', properties: { by: { type: 'string', enum: ['me', 'anyone'] } }, description: 'Filter to saved links' },
50
+ portfolio_ids: { type: 'array', items: { type: 'string' }, description: 'Portfolio UUIDs for pyramid scope' },
51
+ value_stream_id: { type: 'string', description: 'Single value-stream UUID' },
52
+ value_stream_ids: { type: 'array', items: { type: 'string' }, description: 'Value-stream UUIDs for pyramid scope' },
53
+ dossier_ids: { type: 'array', items: { type: 'string' }, description: 'Dossier UUIDs for dossier scope' },
54
+ active_dossier_id: { type: 'string', description: 'Active dossier UUID' },
55
+ collection_ids: { type: 'array', items: { type: 'string' }, description: 'KB collection UUIDs to scope synthesis to' },
56
+ program_ids: { type: 'array', items: { type: 'string' }, description: 'Program UUIDs to scope synthesis to' },
57
+ placement_scope: { type: 'string', enum: ['KB', 'PYRAMID', 'BOTH'], description: 'Placement scope filter' },
58
+ mentioned_ids: { type: 'array', items: { type: 'string' }, description: 'Mentioned artifact UUIDs' },
59
+ scope_name: { type: 'string', description: 'Human-readable scope name' },
60
+ origin: { type: 'string', description: 'Artifact origin filter (PYRAMID, LAKE_SYNC, MANUAL, CAPTURE)' },
42
61
  synthesis_mode: { type: 'string', enum: ['burst', 'orbit', 'crew_compose'], description: 'Synthesis mode: burst (fast retrieval), orbit (agentic multi-turn), crew_compose (crew artifact generation). Default: burst.' },
43
62
  max_turns: { type: 'integer', minimum: 1, description: 'Max agentic loop iterations for orbit/crew_compose mode (1-12 for orbit, 1-54 for crew_compose).' },
44
- voice_mode: { type: 'string', enum: ['voice_on', 'voice_off', 'voice_only'], description: 'Voice personalization mode. Supports optional voice_mode for voice-personalized output.' },
45
- voice_profile_id: { type: 'string', description: 'Specific voice profile UUID. Omit to use the active profile when voice_mode is set.' },
63
+ voice_mode: { type: 'string', enum: ['voice_on', 'voice_off', 'voice_only'], description: 'Voice personalization mode.' },
64
+ voice_profile_id: { type: 'string', description: 'Specific voice profile UUID.' },
46
65
  },
47
66
  required: ['query'],
48
67
  },
@@ -54,16 +73,34 @@ export const SYNTHESIZE_TOOL_DEF = {
54
73
  export function buildSynthesizeRequest(client, input) {
55
74
  return {
56
75
  async execute() {
57
- const { query, scope, stream, workspace_id, collection_ids, program_ids, origin, synthesis_mode, max_turns, voice_mode, voice_profile_id } = input;
76
+ const { query, stream, workspace_id, document_ids, saved_items, portfolio_ids, value_stream_id, value_stream_ids, dossier_ids, active_dossier_id, collection_ids, program_ids, placement_scope, mentioned_ids, scope_name, origin, synthesis_mode, max_turns, voice_mode, voice_profile_id } = input;
58
77
  const body = { query };
59
- if (scope)
60
- body['scope'] = scope;
61
78
  if (workspace_id)
62
79
  body['workspace_id'] = workspace_id;
80
+ if (document_ids)
81
+ body['document_ids'] = document_ids;
82
+ if (saved_items)
83
+ body['saved_items'] = saved_items;
84
+ if (portfolio_ids)
85
+ body['portfolio_ids'] = portfolio_ids;
86
+ if (value_stream_id)
87
+ body['value_stream_id'] = value_stream_id;
88
+ if (value_stream_ids)
89
+ body['value_stream_ids'] = value_stream_ids;
90
+ if (dossier_ids)
91
+ body['dossier_ids'] = dossier_ids;
92
+ if (active_dossier_id)
93
+ body['active_dossier_id'] = active_dossier_id;
63
94
  if (collection_ids)
64
95
  body['collection_ids'] = collection_ids;
65
96
  if (program_ids)
66
97
  body['program_ids'] = program_ids;
98
+ if (placement_scope)
99
+ body['placement_scope'] = placement_scope;
100
+ if (mentioned_ids)
101
+ body['mentioned_ids'] = mentioned_ids;
102
+ if (scope_name)
103
+ body['scope_name'] = scope_name;
67
104
  if (origin)
68
105
  body['origin'] = origin;
69
106
  if (synthesis_mode)
@@ -139,12 +176,22 @@ export async function handleSynthesize(args) {
139
176
  }
140
177
  const SYNTH_SCHEMA = {
141
178
  query: z.string().min(1).describe('Question or synthesis prompt'),
142
- scope: z.string().optional().describe('Optional scope filter (e.g. portfolio or program id)'),
143
179
  stream: z.boolean().optional().describe('If true, use SSE stream variant (/mind/synthesize/stream)'),
144
180
  workspace_id: z.string().optional().describe('Optional workspace UUID'),
145
- collection_ids: z.array(z.string()).optional().describe('Optional collection UUIDs to scope synthesis to'),
146
- program_ids: z.array(z.string()).optional().describe('Optional program UUIDs to scope synthesis to'),
147
- origin: z.string().optional().describe('Optional origin filter (e.g., PYRAMID, LAKE_SYNC, MANUAL) to scope results'),
181
+ document_ids: z.array(z.string()).max(500).optional().describe('Whitelist of artifact UUIDs (max 500)'),
182
+ saved_items: z.object({ by: z.enum(['me', 'anyone']) }).optional()
183
+ .describe('Filter to saved links. by:"me" = caller only, by:"anyone" = workspace-wide'),
184
+ portfolio_ids: z.array(z.string()).optional().describe('Portfolio UUIDs for pyramid scope'),
185
+ value_stream_id: z.string().optional().describe('Single value-stream UUID (legacy compat)'),
186
+ value_stream_ids: z.array(z.string()).optional().describe('Value-stream UUIDs for pyramid scope'),
187
+ dossier_ids: z.array(z.string()).optional().describe('Dossier UUIDs for dossier scope'),
188
+ active_dossier_id: z.string().optional().describe('Active dossier UUID'),
189
+ collection_ids: z.array(z.string()).optional().describe('KB collection UUIDs to scope synthesis to'),
190
+ program_ids: z.array(z.string()).optional().describe('Program UUIDs to scope synthesis to'),
191
+ placement_scope: z.enum(['KB', 'PYRAMID', 'BOTH']).optional().describe('Placement scope filter'),
192
+ mentioned_ids: z.array(z.string()).optional().describe('Mentioned artifact UUIDs'),
193
+ scope_name: z.string().optional().describe('Human-readable scope name'),
194
+ origin: z.string().optional().describe('Artifact origin filter (PYRAMID, LAKE_SYNC, MANUAL, CAPTURE)'),
148
195
  synthesis_mode: z.enum(['burst', 'orbit', 'crew_compose']).optional().describe('Synthesis mode: burst (fast retrieval), orbit (agentic multi-turn), crew_compose (crew artifact generation). Default: burst.'),
149
196
  max_turns: z.number().int().min(1).optional().describe('Max agentic loop iterations for orbit/crew_compose mode (1-12 for orbit, 1-54 for crew_compose).'),
150
197
  voice_mode: z.enum(['voice_on', 'voice_off', 'voice_only']).optional()
@@ -74,7 +74,6 @@ export function registerVoiceTools(server, getClientFn) {
74
74
  server.tool('tacit_compose_in_voice', 'Compose an artifact in your writing voice. Combines crew-based artifact generation with voice personalization in a single call. Use when someone says "write this in my voice" or "compose a brief in my style".', {
75
75
  query: z.string().min(1).describe('Composition prompt — what to write'),
76
76
  voice_profile_id: z.string().optional().describe('Specific voice profile UUID. Omit to use the active profile.'),
77
- scope: z.string().optional().describe('Optional scope filter (e.g. portfolio or program id)'),
78
77
  workspace_id: z.string().optional().describe('Optional workspace UUID'),
79
78
  collection_ids: z.array(z.string()).optional().describe('Optional collection UUIDs to scope synthesis to'),
80
79
  program_ids: z.array(z.string()).optional().describe('Optional program UUIDs to scope synthesis to'),
@@ -86,7 +85,6 @@ export function registerVoiceTools(server, getClientFn) {
86
85
  synthesis_mode: 'crew_compose',
87
86
  voice_mode: 'voice_on',
88
87
  voice_profile_id: args.voice_profile_id,
89
- scope: args.scope,
90
88
  workspace_id: args.workspace_id,
91
89
  collection_ids: args.collection_ids,
92
90
  program_ids: args.program_ids,
@@ -77,4 +77,6 @@ export declare const RESEARCH_TYPE_DEF: WorkflowTypeDef;
77
77
  export declare const WIKI_TYPE_DEF: WorkflowTypeDef;
78
78
  export declare const KB_TYPE_DEF: WorkflowTypeDef;
79
79
  export declare const LAKE_TYPE_DEF: WorkflowTypeDef;
80
+ export declare const CTO_TYPE_DEF: WorkflowTypeDef;
81
+ export declare const SECRETARY_TYPE_DEF: WorkflowTypeDef;
80
82
  export declare function createDefaultRegistry(): WorkflowRegistry;
@@ -358,6 +358,33 @@ export const LAKE_TYPE_DEF = {
358
358
  guidance: 'LAKE_OPERATIONS',
359
359
  maxInstances: 3,
360
360
  };
361
+ // ─── CTO type definition (MV-1541 W1a) ──────────────────────────────────────
362
+ export const CTO_TYPE_DEF = {
363
+ name: 'cto_engineering',
364
+ entryTool: null,
365
+ prereqs: { kind: 'flat', tools: [] },
366
+ gatedChecks: 'standard',
367
+ handoff: {
368
+ targetTypes: ['research_exec'],
369
+ preserveParent: false,
370
+ },
371
+ persistent: false,
372
+ failDirection: 'open',
373
+ sharedToolPolicy: 'passthrough',
374
+ guidance: 'CTO_ENGINEERING',
375
+ maxInstances: 1,
376
+ };
377
+ // ─── Secretary type definition (MV-1541 W1b) ────────────────────────────────
378
+ export const SECRETARY_TYPE_DEF = {
379
+ name: 'secretary_chronicle',
380
+ entryTool: null,
381
+ prereqs: { kind: 'flat', tools: [] },
382
+ persistent: false,
383
+ failDirection: 'open',
384
+ sharedToolPolicy: 'passthrough',
385
+ guidance: 'SECRETARY_CHRONICLE',
386
+ maxInstances: 3,
387
+ };
361
388
  // ─── Factory ────────────────────────────────────────────────────────────────
362
389
  export function createDefaultRegistry() {
363
390
  const registry = new WorkflowRegistry();
@@ -371,5 +398,7 @@ export function createDefaultRegistry() {
371
398
  registry.register(WIKI_TYPE_DEF);
372
399
  registry.register(KB_TYPE_DEF);
373
400
  registry.register(LAKE_TYPE_DEF);
401
+ registry.register(CTO_TYPE_DEF);
402
+ registry.register(SECRETARY_TYPE_DEF);
374
403
  return registry;
375
404
  }
@@ -2,8 +2,8 @@
2
2
  * Hand-written TS validation for user-authored workflow type definitions (MV-1539 W7 Step 29).
3
3
  * No ajv dependency — validation is structural checks only.
4
4
  */
5
- export declare const SYSTEM_RESERVED_TYPE_NAMES: readonly ["gm_content_placement", "cos_coordination", "pyr_exec", "coo_operations", "cmo_marketing_pipeline", "sales_full_pipeline", "research_exec", "wiki_authoring", "kb_management", "lake_operations"];
6
- export declare const SYSTEM_RESERVED_TOOLS: readonly ["tacit_gm_ingest", "tacit_gm_approve", "tacit_gm_reset", "tacit_kb_promote_from_artifact", "tacit_kb_promote_from_catalog", "tacit_cmo_lint", "tacit_dispatch_crew", "tacit_research_launch", "tacit_research_prepare", "tacit_research_place"];
5
+ export declare const SYSTEM_RESERVED_TYPE_NAMES: readonly ["gm_content_placement", "cos_coordination", "pyr_exec", "coo_operations", "cmo_marketing_pipeline", "sales_full_pipeline", "research_exec", "wiki_authoring", "kb_management", "lake_operations", "cto_engineering", "secretary_chronicle"];
6
+ export declare const SYSTEM_RESERVED_TOOLS: readonly ["tacit_gm_ingest", "tacit_gm_approve", "tacit_gm_reset", "tacit_kb_promote_from_artifact", "tacit_kb_promote_from_catalog", "tacit_cmo_lint", "tacit_dispatch_crew", "tacit_research_launch", "tacit_research_prepare", "tacit_research_place", "tacit_secretary_log", "tacit_secretary_recall"];
7
7
  export interface UserTypeValidationResult {
8
8
  valid: boolean;
9
9
  errors: string[];
@@ -6,12 +6,14 @@ export const SYSTEM_RESERVED_TYPE_NAMES = [
6
6
  'gm_content_placement', 'cos_coordination', 'pyr_exec',
7
7
  'coo_operations', 'cmo_marketing_pipeline', 'sales_full_pipeline', 'research_exec',
8
8
  'wiki_authoring', 'kb_management', 'lake_operations',
9
+ 'cto_engineering', 'secretary_chronicle',
9
10
  ];
10
11
  export const SYSTEM_RESERVED_TOOLS = [
11
12
  'tacit_gm_ingest', 'tacit_gm_approve', 'tacit_gm_reset',
12
13
  'tacit_kb_promote_from_artifact', 'tacit_kb_promote_from_catalog',
13
14
  'tacit_cmo_lint', 'tacit_dispatch_crew',
14
15
  'tacit_research_launch', 'tacit_research_prepare', 'tacit_research_place',
16
+ 'tacit_secretary_log', 'tacit_secretary_recall',
15
17
  ];
16
18
  const TYPE_NAME_PATTERN = /^[a-z][a-z0-9_]{2,63}$/;
17
19
  export function validateUserTypeDef(input) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tacitai/mcp-server",
3
- "version": "0.6.50",
3
+ "version": "0.6.51",
4
4
  "description": "stdio MCP server wrapping Tacit /api/v1 REST/SSE API",
5
5
  "license": "UNLICENSED",
6
6
  "repository": {