@tacitai/mcp-server 0.6.10 → 0.6.11

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.
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { TacitApiError } from '../client.js';
3
- import { success, error } from './errors.js';
3
+ import { success, error, featureDisabledResult } from './errors.js';
4
4
  export function registerPeopleTools(server, getClient) {
5
5
  server.tool('tacit_list_people', 'List all people in the current workspace.', {}, async () => {
6
6
  try {
@@ -10,7 +10,7 @@ export function registerPeopleTools(server, getClient) {
10
10
  }
11
11
  catch (e) {
12
12
  if (e instanceof TacitApiError)
13
- return error(e.message);
13
+ return featureDisabledResult(e) ?? error(e.message);
14
14
  return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
15
15
  }
16
16
  });
@@ -24,7 +24,7 @@ export function registerPeopleTools(server, getClient) {
24
24
  }
25
25
  catch (e) {
26
26
  if (e instanceof TacitApiError)
27
- return error(e.message);
27
+ return featureDisabledResult(e) ?? error(e.message);
28
28
  return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
29
29
  }
30
30
  });
@@ -40,7 +40,7 @@ export function registerPeopleTools(server, getClient) {
40
40
  }
41
41
  catch (e) {
42
42
  if (e instanceof TacitApiError)
43
- return error(e.message);
43
+ return featureDisabledResult(e) ?? error(e.message);
44
44
  return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
45
45
  }
46
46
  });
@@ -52,7 +52,7 @@ export function registerPeopleTools(server, getClient) {
52
52
  }
53
53
  catch (e) {
54
54
  if (e instanceof TacitApiError)
55
- return error(e.message);
55
+ return featureDisabledResult(e) ?? error(e.message);
56
56
  return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
57
57
  }
58
58
  });
@@ -11,7 +11,7 @@
11
11
  */
12
12
  import { z } from 'zod';
13
13
  import { getClient, TacitApiError, TokenExpiredError } from '../client.js';
14
- import { apiErrorResult as sharedApiErrorResult } from './errors.js';
14
+ import { apiErrorResult as sharedApiErrorResult, featureDisabledResult } from './errors.js';
15
15
  function apiErrorResult(err, toolName) {
16
16
  if (err instanceof TokenExpiredError) {
17
17
  return {
@@ -20,6 +20,9 @@ function apiErrorResult(err, toolName) {
20
20
  };
21
21
  }
22
22
  if (err instanceof TacitApiError) {
23
+ const disabled = featureDisabledResult(err);
24
+ if (disabled)
25
+ return disabled;
23
26
  return { content: [{ type: 'text', text: `API error ${err.statusCode} on ${toolName}: ${err.body}` }], isError: true };
24
27
  }
25
28
  const msg = err instanceof Error ? err.message : String(err);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Compile-time tool classification. Governs which tools may be called over HTTPS.
3
- * Partition: 6 stdio_only + 17 admin_only + 2 gate_only + 121 https = 146.
3
+ * Partition: 6 stdio_only + 17 admin_only + 2 gate_only + 125 https = 150.
4
4
  */
5
5
  export type ToolTransport = 'https' | 'stdio_only' | 'admin_only' | 'gate_only';
6
6
  export type ToolClass = 'read' | 'write' | 'admin' | 'dispatch';
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Compile-time tool classification. Governs which tools may be called over HTTPS.
3
- * Partition: 6 stdio_only + 17 admin_only + 2 gate_only + 121 https = 146.
3
+ * Partition: 6 stdio_only + 17 admin_only + 2 gate_only + 125 https = 150.
4
4
  */
5
5
  const STDIO_ONLY = [
6
6
  'tacit_ingest_file',
@@ -75,6 +75,7 @@ const READ_TOOLS = [
75
75
  'tacit_list_annotations',
76
76
  'tacit_list_deliverables',
77
77
  'tacit_list_skills',
78
+ 'tacit_onboarding',
78
79
  'tacit_list_people',
79
80
  'tacit_list_workspaces',
80
81
  'tacit_outbox_status',
@@ -117,10 +118,13 @@ const WRITE_TOOLS = [
117
118
  'tacit_artifact_publish',
118
119
  'tacit_artifact_revise',
119
120
  'tacit_artifact_update',
121
+ 'tacit_connector_write_back',
120
122
  'tacit_create_event',
121
123
  'tacit_create_person',
122
124
  'tacit_edit_deliverable',
123
125
  'tacit_export_to_git',
126
+ 'tacit_gm_approve',
127
+ 'tacit_gm_ingest',
124
128
  'tacit_import_artifact',
125
129
  'tacit_ingest_file',
126
130
  'tacit_ingest_url',
@@ -190,8 +194,8 @@ function build() {
190
194
  if (!exclusive.has(n))
191
195
  add(n, classOf(n), 'https', false);
192
196
  }
193
- if (map.size !== 146)
194
- throw new Error(`tool registry expected 146 tools, got ${map.size}`);
197
+ if (map.size !== 150)
198
+ throw new Error(`tool registry expected 150 tools, got ${map.size}`);
195
199
  return map;
196
200
  }
197
201
  export const TOOL_REGISTRY = build();
@@ -446,19 +446,24 @@ export function registerResearchTools(server, getClientFn, getPrincipalFn) {
446
446
  let pyramidMoved = false;
447
447
  const placements = [];
448
448
  try {
449
- const kbArticle = await client.post('/api/v1/kb/promote-from-artifact', { artifact_id });
449
+ // BUG-336: use the real KB promote-from-artifact endpoint.
450
+ const kbArticle = await client.post(`/api/v1/knowledge/articles/from-artifact/${encodeURIComponent(artifact_id)}`, { placement: { kb: {} } });
450
451
  kbArticleId = str(kbArticle['article_id'] ?? kbArticle['id']) || undefined;
451
452
  }
452
- catch { /* KB promote not available */ }
453
+ catch (e) {
454
+ placements.push({ step: 'kb_promote', error: String(e) });
455
+ }
453
456
  try {
454
- const moved = await client.post('/api/v1/move', {
455
- artifact_id,
456
- placement: { pyramid: { portfolio_id: target.portfolio_id, program_id: target.program_id } },
457
+ // BUG-336: use PATCH /api/v1/objects/:id/placement (the real move endpoint).
458
+ const moved = await client.patch(`/api/v1/objects/${encodeURIComponent(artifact_id)}/placement`, {
459
+ pyramid: { portfolio_id: target.portfolio_id, program_id: target.program_id },
457
460
  });
458
461
  placements.push(moved);
459
462
  pyramidMoved = true;
460
463
  }
461
- catch { /* move endpoint not available */ }
464
+ catch (e) {
465
+ placements.push({ step: 'pyramid_move', error: String(e) });
466
+ }
462
467
  if (target.dossier_id) {
463
468
  try {
464
469
  const dossierPath = `/api/v1/dossiers/${encodeURIComponent(target.dossier_id)}`;
@@ -483,13 +488,14 @@ export function registerResearchTools(server, getClientFn, getPrincipalFn) {
483
488
  });
484
489
  }
485
490
  if (content) {
491
+ // BUG-336: send content_body (not content) and program_id.
486
492
  const created = await client.post('/api/v1/artifacts', {
487
493
  title: title ?? 'Research Report',
488
- content,
494
+ content_body: content,
489
495
  domain: 'research',
490
496
  output_format: 'DOCUMENT',
491
497
  portfolio_id: target.portfolio_id,
492
- artifact_kind: 'research_report',
498
+ program_id: target.program_id,
493
499
  });
494
500
  return ok({
495
501
  artifact_id: created['artifact_id'] ?? created['id'],
@@ -10,11 +10,15 @@
10
10
  */
11
11
  import { z } from 'zod';
12
12
  import { TacitApiError, TokenExpiredError } from '../client.js';
13
+ import { featureDisabledResult } from './errors.js';
13
14
  function apiErrorResult(err, toolName) {
14
15
  if (err instanceof TokenExpiredError) {
15
16
  return { content: [{ type: 'text', text: err.message }], isError: true };
16
17
  }
17
18
  if (err instanceof TacitApiError) {
19
+ const disabled = featureDisabledResult(err);
20
+ if (disabled)
21
+ return disabled;
18
22
  return { content: [{ type: 'text', text: `API error ${err.statusCode} on ${toolName}: ${err.body}` }], isError: true };
19
23
  }
20
24
  const msg = err instanceof Error ? err.message : String(err);
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { TacitApiError } from '../client.js';
3
- import { success, error } from './errors.js';
3
+ import { success, error, featureDisabledResult } from './errors.js';
4
4
  export function registerWorkspaceTools(server, getClient) {
5
5
  server.tool('tacit_list_workspaces', 'List all workspaces accessible to the authenticated user.', {}, async () => {
6
6
  try {
@@ -10,7 +10,7 @@ export function registerWorkspaceTools(server, getClient) {
10
10
  }
11
11
  catch (e) {
12
12
  if (e instanceof TacitApiError)
13
- return error(e.message);
13
+ return featureDisabledResult(e) ?? error(e.message);
14
14
  return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
15
15
  }
16
16
  });
@@ -28,7 +28,7 @@ export function registerWorkspaceTools(server, getClient) {
28
28
  }
29
29
  catch (e) {
30
30
  if (e instanceof TacitApiError)
31
- return error(e.message);
31
+ return featureDisabledResult(e) ?? error(e.message);
32
32
  return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
33
33
  }
34
34
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tacitai/mcp-server",
3
- "version": "0.6.10",
3
+ "version": "0.6.11",
4
4
  "description": "stdio MCP server wrapping Tacit /api/v1 REST/SSE API",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,