thumbgate 0.9.9
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/.claude-plugin/README.md +134 -0
- package/.claude-plugin/bundle/icon.png +0 -0
- package/.claude-plugin/bundle/icon.svg +18 -0
- package/.claude-plugin/bundle/server/index.js +24 -0
- package/.claude-plugin/marketplace.json +36 -0
- package/.claude-plugin/plugin.json +21 -0
- package/.well-known/mcp/server-card.json +231 -0
- package/LICENSE +21 -0
- package/README.md +375 -0
- package/adapters/README.md +9 -0
- package/adapters/amp/skills/rlhf-feedback/SKILL.md +22 -0
- package/adapters/chatgpt/INSTALL.md +83 -0
- package/adapters/chatgpt/openapi.yaml +1281 -0
- package/adapters/claude/.mcp.json +14 -0
- package/adapters/codex/config.toml +9 -0
- package/adapters/gemini/function-declarations.json +224 -0
- package/adapters/mcp/server-stdio.js +788 -0
- package/adapters/opencode/opencode.json +15 -0
- package/bin/cli.js +1483 -0
- package/bin/memory.sh +64 -0
- package/bin/obsidian-sync.sh +20 -0
- package/bin/postinstall.js +37 -0
- package/config/build-metadata.json +4 -0
- package/config/e2e-critical-flows.json +45 -0
- package/config/gate-templates.json +77 -0
- package/config/gates/claim-verification.json +29 -0
- package/config/gates/computer-use.json +39 -0
- package/config/gates/default.json +117 -0
- package/config/github-about.json +25 -0
- package/config/mcp-allowlists.json +135 -0
- package/config/model-tiers.json +33 -0
- package/config/partner-routing.json +132 -0
- package/config/policy-bundles/constrained-v1.json +64 -0
- package/config/policy-bundles/default-v1.json +91 -0
- package/config/rubrics/default-v1.json +52 -0
- package/config/skill-packs/react-testing.json +23 -0
- package/config/skill-packs/stripe-integration/references/api-spec.json +1 -0
- package/config/skill-packs/stripe-integration/references/webhook-guide.md +3 -0
- package/config/skill-specs/pr-reviewer.json +9 -0
- package/config/skill-specs/release-status.json +9 -0
- package/config/skill-specs/ticket-triage.json +9 -0
- package/config/subagent-profiles.json +32 -0
- package/config/tessl-tiles.json +29 -0
- package/config/thumbgate-settings.managed.json +12 -0
- package/openapi/openapi.yaml +1281 -0
- package/package.json +286 -0
- package/plugins/amp-skill/INSTALL.md +52 -0
- package/plugins/amp-skill/SKILL.md +64 -0
- package/plugins/claude-codex-bridge/.claude-plugin/plugin.json +22 -0
- package/plugins/claude-codex-bridge/.mcp.json +12 -0
- package/plugins/claude-codex-bridge/INSTALL.md +43 -0
- package/plugins/claude-codex-bridge/README.md +46 -0
- package/plugins/claude-codex-bridge/scripts/codex-bridge.js +288 -0
- package/plugins/claude-codex-bridge/skills/adversarial-review/SKILL.md +24 -0
- package/plugins/claude-codex-bridge/skills/result/SKILL.md +22 -0
- package/plugins/claude-codex-bridge/skills/review/SKILL.md +28 -0
- package/plugins/claude-codex-bridge/skills/second-pass/SKILL.md +27 -0
- package/plugins/claude-codex-bridge/skills/setup/SKILL.md +21 -0
- package/plugins/claude-codex-bridge/skills/status/SKILL.md +19 -0
- package/plugins/claude-skill/INSTALL.md +55 -0
- package/plugins/claude-skill/SKILL.md +46 -0
- package/plugins/codex-profile/.codex-plugin/plugin.json +43 -0
- package/plugins/codex-profile/.mcp.json +12 -0
- package/plugins/codex-profile/AGENTS.md +20 -0
- package/plugins/codex-profile/INSTALL.md +66 -0
- package/plugins/codex-profile/README.md +37 -0
- package/plugins/cursor-marketplace/.cursor-plugin/plugin.json +23 -0
- package/plugins/cursor-marketplace/CHANGELOG.md +30 -0
- package/plugins/cursor-marketplace/LICENSE +21 -0
- package/plugins/cursor-marketplace/README.md +124 -0
- package/plugins/cursor-marketplace/agents/reliability-reviewer.md +31 -0
- package/plugins/cursor-marketplace/assets/logo-400x400.png +0 -0
- package/plugins/cursor-marketplace/commands/capture-feedback.md +33 -0
- package/plugins/cursor-marketplace/commands/check-gates.md +25 -0
- package/plugins/cursor-marketplace/commands/show-lessons.md +27 -0
- package/plugins/cursor-marketplace/hooks/hooks.json +10 -0
- package/plugins/cursor-marketplace/mcp.json +12 -0
- package/plugins/cursor-marketplace/rules/feedback-capture.mdc +34 -0
- package/plugins/cursor-marketplace/rules/pre-action-gates.mdc +30 -0
- package/plugins/cursor-marketplace/rules/session-continuity.mdc +28 -0
- package/plugins/cursor-marketplace/scripts/gate-check.sh +11 -0
- package/plugins/cursor-marketplace/skills/capture-feedback/SKILL.md +47 -0
- package/plugins/cursor-marketplace/skills/prevention-rules/SKILL.md +31 -0
- package/plugins/cursor-marketplace/skills/recall-context/SKILL.md +30 -0
- package/plugins/cursor-marketplace/skills/search-lessons/SKILL.md +33 -0
- package/plugins/gemini-extension/INSTALL.md +92 -0
- package/plugins/gemini-extension/gemini_prompt.txt +14 -0
- package/plugins/gemini-extension/tool_contract.json +45 -0
- package/plugins/opencode-profile/INSTALL.md +57 -0
- package/public/assets/instagram-card.png +0 -0
- package/public/assets/tiktok-agent-memory.mp4 +0 -0
- package/public/blog.html +400 -0
- package/public/dashboard.html +1093 -0
- package/public/guide.html +317 -0
- package/public/index.html +1195 -0
- package/public/learn/agent-harness-pattern.html +180 -0
- package/public/learn/ai-agent-persistent-memory.html +202 -0
- package/public/learn/learn.css +45 -0
- package/public/learn/mcp-pre-action-gates-explained.html +172 -0
- package/public/learn/stop-ai-agent-force-push.html +134 -0
- package/public/learn/vibe-coding-safety-net.html +142 -0
- package/public/learn.html +213 -0
- package/public/lessons.html +650 -0
- package/public/vercel.json +8 -0
- package/scripts/__pycache__/train_from_feedback.cpython-314.pyc +0 -0
- package/scripts/a2ui-engine.js +73 -0
- package/scripts/access-anomaly-detector.js +12 -0
- package/scripts/adk-consolidator.js +266 -0
- package/scripts/agent-readiness.js +220 -0
- package/scripts/agent-security-hardening.js +227 -0
- package/scripts/agentic-data-pipeline.js +847 -0
- package/scripts/analytics-report.js +328 -0
- package/scripts/analytics-window.js +158 -0
- package/scripts/async-job-runner.js +1001 -0
- package/scripts/audit-trail.js +398 -0
- package/scripts/auto-promote-gates.js +293 -0
- package/scripts/auto-wire-hooks.js +316 -0
- package/scripts/autonomous-sales-agent.js +39 -0
- package/scripts/autoresearch-runner.js +216 -0
- package/scripts/background-agent-governance.js +237 -0
- package/scripts/behavioral-extraction.js +93 -0
- package/scripts/belief-update.js +84 -0
- package/scripts/billing.js +2438 -0
- package/scripts/bot-detector.js +50 -0
- package/scripts/budget-guard.js +173 -0
- package/scripts/build-claude-mcpb.js +189 -0
- package/scripts/build-metadata.js +97 -0
- package/scripts/check-congruence.js +322 -0
- package/scripts/cli-feedback.js +135 -0
- package/scripts/cli-telemetry.js +87 -0
- package/scripts/cloudflare-dynamic-sandbox.js +315 -0
- package/scripts/code-reasoning.js +350 -0
- package/scripts/codegraph-context.js +466 -0
- package/scripts/commercial-offer.js +56 -0
- package/scripts/computer-use-firewall.js +250 -0
- package/scripts/context-engine.js +694 -0
- package/scripts/contextfs.js +1287 -0
- package/scripts/conversation-context.js +119 -0
- package/scripts/creator-campaigns.js +239 -0
- package/scripts/daemon-manager.js +108 -0
- package/scripts/daily-digest.js +11 -0
- package/scripts/dashboard-render-spec.js +395 -0
- package/scripts/dashboard.js +1058 -0
- package/scripts/data-governance.js +173 -0
- package/scripts/delegation-runtime.js +900 -0
- package/scripts/deploy-gcp.sh +44 -0
- package/scripts/deploy-policy.js +231 -0
- package/scripts/disagreement-mining.js +315 -0
- package/scripts/dispatch-brief.js +159 -0
- package/scripts/distribution-surfaces.js +44 -0
- package/scripts/dpo-optimizer.js +206 -0
- package/scripts/ensure-repo-bootstrap.js +129 -0
- package/scripts/ephemeral-agent-store.js +219 -0
- package/scripts/eval-harness.js +56 -0
- package/scripts/evolution-state.js +241 -0
- package/scripts/experiment-tracker.js +267 -0
- package/scripts/export-databricks-bundle.js +242 -0
- package/scripts/export-dpo-pairs.js +344 -0
- package/scripts/export-kto-pairs.js +309 -0
- package/scripts/export-training.js +450 -0
- package/scripts/failure-diagnostics.js +558 -0
- package/scripts/feedback-attribution.js +313 -0
- package/scripts/feedback-fallback.js +110 -0
- package/scripts/feedback-history-distiller.js +391 -0
- package/scripts/feedback-inbox-read.js +162 -0
- package/scripts/feedback-loop.js +1887 -0
- package/scripts/feedback-paths.js +145 -0
- package/scripts/feedback-quality.js +139 -0
- package/scripts/feedback-root-consolidator.js +238 -0
- package/scripts/feedback-schema.js +426 -0
- package/scripts/feedback-session.js +286 -0
- package/scripts/feedback-to-memory.js +185 -0
- package/scripts/feedback-to-rules.js +164 -0
- package/scripts/filesystem-search.js +405 -0
- package/scripts/funnel-analytics.js +35 -0
- package/scripts/gate-satisfy.js +42 -0
- package/scripts/gate-stats.js +116 -0
- package/scripts/gate-templates.js +70 -0
- package/scripts/gates-engine.js +816 -0
- package/scripts/generate-paperbanana-diagrams.sh +99 -0
- package/scripts/generate-pretool-hook.sh +40 -0
- package/scripts/github-about.js +350 -0
- package/scripts/github-outreach.js +65 -0
- package/scripts/gtm-revenue-loop.js +520 -0
- package/scripts/hallucination-detector.js +226 -0
- package/scripts/hf-papers.js +317 -0
- package/scripts/history-distiller.js +200 -0
- package/scripts/hook-auto-capture.sh +100 -0
- package/scripts/hook-stop-pr-thread-check.sh +68 -0
- package/scripts/hook-stop-self-score.sh +51 -0
- package/scripts/hook-stop-verify-deploy.sh +31 -0
- package/scripts/hook-thumbgate-cache-updater.js +48 -0
- package/scripts/hook-verify-before-done.sh +20 -0
- package/scripts/hosted-config.js +156 -0
- package/scripts/hybrid-feedback-context.js +675 -0
- package/scripts/install-mcp.js +159 -0
- package/scripts/intent-router.js +392 -0
- package/scripts/internal-agent-bootstrap.js +490 -0
- package/scripts/jsonl-watcher.js +155 -0
- package/scripts/lesson-db.js +613 -0
- package/scripts/lesson-inference.js +310 -0
- package/scripts/lesson-retrieval.js +95 -0
- package/scripts/lesson-rotation.js +137 -0
- package/scripts/lesson-search.js +644 -0
- package/scripts/lesson-synthesis.js +196 -0
- package/scripts/license.js +50 -0
- package/scripts/local-model-profile.js +384 -0
- package/scripts/markdown-escape.js +12 -0
- package/scripts/marketing-experiment.js +671 -0
- package/scripts/mcp-config.js +149 -0
- package/scripts/mcp-policy.js +99 -0
- package/scripts/memalign-recall.js +111 -0
- package/scripts/memory-firewall.js +222 -0
- package/scripts/memory-migration.js +296 -0
- package/scripts/meta-policy.js +190 -0
- package/scripts/metered-billing.js +16 -0
- package/scripts/model-tier-router.js +301 -0
- package/scripts/money-watcher.js +71 -0
- package/scripts/multi-hop-recall.js +240 -0
- package/scripts/natural-language-harness.js +330 -0
- package/scripts/obsidian-export.js +713 -0
- package/scripts/operational-dashboard.js +103 -0
- package/scripts/operational-summary.js +93 -0
- package/scripts/optimize-context.js +17 -0
- package/scripts/org-dashboard.js +201 -0
- package/scripts/partner-orchestration.js +146 -0
- package/scripts/per-step-scoring.js +165 -0
- package/scripts/perplexity-marketing.js +466 -0
- package/scripts/pii-scanner.js +153 -0
- package/scripts/plan-gate.js +154 -0
- package/scripts/post-everywhere.js +308 -0
- package/scripts/post-to-x-retry.sh +22 -0
- package/scripts/post-to-x.js +369 -0
- package/scripts/pr-manager.js +236 -0
- package/scripts/predictive-insights.js +356 -0
- package/scripts/principle-extractor.js +162 -0
- package/scripts/pro-features.js +40 -0
- package/scripts/pro-local-dashboard.js +174 -0
- package/scripts/problem-detail.js +53 -0
- package/scripts/product-feedback.js +134 -0
- package/scripts/profile-router.js +245 -0
- package/scripts/prompt-dlp.js +221 -0
- package/scripts/prompt-guard.js +83 -0
- package/scripts/prove-adapters.js +863 -0
- package/scripts/prove-attribution.js +365 -0
- package/scripts/prove-automation.js +653 -0
- package/scripts/prove-autoresearch.js +304 -0
- package/scripts/prove-claim-verification.js +277 -0
- package/scripts/prove-cloudflare-sandbox.js +163 -0
- package/scripts/prove-data-pipeline.js +410 -0
- package/scripts/prove-data-quality.js +227 -0
- package/scripts/prove-evolution.js +352 -0
- package/scripts/prove-harnesses.js +287 -0
- package/scripts/prove-intelligence.js +259 -0
- package/scripts/prove-lancedb.js +371 -0
- package/scripts/prove-local-intelligence.js +342 -0
- package/scripts/prove-loop-closure.js +263 -0
- package/scripts/prove-predictive-insights.js +357 -0
- package/scripts/prove-runtime.js +350 -0
- package/scripts/prove-seo-gsd.js +234 -0
- package/scripts/prove-settings.js +279 -0
- package/scripts/prove-subway-upgrades.js +277 -0
- package/scripts/prove-tessl.js +229 -0
- package/scripts/prove-training-export.js +327 -0
- package/scripts/prove-workflow-contract.js +116 -0
- package/scripts/prove-xmemory.js +332 -0
- package/scripts/publish-decision.js +133 -0
- package/scripts/pulse.js +80 -0
- package/scripts/rate-limiter.js +125 -0
- package/scripts/reddit-dm-outreach.js +182 -0
- package/scripts/reddit-monitor-cron.sh +26 -0
- package/scripts/reflector-agent.js +221 -0
- package/scripts/reminder-engine.js +132 -0
- package/scripts/revenue-status.js +472 -0
- package/scripts/risk-scorer.js +459 -0
- package/scripts/rlaif-self-audit.js +129 -0
- package/scripts/rlhf_session_start.sh +32 -0
- package/scripts/rubric-engine.js +230 -0
- package/scripts/schedule-manager.js +251 -0
- package/scripts/secret-scanner.js +414 -0
- package/scripts/self-heal.js +147 -0
- package/scripts/self-healing-check.js +188 -0
- package/scripts/semantic-layer.js +98 -0
- package/scripts/seo-gsd.js +1153 -0
- package/scripts/settings-hierarchy.js +214 -0
- package/scripts/shieldcortex-memory-firewall-runner.mjs +53 -0
- package/scripts/skill-exporter.js +262 -0
- package/scripts/skill-generator.js +446 -0
- package/scripts/skill-materializer.js +134 -0
- package/scripts/skill-packs.js +136 -0
- package/scripts/skill-proposer.js +99 -0
- package/scripts/skill-quality-tracker.js +282 -0
- package/scripts/slo-alert-engine.js +14 -0
- package/scripts/slow-loop.js +72 -0
- package/scripts/social-analytics/db/schema.sql +32 -0
- package/scripts/social-analytics/db/social-analytics.db +0 -0
- package/scripts/social-analytics/digest.js +256 -0
- package/scripts/social-analytics/generate-instagram-card.js +97 -0
- package/scripts/social-analytics/instagram-thumbgate-post.js +107 -0
- package/scripts/social-analytics/load-env.js +46 -0
- package/scripts/social-analytics/mcp-server.js +289 -0
- package/scripts/social-analytics/normalizer.js +580 -0
- package/scripts/social-analytics/notify.js +162 -0
- package/scripts/social-analytics/poll-all.js +92 -0
- package/scripts/social-analytics/pollers/github.js +195 -0
- package/scripts/social-analytics/pollers/instagram.js +253 -0
- package/scripts/social-analytics/pollers/linkedin.js +330 -0
- package/scripts/social-analytics/pollers/plausible.js +247 -0
- package/scripts/social-analytics/pollers/reddit.js +306 -0
- package/scripts/social-analytics/pollers/threads.js +233 -0
- package/scripts/social-analytics/pollers/tiktok.js +203 -0
- package/scripts/social-analytics/pollers/x.js +227 -0
- package/scripts/social-analytics/pollers/youtube.js +304 -0
- package/scripts/social-analytics/pollers/zernio.js +183 -0
- package/scripts/social-analytics/publish-instagram-thumbgate.js +98 -0
- package/scripts/social-analytics/publish-thumbgate-launch.js +316 -0
- package/scripts/social-analytics/publishers/devto.js +122 -0
- package/scripts/social-analytics/publishers/instagram.js +317 -0
- package/scripts/social-analytics/publishers/linkedin.js +294 -0
- package/scripts/social-analytics/publishers/reddit.js +390 -0
- package/scripts/social-analytics/publishers/threads.js +275 -0
- package/scripts/social-analytics/publishers/tiktok.js +217 -0
- package/scripts/social-analytics/publishers/x.js +259 -0
- package/scripts/social-analytics/publishers/youtube.js +223 -0
- package/scripts/social-analytics/publishers/zernio.js +378 -0
- package/scripts/social-analytics/run-digest.js +34 -0
- package/scripts/social-analytics/store.js +257 -0
- package/scripts/social-analytics/utm.js +143 -0
- package/scripts/social-pipeline.js +2628 -0
- package/scripts/social-quality-gate.js +18 -0
- package/scripts/social-reply-monitor.js +445 -0
- package/scripts/status-dashboard.js +155 -0
- package/scripts/statusline-lesson.js +16 -0
- package/scripts/statusline-tower.js +8 -0
- package/scripts/statusline.sh +116 -0
- package/scripts/stripe-live-status.js +115 -0
- package/scripts/subagent-profiles.js +79 -0
- package/scripts/sync-gh-secrets-from-env.sh +70 -0
- package/scripts/sync-github-about.js +52 -0
- package/scripts/sync-version.js +447 -0
- package/scripts/synthetic-dpo.js +234 -0
- package/scripts/telemetry-analytics.js +821 -0
- package/scripts/tessl-export.js +371 -0
- package/scripts/test-coverage.js +120 -0
- package/scripts/thompson-sampling.js +417 -0
- package/scripts/thumbgate-search.js +189 -0
- package/scripts/tool-kpi-tracker.js +12 -0
- package/scripts/tool-registry.js +811 -0
- package/scripts/train_from_feedback.py +933 -0
- package/scripts/user-profile.js +78 -0
- package/scripts/validate-feedback.js +581 -0
- package/scripts/validate-workflow-contract.js +287 -0
- package/scripts/vector-store.js +197 -0
- package/scripts/verification-loop.js +291 -0
- package/scripts/verify-obsidian-setup.sh +269 -0
- package/scripts/verify-run.js +269 -0
- package/scripts/webhook-delivery.js +62 -0
- package/scripts/weekly-auto-post.js +124 -0
- package/scripts/workflow-runs.js +154 -0
- package/scripts/workflow-sprint-intake.js +475 -0
- package/scripts/workspace-evolver.js +374 -0
- package/scripts/x-autonomous-marketing.js +139 -0
- package/scripts/xmemory-lite.js +405 -0
- package/skills/agent-memory/SKILL.md +97 -0
- package/skills/rlhf-feedback/SKILL.md +49 -0
- package/skills/solve-architecture-autonomy/SKILL.md +17 -0
- package/skills/solve-architecture-autonomy/tool.js +33 -0
- package/skills/thumbgate/SKILL.md +114 -0
- package/src/api/server.js +4206 -0
|
@@ -0,0 +1,811 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
function readOnlyTool(tool) {
|
|
5
|
+
return {
|
|
6
|
+
...tool,
|
|
7
|
+
annotations: {
|
|
8
|
+
readOnlyHint: true,
|
|
9
|
+
},
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function destructiveTool(tool) {
|
|
14
|
+
return {
|
|
15
|
+
...tool,
|
|
16
|
+
annotations: {
|
|
17
|
+
destructiveHint: true,
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const TOOLS = [
|
|
23
|
+
readOnlyTool({
|
|
24
|
+
name: 'capture_feedback',
|
|
25
|
+
description: 'Capture an up/down signal plus one line of why. Vague feedback is logged, then returned with a clarification prompt instead of memory promotion.',
|
|
26
|
+
inputSchema: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
required: ['signal'],
|
|
29
|
+
properties: {
|
|
30
|
+
signal: { type: 'string', enum: ['up', 'down'] },
|
|
31
|
+
failureType: { type: 'string', enum: ['decision', 'execution'], description: 'Dual-signal: "decision" = wrong tool/action chosen, "execution" = right tool but bad parameters/output. Improves Thompson Sampling precision.' },
|
|
32
|
+
context: { type: 'string', description: 'One-sentence reason describing what worked or failed' },
|
|
33
|
+
relatedFeedbackId: { type: 'string', description: 'Optional prior feedback event to merge with later follow-up context.' },
|
|
34
|
+
whatWentWrong: { type: 'string' },
|
|
35
|
+
whatToChange: { type: 'string' },
|
|
36
|
+
whatWorked: { type: 'string' },
|
|
37
|
+
chatHistory: {
|
|
38
|
+
type: 'array',
|
|
39
|
+
description: 'Optional recent conversation window used for history-aware lesson distillation.',
|
|
40
|
+
items: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
properties: {
|
|
43
|
+
author: { type: 'string' },
|
|
44
|
+
text: { type: 'string' },
|
|
45
|
+
timestamp: { type: 'string' },
|
|
46
|
+
source: { type: 'string' },
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
tags: { type: 'array', items: { type: 'string' } },
|
|
51
|
+
skill: { type: 'string' },
|
|
52
|
+
conversationWindow: {
|
|
53
|
+
type: 'array',
|
|
54
|
+
items: {
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {
|
|
57
|
+
role: { type: 'string', enum: ['user', 'assistant'] },
|
|
58
|
+
content: { type: 'string' },
|
|
59
|
+
timestamp: { type: 'string' },
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
description: 'Last 5-10 conversation turns before the feedback signal. Raw messages, not summaries.',
|
|
63
|
+
},
|
|
64
|
+
rubricScores: {
|
|
65
|
+
type: 'array',
|
|
66
|
+
items: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
properties: {
|
|
69
|
+
criterion: { type: 'string' },
|
|
70
|
+
score: { type: 'number' },
|
|
71
|
+
evidence: { type: 'string' },
|
|
72
|
+
judge: { type: 'string' },
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
guardrails: {
|
|
77
|
+
type: 'object',
|
|
78
|
+
properties: {
|
|
79
|
+
testsPassed: { type: 'boolean' },
|
|
80
|
+
pathSafety: { type: 'boolean' },
|
|
81
|
+
budgetCompliant: { type: 'boolean' },
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
}),
|
|
87
|
+
readOnlyTool({
|
|
88
|
+
name: 'feedback_summary',
|
|
89
|
+
description: 'Get summary of recent feedback',
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
properties: {
|
|
93
|
+
recent: { type: 'number' },
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
}),
|
|
97
|
+
readOnlyTool({
|
|
98
|
+
name: 'search_lessons',
|
|
99
|
+
description: 'Search promoted lessons and show the corrective actions, lifecycle state, prevention rules, gates, and next harness fixes linked to each result.',
|
|
100
|
+
inputSchema: {
|
|
101
|
+
type: 'object',
|
|
102
|
+
properties: {
|
|
103
|
+
query: { type: 'string', description: 'Search query. Leave empty to list the most recent lessons.' },
|
|
104
|
+
limit: { type: 'number', description: 'Maximum results to return (default 10)' },
|
|
105
|
+
category: { type: 'string', enum: ['error', 'learning', 'preference'] },
|
|
106
|
+
tags: { type: 'array', items: { type: 'string' }, description: 'Require all tags to be present on a lesson' },
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
}),
|
|
110
|
+
readOnlyTool({
|
|
111
|
+
name: 'retrieve_lessons',
|
|
112
|
+
description: 'Retrieve the most relevant lessons for a given tool/action context. Use in PreToolUse hooks for per-action guidance.',
|
|
113
|
+
inputSchema: {
|
|
114
|
+
type: 'object',
|
|
115
|
+
properties: {
|
|
116
|
+
toolName: { type: 'string', description: 'The tool being called (e.g., Bash, Edit, Read)' },
|
|
117
|
+
actionContext: { type: 'string', description: 'Description of what the tool call is doing' },
|
|
118
|
+
maxResults: { type: 'number', description: 'Max lessons to return (default 5)' },
|
|
119
|
+
},
|
|
120
|
+
required: ['toolName'],
|
|
121
|
+
},
|
|
122
|
+
}),
|
|
123
|
+
readOnlyTool({
|
|
124
|
+
name: 'search_rlhf',
|
|
125
|
+
description: 'Search raw ThumbGate state across feedback logs, ContextFS memory, and prevention rules.',
|
|
126
|
+
inputSchema: {
|
|
127
|
+
type: 'object',
|
|
128
|
+
required: ['query'],
|
|
129
|
+
properties: {
|
|
130
|
+
query: { type: 'string', description: 'Search query for ThumbGate state.' },
|
|
131
|
+
limit: { type: 'number', description: 'Maximum results to return (default 10)' },
|
|
132
|
+
source: { type: 'string', enum: ['all', 'feedback', 'context', 'rules'], description: 'Restrict search to a single ThumbGate source.' },
|
|
133
|
+
signal: { type: 'string', enum: ['up', 'down', 'positive', 'negative'], description: 'Optional feedback-signal filter when searching feedback data.' },
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
}),
|
|
137
|
+
readOnlyTool({
|
|
138
|
+
name: 'feedback_stats',
|
|
139
|
+
description: 'Get feedback stats and recommendations',
|
|
140
|
+
inputSchema: {
|
|
141
|
+
type: 'object',
|
|
142
|
+
properties: {},
|
|
143
|
+
},
|
|
144
|
+
}),
|
|
145
|
+
readOnlyTool({
|
|
146
|
+
name: 'diagnose_failure',
|
|
147
|
+
description: 'Diagnose a failed or suspect workflow step using MCP schema, workflow, gate, and approval constraints.',
|
|
148
|
+
inputSchema: {
|
|
149
|
+
type: 'object',
|
|
150
|
+
properties: {
|
|
151
|
+
step: { type: 'string' },
|
|
152
|
+
context: { type: 'string' },
|
|
153
|
+
toolName: { type: 'string' },
|
|
154
|
+
toolArgs: { type: 'object' },
|
|
155
|
+
output: { type: 'string' },
|
|
156
|
+
error: { type: 'string' },
|
|
157
|
+
exitCode: { type: 'number' },
|
|
158
|
+
intentId: { type: 'string' },
|
|
159
|
+
approved: { type: 'boolean' },
|
|
160
|
+
mcpProfile: { type: 'string' },
|
|
161
|
+
verification: { type: 'object' },
|
|
162
|
+
rubricScores: {
|
|
163
|
+
type: 'array',
|
|
164
|
+
items: {
|
|
165
|
+
type: 'object',
|
|
166
|
+
properties: {
|
|
167
|
+
criterion: { type: 'string' },
|
|
168
|
+
score: { type: 'number' },
|
|
169
|
+
evidence: { type: 'string' },
|
|
170
|
+
judge: { type: 'string' },
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
guardrails: {
|
|
175
|
+
type: 'object',
|
|
176
|
+
properties: {
|
|
177
|
+
testsPassed: { type: 'boolean' },
|
|
178
|
+
pathSafety: { type: 'boolean' },
|
|
179
|
+
budgetCompliant: { type: 'boolean' },
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
}),
|
|
185
|
+
readOnlyTool({
|
|
186
|
+
name: 'infer_lesson_from_history',
|
|
187
|
+
description: 'Perform autonomous inference on chat history to identify why a failure occurred and what rule should be recorded.',
|
|
188
|
+
inputSchema: {
|
|
189
|
+
type: 'object',
|
|
190
|
+
required: ['chatHistory'],
|
|
191
|
+
properties: {
|
|
192
|
+
chatHistory: {
|
|
193
|
+
type: 'array',
|
|
194
|
+
items: {
|
|
195
|
+
type: 'object',
|
|
196
|
+
properties: {
|
|
197
|
+
role: { type: 'string' },
|
|
198
|
+
content: { type: 'string' },
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
lastAction: { type: 'object' },
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
}),
|
|
206
|
+
readOnlyTool({
|
|
207
|
+
name: 'list_intents',
|
|
208
|
+
description: 'List available intent plans and whether each requires human approval in the active profile',
|
|
209
|
+
inputSchema: {
|
|
210
|
+
type: 'object',
|
|
211
|
+
properties: {
|
|
212
|
+
mcpProfile: { type: 'string' },
|
|
213
|
+
bundleId: { type: 'string' },
|
|
214
|
+
partnerProfile: { type: 'string' },
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
}),
|
|
218
|
+
readOnlyTool({
|
|
219
|
+
name: 'plan_intent',
|
|
220
|
+
description: 'Generate an intent execution plan with policy checkpoints',
|
|
221
|
+
inputSchema: {
|
|
222
|
+
type: 'object',
|
|
223
|
+
required: ['intentId'],
|
|
224
|
+
properties: {
|
|
225
|
+
intentId: { type: 'string' },
|
|
226
|
+
context: { type: 'string' },
|
|
227
|
+
mcpProfile: { type: 'string' },
|
|
228
|
+
bundleId: { type: 'string' },
|
|
229
|
+
partnerProfile: { type: 'string' },
|
|
230
|
+
delegationMode: { type: 'string', enum: ['off', 'auto', 'sequential'] },
|
|
231
|
+
approved: { type: 'boolean' },
|
|
232
|
+
repoPath: { type: 'string' },
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
}),
|
|
236
|
+
destructiveTool({
|
|
237
|
+
name: 'start_handoff',
|
|
238
|
+
description: 'Start a sequential delegation handoff from a delegation-eligible intent plan',
|
|
239
|
+
inputSchema: {
|
|
240
|
+
type: 'object',
|
|
241
|
+
required: ['intentId'],
|
|
242
|
+
properties: {
|
|
243
|
+
intentId: { type: 'string' },
|
|
244
|
+
context: { type: 'string' },
|
|
245
|
+
mcpProfile: { type: 'string' },
|
|
246
|
+
bundleId: { type: 'string' },
|
|
247
|
+
partnerProfile: { type: 'string' },
|
|
248
|
+
approved: { type: 'boolean' },
|
|
249
|
+
repoPath: { type: 'string' },
|
|
250
|
+
delegateProfile: { type: 'string' },
|
|
251
|
+
plannedChecks: { type: 'array', items: { type: 'string' } },
|
|
252
|
+
},
|
|
253
|
+
},
|
|
254
|
+
}),
|
|
255
|
+
destructiveTool({
|
|
256
|
+
name: 'complete_handoff',
|
|
257
|
+
description: 'Complete a sequential delegation handoff and record verification outcomes',
|
|
258
|
+
inputSchema: {
|
|
259
|
+
type: 'object',
|
|
260
|
+
required: ['handoffId', 'outcome'],
|
|
261
|
+
properties: {
|
|
262
|
+
handoffId: { type: 'string' },
|
|
263
|
+
outcome: { type: 'string', enum: ['accepted', 'rejected', 'aborted'] },
|
|
264
|
+
resultContext: { type: 'string' },
|
|
265
|
+
attempts: { type: 'number' },
|
|
266
|
+
violationCount: { type: 'number' },
|
|
267
|
+
tokenEstimate: { type: 'number' },
|
|
268
|
+
latencyMs: { type: 'number' },
|
|
269
|
+
summary: { type: 'string' },
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
}),
|
|
273
|
+
readOnlyTool({
|
|
274
|
+
name: 'describe_reliability_entity',
|
|
275
|
+
description: 'Get the definition and state of a business entity (Customer, Revenue, Funnel). Aliased to describe_semantic_entity.',
|
|
276
|
+
inputSchema: {
|
|
277
|
+
type: 'object',
|
|
278
|
+
properties: {
|
|
279
|
+
type: { type: 'string', enum: ['Customer', 'Revenue', 'Funnel'] },
|
|
280
|
+
},
|
|
281
|
+
},
|
|
282
|
+
}),
|
|
283
|
+
readOnlyTool({
|
|
284
|
+
name: 'get_reliability_rules',
|
|
285
|
+
description: 'Retrieve active prevention rules and success patterns. Aliased to prevention_rules.',
|
|
286
|
+
inputSchema: {
|
|
287
|
+
type: 'object',
|
|
288
|
+
properties: {},
|
|
289
|
+
},
|
|
290
|
+
}),
|
|
291
|
+
readOnlyTool({
|
|
292
|
+
name: 'enforcement_matrix',
|
|
293
|
+
description: 'Show the full Enforcement Matrix: feedback pipeline stats, active pre-action gates, and rejection ledger with revival conditions.',
|
|
294
|
+
inputSchema: {
|
|
295
|
+
type: 'object',
|
|
296
|
+
properties: {},
|
|
297
|
+
},
|
|
298
|
+
}),
|
|
299
|
+
readOnlyTool({
|
|
300
|
+
name: 'capture_memory_feedback',
|
|
301
|
+
description: 'Capture success/failure feedback to harden future workflows. Aliased to capture_feedback.',
|
|
302
|
+
inputSchema: {
|
|
303
|
+
type: 'object',
|
|
304
|
+
properties: {
|
|
305
|
+
signal: { type: 'string', enum: ['up', 'down'] },
|
|
306
|
+
context: { type: 'string' },
|
|
307
|
+
tags: { type: 'array', items: { type: 'string' } },
|
|
308
|
+
},
|
|
309
|
+
required: ['signal', 'context'],
|
|
310
|
+
},
|
|
311
|
+
}),
|
|
312
|
+
destructiveTool({
|
|
313
|
+
name: 'bootstrap_internal_agent',
|
|
314
|
+
description: 'Normalize a GitHub/Slack/Linear trigger into startup context, construct a recall pack, prepare a git worktree sandbox, and emit an execution plus reviewer-lane plan.',
|
|
315
|
+
inputSchema: {
|
|
316
|
+
type: 'object',
|
|
317
|
+
required: ['source'],
|
|
318
|
+
properties: {
|
|
319
|
+
source: { type: 'string', enum: ['github', 'slack', 'linear', 'api', 'cli'] },
|
|
320
|
+
repoPath: { type: 'string' },
|
|
321
|
+
prepareSandbox: { type: 'boolean' },
|
|
322
|
+
sandboxRoot: { type: 'string' },
|
|
323
|
+
intentId: { type: 'string' },
|
|
324
|
+
context: { type: 'string' },
|
|
325
|
+
mcpProfile: { type: 'string' },
|
|
326
|
+
partnerProfile: { type: 'string' },
|
|
327
|
+
delegationMode: { type: 'string', enum: ['off', 'auto', 'sequential'] },
|
|
328
|
+
approved: { type: 'boolean' },
|
|
329
|
+
trigger: {
|
|
330
|
+
type: 'object',
|
|
331
|
+
properties: {
|
|
332
|
+
type: { type: 'string' },
|
|
333
|
+
id: { type: 'string' },
|
|
334
|
+
url: { type: 'string' },
|
|
335
|
+
actor: { type: 'string' },
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
thread: {
|
|
339
|
+
type: 'object',
|
|
340
|
+
properties: {
|
|
341
|
+
id: { type: 'string' },
|
|
342
|
+
title: { type: 'string' },
|
|
343
|
+
url: { type: 'string' },
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
task: {
|
|
347
|
+
type: 'object',
|
|
348
|
+
properties: {
|
|
349
|
+
title: { type: 'string' },
|
|
350
|
+
body: { type: 'string' },
|
|
351
|
+
number: { type: 'string' },
|
|
352
|
+
branch: { type: 'string' },
|
|
353
|
+
labels: { type: 'array', items: { type: 'string' } },
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
comments: {
|
|
357
|
+
type: 'array',
|
|
358
|
+
items: {
|
|
359
|
+
type: 'object',
|
|
360
|
+
properties: {
|
|
361
|
+
author: { type: 'string' },
|
|
362
|
+
text: { type: 'string' },
|
|
363
|
+
timestamp: { type: 'string' },
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
messages: {
|
|
368
|
+
type: 'array',
|
|
369
|
+
items: {
|
|
370
|
+
type: 'object',
|
|
371
|
+
properties: {
|
|
372
|
+
author: { type: 'string' },
|
|
373
|
+
text: { type: 'string' },
|
|
374
|
+
timestamp: { type: 'string' },
|
|
375
|
+
},
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
},
|
|
379
|
+
},
|
|
380
|
+
}),
|
|
381
|
+
destructiveTool({
|
|
382
|
+
name: 'prevention_rules',
|
|
383
|
+
description: 'Generate prevention rules from repeated mistake patterns',
|
|
384
|
+
inputSchema: {
|
|
385
|
+
type: 'object',
|
|
386
|
+
properties: {
|
|
387
|
+
minOccurrences: { type: 'number' },
|
|
388
|
+
outputPath: { type: 'string' },
|
|
389
|
+
},
|
|
390
|
+
},
|
|
391
|
+
}),
|
|
392
|
+
destructiveTool({
|
|
393
|
+
name: 'export_dpo_pairs',
|
|
394
|
+
description: 'Export DPO preference pairs from local memory log',
|
|
395
|
+
inputSchema: {
|
|
396
|
+
type: 'object',
|
|
397
|
+
properties: {
|
|
398
|
+
memoryLogPath: { type: 'string' },
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
}),
|
|
402
|
+
destructiveTool({
|
|
403
|
+
name: 'export_databricks_bundle',
|
|
404
|
+
description: 'Export ThumbGate logs and proof artifacts as a Databricks-ready analytics bundle',
|
|
405
|
+
inputSchema: {
|
|
406
|
+
type: 'object',
|
|
407
|
+
properties: {
|
|
408
|
+
outputPath: { type: 'string' },
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
}),
|
|
412
|
+
destructiveTool({
|
|
413
|
+
name: 'construct_context_pack',
|
|
414
|
+
description: 'Construct a bounded context pack from contextfs',
|
|
415
|
+
inputSchema: {
|
|
416
|
+
type: 'object',
|
|
417
|
+
properties: {
|
|
418
|
+
query: { type: 'string' },
|
|
419
|
+
maxItems: { type: 'number' },
|
|
420
|
+
maxChars: { type: 'number' },
|
|
421
|
+
namespaces: { type: 'array', items: { type: 'string' } },
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
}),
|
|
425
|
+
destructiveTool({
|
|
426
|
+
name: 'evaluate_context_pack',
|
|
427
|
+
description: 'Record evaluation outcome for a context pack',
|
|
428
|
+
inputSchema: {
|
|
429
|
+
type: 'object',
|
|
430
|
+
required: ['packId', 'outcome'],
|
|
431
|
+
properties: {
|
|
432
|
+
packId: { type: 'string' },
|
|
433
|
+
outcome: { type: 'string' },
|
|
434
|
+
signal: { type: 'string' },
|
|
435
|
+
notes: { type: 'string' },
|
|
436
|
+
rubricScores: {
|
|
437
|
+
type: 'array',
|
|
438
|
+
items: {
|
|
439
|
+
type: 'object',
|
|
440
|
+
properties: {
|
|
441
|
+
criterion: { type: 'string' },
|
|
442
|
+
score: { type: 'number' },
|
|
443
|
+
evidence: { type: 'string' },
|
|
444
|
+
judge: { type: 'string' },
|
|
445
|
+
},
|
|
446
|
+
},
|
|
447
|
+
},
|
|
448
|
+
guardrails: {
|
|
449
|
+
type: 'object',
|
|
450
|
+
properties: {
|
|
451
|
+
testsPassed: { type: 'boolean' },
|
|
452
|
+
pathSafety: { type: 'boolean' },
|
|
453
|
+
budgetCompliant: { type: 'boolean' },
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
},
|
|
458
|
+
}),
|
|
459
|
+
readOnlyTool({
|
|
460
|
+
name: 'context_provenance',
|
|
461
|
+
description: 'Get recent context/provenance events',
|
|
462
|
+
inputSchema: {
|
|
463
|
+
type: 'object',
|
|
464
|
+
properties: {
|
|
465
|
+
limit: { type: 'number' },
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
}),
|
|
469
|
+
destructiveTool({
|
|
470
|
+
name: 'generate_skill',
|
|
471
|
+
description: 'Auto-generate Claude skills from repeated feedback patterns. Clusters failure patterns by tags and produces SKILL.md files with DO/INSTEAD rules.',
|
|
472
|
+
inputSchema: {
|
|
473
|
+
type: 'object',
|
|
474
|
+
properties: {
|
|
475
|
+
minOccurrences: { type: 'number', description: 'Minimum pattern occurrences to trigger skill generation (default 3)' },
|
|
476
|
+
tags: { type: 'array', items: { type: 'string' }, description: 'Filter to specific tags' },
|
|
477
|
+
},
|
|
478
|
+
},
|
|
479
|
+
}),
|
|
480
|
+
readOnlyTool({
|
|
481
|
+
name: 'recall',
|
|
482
|
+
description: 'Recall relevant past feedback, memories, and prevention rules for the current task. Call this at the start of any task to inject past learnings into the conversation.',
|
|
483
|
+
inputSchema: {
|
|
484
|
+
type: 'object',
|
|
485
|
+
required: ['query'],
|
|
486
|
+
properties: {
|
|
487
|
+
query: { type: 'string', description: 'Describe the current task or context to find relevant past feedback' },
|
|
488
|
+
limit: { type: 'number', description: 'Max memories to return (default 5)' },
|
|
489
|
+
repoPath: { type: 'string', description: 'Optional repository path for structural impact analysis on coding tasks' },
|
|
490
|
+
},
|
|
491
|
+
},
|
|
492
|
+
}),
|
|
493
|
+
destructiveTool({
|
|
494
|
+
name: 'satisfy_gate',
|
|
495
|
+
description: 'Satisfy a gate condition with optional structured reasoning. Evidence is stored with a 5-minute TTL. When structuredReasoning is provided, the premise/evidence/conclusion chain is stored in the audit trail.',
|
|
496
|
+
inputSchema: {
|
|
497
|
+
type: 'object',
|
|
498
|
+
required: ['gate'],
|
|
499
|
+
properties: {
|
|
500
|
+
gate: { type: 'string', description: 'Gate condition ID to satisfy (e.g., pr_threads_checked)' },
|
|
501
|
+
evidence: { type: 'string', description: 'Evidence text (e.g., \"0 unresolved threads\")' },
|
|
502
|
+
structuredReasoning: {
|
|
503
|
+
type: 'object',
|
|
504
|
+
description: 'Structured pre-gate reasoning: state premises, trace evidence, assess risk, derive conclusion before unlocking.',
|
|
505
|
+
properties: {
|
|
506
|
+
premise: { type: 'string', description: 'What am I trying to do and why?' },
|
|
507
|
+
evidence: { type: 'string', description: 'What specific, verifiable evidence supports this action?' },
|
|
508
|
+
risk: { type: 'string', description: 'What could go wrong if this action proceeds?' },
|
|
509
|
+
conclusion: { type: 'string', description: 'Based on evidence, should I proceed? Yes/No with justification.' },
|
|
510
|
+
},
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
}),
|
|
515
|
+
destructiveTool({
|
|
516
|
+
name: 'track_action',
|
|
517
|
+
description: 'Record a verification action in the current session (for example figma_verified or tests_passed). Session actions expire after one hour.',
|
|
518
|
+
inputSchema: {
|
|
519
|
+
type: 'object',
|
|
520
|
+
required: ['actionId'],
|
|
521
|
+
properties: {
|
|
522
|
+
actionId: { type: 'string', description: 'Verification action ID to record' },
|
|
523
|
+
metadata: { type: 'object', description: 'Optional structured metadata describing the evidence source' },
|
|
524
|
+
},
|
|
525
|
+
},
|
|
526
|
+
}),
|
|
527
|
+
readOnlyTool({
|
|
528
|
+
name: 'verify_claim',
|
|
529
|
+
description: 'Check whether a claim has enough tracked evidence before the agent asserts it.',
|
|
530
|
+
inputSchema: {
|
|
531
|
+
type: 'object',
|
|
532
|
+
required: ['claim'],
|
|
533
|
+
properties: {
|
|
534
|
+
claim: { type: 'string', description: 'The claim text to verify' },
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
}),
|
|
538
|
+
destructiveTool({
|
|
539
|
+
name: 'register_claim_gate',
|
|
540
|
+
description: 'Register a custom claim verification rule in local runtime state without editing tracked repo config.',
|
|
541
|
+
inputSchema: {
|
|
542
|
+
type: 'object',
|
|
543
|
+
required: ['claimPattern', 'requiredActions'],
|
|
544
|
+
properties: {
|
|
545
|
+
claimPattern: { type: 'string', description: 'Regex pattern that should trigger claim verification' },
|
|
546
|
+
requiredActions: {
|
|
547
|
+
type: 'array',
|
|
548
|
+
items: { type: 'string' },
|
|
549
|
+
description: 'Tracked actions that must be present before the claim is verified',
|
|
550
|
+
},
|
|
551
|
+
message: { type: 'string', description: 'Custom message returned when evidence is missing' },
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
}),
|
|
555
|
+
readOnlyTool({
|
|
556
|
+
name: 'gate_stats',
|
|
557
|
+
description: 'Get gate enforcement statistics -- blocked count, warned count, top gates',
|
|
558
|
+
inputSchema: {
|
|
559
|
+
type: 'object',
|
|
560
|
+
properties: {},
|
|
561
|
+
},
|
|
562
|
+
}),
|
|
563
|
+
readOnlyTool({
|
|
564
|
+
name: 'dashboard',
|
|
565
|
+
description: 'Get full ThumbGate dashboard -- Harness Score, gate stats, prevention impact, proof, and system health',
|
|
566
|
+
inputSchema: {
|
|
567
|
+
type: 'object',
|
|
568
|
+
properties: {},
|
|
569
|
+
},
|
|
570
|
+
}),
|
|
571
|
+
readOnlyTool({
|
|
572
|
+
name: 'org_dashboard',
|
|
573
|
+
description: 'Org-wide multi-agent dashboard — shows all active agents, gate decisions, adherence rates, risk agents, and top blocked gates across the organization. Team rollout: full visibility. Free preview: limited to 3 agents.',
|
|
574
|
+
inputSchema: {
|
|
575
|
+
type: 'object',
|
|
576
|
+
properties: {
|
|
577
|
+
windowHours: { type: 'number', description: 'Lookback window in hours (default 24)' },
|
|
578
|
+
},
|
|
579
|
+
},
|
|
580
|
+
}),
|
|
581
|
+
readOnlyTool({
|
|
582
|
+
name: 'settings_status',
|
|
583
|
+
description: 'Resolve managed, user, project, and local ThumbGate settings with per-field origin metadata for policy visibility.',
|
|
584
|
+
inputSchema: {
|
|
585
|
+
type: 'object',
|
|
586
|
+
properties: {},
|
|
587
|
+
},
|
|
588
|
+
}),
|
|
589
|
+
readOnlyTool({
|
|
590
|
+
name: 'commerce_recall',
|
|
591
|
+
description: 'Recall past feedback filtered by commerce categories (product_recommendation, brand_compliance, sizing, pricing, regulatory). Returns quality scores alongside memories for agentic commerce agents.',
|
|
592
|
+
inputSchema: {
|
|
593
|
+
type: 'object',
|
|
594
|
+
required: ['query'],
|
|
595
|
+
properties: {
|
|
596
|
+
query: { type: 'string', description: 'Product or brand context to find relevant past feedback' },
|
|
597
|
+
categories: { type: 'array', items: { type: 'string' }, description: 'Commerce categories to filter (default: all commerce categories)' },
|
|
598
|
+
limit: { type: 'number', description: 'Max memories to return (default 5)' },
|
|
599
|
+
},
|
|
600
|
+
},
|
|
601
|
+
}),
|
|
602
|
+
readOnlyTool({
|
|
603
|
+
name: 'get_business_metrics',
|
|
604
|
+
description: 'Retrieve high-level business metrics (Revenue, Conversion, Customers) from the Semantic Layer.',
|
|
605
|
+
inputSchema: {
|
|
606
|
+
type: 'object',
|
|
607
|
+
properties: {
|
|
608
|
+
window: { type: 'string', description: 'Analytics window (today, 7d, 30d, all)' },
|
|
609
|
+
},
|
|
610
|
+
},
|
|
611
|
+
}),
|
|
612
|
+
readOnlyTool({
|
|
613
|
+
name: 'describe_semantic_entity',
|
|
614
|
+
description: 'Get the canonical definition and state of a business entity (Customer, Revenue, Funnel).',
|
|
615
|
+
inputSchema: {
|
|
616
|
+
type: 'object',
|
|
617
|
+
properties: {
|
|
618
|
+
type: { type: 'string', enum: ['Customer', 'Revenue', 'Funnel'] },
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
}),
|
|
622
|
+
readOnlyTool({
|
|
623
|
+
name: 'estimate_uncertainty',
|
|
624
|
+
description: 'Estimate Bayesian uncertainty for a set of tags based on past feedback.',
|
|
625
|
+
inputSchema: {
|
|
626
|
+
type: 'object',
|
|
627
|
+
properties: {
|
|
628
|
+
tags: { type: 'array', items: { type: 'string' }, description: 'Tags to analyze for uncertainty' },
|
|
629
|
+
},
|
|
630
|
+
},
|
|
631
|
+
}),
|
|
632
|
+
destructiveTool({
|
|
633
|
+
name: 'session_handoff',
|
|
634
|
+
description: 'Write a session handoff primer that auto-captures git state (branch, last 5 commits, modified files), last completed task, next step, and blockers. The next session reads this automatically for seamless context continuity.',
|
|
635
|
+
inputSchema: {
|
|
636
|
+
type: 'object',
|
|
637
|
+
properties: {
|
|
638
|
+
lastTask: { type: 'string', description: 'What was completed this session' },
|
|
639
|
+
nextStep: { type: 'string', description: 'Exact next action for the next session' },
|
|
640
|
+
blockers: { type: 'array', items: { type: 'string' }, description: 'Open blockers or unresolved issues' },
|
|
641
|
+
openFiles: { type: 'array', items: { type: 'string' }, description: 'Key files being worked on' },
|
|
642
|
+
project: { type: 'string', description: 'Project name (auto-detected from cwd if omitted)' },
|
|
643
|
+
customContext: { type: 'string', description: 'Any additional context for the next session' },
|
|
644
|
+
},
|
|
645
|
+
},
|
|
646
|
+
}),
|
|
647
|
+
readOnlyTool({
|
|
648
|
+
name: 'session_primer',
|
|
649
|
+
description: 'Read the most recent session handoff primer to restore context from the previous session. Call at session start.',
|
|
650
|
+
inputSchema: {
|
|
651
|
+
type: 'object',
|
|
652
|
+
properties: {},
|
|
653
|
+
},
|
|
654
|
+
}),
|
|
655
|
+
readOnlyTool({
|
|
656
|
+
name: 'list_harnesses',
|
|
657
|
+
description: 'List natural-language harness specs for portable workflow control, proof-backed verification, and GTM execution.',
|
|
658
|
+
inputSchema: {
|
|
659
|
+
type: 'object',
|
|
660
|
+
properties: {
|
|
661
|
+
tag: { type: 'string', description: 'Optional tag filter such as verification, acquisition, or workflow.' },
|
|
662
|
+
},
|
|
663
|
+
},
|
|
664
|
+
}),
|
|
665
|
+
destructiveTool({
|
|
666
|
+
name: 'run_harness',
|
|
667
|
+
description: 'Execute a natural-language harness through the async job runner with checkpoints, verification, and proof-backed outcomes.',
|
|
668
|
+
inputSchema: {
|
|
669
|
+
type: 'object',
|
|
670
|
+
required: ['harness'],
|
|
671
|
+
properties: {
|
|
672
|
+
harness: { type: 'string', description: 'Harness id or file basename to execute.' },
|
|
673
|
+
inputs: { type: 'object', description: 'Optional input overrides for template variables.' },
|
|
674
|
+
jobId: { type: 'string', description: 'Optional stable job id for the resulting runtime.' },
|
|
675
|
+
},
|
|
676
|
+
},
|
|
677
|
+
}),
|
|
678
|
+
destructiveTool({
|
|
679
|
+
name: 'schedule',
|
|
680
|
+
description: 'Create, list, or delete scheduled tasks. Supports natural language scheduling like "daily 9:00", "weekly monday 8:30", "hourly". Installs as macOS LaunchAgent or Linux crontab.',
|
|
681
|
+
inputSchema: {
|
|
682
|
+
type: 'object',
|
|
683
|
+
required: ['action'],
|
|
684
|
+
properties: {
|
|
685
|
+
action: { type: 'string', enum: ['create', 'list', 'delete'], description: 'Schedule action' },
|
|
686
|
+
name: { type: 'string', description: 'Schedule name/ID' },
|
|
687
|
+
schedule: { type: 'string', description: 'Schedule spec: "daily 9:00", "weekly monday 8:30", "hourly"' },
|
|
688
|
+
command: { type: 'string', description: 'Node.js code to execute on schedule' },
|
|
689
|
+
description: { type: 'string', description: 'What this schedule does' },
|
|
690
|
+
workingDirectory: { type: 'string', description: 'Working directory for the command' },
|
|
691
|
+
},
|
|
692
|
+
},
|
|
693
|
+
}),
|
|
694
|
+
destructiveTool({
|
|
695
|
+
name: 'user_profile',
|
|
696
|
+
description: 'Manage persistent user profile — preferences, style, domain knowledge that persists across sessions. Actions: add, remove, replace, view.',
|
|
697
|
+
inputSchema: {
|
|
698
|
+
type: 'object',
|
|
699
|
+
required: ['action'],
|
|
700
|
+
properties: {
|
|
701
|
+
action: { type: 'string', enum: ['add', 'remove', 'replace', 'view'], description: 'Profile action' },
|
|
702
|
+
content: { type: 'string', description: 'Content to add or new content for replace' },
|
|
703
|
+
old_text: { type: 'string', description: 'Substring to match for remove/replace' },
|
|
704
|
+
},
|
|
705
|
+
},
|
|
706
|
+
}),
|
|
707
|
+
readOnlyTool({
|
|
708
|
+
name: 'session_search',
|
|
709
|
+
description: 'Search past session notes and conversations using full-text search. Returns relevant sessions from the SQLite FTS5 index for cross-session recall.',
|
|
710
|
+
inputSchema: {
|
|
711
|
+
type: 'object',
|
|
712
|
+
required: ['query'],
|
|
713
|
+
properties: {
|
|
714
|
+
query: { type: 'string', description: 'Search query to find relevant past sessions' },
|
|
715
|
+
limit: { type: 'number', description: 'Max results to return (default 10)' },
|
|
716
|
+
},
|
|
717
|
+
},
|
|
718
|
+
}),
|
|
719
|
+
destructiveTool({
|
|
720
|
+
name: 'open_feedback_session',
|
|
721
|
+
description: 'Open a feedback session after thumbs up/down. Follow-up messages will be captured for 60s.',
|
|
722
|
+
inputSchema: {
|
|
723
|
+
type: 'object',
|
|
724
|
+
properties: {
|
|
725
|
+
feedbackEventId: { type: 'string', description: 'The feedback event ID from capture_feedback' },
|
|
726
|
+
signal: { type: 'string', enum: ['up', 'down'] },
|
|
727
|
+
initialContext: { type: 'string' },
|
|
728
|
+
},
|
|
729
|
+
required: ['feedbackEventId', 'signal'],
|
|
730
|
+
},
|
|
731
|
+
}),
|
|
732
|
+
destructiveTool({
|
|
733
|
+
name: 'append_feedback_context',
|
|
734
|
+
description: 'Append a follow-up message to an open feedback session. Call this when the user types additional context after giving thumbs up/down.',
|
|
735
|
+
inputSchema: {
|
|
736
|
+
type: 'object',
|
|
737
|
+
properties: {
|
|
738
|
+
sessionId: { type: 'string' },
|
|
739
|
+
message: { type: 'string', description: 'The follow-up message from the user' },
|
|
740
|
+
role: { type: 'string', enum: ['user', 'assistant'], default: 'user' },
|
|
741
|
+
},
|
|
742
|
+
required: ['sessionId', 'message'],
|
|
743
|
+
},
|
|
744
|
+
}),
|
|
745
|
+
destructiveTool({
|
|
746
|
+
name: 'finalize_feedback_session',
|
|
747
|
+
description: 'Finalize a feedback session and re-infer the lesson with all follow-up context.',
|
|
748
|
+
inputSchema: {
|
|
749
|
+
type: 'object',
|
|
750
|
+
properties: {
|
|
751
|
+
sessionId: { type: 'string' },
|
|
752
|
+
},
|
|
753
|
+
required: ['sessionId'],
|
|
754
|
+
},
|
|
755
|
+
}),
|
|
756
|
+
destructiveTool({
|
|
757
|
+
name: 'webhook_deliver',
|
|
758
|
+
description: 'Send a message to Teams, Slack, or Discord via webhook. Use for status reports, alerts, and notifications.',
|
|
759
|
+
inputSchema: {
|
|
760
|
+
type: 'object',
|
|
761
|
+
required: ['platform', 'webhook_url', 'title', 'message'],
|
|
762
|
+
properties: {
|
|
763
|
+
platform: { type: 'string', enum: ['teams', 'slack', 'discord'], description: 'Target platform' },
|
|
764
|
+
webhook_url: { type: 'string', description: 'Webhook URL for the target channel' },
|
|
765
|
+
title: { type: 'string', description: 'Message title' },
|
|
766
|
+
message: { type: 'string', description: 'Message body (markdown supported)' },
|
|
767
|
+
},
|
|
768
|
+
},
|
|
769
|
+
}),
|
|
770
|
+
readOnlyTool({
|
|
771
|
+
name: 'reflect_on_feedback',
|
|
772
|
+
description: 'Run a post-mortem analysis on negative feedback. Returns a proposed rule and recurrence info.',
|
|
773
|
+
inputSchema: {
|
|
774
|
+
type: 'object',
|
|
775
|
+
properties: {
|
|
776
|
+
conversationWindow: {
|
|
777
|
+
type: 'array',
|
|
778
|
+
items: {
|
|
779
|
+
type: 'object',
|
|
780
|
+
properties: {
|
|
781
|
+
role: { type: 'string', enum: ['user', 'assistant'] },
|
|
782
|
+
content: { type: 'string' },
|
|
783
|
+
timestamp: { type: 'string' },
|
|
784
|
+
},
|
|
785
|
+
},
|
|
786
|
+
description: 'Last 5-10 conversation turns before the feedback signal.',
|
|
787
|
+
},
|
|
788
|
+
context: { type: 'string', description: 'One-line context from the caller' },
|
|
789
|
+
whatWentWrong: { type: 'string', description: 'What the caller said went wrong' },
|
|
790
|
+
feedbackEventId: { type: 'string', description: 'ID of a previously captured feedback event' },
|
|
791
|
+
},
|
|
792
|
+
},
|
|
793
|
+
}),
|
|
794
|
+
destructiveTool({
|
|
795
|
+
name: 'report_product_issue',
|
|
796
|
+
description: 'Report a bug, suggestion, or complaint about ThumbGate itself (not project feedback). Auto-files a GitHub issue with system context. Use when the user expresses frustration or requests a feature for the thumbgate tool.',
|
|
797
|
+
inputSchema: {
|
|
798
|
+
type: 'object',
|
|
799
|
+
required: ['title', 'body'],
|
|
800
|
+
properties: {
|
|
801
|
+
title: { type: 'string', description: 'Short issue title (e.g. "Gate blocks valid migration")' },
|
|
802
|
+
body: { type: 'string', description: 'Description of the problem or suggestion, in the user own words' },
|
|
803
|
+
category: { type: 'string', enum: ['bug', 'feature', 'question'], description: 'Issue category' },
|
|
804
|
+
},
|
|
805
|
+
},
|
|
806
|
+
}),
|
|
807
|
+
];
|
|
808
|
+
|
|
809
|
+
module.exports = {
|
|
810
|
+
TOOLS,
|
|
811
|
+
};
|