@tacitai/mcp-server 0.6.51 → 0.6.54
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/config/exec-roles.yaml +22 -0
- package/dist/index.js +6 -1
- package/dist/prompts.d.ts +8 -7
- package/dist/prompts.js +37 -7
- package/dist/templates/role-loader.js +2 -0
- package/dist/tools/capture.js +22 -6
- package/dist/tools/exec-route.js +22 -0
- package/dist/tools/iam.d.ts +4 -0
- package/dist/tools/iam.js +194 -0
- package/dist/tools/onboarding.js +5 -0
- package/dist/tools/people.js +41 -0
- package/dist/tools/registry.d.ts +1 -1
- package/dist/tools/registry.js +20 -3
- package/dist/tools/secretary.d.ts +30 -0
- package/dist/tools/secretary.js +86 -46
- package/dist/workflow-registry.d.ts +4 -0
- package/dist/workflow-registry.js +45 -0
- package/package.json +1 -1
package/config/exec-roles.yaml
CHANGED
|
@@ -103,3 +103,25 @@ roles:
|
|
|
103
103
|
- structure_proposals
|
|
104
104
|
workflow_types:
|
|
105
105
|
- lake_operations
|
|
106
|
+
|
|
107
|
+
- slug: access_administrator
|
|
108
|
+
display_name: Access Administrator
|
|
109
|
+
description: Manages workspace membership, role assignments, and capability denials via IAM tools.
|
|
110
|
+
icon: shield
|
|
111
|
+
default_capabilities:
|
|
112
|
+
- iam_membership
|
|
113
|
+
- iam_role_management
|
|
114
|
+
- iam_denial_management
|
|
115
|
+
workflow_types:
|
|
116
|
+
- iam_membership_ops
|
|
117
|
+
|
|
118
|
+
- slug: security_officer
|
|
119
|
+
display_name: Security Officer
|
|
120
|
+
description: Manages credential inventory, rotation tracking, and T3 approval workflows.
|
|
121
|
+
icon: lock
|
|
122
|
+
default_capabilities:
|
|
123
|
+
- secret_inventory
|
|
124
|
+
- rotation_tracking
|
|
125
|
+
- t3_approval
|
|
126
|
+
workflow_types:
|
|
127
|
+
- security_audit
|
package/dist/index.js
CHANGED
|
@@ -67,6 +67,7 @@ import { registerWorkflowTypeTools } from './tools/workflow-types.js';
|
|
|
67
67
|
import { registerWorkflowPrereqsTool } from './tools/workflow-prereqs.js';
|
|
68
68
|
import { registerCmoTools } from './tools/cmo.js';
|
|
69
69
|
import { registerSecretaryTools } from './tools/secretary.js';
|
|
70
|
+
import { registerIamTools, registerSecurityTools } from './tools/iam.js';
|
|
70
71
|
import { registerPrompts } from './prompts.js';
|
|
71
72
|
import { getRequestPrincipal, ensureAutonomy, resolveProfileOptions } from './client.js';
|
|
72
73
|
// Setup wizard (MV-1057h / W5)
|
|
@@ -394,8 +395,12 @@ async function run() {
|
|
|
394
395
|
registerWorkflowTypeTools(server, getClient, gate.getRegistry());
|
|
395
396
|
registerWorkflowPrereqsTool(server, gate.getRegistry());
|
|
396
397
|
registerCmoTools(server);
|
|
397
|
-
|
|
398
|
+
if (process.env['FEATURE_SECRETARY'] !== 'false') {
|
|
399
|
+
registerSecretaryTools(server, getClient);
|
|
400
|
+
}
|
|
398
401
|
registerExecRouteTool(server);
|
|
402
|
+
registerIamTools(server, getClient);
|
|
403
|
+
registerSecurityTools(server, getClient);
|
|
399
404
|
registerPrompts(server, getClient);
|
|
400
405
|
if (process.env['MCP_TRANSPORT'] === 'http') {
|
|
401
406
|
await startHttpTransport(server);
|
package/dist/prompts.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { TacitClient } from './client.js';
|
|
|
3
3
|
export declare const ASSISTANT_SYSTEM_PROMPT_STATIC: string;
|
|
4
4
|
export interface WorkspaceState {
|
|
5
5
|
name: string;
|
|
6
|
+
description?: string;
|
|
6
7
|
collectionNames: string[];
|
|
7
8
|
collectionCount: number;
|
|
8
9
|
portfolioNames: string[];
|
|
@@ -121,7 +122,7 @@ export declare const EXPERIENCES: readonly [{
|
|
|
121
122
|
readonly name: "Explore Your Workspace";
|
|
122
123
|
readonly tier: 1;
|
|
123
124
|
readonly tierName: "Orient & Equip";
|
|
124
|
-
readonly action: "Type: \"What is in my workspace?\" — see what knowledge, collections, and structure are already here.";
|
|
125
|
+
readonly action: "Type: \"What is in my workspace?\" — see what knowledge, collections, and structure are already here. DATA LAKE TERMINOLOGY: Every workspace has a data lake — it is the foundational content pool. Never say \"you do not have a data lake.\" If it is empty, say \"your data lake is empty — let's add some content.\" Sources and connections feed the lake (GitHub repos, uploaded files, URLs). The knowledge base holds curated articles promoted from the lake. The pyramid is the strategic alignment structure (portfolios, value streams, programs).";
|
|
125
126
|
readonly signal: "You can describe what is in your workspace";
|
|
126
127
|
readonly tip: "";
|
|
127
128
|
}, {
|
|
@@ -130,7 +131,7 @@ export declare const EXPERIENCES: readonly [{
|
|
|
130
131
|
readonly name: "See What's Possible";
|
|
131
132
|
readonly tier: 1;
|
|
132
133
|
readonly tierName: "Orient & Equip";
|
|
133
|
-
readonly action: "Type: \"What can TACIT do for me?\" — discover the full range of capabilities available to you.";
|
|
134
|
+
readonly action: "Type: \"What can TACIT do for me?\" — discover the full range of capabilities available to you. CAPABILITY DOMAINS: Present capabilities from the CAPABILITY_DOMAINS list defined in the codebase (18 domains including Knowledge Management, Strategic Alignment, Content Intelligence, Voice Resonance, Research, Sales, Operations, etc.). Do NOT invent capability names or fabricate unlisted domain types — stick to the defined domains. If the user asks about a capability not in the list, explain what IS available that is closest.";
|
|
134
135
|
readonly signal: "You know what TACIT can do and are ready to try it";
|
|
135
136
|
readonly tip: "";
|
|
136
137
|
}, {
|
|
@@ -139,7 +140,7 @@ export declare const EXPERIENCES: readonly [{
|
|
|
139
140
|
readonly name: "First Light";
|
|
140
141
|
readonly tier: 1;
|
|
141
142
|
readonly tierName: "Orient & Equip";
|
|
142
|
-
readonly action: "Ask a question about your business — try \"What do we know about [topic]?\"";
|
|
143
|
+
readonly action: "Ask a question about your business — try \"What do we know about [topic]?\" Present the answer confidently with source citations. QUALITY METRIC SUPPRESSION: NEVER mention quality_score, ctx_recall, completeness_score, source_confirmation_rate, or any numeric retrieval quality metric to the user. These are internal diagnostics (ADR-175) and must not appear in your response. If retrieval coverage is thin, say \"This answer draws from a limited set of workspace documents — adding more content will improve future answers\" without showing numbers.";
|
|
143
144
|
readonly signal: "First grounded answer drawn from your workspace knowledge";
|
|
144
145
|
readonly tip: "";
|
|
145
146
|
}, {
|
|
@@ -175,7 +176,7 @@ export declare const EXPERIENCES: readonly [{
|
|
|
175
176
|
readonly name: "Research & Publish";
|
|
176
177
|
readonly tier: 2;
|
|
177
178
|
readonly tierName: "The Operating System";
|
|
178
|
-
readonly action: "Research a topic and publish a report. Ask the user what they want to research, or suggest a topic relevant to their business. Then: (1) Call tacit_research_prepare with the topic as the query. This runs two research lanes in parallel: a workspace lane (KB, pyramid, lake) and an academic lane (arXiv, OpenAlex, Semantic Scholar). The response includes research_lanes[] — each lane has a status and results array with source attribution. Use ALL results from both lanes. If the academic lane status is \"partial\", some providers returned results while others hit rate limits — use what came back. If \"failed\", note it and continue with workspace results. (2) Search the web for current information to complement the workspace and academic findings. (3) Combine ALL findings — workspace knowledge, academic papers, and web results — into a STYLED HTML REPORT using /artifact-design — invoke the artifact-design skill to get the design system, then build a proper HTML artifact with title, date, executive summary, sections with findings, citations, and a professional layout. Academic sources should be cited with author, title, and link. Publish it as a Claude artifact so the user sees it in their browser. Save the HTML file to disk. (4) After the artifact is saved, ingest the HTML FILE into TACIT via tacit_gm_ingest — pass the file path, not the content. The GM classifies and proposes placement. The user approves before anything moves. IMPORTANT: Do NOT copy-paste the report content into tacit_artifact_create. The correct flow is: create the HTML file → publish as Claude artifact → ingest the file via GM. This preserves provenance and goes through the lake-first pipeline.\n\nONBOARDING PLACEMENT DEFAULT: If the user reached this experience through onboarding (the completed set includes your_first_structure), default to placing the output in their onboarding program. Look up the program: call tacit_pyramid_list_value_streams, find the \"Onboarding\" VS, then call tacit_pyramid_list_programs filtered by that VS id to find their \"{Name}'s Onboarding Journey\" program. When the GM proposes placement, suggest this program as the target — e.g. \"I'll file this under your onboarding program ({Name}'s Onboarding Journey). Approve?\" The user can override to a different location, but the onboarding program is the default during onboarding.";
|
|
179
|
+
readonly action: "Research a topic and publish a report. Ask the user what they want to research, or suggest a topic relevant to their business. Then: (1) Call tacit_research_prepare with the topic as the query. This runs two research lanes in parallel: a workspace lane (KB, pyramid, lake) and an academic lane (arXiv, OpenAlex, Semantic Scholar). The response includes research_lanes[] — each lane has a status and results array with source attribution. Use ALL results from both lanes. If the academic lane status is \"partial\", some providers returned results while others hit rate limits — use what came back. If \"failed\", note it and continue with workspace results. (2) Search the web for current information to complement the workspace and academic findings. (3) Combine ALL findings — workspace knowledge, academic papers, and web results — into a STYLED HTML REPORT using /artifact-design — invoke the artifact-design skill to get the design system, then build a proper HTML artifact with title, date, executive summary, sections with findings, citations, and a professional layout. Academic sources should be cited with author, title, and link. Publish it as a Claude artifact so the user sees it in their browser. Save the HTML file to disk. (4) After the artifact is saved, ingest the HTML FILE into TACIT via tacit_gm_ingest — pass the file path, not the content. The GM classifies and proposes placement. The user approves before anything moves. IMPORTANT: Do NOT copy-paste the report content into tacit_artifact_create. The correct flow is: create the HTML file → publish as Claude artifact → ingest the file via GM. This preserves provenance and goes through the lake-first pipeline.\n\nFILE SAVE PATH: Save the HTML file to ~/tacit-reports/ (inside the user home directory), NOT to the scratchpad. TACIT can only read files under the user home directory. After saving, pass the ~/tacit-reports/ path to tacit_gm_ingest.\n\nONBOARDING PLACEMENT DEFAULT: If the user reached this experience through onboarding (the completed set includes your_first_structure), default to placing the output in their onboarding program. Look up the program: call tacit_pyramid_list_value_streams, find the \"Onboarding\" VS, then call tacit_pyramid_list_programs filtered by that VS id to find their \"{Name}'s Onboarding Journey\" program. When the GM proposes placement, suggest this program as the target — e.g. \"I'll file this under your onboarding program ({Name}'s Onboarding Journey). Approve?\" The user can override to a different location, but the onboarding program is the default during onboarding.";
|
|
179
180
|
readonly signal: "First research artifact published as a Claude artifact in the browser with workspace, academic, and web sources, then the HTML file ingested and placed via GM workflow";
|
|
180
181
|
readonly tip: "After publishing, your General Manager will propose where to place the report in your knowledge structure — you approve the placement.";
|
|
181
182
|
}, {
|
|
@@ -184,7 +185,7 @@ export declare const EXPERIENCES: readonly [{
|
|
|
184
185
|
readonly name: "Run Sales";
|
|
185
186
|
readonly tier: 2;
|
|
186
187
|
readonly tierName: "The Operating System";
|
|
187
|
-
readonly action: "Part 1 — Discovery Brief: Say \"Prepare a discovery brief for a potential client.\" TACIT uses workspace knowledge to build a discovery framework. The brief should be a STYLED HTML REPORT using /artifact-design — same flow as Experience 7: invoke artifact-design, build the HTML, publish as a Claude artifact, save the file to disk, then ingest the HTML file via tacit_gm_ingest for placement. ONBOARDING PLACEMENT DEFAULT: If the user reached this experience through onboarding (the completed set includes your_first_structure), default to placing the output in their onboarding program — look up the \"Onboarding\" VS via tacit_pyramid_list_value_streams, then find their \"{Name}'s Onboarding Journey\" program via tacit_pyramid_list_programs filtered by that VS. Propose this program as the target; the user can override. Part 2 — Voice Composition: After the brief, draft an intro email using the TACIT Voice Resonance system. MANDATORY TWO-STEP FLOW: (1) GROUND FIRST — assemble the key facts from the discovery brief (prospect name, pain points, value proposition, relevant capabilities) into a structured plain-text brief. This is the content the voice system will work with. (2) COMPOSE IN VOICE — call tacit_voice_list_profiles to find the user's voice profile (it MUST exist — voice samples were pre-loaded). Then call tacit_compose_in_voice, passing the grounded-facts brief as the content to voice-ify. This ensures the voice system has concrete facts instead of re-retrieving from workspace docs. This uses TACIT's actual voice fingerprinting system, NOT LLM approximation. NEVER draft the email yourself and claim it matches the user's voice. NEVER offer to \"paste a sample email\" or \"upload writing samples\" — voice profiles are already loaded. If tacit_voice_list_profiles returns no profiles, say \"I expected to find your voice profile but it is not set up yet — let me check with the team\" and move on.";
|
|
188
|
+
readonly action: "Part 1 — Discovery Brief: Say \"Prepare a discovery brief for a potential client.\" TACIT uses workspace knowledge to build a discovery framework. The brief should be a STYLED HTML REPORT using /artifact-design — same flow as Experience 7: invoke artifact-design, build the HTML, publish as a Claude artifact, save the file to disk, then ingest the HTML file via tacit_gm_ingest for placement. ONBOARDING PLACEMENT DEFAULT: If the user reached this experience through onboarding (the completed set includes your_first_structure), default to placing the output in their onboarding program — look up the \"Onboarding\" VS via tacit_pyramid_list_value_streams, then find their \"{Name}'s Onboarding Journey\" program via tacit_pyramid_list_programs filtered by that VS. Propose this program as the target; the user can override. Part 2 — Voice Composition: After the brief, draft an intro email using the TACIT Voice Resonance system. MANDATORY TWO-STEP FLOW: (1) GROUND FIRST — assemble the key facts from the discovery brief (prospect name, pain points, value proposition, relevant capabilities) into a structured plain-text brief. This is the content the voice system will work with. (2) COMPOSE IN VOICE — call tacit_voice_list_profiles to find the user's voice profile (it MUST exist — voice samples were pre-loaded). Then call tacit_compose_in_voice, passing the grounded-facts brief as the content to voice-ify. This ensures the voice system has concrete facts instead of re-retrieving from workspace docs. This uses TACIT's actual voice fingerprinting system, NOT LLM approximation. NEVER draft the email yourself and claim it matches the user's voice. NEVER offer to \"paste a sample email\" or \"upload writing samples\" — voice profiles are already loaded. If tacit_voice_list_profiles returns no profiles, say \"I expected to find your voice profile but it is not set up yet — let me check with the team\" and move on.\n\nGROUNDING ENFORCEMENT: NEVER fabricate people names, meeting dates, verbatim quotes, financial figures, or technical specifications. Every claim in the discovery brief and email must be grounded in workspace data returned by TACIT tools. If the workspace has thin data on the prospect, produce an honest thin brief — state what is known, flag what is missing, and suggest how to fill the gaps. A short, honest brief is always better than a fabricated detailed one.";
|
|
188
189
|
readonly signal: "First sales deliverable as HTML report, then first voice-matched composition using TACIT Voice Resonance (not LLM approximation)";
|
|
189
190
|
readonly tip: "Voice Resonance is a real system — it analyzes your writing samples to capture your cadence, vocabulary, and patterns. Every \"in my voice\" request routes through this system.";
|
|
190
191
|
}, {
|
|
@@ -193,7 +194,7 @@ export declare const EXPERIENCES: readonly [{
|
|
|
193
194
|
readonly name: "Morning Brief";
|
|
194
195
|
readonly tier: 2;
|
|
195
196
|
readonly tierName: "The Operating System";
|
|
196
|
-
readonly action: "IMPORTANT — CONNECTOR DETECTION: Before running the brief, CHECK your available MCP tool list to determine what is connected. Gmail IS connected if you have mcp__claude_ai_Gmail__* tools available. Slack IS connected if you have mcp__plugin_*_slack__* tools. Calendar IS connected if you have mcp__claude_ai_Google_Calendar__* tools. Do NOT say \"Gmail not connected\" if you can see Gmail MCP tools — that is a false negative.
|
|
197
|
+
readonly action: "IMPORTANT — CONNECTOR DETECTION: Before running the brief, CHECK your available MCP tool list to determine what is connected. Gmail IS connected if you have mcp__claude_ai_Gmail__* tools available. Slack IS connected if you have mcp__plugin_*_slack__* tools. Calendar IS connected if you have mcp__claude_ai_Google_Calendar__* tools. Do NOT say \"Gmail not connected\" if you can see Gmail MCP tools — that is a false negative.\n\nSCOPE CHECK: After detecting connected tools, verify each connector belongs to the same organization as the workspace. If Slack channels or Gmail accounts reference a different company than the workspace name, exclude that connector data and explain why — say \"Your connected [tool] appears to belong to a different organization than [workspace name]. That data has been excluded to maintain workspace isolation.\" Only include connector data from the workspace-matched organization.\n\nRun the COS daily brief: gather workspace state (programs, deadlines, proposals, KB freshness), and for each connected tool, pull real data — Gmail threads, Slack channels, Calendar events. Present the full operating picture. If a connector genuinely has no MCP tools available, say \"not yet connected\" and explain how to connect via claude.ai Integrations. After the brief, offer to draft a team message in the user's voice. TWO-STEP VOICE FLOW (mandatory): (1) GROUND FIRST — assemble a structured brief of the key facts, numbers, and updates you gathered from the morning brief (programs, deadlines, email highlights, meeting items). Write this as plain text with concrete data points. (2) COMPOSE IN VOICE — call tacit_compose_in_voice, passing the grounded-facts brief as the content to voice-ify. This ensures the voice system has verified facts to work with instead of re-retrieving from workspace documents (which cannot see the live MCP query results you just gathered). NEVER skip step 1 and call tacit_compose_in_voice with just \"draft a team update\" — the voice system cannot access the live data you collected.";
|
|
197
198
|
readonly signal: "First daily operating picture with accurate connector status and real data from connected tools";
|
|
198
199
|
readonly tip: "Meet your executive team. COS (Chief of Staff — daily ops, email, meetings), COO (Chief Operating Officer — business ops, sales, audits), GM (General Manager — content ingestion, classification, pyramid placement). Address them by name to route through their workflow.";
|
|
199
200
|
}, {
|
|
@@ -211,7 +212,7 @@ export declare const EXPERIENCES: readonly [{
|
|
|
211
212
|
readonly name: "Your Operating Rhythm";
|
|
212
213
|
readonly tier: 3;
|
|
213
214
|
readonly tierName: "Agentic Mastery";
|
|
214
|
-
readonly action: "Summarize what the user has accomplished across the onboarding and suggest their operating rhythm. CONNECTOR STATUS: Check your available MCP tool list — if you have Gmail/Slack/Calendar/Drive MCP tools, those ARE connected. Do NOT say they are disconnected. VOICE: Call tacit_voice_list_profiles — if profiles exist, voice is ready. Do NOT ask the user to upload samples if profiles already exist. Focus on: (1) Daily rhythm — morning brief via COS, email triage, meeting prep. (2) Weekly rhythm — COO business review, GM content organization. (3) Delegation — crew dispatch for complex deliverables. (4) What to explore next based on what they have connected and used.";
|
|
215
|
+
readonly action: "Summarize what the user has accomplished across the onboarding and suggest their operating rhythm. CONNECTOR STATUS: Check your available MCP tool list — if you have Gmail/Slack/Calendar/Drive MCP tools, those ARE connected. Do NOT say they are disconnected. CONNECTOR SCOPE: If any connector belongs to a different organization than the workspace (e.g., Slack is from \"GoodOps\" but the workspace is \"Redwood Inference\"), note this in the operating rhythm summary and advise that connector data from a different organization will be excluded from briefs to maintain workspace isolation. VOICE: Call tacit_voice_list_profiles — if profiles exist, voice is ready. Do NOT ask the user to upload samples if profiles already exist. Focus on: (1) Daily rhythm — morning brief via COS, email triage, meeting prep. (2) Weekly rhythm — COO business review, GM content organization. (3) Delegation — crew dispatch for complex deliverables. (4) What to explore next based on what they have connected and used.";
|
|
215
216
|
readonly signal: "User has a clear picture of their operating rhythm and next steps";
|
|
216
217
|
readonly tip: "By now you know the team: COS for daily ops, COO for business operations, GM for content. Address them directly anytime.";
|
|
217
218
|
}];
|
package/dist/prompts.js
CHANGED
|
@@ -16,6 +16,7 @@ export function buildAssistantSystemPrompt(state) {
|
|
|
16
16
|
lines.push(`- Warm but direct. You know ${name} well and you are here to help.`);
|
|
17
17
|
lines.push('- Refer to the workspace by name. When citing answers, name the collection or source they came from.');
|
|
18
18
|
lines.push('- NEVER expose tool names, function names, API endpoints, artifact IDs, SHA hashes, or technical identifiers in your responses. Translate everything into plain language the user would understand. Instead of "tacit_gm_approve" say "approve the placement." Instead of "tacit_kb_promote_from_artifact" say "promote it to the knowledge base." Instead of "crew_compose" say "draft." Instead of "kb_create_collection" say "create a new collection." If a tool returns technical fields (catalog entry IDs, SHA256 fingerprints, confidence scores), summarize the outcome in human terms — "Your content is now in the workspace" not a list of UUIDs.');
|
|
19
|
+
lines.push('- NEVER expose quality_score, ctx_recall, completeness_score, source_confirmation_rate, or any numeric retrieval quality metric to the user. These are internal diagnostics (ADR-175). Present answers confidently with source citations. If retrieval coverage is thin, say "This answer draws from a limited set of workspace documents" without numbers.');
|
|
19
20
|
lines.push('- When something works, say what happened in plain language and name the collection or source — not the tool that did it.');
|
|
20
21
|
lines.push('- Never narrate internal routing decisions, retrieval path choices, or fallback strategies. If one approach does not return results, silently try another. The user should see the answer, not the search process.');
|
|
21
22
|
lines.push('- When a capability is unavailable (missing API key, unconnected service, feature not configured), be kind and reassuring. Say what you CAN do, not what is broken. For example: "Deep research works best with a Gemini API key — I do not see one set up yet, but that is no problem. I have great research tools built in, so let me use those today." Never announce a limitation bluntly or make the user feel their setup is wrong.');
|
|
@@ -30,10 +31,30 @@ export function buildAssistantSystemPrompt(state) {
|
|
|
30
31
|
lines.push('- GitHub connections: call tacit_github_list_connections to check workspace repo connections');
|
|
31
32
|
lines.push('If a tool is in your available tool list, it IS connected. Do NOT tell the user to "connect" something that is already connected. When presenting connector status, check your tool list first.');
|
|
32
33
|
lines.push('');
|
|
34
|
+
lines.push('## Account-workspace alignment (MANDATORY)');
|
|
35
|
+
lines.push('');
|
|
36
|
+
lines.push('The claude.ai account you are running under may not match the TACIT workspace you are connected to. Claude.ai artifacts, connectors (Slack, Gmail, Calendar, Drive), and file storage are tied to the claude.ai ACCOUNT. TACIT workspace data is tied to the WORKSPACE. If these are different organizations, warn the user before any experience that publishes artifacts or uses connectors.');
|
|
37
|
+
lines.push('');
|
|
38
|
+
lines.push('## Connector-workspace scope (MANDATORY)');
|
|
39
|
+
lines.push('');
|
|
40
|
+
lines.push('Claude.ai connectors (Slack, Gmail, Calendar, Drive) are bound to your claude.ai ACCOUNT, not to the TACIT workspace. Before including connector data in any response:');
|
|
41
|
+
lines.push('1. Check the workspace name from your TACIT session.');
|
|
42
|
+
lines.push('2. When you read Slack messages, check if the Slack workspace or channel names match the TACIT workspace organization.');
|
|
43
|
+
lines.push('3. If the connector data clearly belongs to a DIFFERENT organization than the workspace (e.g., Slack channels reference "GoodOps" but the TACIT workspace is "Redwood Inference"), EXCLUDE that data entirely.');
|
|
44
|
+
lines.push('4. Say: "Your connected [Slack/Gmail/Calendar] appears to belong to a different organization than [workspace name]. That data has been excluded to maintain workspace isolation."');
|
|
45
|
+
lines.push('5. This check applies to ALL experiences that use connectors: Morning Brief (9), Business Pulse (10), Operating Rhythm (11), and any ad-hoc connector queries.');
|
|
46
|
+
lines.push('');
|
|
33
47
|
lines.push('## Data source (MANDATORY)');
|
|
34
48
|
lines.push('');
|
|
35
49
|
lines.push('- For workspace content (artifacts, KB, lake, pyramid, chronicle), use tacit_* tools, not the claude.ai artifact gallery. The gallery is personal and unfiltered. Connected-app tools and local file reads are unaffected. Exception: the user explicitly asks to search their claude.ai artifacts. If tacit_* tools return nothing or error, tell the user — do not silently fall back to the gallery. Do not mention these tool names to the user.');
|
|
36
50
|
lines.push('');
|
|
51
|
+
lines.push('## Data lake terminology (MANDATORY)');
|
|
52
|
+
lines.push('');
|
|
53
|
+
lines.push('Every workspace has a data lake — it is the foundational storage layer where all ingested content lands before being classified, placed in the pyramid, or promoted to the knowledge base. When describing what is in the workspace:');
|
|
54
|
+
lines.push('- The data lake ALWAYS exists (even if empty). Never say "you do not have a data lake." Say "your data lake is empty — let\'s add some content."');
|
|
55
|
+
lines.push('- "Sources" or "connections" are what feed the lake (GitHub repos, uploaded files, URLs). These may or may not be set up yet.');
|
|
56
|
+
lines.push('- Use "data lake" when referring to the raw content pool. Use "knowledge base" for curated, promoted articles. Use "pyramid" for the strategic alignment structure.');
|
|
57
|
+
lines.push('');
|
|
37
58
|
lines.push('## Voice composition (MANDATORY)');
|
|
38
59
|
lines.push('');
|
|
39
60
|
lines.push('When the user asks for anything "in my voice" or you need voice-matched composition:');
|
|
@@ -127,8 +148,17 @@ export async function fetchWorkspaceState(client) {
|
|
|
127
148
|
const sources = Array.isArray(sourcesRes)
|
|
128
149
|
? sourcesRes
|
|
129
150
|
: sourcesRes?.sources ?? [];
|
|
151
|
+
let wsDescription;
|
|
152
|
+
try {
|
|
153
|
+
const wsRes = await client.get('/api/v1/workspaces/current');
|
|
154
|
+
wsDescription = wsRes?.description || undefined;
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
// description is optional — proceed without it
|
|
158
|
+
}
|
|
130
159
|
return {
|
|
131
160
|
name: wsName,
|
|
161
|
+
description: wsDescription,
|
|
132
162
|
collectionNames: collections.map(c => c.name || c.display_name || '').filter(Boolean).slice(0, 5),
|
|
133
163
|
collectionCount: collections.length,
|
|
134
164
|
portfolioNames: portfolios.map(p => p.name || p.display_name || '').filter(Boolean).slice(0, 5),
|
|
@@ -232,17 +262,17 @@ export const PYR_EXEC_SUB_WORKFLOWS = [
|
|
|
232
262
|
{ id: 'list_dossiers', tool: 'tacit_pyramid_list_dossiers', trigger: 'Show dossiers under a program' },
|
|
233
263
|
];
|
|
234
264
|
export const EXPERIENCES = [
|
|
235
|
-
{ 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: '' },
|
|
236
|
-
{ 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: '' },
|
|
237
|
-
{ id: 'first_light', num: 3, name: 'First Light', tier: 1, tierName: 'Orient & Equip', action: 'Ask a question about your business — try "What do we know about [topic]?"', signal: 'First grounded answer drawn from your workspace knowledge', tip: '' },
|
|
265
|
+
{ 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. DATA LAKE TERMINOLOGY: Every workspace has a data lake — it is the foundational content pool. Never say "you do not have a data lake." If it is empty, say "your data lake is empty — let\'s add some content." Sources and connections feed the lake (GitHub repos, uploaded files, URLs). The knowledge base holds curated articles promoted from the lake. The pyramid is the strategic alignment structure (portfolios, value streams, programs).', signal: 'You can describe what is in your workspace', tip: '' },
|
|
266
|
+
{ 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. CAPABILITY DOMAINS: Present capabilities from the CAPABILITY_DOMAINS list defined in the codebase (18 domains including Knowledge Management, Strategic Alignment, Content Intelligence, Voice Resonance, Research, Sales, Operations, etc.). Do NOT invent capability names or fabricate unlisted domain types — stick to the defined domains. If the user asks about a capability not in the list, explain what IS available that is closest.', signal: 'You know what TACIT can do and are ready to try it', tip: '' },
|
|
267
|
+
{ id: 'first_light', num: 3, name: 'First Light', tier: 1, tierName: 'Orient & Equip', action: 'Ask a question about your business — try "What do we know about [topic]?" Present the answer confidently with source citations. QUALITY METRIC SUPPRESSION: NEVER mention quality_score, ctx_recall, completeness_score, source_confirmation_rate, or any numeric retrieval quality metric to the user. These are internal diagnostics (ADR-175) and must not appear in your response. If retrieval coverage is thin, say "This answer draws from a limited set of workspace documents — adding more content will improve future answers" without showing numbers.', signal: 'First grounded answer drawn from your workspace knowledge', tip: '' },
|
|
238
268
|
{ id: 'your_first_structure', num: 4, name: 'Your First Structure', tier: 1, tierName: 'Orient & Equip', action: 'Teach the alignment pyramid using the user\'s own onboarding as a live example. Walk through each level top-down:\n\n1. WORKSPACE — Point at it. This is the tenant boundary — the company itself.\n\n2. PORTFOLIO — Explain the three-pillar model: BUSINESS (company-wide strategic decisions — governance, brand, capital allocation), PRODUCT (product and service delivery — what external customers receive), INTERNAL (employee experience excellence — what employees receive to do their best work). Personal/career workspaces also have ATHLETIC (individual growth). Each portfolio passes the board-slide test: "Would a board split investment across these?" Call tacit_pyramid_list_portfolios to show existing portfolios. If an INTERNAL-pillar portfolio exists, use it. If none exists, propose creating one named "Employee Experience" (pillar: INTERNAL) — explain why: the onboarding structure needs a home, and employee experience is a real investment segment. Create via tacit_pyramid_create_portfolio after user confirms.\n\n3. STRATEGIC OKRs — Explain conceptually (no creation). These anchor portfolios to measurable outcomes — "Which 2-3 numbers define success this year?"\n\n4. VALUE STREAM — What an identifiable group receives end-to-end. Passes the customer-receipt test: "Does a customer/employee group receive something through this?" Internal VS use experience qualities, not function names (Operations → Operational Excellence, HR → People & Culture, IT → Digital Workplace). Call tacit_pyramid_list_value_streams to check for an existing "Onboarding" VS (case-insensitive name match). If found, show it and explain it is shared across all users. If not found, propose creating "Onboarding" under the INTERNAL portfolio via tacit_pyramid_create_value_stream. Create after user confirms.\n\n5. PROGRAM — A bounded push with an end state. Passes the end-date test: "Does it have an end state?" If it can never end, it is a stream, not a program. Call tacit_get_myself to get the user\'s name. Call tacit_pyramid_list_programs with the INTERNAL portfolio_id and filter results by value_stream_id matching the Onboarding VS. If a program matching "{Name}\'s Onboarding Journey" exists, reuse it. Otherwise propose creating it via tacit_pyramid_create_program with value_stream_id linking it to the Onboarding VS. Create after user confirms.\n\n6. DOSSIER + ARTIFACT — Explain conceptually only. Dossiers hold the actual work products (artifacts). As the user progresses through the remaining onboarding experiences, each experience that produces saveable content will create a dossier within their program and save its output there. The pyramid fills with real content as they learn — no need to create anything now.\n\n7. Show the structural chain built so far: Workspace → Portfolio → Value Stream → Program. Explain that Dossiers and Artifacts accumulate naturally as they continue through the onboarding experiences.\n\nIMPORTANT: All create operations (steps 2, 4, 5) require a one-line proposal and user confirmation before executing. If the workspace autonomy level blocks a create call, fall back to conceptual-only explanation for that step. Each step checks for existing entities by name before creating (idempotent — handles retries and resumed sessions). The "Onboarding" VS is shared across users; each user gets their own program ("{Name}\'s Onboarding Journey"). This teaches the shared-vs-personal scope distinction organically.', signal: 'User understands the full pyramid chain (Workspace → Portfolio → VS → Program → Dossier → Artifact) with their own onboarding structure as the example', tip: 'Each level has a naming test: Portfolios pass the board-slide test, Value Streams pass the customer-receipt test, Programs pass the end-date test. Functions (Engineering, Marketing, HR) are never portfolios or value streams.' },
|
|
239
269
|
{ id: 'build_your_map', num: 5, name: 'Build Your Map', tier: 1, tierName: 'Orient & Equip', action: 'This experience adapts to the workspace state. First, detect what exists:\n\n1. Call tacit_pyramid_list_portfolios to get all portfolios.\n2. For each portfolio, call tacit_pyramid_list_programs(portfolio_id) to aggregate programs.\n3. Call tacit_pyramid_list_value_streams to get all value streams.\n4. Exclude onboarding scaffolding when counting: ignore programs matching "*Onboarding Journey" and value streams named "Onboarding". Never exclude a portfolio — even if its only VS is "Onboarding", it represents a real investment segment.\n5. Count the remaining "real" programs and value streams.\n\nBRANCH A — EMPTY WORKSPACE (zero real programs AND zero real value streams after excluding onboarding scaffolding):\nRun the setup interview to build the user\'s actual pyramid. First, check existing portfolios by pillar — if Experience 4 or a prior session already created portfolios (e.g. an INTERNAL "Employee Experience"), adopt them per pillar. Do not duplicate. Ask whether each existing name fits or should be renamed. Then ask these questions one at a time:\n\n(1) "What do customers pay you for today?" → Distinct offerings become Value Streams inside a PRODUCT portfolio.\n(2) "What company-wide strategic decisions govern how you invest across everything?" → A BUSINESS portfolio covering governance, brand, capital allocation.\n(3) "What experience qualities do your employees receive that enable them to deliver?" → An INTERNAL portfolio covering employee experience excellence.\n(4) "What must stay true no matter what you are currently working on?" → The Knowledge Base: stream categories for offering truth, domain categories for cross-stream truth.\n(5) "Which 2-3 numbers define success this year?" → Strategic Objectives and Key Results at portfolio level, then VS Objectives that ladder up.\n(6) "What are you driving to done in the next 12 months?" → These become Programs.\n\nCreate real entities across all three pillars (BUSINESS, PRODUCT, INTERNAL). Validate every name against the four naming tests: board-slide (portfolio), customer-receipt (value stream), end-date (program), matrix/function-detection (should it be a domain category instead?). Functions like Engineering, Marketing, HR, Finance are NEVER portfolios or value streams — they describe how work gets done, not investment segments or offerings.\n\nBRANCH B — POPULATED WORKSPACE (any real programs OR real value streams exist after excluding onboarding scaffolding — i.e. NOT Branch A):\nShow what is already there — list all portfolios, value streams, programs, and dossiers. Explain each entity using the same definitions taught in Experience 4. Then run an audit/review against the setup interview questions, reframed as review questions:\n\n- "Does your portfolio structure cover all three pillars (BUSINESS, PRODUCT, INTERNAL)?"\n- "Do your value streams pass the customer-receipt test? Are any named after functions instead of what people receive?"\n- "Do your programs pass the end-date test? Are any immortal (never-ending)?"\n- "Are there functions masquerading as portfolios or value streams?" (the org-chart anti-pattern)\n- Identify gaps: missing pillars, orphan programs not linked to a value stream, function-named entities, flat pyramid (everything in one program).\n\nPresent findings as suggestions, not directives. Offer to help fix any issues found.', signal: 'User has either built their real pyramid structure (Branch A) or reviewed and validated their existing structure (Branch B)', tip: 'Three pillars: BUSINESS (where to invest), PRODUCT (what customers receive), INTERNAL (what employees receive). Every name has a test — if it fails, it belongs on a different tier.' },
|
|
240
270
|
{ id: 'connect_your_tools', num: 6, name: 'Connect Your Tools', tier: 1, tierName: 'Orient & Equip', action: 'First, CHECK what is already connected before telling the user anything: (1) Call tacit_github_list_connections to see GitHub repo connections. (2) Check your available MCP tool list — if you have Gmail tools (mcp__claude_ai_Gmail__*), Gmail IS connected. If you have Slack tools (mcp__plugin_*_slack__*), Slack IS connected. If you have Google Calendar tools, Calendar IS connected. If you have Google Drive tools, Drive IS connected. Present a CONNECTION STATUS showing what is already active and what is not. For anything already connected, say "Already connected — ready to use." For anything not connected, explain how to connect it via claude.ai Settings → Integrations. Also show GitHub workspace connections from step 1. Do NOT say a tool is disconnected if you can see its MCP tools in your available tool list. WAIT for the user to either connect something new or confirm they want to move on.', signal: 'User knows their connection status and has either connected new tools or confirmed they are ready to proceed', tip: 'GitHub connections sync your repos into the workspace. Gmail and Slack power the Morning Brief. Google Drive lets you pull in documents directly.' },
|
|
241
|
-
{ id: 'research_publish', num: 7, name: 'Research & Publish', tier: 2, tierName: 'The Operating System', action: 'Research a topic and publish a report. Ask the user what they want to research, or suggest a topic relevant to their business. Then: (1) Call tacit_research_prepare with the topic as the query. This runs two research lanes in parallel: a workspace lane (KB, pyramid, lake) and an academic lane (arXiv, OpenAlex, Semantic Scholar). The response includes research_lanes[] — each lane has a status and results array with source attribution. Use ALL results from both lanes. If the academic lane status is "partial", some providers returned results while others hit rate limits — use what came back. If "failed", note it and continue with workspace results. (2) Search the web for current information to complement the workspace and academic findings. (3) Combine ALL findings — workspace knowledge, academic papers, and web results — into a STYLED HTML REPORT using /artifact-design — invoke the artifact-design skill to get the design system, then build a proper HTML artifact with title, date, executive summary, sections with findings, citations, and a professional layout. Academic sources should be cited with author, title, and link. Publish it as a Claude artifact so the user sees it in their browser. Save the HTML file to disk. (4) After the artifact is saved, ingest the HTML FILE into TACIT via tacit_gm_ingest — pass the file path, not the content. The GM classifies and proposes placement. The user approves before anything moves. IMPORTANT: Do NOT copy-paste the report content into tacit_artifact_create. The correct flow is: create the HTML file → publish as Claude artifact → ingest the file via GM. This preserves provenance and goes through the lake-first pipeline.\n\nONBOARDING PLACEMENT DEFAULT: If the user reached this experience through onboarding (the completed set includes your_first_structure), default to placing the output in their onboarding program. Look up the program: call tacit_pyramid_list_value_streams, find the "Onboarding" VS, then call tacit_pyramid_list_programs filtered by that VS id to find their "{Name}\'s Onboarding Journey" program. When the GM proposes placement, suggest this program as the target — e.g. "I\'ll file this under your onboarding program ({Name}\'s Onboarding Journey). Approve?" The user can override to a different location, but the onboarding program is the default during onboarding.', signal: 'First research artifact published as a Claude artifact in the browser with workspace, academic, and web sources, then the HTML file ingested and placed via GM workflow', tip: 'After publishing, your General Manager will propose where to place the report in your knowledge structure — you approve the placement.' },
|
|
242
|
-
{ id: 'run_sales', num: 8, name: 'Run Sales', tier: 2, tierName: 'The Operating System', action: 'Part 1 — Discovery Brief: Say "Prepare a discovery brief for a potential client." TACIT uses workspace knowledge to build a discovery framework. The brief should be a STYLED HTML REPORT using /artifact-design — same flow as Experience 7: invoke artifact-design, build the HTML, publish as a Claude artifact, save the file to disk, then ingest the HTML file via tacit_gm_ingest for placement. ONBOARDING PLACEMENT DEFAULT: If the user reached this experience through onboarding (the completed set includes your_first_structure), default to placing the output in their onboarding program — look up the "Onboarding" VS via tacit_pyramid_list_value_streams, then find their "{Name}\'s Onboarding Journey" program via tacit_pyramid_list_programs filtered by that VS. Propose this program as the target; the user can override. Part 2 — Voice Composition: After the brief, draft an intro email using the TACIT Voice Resonance system. MANDATORY TWO-STEP FLOW: (1) GROUND FIRST — assemble the key facts from the discovery brief (prospect name, pain points, value proposition, relevant capabilities) into a structured plain-text brief. This is the content the voice system will work with. (2) COMPOSE IN VOICE — call tacit_voice_list_profiles to find the user\'s voice profile (it MUST exist — voice samples were pre-loaded). Then call tacit_compose_in_voice, passing the grounded-facts brief as the content to voice-ify. This ensures the voice system has concrete facts instead of re-retrieving from workspace docs. This uses TACIT\'s actual voice fingerprinting system, NOT LLM approximation. NEVER draft the email yourself and claim it matches the user\'s voice. NEVER offer to "paste a sample email" or "upload writing samples" — voice profiles are already loaded. If tacit_voice_list_profiles returns no profiles, say "I expected to find your voice profile but it is not set up yet — let me check with the team" and move on.', signal: 'First sales deliverable as HTML report, then first voice-matched composition using TACIT Voice Resonance (not LLM approximation)', tip: 'Voice Resonance is a real system — it analyzes your writing samples to capture your cadence, vocabulary, and patterns. Every "in my voice" request routes through this system.' },
|
|
243
|
-
{ id: 'morning_brief', num: 9, name: 'Morning Brief', tier: 2, tierName: 'The Operating System', action: 'IMPORTANT — CONNECTOR DETECTION: Before running the brief, CHECK your available MCP tool list to determine what is connected. Gmail IS connected if you have mcp__claude_ai_Gmail__* tools available. Slack IS connected if you have mcp__plugin_*_slack__* tools. Calendar IS connected if you have mcp__claude_ai_Google_Calendar__* tools. Do NOT say "Gmail not connected" if you can see Gmail MCP tools — that is a false negative.
|
|
271
|
+
{ id: 'research_publish', num: 7, name: 'Research & Publish', tier: 2, tierName: 'The Operating System', action: 'Research a topic and publish a report. Ask the user what they want to research, or suggest a topic relevant to their business. Then: (1) Call tacit_research_prepare with the topic as the query. This runs two research lanes in parallel: a workspace lane (KB, pyramid, lake) and an academic lane (arXiv, OpenAlex, Semantic Scholar). The response includes research_lanes[] — each lane has a status and results array with source attribution. Use ALL results from both lanes. If the academic lane status is "partial", some providers returned results while others hit rate limits — use what came back. If "failed", note it and continue with workspace results. (2) Search the web for current information to complement the workspace and academic findings. (3) Combine ALL findings — workspace knowledge, academic papers, and web results — into a STYLED HTML REPORT using /artifact-design — invoke the artifact-design skill to get the design system, then build a proper HTML artifact with title, date, executive summary, sections with findings, citations, and a professional layout. Academic sources should be cited with author, title, and link. Publish it as a Claude artifact so the user sees it in their browser. Save the HTML file to disk. (4) After the artifact is saved, ingest the HTML FILE into TACIT via tacit_gm_ingest — pass the file path, not the content. The GM classifies and proposes placement. The user approves before anything moves. IMPORTANT: Do NOT copy-paste the report content into tacit_artifact_create. The correct flow is: create the HTML file → publish as Claude artifact → ingest the file via GM. This preserves provenance and goes through the lake-first pipeline.\n\nFILE SAVE PATH: Save the HTML file to ~/tacit-reports/ (inside the user home directory), NOT to the scratchpad. TACIT can only read files under the user home directory. After saving, pass the ~/tacit-reports/ path to tacit_gm_ingest.\n\nONBOARDING PLACEMENT DEFAULT: If the user reached this experience through onboarding (the completed set includes your_first_structure), default to placing the output in their onboarding program. Look up the program: call tacit_pyramid_list_value_streams, find the "Onboarding" VS, then call tacit_pyramid_list_programs filtered by that VS id to find their "{Name}\'s Onboarding Journey" program. When the GM proposes placement, suggest this program as the target — e.g. "I\'ll file this under your onboarding program ({Name}\'s Onboarding Journey). Approve?" The user can override to a different location, but the onboarding program is the default during onboarding.', signal: 'First research artifact published as a Claude artifact in the browser with workspace, academic, and web sources, then the HTML file ingested and placed via GM workflow', tip: 'After publishing, your General Manager will propose where to place the report in your knowledge structure — you approve the placement.' },
|
|
272
|
+
{ id: 'run_sales', num: 8, name: 'Run Sales', tier: 2, tierName: 'The Operating System', action: 'Part 1 — Discovery Brief: Say "Prepare a discovery brief for a potential client." TACIT uses workspace knowledge to build a discovery framework. The brief should be a STYLED HTML REPORT using /artifact-design — same flow as Experience 7: invoke artifact-design, build the HTML, publish as a Claude artifact, save the file to disk, then ingest the HTML file via tacit_gm_ingest for placement. ONBOARDING PLACEMENT DEFAULT: If the user reached this experience through onboarding (the completed set includes your_first_structure), default to placing the output in their onboarding program — look up the "Onboarding" VS via tacit_pyramid_list_value_streams, then find their "{Name}\'s Onboarding Journey" program via tacit_pyramid_list_programs filtered by that VS. Propose this program as the target; the user can override. Part 2 — Voice Composition: After the brief, draft an intro email using the TACIT Voice Resonance system. MANDATORY TWO-STEP FLOW: (1) GROUND FIRST — assemble the key facts from the discovery brief (prospect name, pain points, value proposition, relevant capabilities) into a structured plain-text brief. This is the content the voice system will work with. (2) COMPOSE IN VOICE — call tacit_voice_list_profiles to find the user\'s voice profile (it MUST exist — voice samples were pre-loaded). Then call tacit_compose_in_voice, passing the grounded-facts brief as the content to voice-ify. This ensures the voice system has concrete facts instead of re-retrieving from workspace docs. This uses TACIT\'s actual voice fingerprinting system, NOT LLM approximation. NEVER draft the email yourself and claim it matches the user\'s voice. NEVER offer to "paste a sample email" or "upload writing samples" — voice profiles are already loaded. If tacit_voice_list_profiles returns no profiles, say "I expected to find your voice profile but it is not set up yet — let me check with the team" and move on.\n\nGROUNDING ENFORCEMENT: NEVER fabricate people names, meeting dates, verbatim quotes, financial figures, or technical specifications. Every claim in the discovery brief and email must be grounded in workspace data returned by TACIT tools. If the workspace has thin data on the prospect, produce an honest thin brief — state what is known, flag what is missing, and suggest how to fill the gaps. A short, honest brief is always better than a fabricated detailed one.', signal: 'First sales deliverable as HTML report, then first voice-matched composition using TACIT Voice Resonance (not LLM approximation)', tip: 'Voice Resonance is a real system — it analyzes your writing samples to capture your cadence, vocabulary, and patterns. Every "in my voice" request routes through this system.' },
|
|
273
|
+
{ id: 'morning_brief', num: 9, name: 'Morning Brief', tier: 2, tierName: 'The Operating System', action: 'IMPORTANT — CONNECTOR DETECTION: Before running the brief, CHECK your available MCP tool list to determine what is connected. Gmail IS connected if you have mcp__claude_ai_Gmail__* tools available. Slack IS connected if you have mcp__plugin_*_slack__* tools. Calendar IS connected if you have mcp__claude_ai_Google_Calendar__* tools. Do NOT say "Gmail not connected" if you can see Gmail MCP tools — that is a false negative.\n\nSCOPE CHECK: After detecting connected tools, verify each connector belongs to the same organization as the workspace. If Slack channels or Gmail accounts reference a different company than the workspace name, exclude that connector data and explain why — say "Your connected [tool] appears to belong to a different organization than [workspace name]. That data has been excluded to maintain workspace isolation." Only include connector data from the workspace-matched organization.\n\nRun the COS daily brief: gather workspace state (programs, deadlines, proposals, KB freshness), and for each connected tool, pull real data — Gmail threads, Slack channels, Calendar events. Present the full operating picture. If a connector genuinely has no MCP tools available, say "not yet connected" and explain how to connect via claude.ai Integrations. After the brief, offer to draft a team message in the user\'s voice. TWO-STEP VOICE FLOW (mandatory): (1) GROUND FIRST — assemble a structured brief of the key facts, numbers, and updates you gathered from the morning brief (programs, deadlines, email highlights, meeting items). Write this as plain text with concrete data points. (2) COMPOSE IN VOICE — call tacit_compose_in_voice, passing the grounded-facts brief as the content to voice-ify. This ensures the voice system has verified facts to work with instead of re-retrieving from workspace documents (which cannot see the live MCP query results you just gathered). NEVER skip step 1 and call tacit_compose_in_voice with just "draft a team update" — the voice system cannot access the live data you collected.', signal: 'First daily operating picture with accurate connector status and real data from connected tools', tip: 'Meet your executive team. COS (Chief of Staff — daily ops, email, meetings), COO (Chief Operating Officer — business ops, sales, audits), GM (General Manager — content ingestion, classification, pyramid placement). Address them by name to route through their workflow.' },
|
|
244
274
|
{ id: 'business_pulse', num: 10, name: 'Your Business Pulse', tier: 2, tierName: 'The Operating System', action: 'Show the user what TACIT can see about their business right now. Ask "Want to see your business pulse?" Then: (1) Gather workspace data — call tacit_pyramid_list_portfolios, tacit_pyramid_list_programs, tacit_pyramid_list_value_streams to assess structure completeness. Call tacit_kb_freshness to check knowledge currency. Call tacit_lake_browse_catalog to gauge content volume. Check connector status from the MCP tool list (Gmail, Slack, Calendar, Drive, GitHub). Call tacit_voice_list_profiles to check voice readiness. (2) Score each dimension (structure completeness, knowledge freshness, content depth, tool connectivity, voice readiness) and produce a STYLED HTML REPORT using /artifact-design — same flow as Experience 7: invoke artifact-design, build the HTML, publish as a Claude artifact, save the file to disk. The report should include dimension scores, a summary health grade, and concrete recommendations for what to build next. Frame it as a health snapshot, not a formal audit. (3) After the artifact is saved, ingest the HTML file via tacit_gm_ingest for placement. ONBOARDING PLACEMENT DEFAULT: If the user reached this experience through onboarding (the completed set includes your_first_structure), default to placing the output in their onboarding program — look up the "Onboarding" VS via tacit_pyramid_list_value_streams, then find their "{Name}\'s Onboarding Journey" program via tacit_pyramid_list_programs filtered by that VS. Propose this program as the target; the user can override.', signal: 'First business pulse report published as a Claude artifact showing workspace health scores, then filed via GM workflow', tip: 'This is your quick health snapshot. When you want the deep version, say "Have COO audit our business" — COO runs the formal operational review with remediation tracking.' },
|
|
245
|
-
{ id: 'operating_rhythm', num: 11, name: 'Your Operating Rhythm', tier: 3, tierName: 'Agentic Mastery', action: 'Summarize what the user has accomplished across the onboarding and suggest their operating rhythm. CONNECTOR STATUS: Check your available MCP tool list — if you have Gmail/Slack/Calendar/Drive MCP tools, those ARE connected. Do NOT say they are disconnected. VOICE: Call tacit_voice_list_profiles — if profiles exist, voice is ready. Do NOT ask the user to upload samples if profiles already exist. Focus on: (1) Daily rhythm — morning brief via COS, email triage, meeting prep. (2) Weekly rhythm — COO business review, GM content organization. (3) Delegation — crew dispatch for complex deliverables. (4) What to explore next based on what they have connected and used.', signal: 'User has a clear picture of their operating rhythm and next steps', tip: 'By now you know the team: COS for daily ops, COO for business operations, GM for content. Address them directly anytime.' },
|
|
275
|
+
{ id: 'operating_rhythm', num: 11, name: 'Your Operating Rhythm', tier: 3, tierName: 'Agentic Mastery', action: 'Summarize what the user has accomplished across the onboarding and suggest their operating rhythm. CONNECTOR STATUS: Check your available MCP tool list — if you have Gmail/Slack/Calendar/Drive MCP tools, those ARE connected. Do NOT say they are disconnected. CONNECTOR SCOPE: If any connector belongs to a different organization than the workspace (e.g., Slack is from "GoodOps" but the workspace is "Redwood Inference"), note this in the operating rhythm summary and advise that connector data from a different organization will be excluded from briefs to maintain workspace isolation. VOICE: Call tacit_voice_list_profiles — if profiles exist, voice is ready. Do NOT ask the user to upload samples if profiles already exist. Focus on: (1) Daily rhythm — morning brief via COS, email triage, meeting prep. (2) Weekly rhythm — COO business review, GM content organization. (3) Delegation — crew dispatch for complex deliverables. (4) What to explore next based on what they have connected and used.', signal: 'User has a clear picture of their operating rhythm and next steps', tip: 'By now you know the team: COS for daily ops, COO for business operations, GM for content. Address them directly anytime.' },
|
|
246
276
|
];
|
|
247
277
|
// Legacy ID aliases for renamed experiences — maps old id → new id
|
|
248
278
|
export const LEGACY_ID_ALIASES = Object.assign(Object.create(null), {
|
|
@@ -93,4 +93,6 @@ const FALLBACK_TEMPLATES = [
|
|
|
93
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
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'] },
|
|
95
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'] },
|
|
96
|
+
{ slug: 'access_administrator', display_name: 'Access Administrator', description: 'Manages workspace membership, role assignments, and capability denials via IAM tools.', icon: 'shield', default_capabilities: ['iam_membership', 'iam_role_management', 'iam_denial_management'], workflow_types: ['iam_membership_ops', 'iam_access_review'] },
|
|
97
|
+
{ slug: 'security_officer', display_name: 'Security Officer', description: 'Manages credential inventory, rotation tracking, and T3 approval workflows.', icon: 'lock', default_capabilities: ['secret_inventory', 'rotation_tracking', 't3_approval'], workflow_types: ['security_audit', 'secret_rotation'] },
|
|
96
98
|
];
|
package/dist/tools/capture.js
CHANGED
|
@@ -27,10 +27,14 @@ function apiErrorResult(err, toolName) {
|
|
|
27
27
|
}
|
|
28
28
|
// ─── Schemas ────────────────────────────────────────────────────────────────
|
|
29
29
|
const captureSaveSchema = z.object({
|
|
30
|
-
url: z.string().
|
|
30
|
+
url: z.string().optional().describe('Single URL to save'),
|
|
31
|
+
urls: z.array(z.string()).optional().describe('Multiple URLs to save (max 5)'),
|
|
31
32
|
title: z.string().optional().describe('Title override (auto-fetched if omitted)'),
|
|
32
|
-
note: z.string().optional().describe('Personal note to attach'),
|
|
33
|
+
note: z.string().optional().describe('Personal note to attach (optional)'),
|
|
33
34
|
tags: z.array(z.string()).optional().describe('Tags for categorisation'),
|
|
35
|
+
request_key: z.string().optional().describe('Idempotency key to prevent duplicate saves'),
|
|
36
|
+
door: z.string().optional().describe('Source door identifier (e.g. "mcp", "telegram")'),
|
|
37
|
+
subject_person_ids: z.array(z.string().uuid()).optional().describe('Person UUIDs this link is about'),
|
|
34
38
|
});
|
|
35
39
|
const captureRemoveSchema = z.object({
|
|
36
40
|
link_id: z.string().uuid().describe('UUID of the saved link to soft-delete'),
|
|
@@ -66,17 +70,29 @@ const captureSynthesizeSchema = z.object({
|
|
|
66
70
|
// ─── Registration ───────────────────────────────────────────────────────────
|
|
67
71
|
export function registerCaptureTools(server, getClientFn) {
|
|
68
72
|
// ── tacit_capture_save ──────────────────────────────────────────────────
|
|
69
|
-
server.tool('tacit_capture_save', 'Save
|
|
73
|
+
server.tool('tacit_capture_save', 'Save one or more URLs to the link library with an optional note. Creates saved_link records, indexes for retrieval, and returns link_id(s). Pass url for a single link or urls for up to 5.', captureSaveSchema.shape, async (args) => {
|
|
70
74
|
try {
|
|
71
75
|
const client = await getClientFn();
|
|
72
76
|
const input = args;
|
|
73
|
-
const body = {
|
|
77
|
+
const body = {};
|
|
78
|
+
if (input.url)
|
|
79
|
+
body['url'] = input.url;
|
|
80
|
+
if (input.urls)
|
|
81
|
+
body['urls'] = input.urls;
|
|
74
82
|
if (input.title)
|
|
75
83
|
body['title'] = input.title;
|
|
76
84
|
if (input.note)
|
|
77
85
|
body['note'] = input.note;
|
|
78
86
|
if (input.tags)
|
|
79
87
|
body['tags'] = input.tags;
|
|
88
|
+
if (input.request_key)
|
|
89
|
+
body['request_key'] = input.request_key;
|
|
90
|
+
if (input.door)
|
|
91
|
+
body['door'] = input.door;
|
|
92
|
+
else
|
|
93
|
+
body['door'] = 'mcp';
|
|
94
|
+
if (input.subject_person_ids)
|
|
95
|
+
body['subject_person_ids'] = input.subject_person_ids;
|
|
80
96
|
const res = await client.request('POST', '/api/v1/gm/capture', body);
|
|
81
97
|
return { content: [{ type: 'text', text: JSON.stringify(res, null, 2) }] };
|
|
82
98
|
}
|
|
@@ -117,7 +133,7 @@ export function registerCaptureTools(server, getClientFn) {
|
|
|
117
133
|
if (!input.content) {
|
|
118
134
|
return { content: [{ type: 'text', text: 'Error: content is required for action=edit' }], isError: true };
|
|
119
135
|
}
|
|
120
|
-
const res = await client.request('POST', `/api/v1/gm/capture/notes/${input.note_id}/edit`, {
|
|
136
|
+
const res = await client.request('POST', `/api/v1/gm/capture/notes/${input.note_id}/edit`, { new_text: input.content });
|
|
121
137
|
return { content: [{ type: 'text', text: JSON.stringify(res, null, 2) }] };
|
|
122
138
|
}
|
|
123
139
|
else {
|
|
@@ -186,7 +202,7 @@ export function registerCaptureTools(server, getClientFn) {
|
|
|
186
202
|
body['scope_name'] = input.scope_name;
|
|
187
203
|
if (input.placement_scope)
|
|
188
204
|
body['placement_scope'] = input.placement_scope;
|
|
189
|
-
const res = await client.request('POST', '/api/v1/synthesize', body);
|
|
205
|
+
const res = await client.request('POST', '/api/v1/mind/synthesize', body);
|
|
190
206
|
return { content: [{ type: 'text', text: JSON.stringify(res, null, 2) }] };
|
|
191
207
|
}
|
|
192
208
|
catch (err) {
|
package/dist/tools/exec-route.js
CHANGED
|
@@ -92,6 +92,20 @@ const ROLE_ROUTES = [
|
|
|
92
92
|
keywords: ['data source', 'data lake', 'classify', 'taxonomy', 'catalog', 'connector', 'sync'],
|
|
93
93
|
description: 'Manages the data lake: sources, classification, taxonomy, connectors, sync.',
|
|
94
94
|
},
|
|
95
|
+
{
|
|
96
|
+
slug: 'access_administrator',
|
|
97
|
+
present_as: 'Access Administrator',
|
|
98
|
+
workflow_type: 'iam_membership_ops',
|
|
99
|
+
keywords: ['grant membership', 'revoke membership', 'change role', 'offboard', 'reactivate', 'access report', 'capability denial'],
|
|
100
|
+
description: 'Manages workspace membership, role assignments, and capability denials via IAM tools.',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
slug: 'security_officer',
|
|
104
|
+
present_as: 'Security Officer',
|
|
105
|
+
workflow_type: 'security_audit',
|
|
106
|
+
keywords: ['secret inventory', 'rotate secret', 'credential', 'token management', 'approval', 't3'],
|
|
107
|
+
description: 'Manages credential inventory, rotation tracking, and T3 approval workflows.',
|
|
108
|
+
},
|
|
95
109
|
];
|
|
96
110
|
function matchRole(request) {
|
|
97
111
|
const lower = request.toLowerCase();
|
|
@@ -157,6 +171,14 @@ function buildScript(role) {
|
|
|
157
171
|
steps.push('While synthesizing, emit brief terminal progress updates so the user knows the system is working.');
|
|
158
172
|
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.');
|
|
159
173
|
}
|
|
174
|
+
if (role.workflow_type === 'iam_membership_ops') {
|
|
175
|
+
steps.push('Use tacit_agent_delegate to the access_administrator role.');
|
|
176
|
+
steps.push('IAM tools: iam_grant_membership, iam_revoke_membership, iam_change_role, iam_offboard_member, iam_reactivate_identity, iam_access_report.');
|
|
177
|
+
}
|
|
178
|
+
if (role.workflow_type === 'security_audit') {
|
|
179
|
+
steps.push('Use tacit_agent_delegate to the security_officer role.');
|
|
180
|
+
steps.push('Security tools: security_secret_inventory, security_rotate_secret, iam_create_approval, iam_token_management.');
|
|
181
|
+
}
|
|
160
182
|
steps.push('Check tacit_workflow_prereqs if a tool returns a workflow block — it shows required prior steps.');
|
|
161
183
|
return steps;
|
|
162
184
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
+
import type { TacitClient } from '../client.js';
|
|
3
|
+
export declare function registerIamTools(server: McpServer, getClient: () => Promise<TacitClient>): void;
|
|
4
|
+
export declare function registerSecurityTools(server: McpServer, getClient: () => Promise<TacitClient>): void;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { success, apiErrorResult } from './errors.js';
|
|
3
|
+
export function registerIamTools(server, getClient) {
|
|
4
|
+
server.tool('tacit_iam_grant_membership', 'Add a member to the workspace with an optional role, display name, and initial PIN', {
|
|
5
|
+
email: z.string().describe('Email address of the new member'),
|
|
6
|
+
role: z.string().optional().describe('Role to assign (e.g. "member", "admin")'),
|
|
7
|
+
display_name: z.string().optional().describe('Display name for the member'),
|
|
8
|
+
initial_pin: z.string().optional().describe('Initial login PIN'),
|
|
9
|
+
}, async (args) => {
|
|
10
|
+
try {
|
|
11
|
+
const client = await getClient();
|
|
12
|
+
const res = await client.request('POST', '/api/v1/iam/members', args);
|
|
13
|
+
return success(res);
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
return apiErrorResult(err, 'POST /api/v1/iam/members');
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
server.tool('tacit_iam_revoke_membership', 'Remove a member from the workspace', {
|
|
20
|
+
user_id: z.string().describe('ID of the user to remove'),
|
|
21
|
+
}, async (args) => {
|
|
22
|
+
try {
|
|
23
|
+
const client = await getClient();
|
|
24
|
+
const res = await client.request('DELETE', `/api/v1/iam/members/${args.user_id}`);
|
|
25
|
+
return success(res);
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
return apiErrorResult(err, `DELETE /api/v1/iam/members/${args.user_id}`);
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
server.tool('tacit_iam_change_role', 'Change the role of a workspace member', {
|
|
32
|
+
user_id: z.string().describe('ID of the user whose role to change'),
|
|
33
|
+
new_role: z.string().describe('New role to assign'),
|
|
34
|
+
}, async (args) => {
|
|
35
|
+
try {
|
|
36
|
+
const client = await getClient();
|
|
37
|
+
const res = await client.request('PUT', `/api/v1/iam/members/${args.user_id}/role`, {
|
|
38
|
+
new_role: args.new_role,
|
|
39
|
+
});
|
|
40
|
+
return success(res);
|
|
41
|
+
}
|
|
42
|
+
catch (err) {
|
|
43
|
+
return apiErrorResult(err, `PUT /api/v1/iam/members/${args.user_id}/role`);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
server.tool('tacit_iam_offboard_member', 'Offboard a member from the workspace (requires approval proof)', {
|
|
47
|
+
user_id: z.string().describe('ID of the user to offboard'),
|
|
48
|
+
approval_proof: z.string().describe('Approval proof token from tacit_iam_create_approval'),
|
|
49
|
+
reason: z.string().optional().describe('Reason for offboarding'),
|
|
50
|
+
}, async (args) => {
|
|
51
|
+
try {
|
|
52
|
+
const client = await getClient();
|
|
53
|
+
const res = await client.request('POST', `/api/v1/iam/members/${args.user_id}/offboard`, {
|
|
54
|
+
approval_proof: args.approval_proof,
|
|
55
|
+
reason: args.reason,
|
|
56
|
+
});
|
|
57
|
+
return success(res);
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
return apiErrorResult(err, `POST /api/v1/iam/members/${args.user_id}/offboard`);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
server.tool('tacit_iam_transfer_ownership', 'Transfer workspace ownership to another member (requires approval proof)', {
|
|
64
|
+
target_user_id: z.string().describe('ID of the user to transfer ownership to'),
|
|
65
|
+
approval_proof: z.string().describe('Approval proof token from tacit_iam_create_approval'),
|
|
66
|
+
}, async (args) => {
|
|
67
|
+
try {
|
|
68
|
+
const client = await getClient();
|
|
69
|
+
const res = await client.request('POST', '/api/v1/iam/transfer-ownership', args);
|
|
70
|
+
return success(res);
|
|
71
|
+
}
|
|
72
|
+
catch (err) {
|
|
73
|
+
return apiErrorResult(err, 'POST /api/v1/iam/transfer-ownership');
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
server.tool('tacit_iam_access_report', 'Generate an access report for all members in the workspace', {}, async () => {
|
|
77
|
+
try {
|
|
78
|
+
const client = await getClient();
|
|
79
|
+
const res = await client.request('GET', '/api/v1/iam/access-report');
|
|
80
|
+
return success(res);
|
|
81
|
+
}
|
|
82
|
+
catch (err) {
|
|
83
|
+
return apiErrorResult(err, 'GET /api/v1/iam/access-report');
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
server.tool('tacit_iam_token_management', 'Manage API tokens: list, issue, rotate, or revoke', {
|
|
87
|
+
action: z.enum(['list', 'issue', 'rotate', 'revoke']).describe('Token action to perform'),
|
|
88
|
+
target_identity_id: z.string().optional().describe('Identity ID to target (for issue/rotate/revoke)'),
|
|
89
|
+
token_id: z.string().optional().describe('Specific token ID (for rotate/revoke)'),
|
|
90
|
+
}, async (args) => {
|
|
91
|
+
try {
|
|
92
|
+
const client = await getClient();
|
|
93
|
+
const res = await client.request('POST', '/api/v1/iam/tokens', args);
|
|
94
|
+
return success(res);
|
|
95
|
+
}
|
|
96
|
+
catch (err) {
|
|
97
|
+
return apiErrorResult(err, 'POST /api/v1/iam/tokens');
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
server.tool('tacit_iam_create_approval', 'Create an approval proof for a sensitive operation (offboard, transfer ownership)', {
|
|
101
|
+
operation_type: z.string().describe('Type of operation requiring approval'),
|
|
102
|
+
target_user_id: z.string().describe('ID of the user the operation targets'),
|
|
103
|
+
pin: z.string().describe('Caller PIN for verification'),
|
|
104
|
+
}, async (args) => {
|
|
105
|
+
try {
|
|
106
|
+
const client = await getClient();
|
|
107
|
+
const res = await client.request('POST', '/api/v1/iam/approvals', args);
|
|
108
|
+
return success(res);
|
|
109
|
+
}
|
|
110
|
+
catch (err) {
|
|
111
|
+
return apiErrorResult(err, 'POST /api/v1/iam/approvals');
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
server.tool('tacit_iam_identity_recovery', 'Initiate identity recovery for a user by email (public endpoint)', {
|
|
115
|
+
email: z.string().describe('Email address of the identity to recover'),
|
|
116
|
+
}, async (args) => {
|
|
117
|
+
try {
|
|
118
|
+
const client = await getClient();
|
|
119
|
+
const res = await client.request('POST', '/api/v1/iam/identity-recovery', args);
|
|
120
|
+
return success(res);
|
|
121
|
+
}
|
|
122
|
+
catch (err) {
|
|
123
|
+
return apiErrorResult(err, 'POST /api/v1/iam/identity-recovery');
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
server.tool('tacit_iam_reactivate_identity', 'Reactivate a previously deactivated member', {
|
|
127
|
+
user_id: z.string().describe('ID of the user to reactivate'),
|
|
128
|
+
}, async (args) => {
|
|
129
|
+
try {
|
|
130
|
+
const client = await getClient();
|
|
131
|
+
const res = await client.request('POST', `/api/v1/iam/members/${args.user_id}/reactivate`);
|
|
132
|
+
return success(res);
|
|
133
|
+
}
|
|
134
|
+
catch (err) {
|
|
135
|
+
return apiErrorResult(err, `POST /api/v1/iam/members/${args.user_id}/reactivate`);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
export function registerSecurityTools(server, getClient) {
|
|
140
|
+
server.tool('tacit_security_access_review', 'Security-grade access review: members, roles, and capability denials', {}, async () => {
|
|
141
|
+
try {
|
|
142
|
+
const client = await getClient();
|
|
143
|
+
const res = await client.request('GET', '/api/v1/iam/access-report');
|
|
144
|
+
return success(res);
|
|
145
|
+
}
|
|
146
|
+
catch (err) {
|
|
147
|
+
return apiErrorResult(err, 'GET /api/v1/iam/access-report');
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
server.tool('tacit_security_secret_inventory', 'List all managed secrets in the workspace', {}, async () => {
|
|
151
|
+
try {
|
|
152
|
+
const client = await getClient();
|
|
153
|
+
const res = await client.request('GET', '/api/v1/iam/secrets');
|
|
154
|
+
return success(res);
|
|
155
|
+
}
|
|
156
|
+
catch (err) {
|
|
157
|
+
return apiErrorResult(err, 'GET /api/v1/iam/secrets');
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
server.tool('tacit_security_rotate_secret', 'Record a secret rotation event', {
|
|
161
|
+
secret_type: z.string().describe('Type of secret (e.g. "api_key", "db_password")'),
|
|
162
|
+
identifier: z.string().describe('Identifier of the secret being rotated'),
|
|
163
|
+
digest_sha256: z.string().optional().describe('SHA-256 digest of the new secret value'),
|
|
164
|
+
}, async (args) => {
|
|
165
|
+
try {
|
|
166
|
+
const client = await getClient();
|
|
167
|
+
const res = await client.request('POST', '/api/v1/iam/secrets/rotate-record', args);
|
|
168
|
+
return success(res);
|
|
169
|
+
}
|
|
170
|
+
catch (err) {
|
|
171
|
+
return apiErrorResult(err, 'POST /api/v1/iam/secrets/rotate-record');
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
server.tool('tacit_security_incident_report', 'Retrieve recent identity-related chronicle events for security review', {}, async () => {
|
|
175
|
+
try {
|
|
176
|
+
const client = await getClient();
|
|
177
|
+
const res = await client.request('GET', '/api/v1/chronicle/events/recent?q=identity.&limit=100');
|
|
178
|
+
return success(res);
|
|
179
|
+
}
|
|
180
|
+
catch (err) {
|
|
181
|
+
return apiErrorResult(err, 'GET /api/v1/chronicle/events/recent?q=identity.');
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
server.tool('tacit_mcp_profile_health', 'Check the health of the current IAM profile and token validity', {}, async () => {
|
|
185
|
+
try {
|
|
186
|
+
const client = await getClient();
|
|
187
|
+
const res = await client.request('GET', '/api/v1/iam/profile-health');
|
|
188
|
+
return success(res);
|
|
189
|
+
}
|
|
190
|
+
catch (err) {
|
|
191
|
+
return apiErrorResult(err, 'GET /api/v1/iam/profile-health');
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
}
|
package/dist/tools/onboarding.js
CHANGED
|
@@ -51,9 +51,14 @@ export function registerOnboardingTools(server, getClient) {
|
|
|
51
51
|
}
|
|
52
52
|
const lines = [];
|
|
53
53
|
lines.push(`## Onboarding: ${state.name}`);
|
|
54
|
+
if (state.description) {
|
|
55
|
+
lines.push(`*${state.description}*`);
|
|
56
|
+
}
|
|
54
57
|
lines.push('');
|
|
55
58
|
lines.push(`Progress: ${completedIds.length} of ${EXPERIENCES.length} experiences complete.`);
|
|
56
59
|
lines.push('');
|
|
60
|
+
lines.push('⚠️ **Account notice:** Your claude.ai session may be associated with a different account than this workspace. Artifacts you create will publish to your personal claude.ai account. If this is not what you want, switch accounts before continuing to Experience 7.');
|
|
61
|
+
lines.push('');
|
|
57
62
|
if (!next) {
|
|
58
63
|
lines.push('All eleven experiences complete — you are a TACIT power user.');
|
|
59
64
|
lines.push('');
|
package/dist/tools/people.js
CHANGED
|
@@ -44,6 +44,47 @@ export function registerPeopleTools(server, getClient) {
|
|
|
44
44
|
return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
|
|
45
45
|
}
|
|
46
46
|
});
|
|
47
|
+
server.tool('tacit_update_person', 'Update a person record (name, url, email, notes). Pass clear_url/clear_email/clear_notes to remove a field.', {
|
|
48
|
+
person_id: z.string().uuid().describe('Person UUID'),
|
|
49
|
+
name: z.string().optional().describe('New name'),
|
|
50
|
+
url: z.string().url().optional().describe('New URL'),
|
|
51
|
+
clear_url: z.boolean().optional().describe('Set true to clear the URL'),
|
|
52
|
+
email: z.string().email().optional().describe('New email'),
|
|
53
|
+
clear_email: z.boolean().optional().describe('Set true to clear the email'),
|
|
54
|
+
notes: z.string().max(4000).optional().describe('Free-text notes about this person'),
|
|
55
|
+
clear_notes: z.boolean().optional().describe('Set true to clear the notes'),
|
|
56
|
+
}, async (args) => {
|
|
57
|
+
try {
|
|
58
|
+
const client = await getClient();
|
|
59
|
+
const { person_id, ...body } = args;
|
|
60
|
+
const data = await client.request('PATCH', `/api/v1/people/${person_id}`, body);
|
|
61
|
+
return success(data);
|
|
62
|
+
}
|
|
63
|
+
catch (e) {
|
|
64
|
+
if (e instanceof TacitApiError)
|
|
65
|
+
return featureDisabledResult(e) ?? error(e.message);
|
|
66
|
+
return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
server.tool('tacit_add_document_person', 'Link a person to a document with a role (author, editor, contributor, speaker, subject).', {
|
|
70
|
+
document_id: z.string().uuid().describe('Document (data_object) UUID'),
|
|
71
|
+
person_id: z.string().uuid().describe('Person UUID'),
|
|
72
|
+
role: z.enum(['author', 'editor', 'contributor', 'speaker', 'subject']).default('author').describe('Role of this person on the document'),
|
|
73
|
+
position: z.number().int().min(0).default(0).describe('Author position (0-indexed)'),
|
|
74
|
+
}, async (args) => {
|
|
75
|
+
try {
|
|
76
|
+
const client = await getClient();
|
|
77
|
+
const data = await client.request('PUT', `/api/v1/documents/${args.document_id}/people`, {
|
|
78
|
+
people: [{ person_id: args.person_id, role: args.role, position: args.position }],
|
|
79
|
+
});
|
|
80
|
+
return success(data);
|
|
81
|
+
}
|
|
82
|
+
catch (e) {
|
|
83
|
+
if (e instanceof TacitApiError)
|
|
84
|
+
return featureDisabledResult(e) ?? error(e.message);
|
|
85
|
+
return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
47
88
|
server.tool('tacit_get_myself', "Get the authenticated user's own person record.", {}, async () => {
|
|
48
89
|
try {
|
|
49
90
|
const client = await getClient();
|
package/dist/tools/registry.d.ts
CHANGED
|
@@ -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 +
|
|
3
|
+
* Partition: 6 stdio_only + 26 admin_only + 2 gate_only + 158 https = 192.
|
|
4
4
|
*/
|
|
5
5
|
export type ToolTransport = 'https' | 'stdio_only' | 'admin_only' | 'gate_only';
|
|
6
6
|
export type ToolClass = 'read' | 'write' | 'admin' | 'dispatch';
|
package/dist/tools/registry.js
CHANGED
|
@@ -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 +
|
|
3
|
+
* Partition: 6 stdio_only + 26 admin_only + 2 gate_only + 158 https = 192.
|
|
4
4
|
*/
|
|
5
5
|
const STDIO_ONLY = [
|
|
6
6
|
'tacit_ingest_file',
|
|
@@ -29,6 +29,14 @@ const ADMIN_ONLY = [
|
|
|
29
29
|
'tacit_github_reconnect_connection',
|
|
30
30
|
'tacit_compose',
|
|
31
31
|
'tacit_converse',
|
|
32
|
+
'tacit_iam_grant_membership',
|
|
33
|
+
'tacit_iam_revoke_membership',
|
|
34
|
+
'tacit_iam_change_role',
|
|
35
|
+
'tacit_iam_offboard_member',
|
|
36
|
+
'tacit_iam_transfer_ownership',
|
|
37
|
+
'tacit_iam_create_approval',
|
|
38
|
+
'tacit_iam_token_management',
|
|
39
|
+
'tacit_security_rotate_secret',
|
|
32
40
|
];
|
|
33
41
|
const GATE_ONLY = ['tacit_approve_gate', 'tacit_reject_gate'];
|
|
34
42
|
const READ_TOOLS = [
|
|
@@ -108,6 +116,12 @@ const READ_TOOLS = [
|
|
|
108
116
|
'tacit_secretary_recall',
|
|
109
117
|
'tacit_capture_find',
|
|
110
118
|
'tacit_capture_synthesize',
|
|
119
|
+
'tacit_iam_access_report',
|
|
120
|
+
'tacit_iam_identity_recovery',
|
|
121
|
+
'tacit_security_access_review',
|
|
122
|
+
'tacit_security_secret_inventory',
|
|
123
|
+
'tacit_security_incident_report',
|
|
124
|
+
'tacit_mcp_profile_health',
|
|
111
125
|
];
|
|
112
126
|
const DISPATCH_TOOLS = [
|
|
113
127
|
'tacit_agent_delegate',
|
|
@@ -122,6 +136,7 @@ const WRITE_TOOLS = [
|
|
|
122
136
|
'tacit_agent_decide',
|
|
123
137
|
'tacit_annotate',
|
|
124
138
|
'tacit_approve_gate',
|
|
139
|
+
'tacit_add_document_person',
|
|
125
140
|
'tacit_artifact_create',
|
|
126
141
|
'tacit_artifact_delete',
|
|
127
142
|
'tacit_artifact_publish',
|
|
@@ -174,6 +189,7 @@ const WRITE_TOOLS = [
|
|
|
174
189
|
'tacit_research_prepare',
|
|
175
190
|
'tacit_share_artifact',
|
|
176
191
|
'tacit_switch_workspace',
|
|
192
|
+
'tacit_update_person',
|
|
177
193
|
'tacit_voice_upload_sample',
|
|
178
194
|
'tacit_wiki_author',
|
|
179
195
|
'tacit_wiki_override',
|
|
@@ -193,6 +209,7 @@ const WRITE_TOOLS = [
|
|
|
193
209
|
'tacit_capture_restore',
|
|
194
210
|
'tacit_capture_note',
|
|
195
211
|
'tacit_capture_place',
|
|
212
|
+
'tacit_iam_reactivate_identity',
|
|
196
213
|
];
|
|
197
214
|
function build() {
|
|
198
215
|
const map = new Map();
|
|
@@ -219,8 +236,8 @@ function build() {
|
|
|
219
236
|
if (!exclusive.has(n))
|
|
220
237
|
add(n, classOf(n), 'https', false);
|
|
221
238
|
}
|
|
222
|
-
if (map.size !==
|
|
223
|
-
throw new Error(`tool registry expected
|
|
239
|
+
if (map.size !== 192)
|
|
240
|
+
throw new Error(`tool registry expected 192 tools, got ${map.size}`);
|
|
224
241
|
return map;
|
|
225
242
|
}
|
|
226
243
|
export const TOOL_REGISTRY = build();
|
|
@@ -1,3 +1,33 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import type { TacitClient } from '../client.js';
|
|
3
|
+
/**
|
|
4
|
+
* NL→EventType keyword table (longest-match-first).
|
|
5
|
+
* Each entry: [keyword_phrase, chronicle_event_type].
|
|
6
|
+
* Sorted by phrase length descending so "status update" matches before "status".
|
|
7
|
+
*/
|
|
8
|
+
export declare const EVENT_TYPE_KEYWORDS: [string, string][];
|
|
9
|
+
export declare function classifyEventType(text: string, hint?: string): string;
|
|
10
|
+
export interface LogPayloadArgs {
|
|
11
|
+
description: string;
|
|
12
|
+
event_hint?: string;
|
|
13
|
+
title?: string;
|
|
14
|
+
project_id?: string;
|
|
15
|
+
chapter_id?: string;
|
|
16
|
+
participants?: string;
|
|
17
|
+
supersedes_event_id?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare function buildLogPayload(args: LogPayloadArgs): Record<string, unknown>;
|
|
20
|
+
export interface RecallRequestArgs {
|
|
21
|
+
query: string;
|
|
22
|
+
from?: string;
|
|
23
|
+
to?: string;
|
|
24
|
+
event_types?: string;
|
|
25
|
+
limit?: number;
|
|
26
|
+
project_id?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface RecallRequest {
|
|
29
|
+
method: 'GET';
|
|
30
|
+
path: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function buildRecallRequest(args: RecallRequestArgs): RecallRequest;
|
|
3
33
|
export declare function registerSecretaryTools(server: McpServer, getClient: () => Promise<TacitClient>): void;
|
package/dist/tools/secretary.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { TacitApiError } from '../client.js';
|
|
3
|
-
import { success, error, featureDisabledResult } from './errors.js';
|
|
3
|
+
import { success, error, featureDisabledResult, apiErrorResult } from './errors.js';
|
|
4
4
|
/**
|
|
5
5
|
* NL→EventType keyword table (longest-match-first).
|
|
6
6
|
* Each entry: [keyword_phrase, chronicle_event_type].
|
|
7
7
|
* Sorted by phrase length descending so "status update" matches before "status".
|
|
8
8
|
*/
|
|
9
|
-
const EVENT_TYPE_KEYWORDS = [
|
|
9
|
+
export const EVENT_TYPE_KEYWORDS = [
|
|
10
10
|
// Multi-word first (longest match)
|
|
11
11
|
['status update', 'status_update'],
|
|
12
12
|
['action item', 'action_item'],
|
|
@@ -16,13 +16,13 @@ const EVENT_TYPE_KEYWORDS = [
|
|
|
16
16
|
['signed off', 'decision'],
|
|
17
17
|
['agreed to', 'decision'],
|
|
18
18
|
['wrapped up', 'milestone'],
|
|
19
|
-
['checked in', 'meeting_note'],
|
|
20
|
-
['caught up', 'meeting_note'],
|
|
21
19
|
// Single-word
|
|
22
20
|
['decided', 'decision'],
|
|
23
21
|
['decision', 'decision'],
|
|
24
22
|
['approved', 'decision'],
|
|
25
23
|
['rejected', 'decision'],
|
|
24
|
+
['checked in', 'meeting_note'],
|
|
25
|
+
['caught up', 'meeting_note'],
|
|
26
26
|
['met', 'meeting_note'],
|
|
27
27
|
['meeting', 'meeting_note'],
|
|
28
28
|
['call', 'meeting_note'],
|
|
@@ -53,16 +53,86 @@ const EVENT_TYPE_KEYWORDS = [
|
|
|
53
53
|
['task', 'action_item'],
|
|
54
54
|
['assign', 'action_item'],
|
|
55
55
|
];
|
|
56
|
-
function classifyEventType(text, hint) {
|
|
56
|
+
export function classifyEventType(text, hint) {
|
|
57
57
|
if (hint)
|
|
58
58
|
return hint;
|
|
59
59
|
const lower = text.toLowerCase();
|
|
60
60
|
for (const [phrase, eventType] of EVENT_TYPE_KEYWORDS) {
|
|
61
|
-
if (
|
|
61
|
+
if (new RegExp(`\\b${phrase}(?:s|es|d|ed|ing)?\\b`).test(lower))
|
|
62
62
|
return eventType;
|
|
63
63
|
}
|
|
64
64
|
return 'note';
|
|
65
65
|
}
|
|
66
|
+
const SECRETARY_TO_BACKEND = {
|
|
67
|
+
decision: 'DECISION',
|
|
68
|
+
meeting_note: 'MEETING_MINUTES',
|
|
69
|
+
milestone: 'WORK_NOTE',
|
|
70
|
+
blocker: 'BLOCKER',
|
|
71
|
+
risk: 'RISK_ESCALATION',
|
|
72
|
+
note: 'WORK_NOTE',
|
|
73
|
+
insight: 'WORK_NOTE',
|
|
74
|
+
action_item: 'ACTION_ITEM',
|
|
75
|
+
status_update: 'STATUS_UPDATE',
|
|
76
|
+
};
|
|
77
|
+
export function buildLogPayload(args) {
|
|
78
|
+
const eventType = classifyEventType(args.description, args.event_hint);
|
|
79
|
+
const backendType = SECRETARY_TO_BACKEND[eventType] ?? 'WORK_NOTE';
|
|
80
|
+
const title = args.title ??
|
|
81
|
+
(args.description.length > 80
|
|
82
|
+
? args.description.slice(0, 77) + '...'
|
|
83
|
+
: args.description);
|
|
84
|
+
const payload = {
|
|
85
|
+
event_type: backendType,
|
|
86
|
+
title,
|
|
87
|
+
raw_payload: args.description,
|
|
88
|
+
metadata: { secretary_kind: eventType },
|
|
89
|
+
hint: `Logged as ${eventType} (backend: ${backendType}). Pass event_hint to override.`,
|
|
90
|
+
};
|
|
91
|
+
if (args.project_id)
|
|
92
|
+
payload['project_id'] = args.project_id;
|
|
93
|
+
if (args.chapter_id)
|
|
94
|
+
payload['chapter_id'] = args.chapter_id;
|
|
95
|
+
if (args.participants) {
|
|
96
|
+
payload['metadata']['participants'] = args.participants
|
|
97
|
+
.split(',')
|
|
98
|
+
.map((p) => p.trim());
|
|
99
|
+
}
|
|
100
|
+
if (args.supersedes_event_id) {
|
|
101
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
102
|
+
if (!UUID_RE.test(args.supersedes_event_id)) {
|
|
103
|
+
throw new Error('supersedes_event_id must be a valid UUID');
|
|
104
|
+
}
|
|
105
|
+
payload['supersedes_event_id'] = args.supersedes_event_id;
|
|
106
|
+
}
|
|
107
|
+
return payload;
|
|
108
|
+
}
|
|
109
|
+
export function buildRecallRequest(args) {
|
|
110
|
+
const query = args.query.trim();
|
|
111
|
+
if (query) {
|
|
112
|
+
if (args.project_id) {
|
|
113
|
+
throw new Error('project_id filtering is not supported with semantic search queries');
|
|
114
|
+
}
|
|
115
|
+
const params = new URLSearchParams();
|
|
116
|
+
params.set('q', query);
|
|
117
|
+
params.set('source_type', 'CHRONICLE_EVENT');
|
|
118
|
+
if (args.limit !== undefined)
|
|
119
|
+
params.set('limit', String(args.limit));
|
|
120
|
+
return { method: 'GET', path: `/api/v1/search?${params.toString()}` };
|
|
121
|
+
}
|
|
122
|
+
const params = new URLSearchParams();
|
|
123
|
+
if (args.from)
|
|
124
|
+
params.set('from', args.from);
|
|
125
|
+
if (args.to)
|
|
126
|
+
params.set('to', args.to);
|
|
127
|
+
if (args.event_types)
|
|
128
|
+
params.set('event_types', args.event_types);
|
|
129
|
+
if (args.limit !== undefined)
|
|
130
|
+
params.set('limit', String(args.limit));
|
|
131
|
+
if (args.project_id)
|
|
132
|
+
params.set('project_id', args.project_id);
|
|
133
|
+
const qs = params.toString();
|
|
134
|
+
return { method: 'GET', path: `/api/v1/chronicle/events/recent${qs ? `?${qs}` : ''}` };
|
|
135
|
+
}
|
|
66
136
|
export function registerSecretaryTools(server, getClient) {
|
|
67
137
|
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
138
|
description: z.string().describe('Natural language description of the event'),
|
|
@@ -90,43 +160,26 @@ export function registerSecretaryTools(server, getClient) {
|
|
|
90
160
|
.string()
|
|
91
161
|
.optional()
|
|
92
162
|
.describe('Comma-separated participant names or emails'),
|
|
163
|
+
supersedes_event_id: z.string().uuid().optional().describe('UUID of a prior event this one supersedes'),
|
|
93
164
|
}, async (args) => {
|
|
94
165
|
try {
|
|
95
166
|
const client = await getClient();
|
|
96
|
-
const
|
|
97
|
-
const
|
|
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);
|
|
167
|
+
const { hint, ...body } = buildLogPayload(args);
|
|
168
|
+
const data = await client.request('POST', '/api/v1/events', body);
|
|
117
169
|
return success({
|
|
118
170
|
logged: true,
|
|
119
|
-
classified_as:
|
|
171
|
+
classified_as: body.event_type,
|
|
172
|
+
hint,
|
|
120
173
|
event: data,
|
|
121
174
|
});
|
|
122
175
|
}
|
|
123
176
|
catch (e) {
|
|
124
177
|
if (e instanceof TacitApiError)
|
|
125
|
-
return featureDisabledResult(e) ??
|
|
178
|
+
return featureDisabledResult(e) ?? apiErrorResult(e, '/api/v1/events');
|
|
126
179
|
return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
|
|
127
180
|
}
|
|
128
181
|
});
|
|
129
|
-
server.tool('tacit_secretary_recall', 'Search Chronicle history with natural language.
|
|
182
|
+
server.tool('tacit_secretary_recall', 'Search Chronicle history with natural language. Returns the most relevant events ranked by semantic similarity, with optional date-range listing when no query is given. Examples: "decisions about auth", "meetings last week", "blockers this sprint".', {
|
|
130
183
|
query: z.string().describe('Natural language search query'),
|
|
131
184
|
from: z.string().optional().describe('RFC 3339 lower bound (inclusive)'),
|
|
132
185
|
to: z.string().optional().describe('RFC 3339 upper bound (inclusive)'),
|
|
@@ -138,27 +191,14 @@ export function registerSecretaryTools(server, getClient) {
|
|
|
138
191
|
project_id: z.string().uuid().optional().describe('Scope to a specific project'),
|
|
139
192
|
}, async (args) => {
|
|
140
193
|
try {
|
|
194
|
+
const req = buildRecallRequest(args);
|
|
141
195
|
const client = await getClient();
|
|
142
|
-
const
|
|
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}`);
|
|
196
|
+
const data = await client.request(req.method, req.path);
|
|
157
197
|
return success(data);
|
|
158
198
|
}
|
|
159
199
|
catch (e) {
|
|
160
200
|
if (e instanceof TacitApiError)
|
|
161
|
-
return featureDisabledResult(e) ??
|
|
201
|
+
return featureDisabledResult(e) ?? apiErrorResult(e, '/api/v1/search');
|
|
162
202
|
return error(`Unexpected error: ${e instanceof Error ? e.message : String(e)}`);
|
|
163
203
|
}
|
|
164
204
|
});
|
|
@@ -79,4 +79,8 @@ export declare const KB_TYPE_DEF: WorkflowTypeDef;
|
|
|
79
79
|
export declare const LAKE_TYPE_DEF: WorkflowTypeDef;
|
|
80
80
|
export declare const CTO_TYPE_DEF: WorkflowTypeDef;
|
|
81
81
|
export declare const SECRETARY_TYPE_DEF: WorkflowTypeDef;
|
|
82
|
+
export declare const IAM_MEMBERSHIP_OPS_TYPE_DEF: WorkflowTypeDef;
|
|
83
|
+
export declare const IAM_ACCESS_REVIEW_TYPE_DEF: WorkflowTypeDef;
|
|
84
|
+
export declare const SECURITY_AUDIT_TYPE_DEF: WorkflowTypeDef;
|
|
85
|
+
export declare const SECRET_ROTATION_TYPE_DEF: WorkflowTypeDef;
|
|
82
86
|
export declare function createDefaultRegistry(): WorkflowRegistry;
|
|
@@ -385,6 +385,47 @@ export const SECRETARY_TYPE_DEF = {
|
|
|
385
385
|
guidance: 'SECRETARY_CHRONICLE',
|
|
386
386
|
maxInstances: 3,
|
|
387
387
|
};
|
|
388
|
+
// ─── IAM type definitions (MV-1542b W3) ────────────────────────────────────
|
|
389
|
+
export const IAM_MEMBERSHIP_OPS_TYPE_DEF = {
|
|
390
|
+
name: 'iam_membership_ops',
|
|
391
|
+
entryTool: null,
|
|
392
|
+
prereqs: { kind: 'flat', tools: ['tacit_iam_access_report'] },
|
|
393
|
+
persistent: false,
|
|
394
|
+
failDirection: 'closed',
|
|
395
|
+
sharedToolPolicy: 'passthrough',
|
|
396
|
+
guidance: 'IAM_MEMBERSHIP_OPS',
|
|
397
|
+
maxInstances: 1,
|
|
398
|
+
};
|
|
399
|
+
export const IAM_ACCESS_REVIEW_TYPE_DEF = {
|
|
400
|
+
name: 'iam_access_review',
|
|
401
|
+
entryTool: 'tacit_iam_access_report',
|
|
402
|
+
prereqs: { kind: 'flat', tools: [] },
|
|
403
|
+
persistent: false,
|
|
404
|
+
failDirection: 'open',
|
|
405
|
+
sharedToolPolicy: 'passthrough',
|
|
406
|
+
guidance: 'IAM_ACCESS_REVIEW',
|
|
407
|
+
maxInstances: 3,
|
|
408
|
+
};
|
|
409
|
+
export const SECURITY_AUDIT_TYPE_DEF = {
|
|
410
|
+
name: 'security_audit',
|
|
411
|
+
entryTool: null,
|
|
412
|
+
prereqs: { kind: 'flat', tools: ['tacit_security_secret_inventory'] },
|
|
413
|
+
persistent: false,
|
|
414
|
+
failDirection: 'closed',
|
|
415
|
+
sharedToolPolicy: 'passthrough',
|
|
416
|
+
guidance: 'SECURITY_AUDIT',
|
|
417
|
+
maxInstances: 1,
|
|
418
|
+
};
|
|
419
|
+
export const SECRET_ROTATION_TYPE_DEF = {
|
|
420
|
+
name: 'secret_rotation',
|
|
421
|
+
entryTool: null,
|
|
422
|
+
prereqs: { kind: 'flat', tools: ['tacit_security_secret_inventory'] },
|
|
423
|
+
persistent: false,
|
|
424
|
+
failDirection: 'closed',
|
|
425
|
+
sharedToolPolicy: 'passthrough',
|
|
426
|
+
guidance: 'SECRET_ROTATION',
|
|
427
|
+
maxInstances: 1,
|
|
428
|
+
};
|
|
388
429
|
// ─── Factory ────────────────────────────────────────────────────────────────
|
|
389
430
|
export function createDefaultRegistry() {
|
|
390
431
|
const registry = new WorkflowRegistry();
|
|
@@ -400,5 +441,9 @@ export function createDefaultRegistry() {
|
|
|
400
441
|
registry.register(LAKE_TYPE_DEF);
|
|
401
442
|
registry.register(CTO_TYPE_DEF);
|
|
402
443
|
registry.register(SECRETARY_TYPE_DEF);
|
|
444
|
+
registry.register(IAM_MEMBERSHIP_OPS_TYPE_DEF);
|
|
445
|
+
registry.register(IAM_ACCESS_REVIEW_TYPE_DEF);
|
|
446
|
+
registry.register(SECURITY_AUDIT_TYPE_DEF);
|
|
447
|
+
registry.register(SECRET_ROTATION_TYPE_DEF);
|
|
403
448
|
return registry;
|
|
404
449
|
}
|