@tacitai/mcp-server 0.6.22 → 0.6.23
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 +7 -7
- package/dist/prompts.js +8 -8
- package/dist/tools/gm.js +7 -5
- package/package.json +1 -2
package/dist/prompts.d.ts
CHANGED
|
@@ -27,20 +27,20 @@ export declare const GM_WORKFLOW: {
|
|
|
27
27
|
}, {
|
|
28
28
|
readonly id: "classify_present";
|
|
29
29
|
readonly name: "Present classification and offer options";
|
|
30
|
-
readonly action: "Tell the user what the GM classified their content as and which surface it suggested (workspace structure or knowledge base). Then ALWAYS offer placement options — do not default to lake, and lead with the GM's suggested surface. 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.";
|
|
30
|
+
readonly action: "Tell the user what the GM classified their content as and which surface it suggested (workspace structure or knowledge base). Then ALWAYS offer placement options — do not default to lake, and lead with the GM's suggested surface. 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. IMPORTANT: When the user picks a surface (e.g. \"pyramid\", \"KB\", \"workspace structure\"), that is a SURFACE CHOICE — it tells you which direction to explore, NOT which specific location to place it. You MUST still proceed to step 3 (drill down) and step 4 (propose specific location and wait for approval). Surface choice ≠ location approval.";
|
|
31
31
|
readonly tools: readonly [];
|
|
32
|
-
readonly signal: "User chooses: workspace structure, knowledge base, both, lake-only, or \"you decide.\"";
|
|
32
|
+
readonly signal: "User chooses: workspace structure, knowledge base, both, lake-only, or \"you decide.\" This choice triggers drill-down and a specific location proposal — it is NOT placement approval.";
|
|
33
33
|
}, {
|
|
34
34
|
readonly id: "review_structure";
|
|
35
35
|
readonly name: "Review workspace structure (MANDATORY for pyramid placement)";
|
|
36
|
-
readonly action: "You MUST call ALL
|
|
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.";
|
|
36
|
+
readonly action: "You MUST call ALL FOUR 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_value_streams — if value streams exist, identify which one aligns with the content. (3) Call tacit_pyramid_list_programs with the portfolio_id. Pick the best-fit program. (4) 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_value_streams", "tacit_pyramid_list_programs", "tacit_pyramid_list_dossiers"];
|
|
38
|
+
readonly signal: "You have identified a specific portfolio → value stream (if any) → program → dossier, or determined a new dossier name is needed.";
|
|
39
39
|
readonly skip_when: "User chose KB-only or lake-only.";
|
|
40
40
|
}, {
|
|
41
41
|
readonly id: "propose";
|
|
42
42
|
readonly name: "Propose and WAIT for approval";
|
|
43
|
-
readonly action: "Present a specific proposal and STOP. Do not call tacit_gm_approve yet.
|
|
43
|
+
readonly action: "Present a specific proposal and STOP. Do not call tacit_gm_approve yet. For pyramid, say: \"I'd file this under [portfolio] → [value stream] → [program] → [dossier] — [one sentence reason]. Should I go ahead?\" (Omit value stream only if the workspace has none.) 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, where it will be published. Approve?\" CRITICAL: You MUST wait for the user to say yes, approve, or confirm BEFORE proceeding to the next step. Do NOT interpret ANY of these as approval of a specific location: \"place it\", \"add it to the workspace\", \"you decide\", \"pyramid\", \"KB\", \"knowledge base\", \"workspace structure\". Those are SURFACE choices — the user still needs to see and approve the SPECIFIC portfolio → value stream → program → dossier path (or specific collection for KB) that you are proposing. If the classifier's suggestion does not fit, propose a better location; never place it yourself instead of asking.";
|
|
44
44
|
readonly tools: readonly [];
|
|
45
45
|
readonly signal: "User explicitly approves (\"yes\", \"approve\", \"do it\", \"go ahead\"), redirects to a different location, or declines.";
|
|
46
46
|
}, {
|
|
@@ -53,7 +53,7 @@ export declare const GM_WORKFLOW: {
|
|
|
53
53
|
}, {
|
|
54
54
|
readonly id: "confirm";
|
|
55
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.\" 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.";
|
|
56
|
+
readonly action: "Tell the user where their content landed: \"Done — your [title] is filed under [portfolio] → [value stream] → [program] → [dossier].\" (Omit value stream only if the workspace has none.) For KB: \"Added to your [collection] knowledge base.\" 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
57
|
readonly tools: readonly [];
|
|
58
58
|
readonly signal: "User sees a clear, plain-language confirmation.";
|
|
59
59
|
}];
|
package/dist/prompts.js
CHANGED
|
@@ -57,7 +57,7 @@ function buildAssistantSystemPrompt(state) {
|
|
|
57
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
58
|
lines.push('');
|
|
59
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.');
|
|
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 (portfolio → program → dossier for pyramid, or specific collection for KB). Choosing a surface ("pyramid", "KB") is step one; the user must ALSO approve the exact location you propose. Two approvals required: surface, then location. (3) ALWAYS drill down to dossier level for pyramid placement — program-level placement creates orphans. (4) ALWAYS call list_portfolios → list_programs → list_dossiers before proposing pyramid placement — never guess or skip the drill-down.');
|
|
61
61
|
for (const step of GM_WORKFLOW.steps) {
|
|
62
62
|
let line = `${step.id.toUpperCase()}: ${step.action}`;
|
|
63
63
|
if ('skip_when' in step && step.skip_when) {
|
|
@@ -135,22 +135,22 @@ export const GM_WORKFLOW = {
|
|
|
135
135
|
{
|
|
136
136
|
id: 'classify_present',
|
|
137
137
|
name: 'Present classification and offer options',
|
|
138
|
-
action: 'Tell the user what the GM classified their content as and which surface it suggested (workspace structure or knowledge base). Then ALWAYS offer placement options — do not default to lake, and lead with the GM\'s suggested surface. 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.',
|
|
138
|
+
action: 'Tell the user what the GM classified their content as and which surface it suggested (workspace structure or knowledge base). Then ALWAYS offer placement options — do not default to lake, and lead with the GM\'s suggested surface. 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. IMPORTANT: When the user picks a surface (e.g. "pyramid", "KB", "workspace structure"), that is a SURFACE CHOICE — it tells you which direction to explore, NOT which specific location to place it. You MUST still proceed to step 3 (drill down) and step 4 (propose specific location and wait for approval). Surface choice ≠ location approval.',
|
|
139
139
|
tools: [],
|
|
140
|
-
signal: 'User chooses: workspace structure, knowledge base, both, lake-only, or "you decide."',
|
|
140
|
+
signal: 'User chooses: workspace structure, knowledge base, both, lake-only, or "you decide." This choice triggers drill-down and a specific location proposal — it is NOT placement approval.',
|
|
141
141
|
},
|
|
142
142
|
{
|
|
143
143
|
id: 'review_structure',
|
|
144
144
|
name: 'Review workspace structure (MANDATORY for pyramid placement)',
|
|
145
|
-
action: 'You MUST call ALL
|
|
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.',
|
|
145
|
+
action: 'You MUST call ALL FOUR 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_value_streams — if value streams exist, identify which one aligns with the content. (3) Call tacit_pyramid_list_programs with the portfolio_id. Pick the best-fit program. (4) 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_value_streams', 'tacit_pyramid_list_programs', 'tacit_pyramid_list_dossiers'],
|
|
147
|
+
signal: 'You have identified a specific portfolio → value stream (if any) → program → dossier, or determined a new dossier name is needed.',
|
|
148
148
|
skip_when: 'User chose KB-only or lake-only.',
|
|
149
149
|
},
|
|
150
150
|
{
|
|
151
151
|
id: 'propose',
|
|
152
152
|
name: 'Propose and WAIT for approval',
|
|
153
|
-
action: 'Present a specific proposal and STOP. Do not call tacit_gm_approve yet.
|
|
153
|
+
action: 'Present a specific proposal and STOP. Do not call tacit_gm_approve yet. For pyramid, say: "I\'d file this under [portfolio] → [value stream] → [program] → [dossier] — [one sentence reason]. Should I go ahead?" (Omit value stream only if the workspace has none.) 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, where it will be published. Approve?" CRITICAL: You MUST wait for the user to say yes, approve, or confirm BEFORE proceeding to the next step. Do NOT interpret ANY of these as approval of a specific location: "place it", "add it to the workspace", "you decide", "pyramid", "KB", "knowledge base", "workspace structure". Those are SURFACE choices — the user still needs to see and approve the SPECIFIC portfolio → value stream → program → dossier path (or specific collection for KB) that you are proposing. If the classifier\'s suggestion does not fit, propose a better location; never place it yourself instead of asking.',
|
|
154
154
|
tools: [],
|
|
155
155
|
signal: 'User explicitly approves ("yes", "approve", "do it", "go ahead"), redirects to a different location, or declines.',
|
|
156
156
|
},
|
|
@@ -165,7 +165,7 @@ export const GM_WORKFLOW = {
|
|
|
165
165
|
{
|
|
166
166
|
id: 'confirm',
|
|
167
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." 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.',
|
|
168
|
+
action: 'Tell the user where their content landed: "Done — your [title] is filed under [portfolio] → [value stream] → [program] → [dossier]." (Omit value stream only if the workspace has none.) For KB: "Added to your [collection] knowledge base." 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
169
|
tools: [],
|
|
170
170
|
signal: 'User sees a clear, plain-language confirmation.',
|
|
171
171
|
},
|
package/dist/tools/gm.js
CHANGED
|
@@ -27,11 +27,13 @@ function apiErrorResult(err, toolName) {
|
|
|
27
27
|
const msg = err instanceof Error ? err.message : String(err);
|
|
28
28
|
return { content: [{ type: 'text', text: `Error: ${msg}` }], isError: true };
|
|
29
29
|
}
|
|
30
|
-
export const GM_INGEST_NEXT_STEP = 'NEXT STEP: nothing has been placed yet. Tell the user in plain language what this was classified as and
|
|
31
|
-
'
|
|
32
|
-
'
|
|
33
|
-
'
|
|
34
|
-
'
|
|
30
|
+
export const GM_INGEST_NEXT_STEP = 'NEXT STEP: nothing has been placed yet. Tell the user in plain language what this was classified as and offer surface options ' +
|
|
31
|
+
'(workspace structure, knowledge base, both, or data lake). Lead with the suggested_surface but let the user choose. ' +
|
|
32
|
+
'If suggested_surface is "lake", say it is saved in the data lake and ask whether to file it in the workspace structure or the knowledge base; do not pick one yourself. ' +
|
|
33
|
+
'When the user picks a surface (e.g. "pyramid", "KB"), that is a SURFACE CHOICE, not a location approval. You must THEN drill down ' +
|
|
34
|
+
'(list portfolios → programs → dossiers for pyramid, or list collections for KB), propose the SPECIFIC location ' +
|
|
35
|
+
'(e.g. "I\'d file this under Product → GoodOps Site → GoodOps Site v1. Approve?"), and wait for the user to approve THAT location in a new message. ' +
|
|
36
|
+
'The user saying "add it to the workspace", "pyramid", "KB", or "you decide" is NOT approval of a specific location.';
|
|
35
37
|
// ─── tacit_gm_ingest ────────────────────────────────────────────────────────
|
|
36
38
|
/** Largest file `file_path` will read (10 MiB). */
|
|
37
39
|
export const GM_INGEST_MAX_FILE_BYTES = 10 * 1024 * 1024;
|