nexus-prime 3.10.0 → 3.11.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/README.md +7 -0
- package/dist/agents/adapters/mcp.d.ts +2 -2
- package/dist/agents/adapters/mcp.d.ts.map +1 -1
- package/dist/agents/adapters/mcp.js +234 -2
- package/dist/agents/adapters/mcp.js.map +1 -1
- package/dist/dashboard/index.html +285 -3
- package/dist/dashboard/server.d.ts.map +1 -1
- package/dist/dashboard/server.js +125 -0
- package/dist/dashboard/server.js.map +1 -1
- package/dist/engines/index.d.ts +6 -0
- package/dist/engines/index.d.ts.map +1 -1
- package/dist/engines/index.js +3 -0
- package/dist/engines/index.js.map +1 -1
- package/dist/engines/instruction-gateway.d.ts +18 -1
- package/dist/engines/instruction-gateway.d.ts.map +1 -1
- package/dist/engines/instruction-gateway.js +30 -0
- package/dist/engines/instruction-gateway.js.map +1 -1
- package/dist/engines/knowledge-fabric.d.ts +185 -0
- package/dist/engines/knowledge-fabric.d.ts.map +1 -0
- package/dist/engines/knowledge-fabric.js +422 -0
- package/dist/engines/knowledge-fabric.js.map +1 -0
- package/dist/engines/orchestrator.d.ts +40 -0
- package/dist/engines/orchestrator.d.ts.map +1 -1
- package/dist/engines/orchestrator.js +136 -48
- package/dist/engines/orchestrator.js.map +1 -1
- package/dist/engines/pattern-registry.d.ts +34 -0
- package/dist/engines/pattern-registry.d.ts.map +1 -0
- package/dist/engines/pattern-registry.js +176 -0
- package/dist/engines/pattern-registry.js.map +1 -0
- package/dist/engines/rag-collections.d.ts +98 -0
- package/dist/engines/rag-collections.d.ts.map +1 -0
- package/dist/engines/rag-collections.js +304 -0
- package/dist/engines/rag-collections.js.map +1 -0
- package/dist/engines/runtime-registry.d.ts +4 -0
- package/dist/engines/runtime-registry.d.ts.map +1 -1
- package/dist/engines/runtime-registry.js +2 -0
- package/dist/engines/runtime-registry.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/phantom/runtime.d.ts +6 -0
- package/dist/phantom/runtime.d.ts.map +1 -1
- package/dist/phantom/runtime.js +70 -0
- package/dist/phantom/runtime.js.map +1 -1
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -338,6 +338,13 @@ nexus-prime setup status
|
|
|
338
338
|
---
|
|
339
339
|
|
|
340
340
|
## 📜 Changelog
|
|
341
|
+
### v3.11.0 "Knowledge Fabric"
|
|
342
|
+
- **New Knowledge Fabric layer now assembles bounded execution bundles across repo code, memory, session RAG collections, reusable patterns, and prior runtime traces**
|
|
343
|
+
- **Session-first RAG collections and the pattern registry now feed orchestrated runs, runtime truth, and dashboard provenance instead of living outside the control plane**
|
|
344
|
+
- **`CI & Publish` now mirrors the real release gate on pull requests with build, lint, full tests, and `npm pack --dry-run` before publish is allowed**
|
|
345
|
+
- **RAG collection IDs are sanitized before filesystem access, and remote URL ingestion now times out instead of hanging indefinitely**
|
|
346
|
+
- **TypeScript tests and public-surface checks now run through `tsx`, keeping local and GitHub Actions behavior aligned**
|
|
347
|
+
|
|
341
348
|
### v3.10.0 "Autonomous Bootstrap"
|
|
342
349
|
- **New `nexus_session_bootstrap` entrypoint gives external clients one compact session-start tool with memory recall, stats, shortlist guidance, and token-optimization expectations**
|
|
343
350
|
- **MCP now defaults to an `autonomous` tool profile, keeping `nexus_session_bootstrap` and `nexus_orchestrate` first while reserving the full expert surface for manual work**
|
|
@@ -34,8 +34,8 @@ export declare class MCPAdapter implements Adapter {
|
|
|
34
34
|
private walk;
|
|
35
35
|
connect(): Promise<void>;
|
|
36
36
|
disconnect(): Promise<void>;
|
|
37
|
-
send(
|
|
38
|
-
receive(
|
|
37
|
+
send(message: NetworkMessage): Promise<void>;
|
|
38
|
+
receive(message: NetworkMessage): void;
|
|
39
39
|
}
|
|
40
40
|
export {};
|
|
41
41
|
//# sourceMappingURL=mcp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../../src/agents/adapters/mcp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,cAAc;IAMtB,OAAO,CAAC,+BAA+B;IAMvC,OAAO,CAAC,uBAAuB;IAqB/B,OAAO,CAAC,uBAAuB;IAsB/B,cAAc,CAAC,OAAO,GAAE,cAAsC,GAAG,iBAAiB,EAAE;IAIpF,OAAO,CAAC,oBAAoB;IAytB5B,OAAO,CAAC,iBAAiB;YAuCX,cAAc;IA6iD5B,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE;IAItC,OAAO,CAAC,IAAI;IAmBN,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAOxB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAkB3B,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAClD,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;CACzC"}
|
|
@@ -105,6 +105,15 @@ const MANUAL_OR_DIAGNOSTIC_TOOLS = new Set([
|
|
|
105
105
|
'nexus_assemble_context',
|
|
106
106
|
'nexus_execute_nxl',
|
|
107
107
|
'nexus_publish_trace',
|
|
108
|
+
'nexus_rag_list_collections',
|
|
109
|
+
'nexus_rag_create_collection',
|
|
110
|
+
'nexus_rag_ingest_collection',
|
|
111
|
+
'nexus_rag_attach_collection',
|
|
112
|
+
'nexus_rag_detach_collection',
|
|
113
|
+
'nexus_rag_delete_collection',
|
|
114
|
+
'nexus_pattern_search',
|
|
115
|
+
'nexus_pattern_list',
|
|
116
|
+
'nexus_knowledge_provenance',
|
|
108
117
|
]);
|
|
109
118
|
/** Session-level telemetry tracker */
|
|
110
119
|
class SessionTelemetry {
|
|
@@ -780,6 +789,116 @@ export class MCPAdapter {
|
|
|
780
789
|
properties: {},
|
|
781
790
|
},
|
|
782
791
|
},
|
|
792
|
+
{
|
|
793
|
+
name: 'nexus_rag_list_collections',
|
|
794
|
+
description: 'Expert surface: list session-first RAG collections managed by Nexus Prime.',
|
|
795
|
+
inputSchema: {
|
|
796
|
+
type: 'object',
|
|
797
|
+
properties: {},
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
name: 'nexus_rag_create_collection',
|
|
802
|
+
description: 'Expert surface: create a session-first RAG collection outside the git repo.',
|
|
803
|
+
inputSchema: {
|
|
804
|
+
type: 'object',
|
|
805
|
+
properties: {
|
|
806
|
+
name: { type: 'string', description: 'Collection name' },
|
|
807
|
+
description: { type: 'string', description: 'Optional collection description' },
|
|
808
|
+
tags: { type: 'array', items: { type: 'string' }, description: 'Collection tags' },
|
|
809
|
+
scope: { type: 'string', enum: ['session', 'project'], description: 'Collection scope' },
|
|
810
|
+
},
|
|
811
|
+
required: ['name'],
|
|
812
|
+
},
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
name: 'nexus_rag_ingest_collection',
|
|
816
|
+
description: 'Expert surface: ingest local files, URLs, or raw text into a RAG collection.',
|
|
817
|
+
inputSchema: {
|
|
818
|
+
type: 'object',
|
|
819
|
+
properties: {
|
|
820
|
+
collectionId: { type: 'string', description: 'Collection id' },
|
|
821
|
+
inputs: {
|
|
822
|
+
type: 'array',
|
|
823
|
+
items: {
|
|
824
|
+
type: 'object',
|
|
825
|
+
properties: {
|
|
826
|
+
filePath: { type: 'string' },
|
|
827
|
+
url: { type: 'string' },
|
|
828
|
+
text: { type: 'string' },
|
|
829
|
+
label: { type: 'string' },
|
|
830
|
+
tags: { type: 'array', items: { type: 'string' } },
|
|
831
|
+
},
|
|
832
|
+
},
|
|
833
|
+
description: 'Collection sources',
|
|
834
|
+
},
|
|
835
|
+
},
|
|
836
|
+
required: ['collectionId', 'inputs'],
|
|
837
|
+
},
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
name: 'nexus_rag_attach_collection',
|
|
841
|
+
description: 'Expert surface: attach an existing RAG collection to the active runtime/session.',
|
|
842
|
+
inputSchema: {
|
|
843
|
+
type: 'object',
|
|
844
|
+
properties: {
|
|
845
|
+
collectionId: { type: 'string', description: 'Collection id' },
|
|
846
|
+
},
|
|
847
|
+
required: ['collectionId'],
|
|
848
|
+
},
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
name: 'nexus_rag_detach_collection',
|
|
852
|
+
description: 'Expert surface: detach a RAG collection from the active runtime/session.',
|
|
853
|
+
inputSchema: {
|
|
854
|
+
type: 'object',
|
|
855
|
+
properties: {
|
|
856
|
+
collectionId: { type: 'string', description: 'Collection id' },
|
|
857
|
+
},
|
|
858
|
+
required: ['collectionId'],
|
|
859
|
+
},
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
name: 'nexus_rag_delete_collection',
|
|
863
|
+
description: 'Expert surface: delete a RAG collection from Nexus state.',
|
|
864
|
+
inputSchema: {
|
|
865
|
+
type: 'object',
|
|
866
|
+
properties: {
|
|
867
|
+
collectionId: { type: 'string', description: 'Collection id' },
|
|
868
|
+
},
|
|
869
|
+
required: ['collectionId'],
|
|
870
|
+
},
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
name: 'nexus_pattern_search',
|
|
874
|
+
description: 'Expert surface: search bounded orchestration pattern cards that can shape a run.',
|
|
875
|
+
inputSchema: {
|
|
876
|
+
type: 'object',
|
|
877
|
+
properties: {
|
|
878
|
+
query: { type: 'string', description: 'Pattern search query' },
|
|
879
|
+
limit: { type: 'number', description: 'Optional result limit' },
|
|
880
|
+
},
|
|
881
|
+
required: ['query'],
|
|
882
|
+
},
|
|
883
|
+
},
|
|
884
|
+
{
|
|
885
|
+
name: 'nexus_pattern_list',
|
|
886
|
+
description: 'Expert surface: list the top bounded orchestration pattern cards available to Nexus Prime.',
|
|
887
|
+
inputSchema: {
|
|
888
|
+
type: 'object',
|
|
889
|
+
properties: {
|
|
890
|
+
limit: { type: 'number', description: 'Optional result limit' },
|
|
891
|
+
},
|
|
892
|
+
},
|
|
893
|
+
},
|
|
894
|
+
{
|
|
895
|
+
name: 'nexus_knowledge_provenance',
|
|
896
|
+
description: 'Expert surface: inspect the latest knowledge-fabric provenance trace for the active runtime.',
|
|
897
|
+
inputSchema: {
|
|
898
|
+
type: 'object',
|
|
899
|
+
properties: {},
|
|
900
|
+
},
|
|
901
|
+
},
|
|
783
902
|
{
|
|
784
903
|
name: 'nexus_run_status',
|
|
785
904
|
description: 'Return the current recorded state of a runtime execution run.',
|
|
@@ -1031,6 +1150,7 @@ export class MCPAdapter {
|
|
|
1031
1150
|
shortlist: bootstrap.shortlist,
|
|
1032
1151
|
tokenOptimization: bootstrap.tokenOptimization,
|
|
1033
1152
|
reviewGates: bootstrap.reviewGates,
|
|
1153
|
+
knowledgeFabric: bootstrap.knowledgeFabric,
|
|
1034
1154
|
mcpToolProfile: this.getToolProfile(),
|
|
1035
1155
|
}, null, 2),
|
|
1036
1156
|
}],
|
|
@@ -1912,6 +2032,82 @@ export class MCPAdapter {
|
|
|
1912
2032
|
}],
|
|
1913
2033
|
};
|
|
1914
2034
|
}
|
|
2035
|
+
case 'nexus_rag_list_collections': {
|
|
2036
|
+
const collections = this.getOrchestrator().listRagCollections();
|
|
2037
|
+
return {
|
|
2038
|
+
content: [{
|
|
2039
|
+
type: 'text',
|
|
2040
|
+
text: JSON.stringify({
|
|
2041
|
+
total: collections.length,
|
|
2042
|
+
collections,
|
|
2043
|
+
}, null, 2),
|
|
2044
|
+
}],
|
|
2045
|
+
};
|
|
2046
|
+
}
|
|
2047
|
+
case 'nexus_rag_create_collection': {
|
|
2048
|
+
const name = String(request.params.arguments?.name ?? '');
|
|
2049
|
+
const description = request.params.arguments?.description ? String(request.params.arguments.description) : undefined;
|
|
2050
|
+
const tags = Array.isArray(request.params.arguments?.tags)
|
|
2051
|
+
? request.params.arguments.tags.map(String)
|
|
2052
|
+
: [];
|
|
2053
|
+
const scope = String(request.params.arguments?.scope ?? 'session') === 'project' ? 'project' : 'session';
|
|
2054
|
+
const collection = this.getOrchestrator().createRagCollection({ name, description, tags, scope });
|
|
2055
|
+
return {
|
|
2056
|
+
content: [{
|
|
2057
|
+
type: 'text',
|
|
2058
|
+
text: JSON.stringify(collection, null, 2),
|
|
2059
|
+
}],
|
|
2060
|
+
};
|
|
2061
|
+
}
|
|
2062
|
+
case 'nexus_rag_ingest_collection': {
|
|
2063
|
+
const collectionId = String(request.params.arguments?.collectionId ?? '');
|
|
2064
|
+
const inputs = Array.isArray(request.params.arguments?.inputs)
|
|
2065
|
+
? request.params.arguments.inputs.map((entry) => ({
|
|
2066
|
+
filePath: entry?.filePath ? String(entry.filePath) : undefined,
|
|
2067
|
+
url: entry?.url ? String(entry.url) : undefined,
|
|
2068
|
+
text: entry?.text ? String(entry.text) : undefined,
|
|
2069
|
+
label: entry?.label ? String(entry.label) : undefined,
|
|
2070
|
+
tags: Array.isArray(entry?.tags) ? entry.tags.map(String) : [],
|
|
2071
|
+
}))
|
|
2072
|
+
: [];
|
|
2073
|
+
const result = await this.getOrchestrator().ingestRagCollection(collectionId, inputs);
|
|
2074
|
+
return {
|
|
2075
|
+
content: [{
|
|
2076
|
+
type: 'text',
|
|
2077
|
+
text: JSON.stringify(result, null, 2),
|
|
2078
|
+
}],
|
|
2079
|
+
};
|
|
2080
|
+
}
|
|
2081
|
+
case 'nexus_rag_attach_collection': {
|
|
2082
|
+
const collectionId = String(request.params.arguments?.collectionId ?? '');
|
|
2083
|
+
const collection = this.getOrchestrator().attachRagCollection(collectionId);
|
|
2084
|
+
return {
|
|
2085
|
+
content: [{
|
|
2086
|
+
type: 'text',
|
|
2087
|
+
text: JSON.stringify(collection, null, 2),
|
|
2088
|
+
}],
|
|
2089
|
+
};
|
|
2090
|
+
}
|
|
2091
|
+
case 'nexus_rag_detach_collection': {
|
|
2092
|
+
const collectionId = String(request.params.arguments?.collectionId ?? '');
|
|
2093
|
+
const collection = this.getOrchestrator().detachRagCollection(collectionId);
|
|
2094
|
+
return {
|
|
2095
|
+
content: [{
|
|
2096
|
+
type: 'text',
|
|
2097
|
+
text: JSON.stringify(collection, null, 2),
|
|
2098
|
+
}],
|
|
2099
|
+
};
|
|
2100
|
+
}
|
|
2101
|
+
case 'nexus_rag_delete_collection': {
|
|
2102
|
+
const collectionId = String(request.params.arguments?.collectionId ?? '');
|
|
2103
|
+
const removed = this.getOrchestrator().deleteRagCollection(collectionId);
|
|
2104
|
+
return {
|
|
2105
|
+
content: [{
|
|
2106
|
+
type: 'text',
|
|
2107
|
+
text: JSON.stringify({ collectionId, removed }, null, 2),
|
|
2108
|
+
}],
|
|
2109
|
+
};
|
|
2110
|
+
}
|
|
1915
2111
|
case 'nexus_list_workflows': {
|
|
1916
2112
|
const workflows = this.getRuntime().listWorkflows();
|
|
1917
2113
|
return {
|
|
@@ -1971,6 +2167,42 @@ export class MCPAdapter {
|
|
|
1971
2167
|
}],
|
|
1972
2168
|
};
|
|
1973
2169
|
}
|
|
2170
|
+
case 'nexus_pattern_search': {
|
|
2171
|
+
const query = String(request.params.arguments?.query ?? '');
|
|
2172
|
+
const limit = Number(request.params.arguments?.limit ?? 6);
|
|
2173
|
+
const results = this.getOrchestrator().searchPatterns(query, limit);
|
|
2174
|
+
return {
|
|
2175
|
+
content: [{
|
|
2176
|
+
type: 'text',
|
|
2177
|
+
text: JSON.stringify({
|
|
2178
|
+
total: results.length,
|
|
2179
|
+
patterns: results,
|
|
2180
|
+
}, null, 2),
|
|
2181
|
+
}],
|
|
2182
|
+
};
|
|
2183
|
+
}
|
|
2184
|
+
case 'nexus_pattern_list': {
|
|
2185
|
+
const limit = Number(request.params.arguments?.limit ?? 8);
|
|
2186
|
+
const results = this.getOrchestrator().listPatterns().slice(0, Math.max(1, limit));
|
|
2187
|
+
return {
|
|
2188
|
+
content: [{
|
|
2189
|
+
type: 'text',
|
|
2190
|
+
text: JSON.stringify({
|
|
2191
|
+
total: results.length,
|
|
2192
|
+
patterns: results,
|
|
2193
|
+
}, null, 2),
|
|
2194
|
+
}],
|
|
2195
|
+
};
|
|
2196
|
+
}
|
|
2197
|
+
case 'nexus_knowledge_provenance': {
|
|
2198
|
+
const provenance = this.getOrchestrator().getKnowledgeFabricProvenance();
|
|
2199
|
+
return {
|
|
2200
|
+
content: [{
|
|
2201
|
+
type: 'text',
|
|
2202
|
+
text: JSON.stringify(provenance, null, 2),
|
|
2203
|
+
}],
|
|
2204
|
+
};
|
|
2205
|
+
}
|
|
1974
2206
|
case 'nexus_run_status': {
|
|
1975
2207
|
const runId = String(request.params.arguments?.runId ?? '');
|
|
1976
2208
|
const run = this.getRuntime().getRun(runId);
|
|
@@ -2343,7 +2575,7 @@ export class MCPAdapter {
|
|
|
2343
2575
|
this.connected = false;
|
|
2344
2576
|
console.error('[MCP Adapter] Disconnected');
|
|
2345
2577
|
}
|
|
2346
|
-
async send(
|
|
2347
|
-
receive(
|
|
2578
|
+
async send(message) { void message; }
|
|
2579
|
+
receive(message) { void message; }
|
|
2348
2580
|
}
|
|
2349
2581
|
//# sourceMappingURL=mcp.js.map
|