@stackmemoryai/stackmemory 1.12.0 → 1.14.0
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/LICENSE +131 -64
- package/README.md +3 -1
- package/bin/claude-sm +16 -1
- package/bin/claude-smd +16 -1
- package/bin/codex-smd +16 -1
- package/bin/gemini-sm +16 -1
- package/bin/hermes-sm +21 -0
- package/bin/hermes-smd +21 -0
- package/bin/opencode-sm +16 -1
- package/dist/src/cli/codex-sm.js +51 -11
- package/dist/src/cli/commands/brain.js +206 -0
- package/dist/src/cli/commands/company-os.js +184 -0
- package/dist/src/cli/commands/context.js +5 -0
- package/dist/src/cli/commands/operator.js +127 -0
- package/dist/src/cli/commands/orchestrate.js +2 -0
- package/dist/src/cli/commands/orchestrator.js +3 -2
- package/dist/src/cli/commands/patterns.js +254 -0
- package/dist/src/cli/commands/portal.js +161 -0
- package/dist/src/cli/commands/scaffold.js +92 -0
- package/dist/src/cli/commands/setup.js +1 -4
- package/dist/src/cli/commands/sync.js +253 -0
- package/dist/src/cli/commands/tasks.js +130 -1
- package/dist/src/cli/commands/vision.js +221 -0
- package/dist/src/cli/hermes-sm.js +224 -0
- package/dist/src/cli/index.js +15 -10
- package/dist/src/cli/utils/real-cli-bin.js +72 -0
- package/dist/src/core/brain/brain-store.js +187 -0
- package/dist/src/core/brain/brain-sync.js +193 -0
- package/dist/src/core/brain/index.js +78 -0
- package/dist/src/core/brain/types.js +10 -0
- package/dist/src/core/cache/token-estimator.js +24 -1
- package/dist/src/core/config/feature-flags.js +2 -6
- package/dist/src/core/context/frame-database.js +44 -0
- package/dist/src/core/context/recursive-context-manager.js +1 -1
- package/dist/src/core/context/rehydration.js +2 -1
- package/dist/src/core/database/sqlite-adapter.js +14 -1
- package/dist/src/core/models/model-router.js +33 -1
- package/dist/src/core/models/provider-pricing.js +58 -4
- package/dist/src/core/patterns/index.js +22 -0
- package/dist/src/core/patterns/pattern-applier.js +39 -0
- package/dist/src/core/patterns/pattern-observer.js +157 -0
- package/dist/src/core/patterns/pattern-store.js +259 -0
- package/dist/src/core/patterns/types.js +19 -0
- package/dist/src/core/retrieval/llm-context-retrieval.js +5 -4
- package/dist/src/core/retrieval/unified-context-assembler.js +11 -66
- package/dist/src/core/skill-packs/types.js +14 -1
- package/dist/src/core/storage/cloud-sync-manager.js +116 -0
- package/dist/src/core/storage/cloud-sync.js +574 -0
- package/dist/src/core/storage/two-tier-storage.js +5 -1
- package/dist/src/core/tasks/master-tasks-template.js +43 -0
- package/dist/src/core/tasks/md-task-parser.js +138 -0
- package/dist/src/core/vision/index.js +27 -0
- package/dist/src/core/vision/signals.js +79 -0
- package/dist/src/core/vision/types.js +22 -0
- package/dist/src/core/vision/vision-file.js +146 -0
- package/dist/src/core/vision/vision-loop.js +220 -0
- package/dist/src/core/wiki/wiki-compiler.js +103 -1
- package/dist/src/daemon/daemon-config.js +45 -0
- package/dist/src/daemon/services/desire-path-service.js +566 -0
- package/dist/src/daemon/services/research-stream-service.js +320 -0
- package/dist/src/daemon/services/telemetry-service.js +192 -0
- package/dist/src/daemon/unified-daemon.js +28 -1
- package/dist/src/features/browser/cli-browser-agent.js +417 -0
- package/dist/src/features/browser/stagehand-workflows.js +578 -0
- package/dist/src/features/operator/adapter-factory.js +62 -0
- package/dist/src/features/operator/browser-adapter.js +109 -0
- package/dist/src/features/operator/desktop-adapter.js +125 -0
- package/dist/src/features/operator/index.js +39 -0
- package/dist/src/features/operator/llm-decision.js +137 -0
- package/dist/src/features/operator/operator-logger.js +92 -0
- package/dist/src/features/operator/overnight-runner.js +327 -0
- package/dist/src/features/operator/screen-adapter.js +91 -0
- package/dist/src/features/operator/session-manager.js +127 -0
- package/dist/src/features/operator/state-machine.js +227 -0
- package/dist/src/features/operator/task-queue.js +81 -0
- package/dist/src/features/portal/index.js +26 -0
- package/dist/src/features/portal/server.js +240 -0
- package/dist/src/features/portal/types.js +14 -0
- package/dist/src/features/portal/ui.js +195 -0
- package/dist/src/features/tasks/task-aware-context.js +2 -1
- package/dist/src/features/tui/simple-monitor.js +0 -23
- package/dist/src/features/tui/swarm-monitor.js +8 -66
- package/dist/src/{integrations/diffmem/index.js → features/web/client/hooks/use-socket.js} +6 -5
- package/dist/src/features/web/client/lib/utils.js +12 -0
- package/dist/src/features/web/client/stores/session-store.js +12 -0
- package/dist/src/features/web/server/gcp-billing.js +76 -0
- package/dist/src/features/web/server/index.js +10 -0
- package/dist/src/features/web/server/spend-calculator.js +228 -0
- package/dist/src/hooks/schemas.js +4 -1
- package/dist/src/integrations/anthropic/client.js +3 -2
- package/dist/src/integrations/claude-code/agent-bridge.js +0 -3
- package/dist/src/integrations/claude-code/subagent-client.js +218 -11
- package/dist/src/integrations/claude-code/task-coordinator.js +2 -1
- package/dist/src/integrations/linear/webhook-retry.js +196 -0
- package/dist/src/integrations/linear/webhook-server.js +18 -22
- package/dist/src/integrations/mcp/handlers/cloud-sync-handlers.js +101 -0
- package/dist/src/integrations/mcp/handlers/index.js +27 -52
- package/dist/src/integrations/mcp/server.js +122 -335
- package/dist/src/integrations/mcp/tool-alias-registry.js +0 -73
- package/dist/src/integrations/mcp/tool-definitions.js +111 -510
- package/dist/src/mcp/stackmemory-mcp-server.js +404 -379
- package/dist/src/orchestrators/multimodal/determinism.js +2 -1
- package/dist/src/orchestrators/multimodal/harness.js +2 -1
- package/dist/src/skills/recursive-agent-orchestrator.js +2 -4
- package/dist/src/utils/process-cleanup.js +1 -7
- package/docs/README.md +42 -0
- package/docs/guides/README_INSTALL.md +208 -0
- package/package.json +18 -9
- package/scripts/claude-code-wrapper.sh +11 -0
- package/scripts/claude-sm-setup.sh +12 -1
- package/scripts/codex-wrapper.sh +11 -0
- package/scripts/git-hooks/branch-context-manager.sh +11 -0
- package/scripts/git-hooks/post-checkout-stackmemory.sh +11 -0
- package/scripts/git-hooks/post-commit-stackmemory.sh +11 -0
- package/scripts/git-hooks/pre-commit-stackmemory.sh +11 -0
- package/scripts/hooks/cleanup-shell.sh +12 -1
- package/scripts/hooks/task-complete.sh +12 -1
- package/scripts/install-code-execution-hooks.sh +12 -1
- package/scripts/install-sweep-hook.sh +12 -0
- package/scripts/install.sh +11 -0
- package/scripts/opencode-wrapper.sh +11 -0
- package/scripts/portal/cloud-init.yaml +69 -0
- package/scripts/portal/setup.sh +69 -0
- package/scripts/portal/stackmemory-portal.service +34 -0
- package/scripts/setup-claude-integration.sh +12 -1
- package/scripts/smoke-init-db.sh +23 -0
- package/scripts/stackmemory-daemon.sh +11 -0
- package/scripts/verify-dist.cjs +11 -4
- package/dist/src/cli/commands/ralph.js +0 -1053
- package/dist/src/hooks/diffmem-hooks.js +0 -376
- package/dist/src/integrations/diffmem/client.js +0 -208
- package/dist/src/integrations/diffmem/config.js +0 -14
- package/dist/src/integrations/greptile/client.js +0 -101
- package/dist/src/integrations/greptile/config.js +0 -14
- package/dist/src/integrations/greptile/index.js +0 -11
- package/dist/src/integrations/mcp/handlers/cross-search-handlers.js +0 -188
- package/dist/src/integrations/mcp/handlers/diffmem-handlers.js +0 -455
- package/dist/src/integrations/mcp/handlers/greptile-handlers.js +0 -456
- package/dist/src/integrations/mcp/handlers/provider-handlers.js +0 -227
- package/dist/src/integrations/ralph/bridge/ralph-stackmemory-bridge.js +0 -863
- package/dist/src/integrations/ralph/context/context-budget-manager.js +0 -308
- package/dist/src/integrations/ralph/context/stackmemory-context-loader.js +0 -354
- package/dist/src/integrations/ralph/index.js +0 -17
- package/dist/src/integrations/ralph/learning/pattern-learner.js +0 -416
- package/dist/src/integrations/ralph/lifecycle/iteration-lifecycle.js +0 -448
- package/dist/src/integrations/ralph/loopmax.js +0 -488
- package/dist/src/integrations/ralph/monitoring/swarm-dashboard.js +0 -293
- package/dist/src/integrations/ralph/monitoring/swarm-registry.js +0 -107
- package/dist/src/integrations/ralph/orchestration/multi-loop-orchestrator.js +0 -508
- package/dist/src/integrations/ralph/patterns/compounding-engineering-pattern.js +0 -407
- package/dist/src/integrations/ralph/patterns/extended-coherence-sessions.js +0 -495
- package/dist/src/integrations/ralph/patterns/oracle-worker-pattern.js +0 -387
- package/dist/src/integrations/ralph/performance/performance-optimizer.js +0 -357
- package/dist/src/integrations/ralph/recovery/crash-recovery.js +0 -461
- package/dist/src/integrations/ralph/state/state-reconciler.js +0 -420
- package/dist/src/integrations/ralph/swarm/git-workflow-manager.js +0 -444
- package/dist/src/integrations/ralph/swarm/swarm-coordinator.js +0 -1005
- package/dist/src/integrations/ralph/visualization/ralph-debugger.js +0 -635
- package/scripts/ralph-loop-implementation.js +0 -404
- /package/dist/src/{integrations/diffmem/types.js → core/storage/cloud-sync-types.js} +0 -0
- /package/dist/src/{integrations/greptile → features/operator}/types.js +0 -0
- /package/dist/src/{integrations/ralph/types.js → features/web/client/next-env.d.js} +0 -0
|
@@ -13,18 +13,15 @@ class MCPToolDefinitions {
|
|
|
13
13
|
...this.getLinearTools(),
|
|
14
14
|
...this.getTraceTools(),
|
|
15
15
|
...this.getTraceExtensionTools(),
|
|
16
|
-
...this.getPlanningTools(),
|
|
17
16
|
...this.getPendingTools(),
|
|
18
17
|
...this.getSmartContextTools(),
|
|
19
18
|
...this.getDiscoveryTools(),
|
|
20
19
|
...this.getEditTools(),
|
|
21
|
-
...this.getDiffMemTools(),
|
|
22
|
-
...this.getGreptileTools(),
|
|
23
|
-
...this.getProviderTools(),
|
|
24
20
|
...this.getDigestTools(),
|
|
25
21
|
...this.getDesirePathTools(),
|
|
26
22
|
...this.getProvenantTools(),
|
|
27
|
-
...this.
|
|
23
|
+
...this.getCloudSyncTools(),
|
|
24
|
+
...this.getMasterTaskTools()
|
|
28
25
|
];
|
|
29
26
|
}
|
|
30
27
|
/**
|
|
@@ -532,102 +529,6 @@ class MCPToolDefinitions {
|
|
|
532
529
|
/**
|
|
533
530
|
* Planning and orchestration tools
|
|
534
531
|
*/
|
|
535
|
-
getPlanningTools() {
|
|
536
|
-
return [
|
|
537
|
-
{
|
|
538
|
-
name: "plan_only",
|
|
539
|
-
description: "Generate an implementation plan (Claude) and return JSON only",
|
|
540
|
-
inputSchema: {
|
|
541
|
-
type: "object",
|
|
542
|
-
properties: {
|
|
543
|
-
task: { type: "string", description: "Task description" },
|
|
544
|
-
plannerModel: {
|
|
545
|
-
type: "string",
|
|
546
|
-
description: "Claude model for planning (optional)"
|
|
547
|
-
}
|
|
548
|
-
},
|
|
549
|
-
required: ["task"]
|
|
550
|
-
}
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
name: "call_codex",
|
|
554
|
-
description: "Invoke Codex via codex-sm with a prompt and args; dry-run by default",
|
|
555
|
-
inputSchema: {
|
|
556
|
-
type: "object",
|
|
557
|
-
properties: {
|
|
558
|
-
prompt: { type: "string", description: "Prompt for Codex" },
|
|
559
|
-
args: {
|
|
560
|
-
type: "array",
|
|
561
|
-
items: { type: "string" },
|
|
562
|
-
description: "Additional CLI args for codex-sm"
|
|
563
|
-
},
|
|
564
|
-
execute: {
|
|
565
|
-
type: "boolean",
|
|
566
|
-
default: false,
|
|
567
|
-
description: "Actually run codex-sm (otherwise dry-run)"
|
|
568
|
-
}
|
|
569
|
-
},
|
|
570
|
-
required: ["prompt"]
|
|
571
|
-
}
|
|
572
|
-
},
|
|
573
|
-
{
|
|
574
|
-
name: "call_claude",
|
|
575
|
-
description: "Invoke Claude with a prompt (Anthropic SDK)",
|
|
576
|
-
inputSchema: {
|
|
577
|
-
type: "object",
|
|
578
|
-
properties: {
|
|
579
|
-
prompt: { type: "string", description: "Prompt for Claude" },
|
|
580
|
-
model: { type: "string", description: "Claude model (optional)" },
|
|
581
|
-
system: { type: "string", description: "System prompt (optional)" }
|
|
582
|
-
},
|
|
583
|
-
required: ["prompt"]
|
|
584
|
-
}
|
|
585
|
-
},
|
|
586
|
-
{
|
|
587
|
-
name: "plan_gate",
|
|
588
|
-
description: "Phase 1: Generate a plan and return an approvalId for later execution",
|
|
589
|
-
inputSchema: {
|
|
590
|
-
type: "object",
|
|
591
|
-
properties: {
|
|
592
|
-
task: { type: "string", description: "Task description" },
|
|
593
|
-
plannerModel: {
|
|
594
|
-
type: "string",
|
|
595
|
-
description: "Claude model (optional)"
|
|
596
|
-
}
|
|
597
|
-
},
|
|
598
|
-
required: ["task"]
|
|
599
|
-
}
|
|
600
|
-
},
|
|
601
|
-
{
|
|
602
|
-
name: "approve_plan",
|
|
603
|
-
description: "Phase 2: Execute a previously generated plan by approvalId",
|
|
604
|
-
inputSchema: {
|
|
605
|
-
type: "object",
|
|
606
|
-
properties: {
|
|
607
|
-
approvalId: { type: "string", description: "Id from plan_gate" },
|
|
608
|
-
implementer: {
|
|
609
|
-
type: "string",
|
|
610
|
-
enum: ["codex", "claude"],
|
|
611
|
-
default: "codex",
|
|
612
|
-
description: "Which agent implements code"
|
|
613
|
-
},
|
|
614
|
-
maxIters: { type: "number", default: 2 },
|
|
615
|
-
verificationCommands: {
|
|
616
|
-
type: "array",
|
|
617
|
-
items: { type: "string" },
|
|
618
|
-
description: "Optional repro/test commands that must pass after implementation"
|
|
619
|
-
},
|
|
620
|
-
recordFrame: { type: "boolean", default: true },
|
|
621
|
-
execute: { type: "boolean", default: true }
|
|
622
|
-
},
|
|
623
|
-
required: ["approvalId"]
|
|
624
|
-
}
|
|
625
|
-
}
|
|
626
|
-
];
|
|
627
|
-
}
|
|
628
|
-
/**
|
|
629
|
-
* Pending approval management tools
|
|
630
|
-
*/
|
|
631
532
|
getPendingTools() {
|
|
632
533
|
return [
|
|
633
534
|
{
|
|
@@ -878,340 +779,13 @@ class MCPToolDefinitions {
|
|
|
878
779
|
}
|
|
879
780
|
];
|
|
880
781
|
}
|
|
881
|
-
|
|
882
|
-
* DiffMem user memory management tools
|
|
883
|
-
*/
|
|
884
|
-
getDiffMemTools() {
|
|
885
|
-
return [
|
|
886
|
-
{
|
|
887
|
-
name: "diffmem_get_user_context",
|
|
888
|
-
description: "Fetch user knowledge and preferences from memory. Use to personalize responses.",
|
|
889
|
-
inputSchema: {
|
|
890
|
-
type: "object",
|
|
891
|
-
properties: {
|
|
892
|
-
categories: {
|
|
893
|
-
type: "array",
|
|
894
|
-
items: {
|
|
895
|
-
type: "string",
|
|
896
|
-
enum: [
|
|
897
|
-
"preference",
|
|
898
|
-
"expertise",
|
|
899
|
-
"project_knowledge",
|
|
900
|
-
"pattern",
|
|
901
|
-
"correction"
|
|
902
|
-
]
|
|
903
|
-
},
|
|
904
|
-
description: "Filter by memory categories"
|
|
905
|
-
},
|
|
906
|
-
limit: {
|
|
907
|
-
type: "number",
|
|
908
|
-
default: 10,
|
|
909
|
-
description: "Maximum memories to return"
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
}
|
|
913
|
-
},
|
|
914
|
-
{
|
|
915
|
-
name: "diffmem_store_learning",
|
|
916
|
-
description: "Store a new insight about the user (preference, expertise, pattern, or correction)",
|
|
917
|
-
inputSchema: {
|
|
918
|
-
type: "object",
|
|
919
|
-
properties: {
|
|
920
|
-
content: { type: "string", description: "The insight to store" },
|
|
921
|
-
category: {
|
|
922
|
-
type: "string",
|
|
923
|
-
enum: [
|
|
924
|
-
"preference",
|
|
925
|
-
"expertise",
|
|
926
|
-
"project_knowledge",
|
|
927
|
-
"pattern",
|
|
928
|
-
"correction"
|
|
929
|
-
],
|
|
930
|
-
description: "Category of the insight"
|
|
931
|
-
},
|
|
932
|
-
confidence: {
|
|
933
|
-
type: "number",
|
|
934
|
-
minimum: 0,
|
|
935
|
-
maximum: 1,
|
|
936
|
-
default: 0.7,
|
|
937
|
-
description: "Confidence level (0-1)"
|
|
938
|
-
},
|
|
939
|
-
context: {
|
|
940
|
-
type: "object",
|
|
941
|
-
description: "Additional context for the insight"
|
|
942
|
-
}
|
|
943
|
-
},
|
|
944
|
-
required: ["content", "category"]
|
|
945
|
-
}
|
|
946
|
-
},
|
|
947
|
-
{
|
|
948
|
-
name: "diffmem_search",
|
|
949
|
-
description: "Semantic search across user memories. Find relevant past insights and preferences.",
|
|
950
|
-
inputSchema: {
|
|
951
|
-
type: "object",
|
|
952
|
-
properties: {
|
|
953
|
-
query: { type: "string", description: "Search query" },
|
|
954
|
-
timeRange: {
|
|
955
|
-
type: "string",
|
|
956
|
-
enum: ["day", "week", "month", "all"],
|
|
957
|
-
default: "all",
|
|
958
|
-
description: "Time range filter"
|
|
959
|
-
},
|
|
960
|
-
minConfidence: {
|
|
961
|
-
type: "number",
|
|
962
|
-
minimum: 0,
|
|
963
|
-
maximum: 1,
|
|
964
|
-
default: 0.5,
|
|
965
|
-
description: "Minimum confidence threshold"
|
|
966
|
-
},
|
|
967
|
-
limit: {
|
|
968
|
-
type: "number",
|
|
969
|
-
default: 10,
|
|
970
|
-
description: "Maximum results"
|
|
971
|
-
}
|
|
972
|
-
},
|
|
973
|
-
required: ["query"]
|
|
974
|
-
}
|
|
975
|
-
},
|
|
976
|
-
{
|
|
977
|
-
name: "diffmem_status",
|
|
978
|
-
description: "Check DiffMem connection status and memory statistics",
|
|
979
|
-
inputSchema: { type: "object", properties: {} }
|
|
980
|
-
}
|
|
981
|
-
];
|
|
982
|
-
}
|
|
983
|
-
/**
|
|
984
|
-
* Greptile code review tools
|
|
985
|
-
*/
|
|
782
|
+
// [REMOVED in v1.14]
|
|
986
783
|
getGreptileTools() {
|
|
987
|
-
return [
|
|
988
|
-
{
|
|
989
|
-
name: "greptile_pr_comments",
|
|
990
|
-
description: "Get PR review comments from Greptile. Returns unaddressed comments with suggestedCode.",
|
|
991
|
-
inputSchema: {
|
|
992
|
-
type: "object",
|
|
993
|
-
properties: {
|
|
994
|
-
name: {
|
|
995
|
-
type: "string",
|
|
996
|
-
description: 'Repository full name (e.g., "owner/repo")'
|
|
997
|
-
},
|
|
998
|
-
remote: {
|
|
999
|
-
type: "string",
|
|
1000
|
-
enum: ["github", "gitlab", "azure", "bitbucket"],
|
|
1001
|
-
description: "Remote provider"
|
|
1002
|
-
},
|
|
1003
|
-
defaultBranch: {
|
|
1004
|
-
type: "string",
|
|
1005
|
-
description: 'Default branch (e.g., "main")'
|
|
1006
|
-
},
|
|
1007
|
-
prNumber: { type: "number", description: "Pull request number" },
|
|
1008
|
-
greptileGenerated: {
|
|
1009
|
-
type: "boolean",
|
|
1010
|
-
description: "Filter for only Greptile review comments"
|
|
1011
|
-
},
|
|
1012
|
-
addressed: {
|
|
1013
|
-
type: "boolean",
|
|
1014
|
-
description: "Filter by comment addressed status"
|
|
1015
|
-
}
|
|
1016
|
-
},
|
|
1017
|
-
required: ["name", "remote", "defaultBranch", "prNumber"]
|
|
1018
|
-
}
|
|
1019
|
-
},
|
|
1020
|
-
{
|
|
1021
|
-
name: "greptile_pr_details",
|
|
1022
|
-
description: "Get detailed PR information including metadata, statistics, and review analysis.",
|
|
1023
|
-
inputSchema: {
|
|
1024
|
-
type: "object",
|
|
1025
|
-
properties: {
|
|
1026
|
-
name: { type: "string", description: "Repository full name" },
|
|
1027
|
-
remote: {
|
|
1028
|
-
type: "string",
|
|
1029
|
-
enum: ["github", "gitlab", "azure", "bitbucket"],
|
|
1030
|
-
description: "Remote provider"
|
|
1031
|
-
},
|
|
1032
|
-
defaultBranch: { type: "string", description: "Default branch" },
|
|
1033
|
-
prNumber: { type: "number", description: "Pull request number" }
|
|
1034
|
-
},
|
|
1035
|
-
required: ["name", "remote", "defaultBranch", "prNumber"]
|
|
1036
|
-
}
|
|
1037
|
-
},
|
|
1038
|
-
{
|
|
1039
|
-
name: "greptile_list_prs",
|
|
1040
|
-
description: "List pull requests. Filter by repository, branch, author, or state.",
|
|
1041
|
-
inputSchema: {
|
|
1042
|
-
type: "object",
|
|
1043
|
-
properties: {
|
|
1044
|
-
name: { type: "string", description: "Repository full name" },
|
|
1045
|
-
remote: {
|
|
1046
|
-
type: "string",
|
|
1047
|
-
enum: ["github", "gitlab", "azure", "bitbucket"],
|
|
1048
|
-
description: "Remote provider"
|
|
1049
|
-
},
|
|
1050
|
-
defaultBranch: { type: "string", description: "Default branch" },
|
|
1051
|
-
sourceBranch: {
|
|
1052
|
-
type: "string",
|
|
1053
|
-
description: "Filter by source branch name"
|
|
1054
|
-
},
|
|
1055
|
-
authorLogin: {
|
|
1056
|
-
type: "string",
|
|
1057
|
-
description: "Filter by PR author username"
|
|
1058
|
-
},
|
|
1059
|
-
state: {
|
|
1060
|
-
type: "string",
|
|
1061
|
-
enum: ["open", "closed", "merged"],
|
|
1062
|
-
description: "Filter by PR state"
|
|
1063
|
-
},
|
|
1064
|
-
limit: { type: "number", description: "Max results (default 20)" }
|
|
1065
|
-
}
|
|
1066
|
-
}
|
|
1067
|
-
},
|
|
1068
|
-
{
|
|
1069
|
-
name: "greptile_trigger_review",
|
|
1070
|
-
description: "Trigger a Greptile code review for a pull request.",
|
|
1071
|
-
inputSchema: {
|
|
1072
|
-
type: "object",
|
|
1073
|
-
properties: {
|
|
1074
|
-
name: { type: "string", description: "Repository full name" },
|
|
1075
|
-
remote: {
|
|
1076
|
-
type: "string",
|
|
1077
|
-
enum: ["github", "gitlab", "azure", "bitbucket"],
|
|
1078
|
-
description: "Remote provider"
|
|
1079
|
-
},
|
|
1080
|
-
defaultBranch: { type: "string", description: "Default branch" },
|
|
1081
|
-
prNumber: { type: "number", description: "Pull request number" },
|
|
1082
|
-
branch: { type: "string", description: "Current working branch" }
|
|
1083
|
-
},
|
|
1084
|
-
required: ["name", "remote", "prNumber"]
|
|
1085
|
-
}
|
|
1086
|
-
},
|
|
1087
|
-
{
|
|
1088
|
-
name: "greptile_search_patterns",
|
|
1089
|
-
description: "Search custom coding patterns and instructions in Greptile.",
|
|
1090
|
-
inputSchema: {
|
|
1091
|
-
type: "object",
|
|
1092
|
-
properties: {
|
|
1093
|
-
query: {
|
|
1094
|
-
type: "string",
|
|
1095
|
-
description: "Search query for pattern content"
|
|
1096
|
-
},
|
|
1097
|
-
limit: { type: "number", description: "Max results (default 10)" }
|
|
1098
|
-
},
|
|
1099
|
-
required: ["query"]
|
|
1100
|
-
}
|
|
1101
|
-
},
|
|
1102
|
-
{
|
|
1103
|
-
name: "greptile_create_pattern",
|
|
1104
|
-
description: "Create a new custom coding pattern or instruction in Greptile.",
|
|
1105
|
-
inputSchema: {
|
|
1106
|
-
type: "object",
|
|
1107
|
-
properties: {
|
|
1108
|
-
body: { type: "string", description: "Pattern content" },
|
|
1109
|
-
type: {
|
|
1110
|
-
type: "string",
|
|
1111
|
-
enum: ["CUSTOM_INSTRUCTION", "PATTERN"],
|
|
1112
|
-
description: "Context type"
|
|
1113
|
-
},
|
|
1114
|
-
scopes: {
|
|
1115
|
-
type: "object",
|
|
1116
|
-
description: "Boolean expression defining where this pattern applies"
|
|
1117
|
-
}
|
|
1118
|
-
},
|
|
1119
|
-
required: ["body"]
|
|
1120
|
-
}
|
|
1121
|
-
},
|
|
1122
|
-
{
|
|
1123
|
-
name: "greptile_status",
|
|
1124
|
-
description: "Check Greptile integration connection status.",
|
|
1125
|
-
inputSchema: { type: "object", properties: {} }
|
|
1126
|
-
}
|
|
1127
|
-
];
|
|
784
|
+
return [];
|
|
1128
785
|
}
|
|
1129
786
|
/**
|
|
1130
787
|
* Multi-provider routing tools
|
|
1131
788
|
*/
|
|
1132
|
-
getProviderTools() {
|
|
1133
|
-
return [
|
|
1134
|
-
{
|
|
1135
|
-
name: "delegate_to_model",
|
|
1136
|
-
description: "Route a prompt to a specific provider/model. Uses smart cost-based routing by default. Aliases: delegate, route, send_to_model",
|
|
1137
|
-
inputSchema: {
|
|
1138
|
-
type: "object",
|
|
1139
|
-
properties: {
|
|
1140
|
-
prompt: { type: "string", description: "The prompt to send" },
|
|
1141
|
-
provider: {
|
|
1142
|
-
type: "string",
|
|
1143
|
-
enum: [
|
|
1144
|
-
"anthropic",
|
|
1145
|
-
"cerebras",
|
|
1146
|
-
"deepinfra",
|
|
1147
|
-
"openai",
|
|
1148
|
-
"openrouter"
|
|
1149
|
-
],
|
|
1150
|
-
description: "Override provider"
|
|
1151
|
-
},
|
|
1152
|
-
model: { type: "string", description: "Override model name" },
|
|
1153
|
-
taskType: {
|
|
1154
|
-
type: "string",
|
|
1155
|
-
enum: ["linting", "context", "code", "testing", "review", "plan"],
|
|
1156
|
-
description: "Task type for auto-routing"
|
|
1157
|
-
},
|
|
1158
|
-
maxTokens: { type: "number", description: "Max tokens" },
|
|
1159
|
-
temperature: { type: "number" },
|
|
1160
|
-
system: { type: "string", description: "System prompt" }
|
|
1161
|
-
},
|
|
1162
|
-
required: ["prompt"]
|
|
1163
|
-
}
|
|
1164
|
-
},
|
|
1165
|
-
{
|
|
1166
|
-
name: "batch_submit",
|
|
1167
|
-
description: "Submit prompts to Anthropic Batch API (50% discount, async)",
|
|
1168
|
-
inputSchema: {
|
|
1169
|
-
type: "object",
|
|
1170
|
-
properties: {
|
|
1171
|
-
prompts: {
|
|
1172
|
-
type: "array",
|
|
1173
|
-
items: {
|
|
1174
|
-
type: "object",
|
|
1175
|
-
properties: {
|
|
1176
|
-
id: { type: "string" },
|
|
1177
|
-
prompt: { type: "string" },
|
|
1178
|
-
model: { type: "string" },
|
|
1179
|
-
maxTokens: { type: "number" },
|
|
1180
|
-
system: { type: "string" }
|
|
1181
|
-
},
|
|
1182
|
-
required: ["id", "prompt"]
|
|
1183
|
-
},
|
|
1184
|
-
description: "Array of prompts to batch"
|
|
1185
|
-
},
|
|
1186
|
-
description: {
|
|
1187
|
-
type: "string",
|
|
1188
|
-
description: "Batch job description"
|
|
1189
|
-
}
|
|
1190
|
-
},
|
|
1191
|
-
required: ["prompts"]
|
|
1192
|
-
}
|
|
1193
|
-
},
|
|
1194
|
-
{
|
|
1195
|
-
name: "batch_check",
|
|
1196
|
-
description: "Check status or retrieve results for a batch job",
|
|
1197
|
-
inputSchema: {
|
|
1198
|
-
type: "object",
|
|
1199
|
-
properties: {
|
|
1200
|
-
batchId: { type: "string", description: "Batch job ID" },
|
|
1201
|
-
retrieve: {
|
|
1202
|
-
type: "boolean",
|
|
1203
|
-
default: false,
|
|
1204
|
-
description: "Retrieve results if complete"
|
|
1205
|
-
}
|
|
1206
|
-
},
|
|
1207
|
-
required: ["batchId"]
|
|
1208
|
-
}
|
|
1209
|
-
}
|
|
1210
|
-
];
|
|
1211
|
-
}
|
|
1212
|
-
/**
|
|
1213
|
-
* Chronological digest tools
|
|
1214
|
-
*/
|
|
1215
789
|
getDigestTools() {
|
|
1216
790
|
return [
|
|
1217
791
|
{
|
|
@@ -1369,126 +943,153 @@ class MCPToolDefinitions {
|
|
|
1369
943
|
/**
|
|
1370
944
|
* Cross-project search tools
|
|
1371
945
|
*/
|
|
1372
|
-
|
|
946
|
+
getCloudSyncTools() {
|
|
1373
947
|
return [
|
|
1374
948
|
{
|
|
1375
|
-
name: "
|
|
1376
|
-
description: "
|
|
949
|
+
name: "cloud_sync_push",
|
|
950
|
+
description: "Push local context changes to Provenant cloud. Syncs frames, events, anchors, traces, and entity states.",
|
|
1377
951
|
inputSchema: {
|
|
1378
952
|
type: "object",
|
|
1379
953
|
properties: {
|
|
1380
|
-
|
|
1381
|
-
type: "string",
|
|
1382
|
-
description: "Search query (natural language or keywords)"
|
|
1383
|
-
},
|
|
1384
|
-
limit: {
|
|
1385
|
-
type: "number",
|
|
1386
|
-
default: 20,
|
|
1387
|
-
description: "Maximum results to return"
|
|
1388
|
-
},
|
|
1389
|
-
exclude_current: {
|
|
954
|
+
force: {
|
|
1390
955
|
type: "boolean",
|
|
1391
|
-
|
|
1392
|
-
description: "Exclude the current project from results (useful when searching for external context)"
|
|
956
|
+
description: "Push all data, ignoring sync cursors"
|
|
1393
957
|
}
|
|
1394
|
-
}
|
|
1395
|
-
required: ["query"]
|
|
958
|
+
}
|
|
1396
959
|
}
|
|
1397
960
|
},
|
|
1398
961
|
{
|
|
1399
|
-
name: "
|
|
1400
|
-
description: "
|
|
962
|
+
name: "cloud_sync_pull",
|
|
963
|
+
description: "Pull remote changes from Provenant cloud to local database.",
|
|
1401
964
|
inputSchema: {
|
|
1402
965
|
type: "object",
|
|
1403
966
|
properties: {
|
|
1404
|
-
|
|
967
|
+
tables: {
|
|
1405
968
|
type: "array",
|
|
1406
969
|
items: { type: "string" },
|
|
1407
|
-
description: "
|
|
970
|
+
description: "Only pull specific tables (frames, events, anchors, trace_events, entity_states)"
|
|
1408
971
|
}
|
|
1409
972
|
}
|
|
1410
973
|
}
|
|
1411
974
|
},
|
|
1412
975
|
{
|
|
1413
|
-
name: "
|
|
1414
|
-
description: "
|
|
976
|
+
name: "cloud_sync_status",
|
|
977
|
+
description: "Show current cloud sync status \u2014 connection, pending items, conflicts.",
|
|
978
|
+
inputSchema: {
|
|
979
|
+
type: "object",
|
|
980
|
+
properties: {}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
];
|
|
984
|
+
}
|
|
985
|
+
getMasterTaskTools() {
|
|
986
|
+
return [
|
|
987
|
+
{
|
|
988
|
+
name: "get_next_master_task",
|
|
989
|
+
description: "Get the highest-priority actionable task from master-tasks.md. Returns the next task to work on based on priority (P0 > P1 > P2 > P3), skipping blocked/done/cut tasks.",
|
|
1415
990
|
inputSchema: {
|
|
1416
991
|
type: "object",
|
|
1417
992
|
properties: {
|
|
1418
|
-
|
|
993
|
+
owner: {
|
|
994
|
+
type: "string",
|
|
995
|
+
description: "Filter by owner (@me, @agent, @defer). If omitted, returns highest priority regardless of owner."
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
name: "update_master_task",
|
|
1002
|
+
description: "Update a task in master-tasks.md by task ID (e.g. T01). Can update status, priority, owner, branch, notes, or sync target.",
|
|
1003
|
+
inputSchema: {
|
|
1004
|
+
type: "object",
|
|
1005
|
+
properties: {
|
|
1006
|
+
task_id: {
|
|
1419
1007
|
type: "string",
|
|
1420
|
-
description: "
|
|
1008
|
+
description: "Task ID (e.g. T01, T02)"
|
|
1421
1009
|
},
|
|
1422
|
-
|
|
1010
|
+
status: {
|
|
1011
|
+
type: "string",
|
|
1012
|
+
enum: ["todo", "active", "done", "blocked", "cut"],
|
|
1013
|
+
description: "New status"
|
|
1014
|
+
},
|
|
1015
|
+
priority: {
|
|
1423
1016
|
type: "string",
|
|
1424
|
-
|
|
1017
|
+
enum: ["P0", "P1", "P2", "P3"],
|
|
1018
|
+
description: "New priority"
|
|
1425
1019
|
},
|
|
1426
|
-
|
|
1020
|
+
owner: {
|
|
1427
1021
|
type: "string",
|
|
1428
|
-
description: "
|
|
1022
|
+
description: "New owner (@me, @agent, @defer)"
|
|
1023
|
+
},
|
|
1024
|
+
branch_pr: {
|
|
1025
|
+
type: "string",
|
|
1026
|
+
description: "Branch name or PR link"
|
|
1027
|
+
},
|
|
1028
|
+
notes: {
|
|
1029
|
+
type: "string",
|
|
1030
|
+
description: "Updated notes"
|
|
1031
|
+
},
|
|
1032
|
+
sync: {
|
|
1033
|
+
type: "string",
|
|
1034
|
+
enum: ["local", "linear", "gh"],
|
|
1035
|
+
description: "Sync target"
|
|
1429
1036
|
}
|
|
1430
1037
|
},
|
|
1431
|
-
required: ["
|
|
1038
|
+
required: ["task_id"]
|
|
1432
1039
|
}
|
|
1433
1040
|
},
|
|
1434
1041
|
{
|
|
1435
|
-
name: "
|
|
1436
|
-
description: "
|
|
1042
|
+
name: "create_master_task",
|
|
1043
|
+
description: "Add a new task to master-tasks.md. Auto-assigns the next available ID (T01, T02...).",
|
|
1437
1044
|
inputSchema: {
|
|
1438
1045
|
type: "object",
|
|
1439
|
-
properties: {
|
|
1046
|
+
properties: {
|
|
1047
|
+
task: {
|
|
1048
|
+
type: "string",
|
|
1049
|
+
description: "Task description"
|
|
1050
|
+
},
|
|
1051
|
+
priority: {
|
|
1052
|
+
type: "string",
|
|
1053
|
+
enum: ["P0", "P1", "P2", "P3"],
|
|
1054
|
+
default: "P1",
|
|
1055
|
+
description: "Priority level"
|
|
1056
|
+
},
|
|
1057
|
+
owner: {
|
|
1058
|
+
type: "string",
|
|
1059
|
+
default: "@me",
|
|
1060
|
+
description: "Task owner (@me, @agent, @defer)"
|
|
1061
|
+
},
|
|
1062
|
+
sync: {
|
|
1063
|
+
type: "string",
|
|
1064
|
+
enum: ["local", "linear", "gh"],
|
|
1065
|
+
default: "local",
|
|
1066
|
+
description: "Sync target"
|
|
1067
|
+
},
|
|
1068
|
+
notes: {
|
|
1069
|
+
type: "string",
|
|
1070
|
+
description: "Optional notes"
|
|
1071
|
+
}
|
|
1072
|
+
},
|
|
1073
|
+
required: ["task"]
|
|
1440
1074
|
}
|
|
1441
1075
|
}
|
|
1442
1076
|
];
|
|
1443
1077
|
}
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
getToolDefinition(name) {
|
|
1448
|
-
return this.getAllToolDefinitions().find((tool) => tool.name === name);
|
|
1078
|
+
// [REMOVED in v1.14]
|
|
1079
|
+
getPlanningTools() {
|
|
1080
|
+
return [];
|
|
1449
1081
|
}
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
case "trace":
|
|
1462
|
-
return this.getTraceTools();
|
|
1463
|
-
case "trace_extension":
|
|
1464
|
-
return this.getTraceExtensionTools();
|
|
1465
|
-
case "planning":
|
|
1466
|
-
return this.getPlanningTools();
|
|
1467
|
-
case "pending":
|
|
1468
|
-
return this.getPendingTools();
|
|
1469
|
-
case "smart_context":
|
|
1470
|
-
return this.getSmartContextTools();
|
|
1471
|
-
case "discovery":
|
|
1472
|
-
return this.getDiscoveryTools();
|
|
1473
|
-
case "edit":
|
|
1474
|
-
return this.getEditTools();
|
|
1475
|
-
case "diffmem":
|
|
1476
|
-
return this.getDiffMemTools();
|
|
1477
|
-
case "greptile":
|
|
1478
|
-
return this.getGreptileTools();
|
|
1479
|
-
case "provider":
|
|
1480
|
-
return this.getProviderTools();
|
|
1481
|
-
case "digest":
|
|
1482
|
-
return this.getDigestTools();
|
|
1483
|
-
case "desire_paths":
|
|
1484
|
-
return this.getDesirePathTools();
|
|
1485
|
-
case "provenant":
|
|
1486
|
-
return this.getProvenantTools();
|
|
1487
|
-
case "cross_search":
|
|
1488
|
-
return this.getProvenantTools();
|
|
1489
|
-
default:
|
|
1490
|
-
return [];
|
|
1491
|
-
}
|
|
1082
|
+
getDiffMemTools() {
|
|
1083
|
+
return [];
|
|
1084
|
+
}
|
|
1085
|
+
getProviderTools() {
|
|
1086
|
+
return [];
|
|
1087
|
+
}
|
|
1088
|
+
getCrossSearchTools() {
|
|
1089
|
+
return [];
|
|
1090
|
+
}
|
|
1091
|
+
getWorkflowTools() {
|
|
1092
|
+
return [];
|
|
1492
1093
|
}
|
|
1493
1094
|
}
|
|
1494
1095
|
export {
|