@tacitai/mcp-server 0.6.16 → 0.6.18

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. IMPORTANT: The response will include a placement_proposal with suggested_surface — IGNORE this field, it is a backend stub that always says \"lake.\" You will determine placement yourself in the next steps.";
24
+ readonly tools: readonly ["tacit_gm_ingest"];
25
+ readonly signal: "You receive a catalog_id, artifact_id, content_type, and is_duplicate flag. Save the catalog_id — you will need it for placement.";
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 and offer options";
30
+ readonly action: "Tell the user what the GM classified their content as. Then ALWAYS offer placement options — do not default to lake. Say something like: \"Your [title] is cataloged. Where should it live? I can file it in your workspace structure, add it to your knowledge base, both, or keep it in the data lake for now. Or say 'you decide' and I'll recommend a spot.\" STOP here and wait for the user to respond. Do not proceed until they choose.";
31
+ readonly tools: readonly [];
32
+ readonly signal: "User chooses: workspace structure, knowledge base, both, lake-only, or \"you decide.\"";
33
+ }, {
34
+ readonly id: "review_structure";
35
+ readonly name: "Review workspace structure (MANDATORY for pyramid placement)";
36
+ readonly action: "You MUST call ALL THREE tools in sequence — do not skip any: (1) Call tacit_pyramid_list_portfolios to see all portfolios. Pick the best fit. (2) Call tacit_pyramid_list_programs with that portfolio_id. Pick the best-fit program. (3) Call tacit_pyramid_list_dossiers with that program_id. Pick the best-fit dossier. If no dossier fits, note that you will propose creating a new one. You MUST drill down to the dossier level — placing at the program level without a dossier creates an orphan.";
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, or determined a new dossier name is needed.";
39
+ readonly skip_when: "User chose KB-only or lake-only.";
40
+ }, {
41
+ readonly id: "propose";
42
+ readonly name: "Propose and WAIT for approval";
43
+ readonly action: "Present a specific proposal and STOP. Do not call tacit_gm_approve yet. Say: \"I'd file this under [portfolio] → [program] → [dossier] — [one sentence reason]. Should I go ahead?\" If proposing a new dossier: \"There's no dossier that fits under [program], so I'd create one called [name]. Good?\" For KB: \"I'd add this to your [collection] knowledge base. It will start as a draft. Approve?\" CRITICAL: You MUST wait for the user to say yes, approve, or confirm BEFORE proceeding to the next step. Do NOT interpret the user's earlier request to \"place it\" as approval — they need to approve the SPECIFIC location you are proposing.";
44
+ readonly tools: readonly [];
45
+ readonly signal: "User explicitly approves (\"yes\", \"approve\", \"do it\", \"go ahead\"), redirects to a different location, or declines.";
46
+ }, {
47
+ readonly id: "place";
48
+ readonly name: "Execute approved placement";
49
+ readonly action: "ONLY after the user explicitly approved the proposal in step 4: 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. NEVER call tacit_gm_approve without a dossier_id for pyramid placement. For KB: call tacit_gm_approve with surface=\"kb\" and the collection UUID. For both: pyramid first, then KB (two separate calls). For lake-only: no call needed.";
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 in plain language";
56
+ readonly action: "Tell the user where their content landed: \"Done — your [title] is filed under [portfolio] → [program] → [dossier].\" For KB: \"Added to your [collection] knowledge base as a draft — it won't appear in search results until published.\" For lake-only: \"Saved to your data lake — you can file it somewhere anytime by asking me.\" NEVER show catalog IDs, artifact IDs, UUIDs, or SHA hashes in your response.";
57
+ readonly tools: readonly [];
58
+ readonly signal: "User sees a clear, plain-language confirmation.";
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. RULES: (1) NEVER show UUIDs, catalog IDs, artifact IDs, or SHA hashes to the user — use human-readable names only. (2) NEVER place content without explicit user approval of the specific location. (3) ALWAYS drill down to dossier level for pyramid placement — program-level placement creates orphans.');
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,61 @@ 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 happy-path SOPs (SOP-01 ingest, SOP-03 KB, SOP-04 pyramid,
121
+ // SOP-05 lake-only, SOP-06 cross-ref). SOP-02 (classify existing) and SOP-04a
122
+ // (build-program dossier set) are not yet covered.
123
+ export const GM_WORKFLOW = {
124
+ name: 'Content Ingestion & Placement',
125
+ trigger: 'User asks to add, save, ingest, or file content into the workspace',
126
+ steps: [
127
+ {
128
+ id: 'ingest',
129
+ name: 'Ingest',
130
+ 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. IMPORTANT: The response will include a placement_proposal with suggested_surface — IGNORE this field, it is a backend stub that always says "lake." You will determine placement yourself in the next steps.',
131
+ tools: ['tacit_gm_ingest'],
132
+ signal: 'You receive a catalog_id, artifact_id, content_type, and is_duplicate flag. Save the catalog_id — you will need it for placement.',
133
+ 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.',
134
+ },
135
+ {
136
+ id: 'classify_present',
137
+ name: 'Present classification and offer options',
138
+ action: 'Tell the user what the GM classified their content as. Then ALWAYS offer placement options — do not default to lake. Say something like: "Your [title] is cataloged. Where should it live? I can file it in your workspace structure, add it to your knowledge base, both, or keep it in the data lake for now. Or say \'you decide\' and I\'ll recommend a spot." STOP here and wait for the user to respond. Do not proceed until they choose.',
139
+ tools: [],
140
+ signal: 'User chooses: workspace structure, knowledge base, both, lake-only, or "you decide."',
141
+ },
142
+ {
143
+ id: 'review_structure',
144
+ name: 'Review workspace structure (MANDATORY for pyramid placement)',
145
+ action: 'You MUST call ALL THREE tools in sequence — do not skip any: (1) Call tacit_pyramid_list_portfolios to see all portfolios. Pick the best fit. (2) Call tacit_pyramid_list_programs with that portfolio_id. Pick the best-fit program. (3) Call tacit_pyramid_list_dossiers with that program_id. Pick the best-fit dossier. If no dossier fits, note that you will propose creating a new one. You MUST drill down to the dossier level — placing at the program level without a dossier creates an orphan.',
146
+ tools: ['tacit_pyramid_list_portfolios', 'tacit_pyramid_list_programs', 'tacit_pyramid_list_dossiers'],
147
+ signal: 'You have identified a specific portfolio → program → dossier, or determined a new dossier name is needed.',
148
+ skip_when: 'User chose KB-only or lake-only.',
149
+ },
150
+ {
151
+ id: 'propose',
152
+ name: 'Propose and WAIT for approval',
153
+ action: 'Present a specific proposal and STOP. Do not call tacit_gm_approve yet. Say: "I\'d file this under [portfolio] → [program] → [dossier] — [one sentence reason]. Should I go ahead?" If proposing a new dossier: "There\'s no dossier that fits under [program], so I\'d create one called [name]. Good?" For KB: "I\'d add this to your [collection] knowledge base. It will start as a draft. Approve?" CRITICAL: You MUST wait for the user to say yes, approve, or confirm BEFORE proceeding to the next step. Do NOT interpret the user\'s earlier request to "place it" as approval — they need to approve the SPECIFIC location you are proposing.',
154
+ tools: [],
155
+ signal: 'User explicitly approves ("yes", "approve", "do it", "go ahead"), redirects to a different location, or declines.',
156
+ },
157
+ {
158
+ id: 'place',
159
+ name: 'Execute approved placement',
160
+ action: 'ONLY after the user explicitly approved the proposal in step 4: 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. NEVER call tacit_gm_approve without a dossier_id for pyramid placement. For KB: call tacit_gm_approve with surface="kb" and the collection UUID. For both: pyramid first, then KB (two separate calls). For lake-only: no call needed.',
161
+ tools: ['tacit_gm_approve', 'tacit_pyramid_create_dossier'],
162
+ signal: 'tacit_gm_approve returns success.',
163
+ skip_when: 'User chose lake-only.',
164
+ },
165
+ {
166
+ id: 'confirm',
167
+ name: 'Confirm in plain language',
168
+ action: 'Tell the user where their content landed: "Done — your [title] is filed under [portfolio] → [program] → [dossier]." For KB: "Added to your [collection] knowledge base as a draft — it won\'t appear in search results until published." For lake-only: "Saved to your data lake — you can file it somewhere anytime by asking me." NEVER show catalog IDs, artifact IDs, UUIDs, or SHA hashes in your response.',
169
+ tools: [],
170
+ signal: 'User sees a clear, plain-language confirmation.',
171
+ },
172
+ ],
173
+ };
107
174
  export const EXPERIENCES = [
108
175
  { 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
176
  { 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.18",
4
4
  "private": false,
5
5
  "description": "stdio MCP server wrapping Tacit /api/v1 REST/SSE API",
6
6
  "license": "UNLICENSED",