@tacitai/mcp-server 0.6.16 → 0.6.17

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/prompts.d.ts CHANGED
@@ -14,6 +14,50 @@ export declare const CAPABILITY_DOMAINS: Array<{
14
14
  triggers: string[];
15
15
  description: string;
16
16
  }>;
17
+ export declare const GM_WORKFLOW: {
18
+ readonly name: "Content Ingestion & Placement";
19
+ readonly trigger: "User asks to add, save, ingest, or file content into the workspace";
20
+ readonly steps: readonly [{
21
+ readonly id: "ingest";
22
+ readonly name: "Ingest";
23
+ readonly action: "Call tacit_gm_ingest with a title and the content (inline text via \"content\", or a local file via \"file_path\" — never both). Do NOT set domain_id.";
24
+ readonly tools: readonly ["tacit_gm_ingest"];
25
+ readonly signal: "You receive a catalog_id, artifact_id, content_type, and is_duplicate flag.";
26
+ readonly on_duplicate: "If is_duplicate is true, tell the user this content already exists and ask how to proceed: update, skip, or ingest as a new version.";
27
+ }, {
28
+ readonly id: "classify_present";
29
+ readonly name: "Present classification";
30
+ readonly action: "Tell the user what the GM classified their content as (use the content_type from step 1). Then offer placement options in plain language: \"Where should this live? I can file it in your workspace structure, add it to your knowledge base, both, or just keep it in the data lake for now.\"";
31
+ readonly tools: readonly [];
32
+ readonly signal: "User chooses: workspace structure (pyramid), knowledge base, both, or lake-only.";
33
+ }, {
34
+ readonly id: "review_structure";
35
+ readonly name: "Review workspace structure";
36
+ readonly action: "If the user chose workspace structure (or said \"you decide\"): call tacit_pyramid_list_portfolios to see all portfolios. Find the portfolio that best fits the content. Then call tacit_pyramid_list_programs with that portfolio_id. Find the program that best fits. Then call tacit_pyramid_list_dossiers with that program_id. Find the dossier that best fits — or note that a new one is needed.";
37
+ readonly tools: readonly ["tacit_pyramid_list_portfolios", "tacit_pyramid_list_programs", "tacit_pyramid_list_dossiers"];
38
+ readonly signal: "You have identified a specific portfolio → program → dossier path, or determined a new dossier is needed.";
39
+ readonly skip_when: "User chose KB-only or lake-only.";
40
+ }, {
41
+ readonly id: "propose";
42
+ readonly name: "Propose placement";
43
+ readonly action: "Present the user with your specific recommendation: \"I'd file this under [portfolio name] → [program name] → [dossier name] — [one sentence why].\" If no existing dossier fits, propose creating one: \"I'd create a new [dossier name] folder under [program name] for this.\" If the user chose KB, propose the target collection. Always ask for approval before proceeding.";
44
+ readonly tools: readonly [];
45
+ readonly signal: "User approves, redirects to a different location, or declines.";
46
+ }, {
47
+ readonly id: "place";
48
+ readonly name: "Place";
49
+ readonly action: "On approval — for pyramid: if a new dossier is needed, call tacit_pyramid_create_dossier first to get the dossier_id. Then call tacit_gm_approve with the catalog_id from step 1, surface=\"pyramid\", collection_or_program set to the program UUID, and dossier_id set to the dossier UUID. For KB: call tacit_gm_approve with surface=\"kb\" and the collection UUID. For both: do pyramid first, then KB (two separate tacit_gm_approve calls). For lake-only: no call needed — just acknowledge.";
50
+ readonly tools: readonly ["tacit_gm_approve", "tacit_pyramid_create_dossier"];
51
+ readonly signal: "tacit_gm_approve returns success.";
52
+ readonly skip_when: "User chose lake-only.";
53
+ }, {
54
+ readonly id: "confirm";
55
+ readonly name: "Confirm";
56
+ readonly action: "Tell the user where their content landed in plain language: \"Done — your [title] is filed under [portfolio] → [program] → [dossier].\" For KB: \"Added to your [collection name] knowledge base as a draft.\" For lake-only: \"Saved to your data lake — you can file it somewhere later.\" Never expose catalog IDs, artifact IDs, or UUIDs.";
57
+ readonly tools: readonly [];
58
+ readonly signal: "User sees a clear confirmation of where their content lives.";
59
+ }];
60
+ };
17
61
  export declare const EXPERIENCES: readonly [{
18
62
  readonly id: "explore_workspace";
19
63
  readonly num: 1;
package/dist/prompts.js CHANGED
@@ -54,8 +54,20 @@ function buildAssistantSystemPrompt(state) {
54
54
  lines.push('');
55
55
  lines.push('Prefer a single read tool for direct lookups, synthesis for open questions, and ask before any write or dispatch.');
56
56
  lines.push('- For all synthesis and research requests, use burst mode. Do not use crew_compose or orbit modes — they are under review and not reliable for the MCP experience. If a task seems to need multi-step agentic work, break it into sequential burst calls instead.');
57
- lines.push('- For all content ingestion (adding documents, text, URLs, or files to the workspace), always use tacit_gm_ingest. Do not call tacit_artifact_create, tacit_import_artifact, tacit_ingest_file, tacit_ingest_url, tacit_ingest_url_general, or tacit_kb_create_article directly for new content — those bypass the data lake classification pipeline.');
58
- lines.push('- After tacit_gm_ingest succeeds, you MUST complete the full General Manager flow — lake ingestion alone is never "done." The full flow is: (1) Present the classification result and offer placement options: KB, Pyramid, both, or lake-only. (2) If the user chooses Pyramid (or you are recommending a spot): call tacit_pyramid_list_portfolios, then list programs in the matching portfolio, then list dossiers in the matching program — find the best fit for the content. (3) Present a specific placement proposal: the portfolio, program, and dossier you recommend, with a short reason. Ask the user to approve. (4) On approval, call tacit_gm_approve with catalog_id, surface="pyramid", the program UUID as collection_or_program, and the dossier UUID as dossier_id. (5) If the user chooses KB: call tacit_gm_approve with surface="kb". (6) If the user says lake-only or declines: acknowledge it, no approve call needed. Never skip the proposal step. Never auto-place without asking.');
57
+ lines.push('- For all content ingestion (adding documents, text, URLs, or files to the workspace), follow the GM Workflow below. Do not call tacit_artifact_create, tacit_import_artifact, tacit_ingest_file, tacit_ingest_url, tacit_ingest_url_general, or tacit_kb_create_article directly for new content — those bypass the data lake classification pipeline.');
58
+ lines.push('');
59
+ lines.push('### GM Workflow — Content Ingestion & Placement');
60
+ lines.push('When the user asks to add, save, ingest, or file content, follow these steps in order. Lake ingestion alone is NEVER "done" — always complete through to the confirm step.');
61
+ for (const step of GM_WORKFLOW.steps) {
62
+ let line = `${step.id.toUpperCase()}: ${step.action}`;
63
+ if ('skip_when' in step && step.skip_when) {
64
+ line += ` (Skip this step if: ${step.skip_when})`;
65
+ }
66
+ if ('on_duplicate' in step && step.on_duplicate) {
67
+ line += ` Duplicate handling: ${step.on_duplicate}`;
68
+ }
69
+ lines.push(`- Step ${GM_WORKFLOW.steps.indexOf(step) + 1} — ${line}`);
70
+ }
59
71
  return lines.join('\n');
60
72
  }
61
73
  export async function fetchWorkspaceState(client) {
@@ -104,6 +116,60 @@ export const CAPABILITY_DOMAINS = [
104
116
  { domain: 'Connectors', triggers: ['Connect my Gmail…', 'Add Slack…'], description: 'Connect external tools via claude.ai Integrations' },
105
117
  { domain: 'Code & GitHub', triggers: ['Show my repo connections…', 'Sync from GitHub…'], description: 'Repository connections and code sync' },
106
118
  ];
119
+ // ─── GM Workflow Chain ──────────────────────────────────────────────────────
120
+ // Mirrors the /gm skill SOPs (SOP-01 through SOP-06) as a structured chain
121
+ // the LLM can follow step-by-step during content ingestion.
122
+ export const GM_WORKFLOW = {
123
+ name: 'Content Ingestion & Placement',
124
+ trigger: 'User asks to add, save, ingest, or file content into the workspace',
125
+ steps: [
126
+ {
127
+ id: 'ingest',
128
+ name: 'Ingest',
129
+ action: 'Call tacit_gm_ingest with a title and the content (inline text via "content", or a local file via "file_path" — never both). Do NOT set domain_id.',
130
+ tools: ['tacit_gm_ingest'],
131
+ signal: 'You receive a catalog_id, artifact_id, content_type, and is_duplicate flag.',
132
+ on_duplicate: 'If is_duplicate is true, tell the user this content already exists and ask how to proceed: update, skip, or ingest as a new version.',
133
+ },
134
+ {
135
+ id: 'classify_present',
136
+ name: 'Present classification',
137
+ action: 'Tell the user what the GM classified their content as (use the content_type from step 1). Then offer placement options in plain language: "Where should this live? I can file it in your workspace structure, add it to your knowledge base, both, or just keep it in the data lake for now."',
138
+ tools: [],
139
+ signal: 'User chooses: workspace structure (pyramid), knowledge base, both, or lake-only.',
140
+ },
141
+ {
142
+ id: 'review_structure',
143
+ name: 'Review workspace structure',
144
+ action: 'If the user chose workspace structure (or said "you decide"): call tacit_pyramid_list_portfolios to see all portfolios. Find the portfolio that best fits the content. Then call tacit_pyramid_list_programs with that portfolio_id. Find the program that best fits. Then call tacit_pyramid_list_dossiers with that program_id. Find the dossier that best fits — or note that a new one is needed.',
145
+ tools: ['tacit_pyramid_list_portfolios', 'tacit_pyramid_list_programs', 'tacit_pyramid_list_dossiers'],
146
+ signal: 'You have identified a specific portfolio → program → dossier path, or determined a new dossier is needed.',
147
+ skip_when: 'User chose KB-only or lake-only.',
148
+ },
149
+ {
150
+ id: 'propose',
151
+ name: 'Propose placement',
152
+ action: 'Present the user with your specific recommendation: "I\'d file this under [portfolio name] → [program name] → [dossier name] — [one sentence why]." If no existing dossier fits, propose creating one: "I\'d create a new [dossier name] folder under [program name] for this." If the user chose KB, propose the target collection. Always ask for approval before proceeding.',
153
+ tools: [],
154
+ signal: 'User approves, redirects to a different location, or declines.',
155
+ },
156
+ {
157
+ id: 'place',
158
+ name: 'Place',
159
+ action: 'On approval — for pyramid: if a new dossier is needed, call tacit_pyramid_create_dossier first to get the dossier_id. Then call tacit_gm_approve with the catalog_id from step 1, surface="pyramid", collection_or_program set to the program UUID, and dossier_id set to the dossier UUID. For KB: call tacit_gm_approve with surface="kb" and the collection UUID. For both: do pyramid first, then KB (two separate tacit_gm_approve calls). For lake-only: no call needed — just acknowledge.',
160
+ tools: ['tacit_gm_approve', 'tacit_pyramid_create_dossier'],
161
+ signal: 'tacit_gm_approve returns success.',
162
+ skip_when: 'User chose lake-only.',
163
+ },
164
+ {
165
+ id: 'confirm',
166
+ name: 'Confirm',
167
+ action: 'Tell the user where their content landed in plain language: "Done — your [title] is filed under [portfolio] → [program] → [dossier]." For KB: "Added to your [collection name] knowledge base as a draft." For lake-only: "Saved to your data lake — you can file it somewhere later." Never expose catalog IDs, artifact IDs, or UUIDs.',
168
+ tools: [],
169
+ signal: 'User sees a clear confirmation of where their content lives.',
170
+ },
171
+ ],
172
+ };
107
173
  export const EXPERIENCES = [
108
174
  { id: 'explore_workspace', num: 1, name: 'Explore Your Workspace', tier: 1, tierName: 'Orient & Equip', action: 'Type: "What is in my workspace?" — see what knowledge, collections, and structure are already here.', signal: 'You can describe what is in your workspace', tip: '' },
109
175
  { id: 'see_capabilities', num: 2, name: 'See What\'s Possible', tier: 1, tierName: 'Orient & Equip', action: 'Type: "What can TACIT do for me?" — discover the full range of capabilities available to you.', signal: 'You know what TACIT can do and are ready to try it', tip: '' },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tacitai/mcp-server",
3
- "version": "0.6.16",
3
+ "version": "0.6.17",
4
4
  "private": false,
5
5
  "description": "stdio MCP server wrapping Tacit /api/v1 REST/SSE API",
6
6
  "license": "UNLICENSED",