archgraph-argo 0.10.4 → 0.10.6
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/argo/defaults/EA-model-template.feap +0 -0
- package/argo/defaults/design/KG/SystemArchitecture.json +82 -82
- package/argo/rules/archgraph.instructions.md +4 -0
- package/argo/scripts/argo-mcp-server.js +11 -7
- package/argo/scripts/argo-paths.js +4 -22
- package/argo/scripts/systemarchitecture-mcp-server.js +27 -19
- package/argo/scripts/validator-mcp-server.js +5 -5
- package/install-argo.ps1 +11 -17
- package/package.json +1 -4
|
Binary file
|
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "System",
|
|
3
|
-
"description": "Exported from EA package System
|
|
4
|
-
"elements": [
|
|
5
|
-
{
|
|
6
|
-
"id": "1240",
|
|
7
|
-
"name": "Application Cooperation Viewpoint",
|
|
8
|
-
"alias": "1211",
|
|
9
|
-
"type": "Grouping",
|
|
10
|
-
"subdiagram_views": [
|
|
11
|
-
{
|
|
12
|
-
"view_id": "169",
|
|
13
|
-
"view_name": "Application Cooperation"
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"id": "1249",
|
|
19
|
-
"name": "Implementation and Migration Viewpoint",
|
|
20
|
-
"alias": "1211",
|
|
21
|
-
"type": "Grouping",
|
|
22
|
-
"subdiagram_views": [
|
|
23
|
-
{
|
|
24
|
-
"view_id": "176",
|
|
25
|
-
"view_name": "AgentCapabilities"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"view_id": "174",
|
|
29
|
-
"view_name": "Implementation and Migration"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
32
|
-
}
|
|
33
|
-
],
|
|
34
|
-
"relationships": [
|
|
35
|
-
{
|
|
36
|
-
"id": "1161",
|
|
37
|
-
"statement": "Implementation and Migration Viewpoint --(Association)--> Application Cooperation Viewpoint",
|
|
38
|
-
"name": "Association",
|
|
39
|
-
"type": "Association",
|
|
40
|
-
"source_id": "1249",
|
|
41
|
-
"target_id": "1240",
|
|
42
|
-
"source_name": "Implementation and Migration Viewpoint",
|
|
43
|
-
"target_name": "Application Cooperation Viewpoint"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"views": [
|
|
47
|
-
{
|
|
48
|
-
"view_id": "176",
|
|
49
|
-
"view_name": "AgentCapabilities",
|
|
50
|
-
"parent_element_id": "1249",
|
|
51
|
-
"parent_element_name": "Implementation and Migration Viewpoint",
|
|
52
|
-
"included_elements": [],
|
|
53
|
-
"included_relationships": []
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"view_id": "174",
|
|
57
|
-
"view_name": "Implementation and Migration",
|
|
58
|
-
"parent_element_id": "1249",
|
|
59
|
-
"parent_element_name": "Implementation and Migration Viewpoint",
|
|
60
|
-
"included_elements": [],
|
|
61
|
-
"included_relationships": []
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
"view_id": "169",
|
|
65
|
-
"view_name": "Application Cooperation",
|
|
66
|
-
"parent_element_id": "1240",
|
|
67
|
-
"parent_element_name": "Application Cooperation Viewpoint",
|
|
68
|
-
"included_elements": [],
|
|
69
|
-
"included_relationships": []
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
"view_id": "170",
|
|
73
|
-
"view_name": "SystemArchitecture",
|
|
74
|
-
"included_elements": [
|
|
75
|
-
"1249",
|
|
76
|
-
"1240"
|
|
77
|
-
],
|
|
78
|
-
"included_relationships": [
|
|
79
|
-
"1161"
|
|
80
|
-
]
|
|
81
|
-
}
|
|
82
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"name": "System",
|
|
3
|
+
"description": "Exported from EA package System",
|
|
4
|
+
"elements": [
|
|
5
|
+
{
|
|
6
|
+
"id": "1240",
|
|
7
|
+
"name": "Application Cooperation Viewpoint",
|
|
8
|
+
"alias": "1211",
|
|
9
|
+
"type": "Grouping",
|
|
10
|
+
"subdiagram_views": [
|
|
11
|
+
{
|
|
12
|
+
"view_id": "169",
|
|
13
|
+
"view_name": "Application Cooperation"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "1249",
|
|
19
|
+
"name": "Implementation and Migration Viewpoint",
|
|
20
|
+
"alias": "1211",
|
|
21
|
+
"type": "Grouping",
|
|
22
|
+
"subdiagram_views": [
|
|
23
|
+
{
|
|
24
|
+
"view_id": "176",
|
|
25
|
+
"view_name": "AgentCapabilities"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"view_id": "174",
|
|
29
|
+
"view_name": "Implementation and Migration"
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"relationships": [
|
|
35
|
+
{
|
|
36
|
+
"id": "1161",
|
|
37
|
+
"statement": "Implementation and Migration Viewpoint --(Association)--> Application Cooperation Viewpoint",
|
|
38
|
+
"name": "Association",
|
|
39
|
+
"type": "Association",
|
|
40
|
+
"source_id": "1249",
|
|
41
|
+
"target_id": "1240",
|
|
42
|
+
"source_name": "Implementation and Migration Viewpoint",
|
|
43
|
+
"target_name": "Application Cooperation Viewpoint"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
"views": [
|
|
47
|
+
{
|
|
48
|
+
"view_id": "176",
|
|
49
|
+
"view_name": "AgentCapabilities",
|
|
50
|
+
"parent_element_id": "1249",
|
|
51
|
+
"parent_element_name": "Implementation and Migration Viewpoint",
|
|
52
|
+
"included_elements": [],
|
|
53
|
+
"included_relationships": []
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"view_id": "174",
|
|
57
|
+
"view_name": "Implementation and Migration",
|
|
58
|
+
"parent_element_id": "1249",
|
|
59
|
+
"parent_element_name": "Implementation and Migration Viewpoint",
|
|
60
|
+
"included_elements": [],
|
|
61
|
+
"included_relationships": []
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"view_id": "169",
|
|
65
|
+
"view_name": "Application Cooperation",
|
|
66
|
+
"parent_element_id": "1240",
|
|
67
|
+
"parent_element_name": "Application Cooperation Viewpoint",
|
|
68
|
+
"included_elements": [],
|
|
69
|
+
"included_relationships": []
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"view_id": "170",
|
|
73
|
+
"view_name": "SystemArchitecture",
|
|
74
|
+
"included_elements": [
|
|
75
|
+
"1249",
|
|
76
|
+
"1240"
|
|
77
|
+
],
|
|
78
|
+
"included_relationships": [
|
|
79
|
+
"1161"
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
83
|
}
|
|
@@ -95,4 +95,8 @@ You MUST read/write the intent architecture through the tools provided by the AR
|
|
|
95
95
|
13. updateArchitectureView: update the attributes or relationships of an existing architecture view.
|
|
96
96
|
14. removeArchitectureView: remove an existing architecture view.
|
|
97
97
|
15. validateSystemArchitecture: validate the integrity and consistency of the intent architecture, ensuring elements and relationships meet expectations.
|
|
98
|
+
|
|
99
|
+
<Attention>
|
|
100
|
+
you MUST make sure the knowledge graph the ARGO MCP server is handling is actually the one in this repository (design/KG/SystemArchitecture.json) and not some other knowledge graph; otherwise, you MUST stop and report the issue to your human partner before doing anything else.
|
|
101
|
+
</Attention>
|
|
98
102
|
</ToolsGuideline>
|
|
@@ -306,14 +306,14 @@ const TOOLS = [
|
|
|
306
306
|
];
|
|
307
307
|
|
|
308
308
|
// Every tool accepts an optional per-call `workspaceRoot` (absolute path,
|
|
309
|
-
// honored
|
|
310
|
-
//
|
|
309
|
+
// honored unconditionally when provided). The DeepSeek Harness bridge injects
|
|
310
|
+
// the current session's workspace directory here automatically.
|
|
311
311
|
// (tools/list dedupes with systemArchitectureMcp/validatorMcp tools, which
|
|
312
312
|
// carry the same field; this covers the local-only rows like initializeWorkspace.)
|
|
313
313
|
const WORKSPACE_ROOT_PARAM = Object.freeze({
|
|
314
314
|
type: 'string',
|
|
315
315
|
description:
|
|
316
|
-
'Optional absolute workspace root for this call.
|
|
316
|
+
'Optional absolute workspace root for this call. When provided it is used as-is; otherwise the server launch directory is used.',
|
|
317
317
|
});
|
|
318
318
|
for (const tool of TOOLS) {
|
|
319
319
|
const inputSchema = tool && tool.inputSchema;
|
|
@@ -395,8 +395,8 @@ function resolveWorkspaceRoot() {
|
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
function resolveWorkspaceRoot(args) {
|
|
398
|
-
// Per-call workspaceRoot override
|
|
399
|
-
//
|
|
398
|
+
// Per-call workspaceRoot override, honored unconditionally when provided;
|
|
399
|
+
// defaults to the launch-directory root.
|
|
400
400
|
return resolveCallWorkspaceRoot(args);
|
|
401
401
|
}
|
|
402
402
|
|
|
@@ -405,7 +405,9 @@ async function callTool(name, args = {}, progressToken = null, dependencies = un
|
|
|
405
405
|
if (name === 'initializeWorkspace') {
|
|
406
406
|
const workspace = await initializeWorkspace(resolveWorkspaceRoot(args));
|
|
407
407
|
const composition = canonicalSemanticInitStorage.getStore()
|
|
408
|
-
|| systemArchitectureMcp.createDefaultCanonicalSemanticInitComposition(
|
|
408
|
+
|| systemArchitectureMcp.createDefaultCanonicalSemanticInitComposition({
|
|
409
|
+
repositoryRoot: resolveWorkspaceRoot(args),
|
|
410
|
+
});
|
|
409
411
|
const semanticLifecycle = await runCanonicalSemanticInit(composition, {
|
|
410
412
|
repositoryRoot: resolveWorkspaceRoot(args),
|
|
411
413
|
workspace,
|
|
@@ -675,7 +677,9 @@ async function handleRequest(request, dependencies = undefined) {
|
|
|
675
677
|
) {
|
|
676
678
|
activeDependencies = {
|
|
677
679
|
semanticOperatorJourney:
|
|
678
|
-
await systemArchitectureMcp.createDefaultProductionSemanticOperatorJourney(
|
|
680
|
+
await systemArchitectureMcp.createDefaultProductionSemanticOperatorJourney({
|
|
681
|
+
repositoryRoot: resolveWorkspaceRoot(params.arguments),
|
|
682
|
+
}),
|
|
679
683
|
};
|
|
680
684
|
}
|
|
681
685
|
const result = await callTool(
|
|
@@ -125,17 +125,14 @@ function normalizeRelativePath(value) {
|
|
|
125
125
|
* Resolve the workspace root for one tool call.
|
|
126
126
|
*
|
|
127
127
|
* Defaults to the launch-directory root (`getWorkspaceRoot()`). A per-call
|
|
128
|
-
* `workspaceRoot` argument (absolute path) is honored
|
|
129
|
-
* the
|
|
130
|
-
*
|
|
131
|
-
* deployments keep launch-directory resolution with zero behavior change.
|
|
132
|
-
* This powers the DeepSeek Harness bridge, which injects the current session's
|
|
128
|
+
* `workspaceRoot` argument (absolute path) is honored unconditionally when
|
|
129
|
+
* present, so the caller decides which workspace this call operates on. This
|
|
130
|
+
* powers the DeepSeek Harness bridge, which injects the current session's
|
|
133
131
|
* workspace directory into every call so one dsh instance can follow the
|
|
134
132
|
* workspace the user switched to.
|
|
135
133
|
*
|
|
136
134
|
* @param {object} [args] - tool call arguments (may carry `workspaceRoot`).
|
|
137
135
|
* @returns {string} resolved absolute workspace root.
|
|
138
|
-
* @throws when the requested root is not in the allowlist.
|
|
139
136
|
*/
|
|
140
137
|
function resolveCallWorkspaceRoot(args = {}) {
|
|
141
138
|
const requested =
|
|
@@ -145,22 +142,7 @@ function resolveCallWorkspaceRoot(args = {}) {
|
|
|
145
142
|
if (requested === '') {
|
|
146
143
|
return getWorkspaceRoot();
|
|
147
144
|
}
|
|
148
|
-
|
|
149
|
-
.split(/[;,]/)
|
|
150
|
-
.map((entry) => entry.trim())
|
|
151
|
-
.filter(Boolean)
|
|
152
|
-
.map((entry) => path.resolve(entry));
|
|
153
|
-
if (allowlist.length === 0) {
|
|
154
|
-
return getWorkspaceRoot();
|
|
155
|
-
}
|
|
156
|
-
const resolved = path.resolve(requested);
|
|
157
|
-
const allowed = allowlist.some(
|
|
158
|
-
(root) => resolved === root || resolved.startsWith(root + path.sep),
|
|
159
|
-
);
|
|
160
|
-
if (!allowed) {
|
|
161
|
-
throw new Error(`workspaceRoot not in ARGO_WORKSPACE_ROOTS allowlist: ${requested}`);
|
|
162
|
-
}
|
|
163
|
-
return resolved;
|
|
145
|
+
return path.resolve(requested);
|
|
164
146
|
}
|
|
165
147
|
|
|
166
148
|
module.exports = {
|
|
@@ -382,12 +382,12 @@ const TOOLS = [
|
|
|
382
382
|
];
|
|
383
383
|
|
|
384
384
|
// Every tool accepts an optional per-call `workspaceRoot` (absolute path,
|
|
385
|
-
// honored
|
|
386
|
-
//
|
|
385
|
+
// honored unconditionally when provided). The DeepSeek Harness bridge injects
|
|
386
|
+
// the current session's workspace directory here automatically.
|
|
387
387
|
const WORKSPACE_ROOT_PARAM = Object.freeze({
|
|
388
388
|
type: 'string',
|
|
389
389
|
description:
|
|
390
|
-
'Optional absolute workspace root for this call.
|
|
390
|
+
'Optional absolute workspace root for this call. When provided it is used as-is; otherwise the server launch directory is used.',
|
|
391
391
|
});
|
|
392
392
|
for (const tool of TOOLS) {
|
|
393
393
|
const inputSchema = tool && tool.inputSchema;
|
|
@@ -466,8 +466,8 @@ function mutationInputSchema() {
|
|
|
466
466
|
}
|
|
467
467
|
|
|
468
468
|
function resolveWorkspaceRoot(args) {
|
|
469
|
-
// Per-call workspaceRoot override
|
|
470
|
-
//
|
|
469
|
+
// Per-call workspaceRoot override, honored unconditionally when provided;
|
|
470
|
+
// defaults to the launch-directory root.
|
|
471
471
|
return resolveCallWorkspaceRoot(args);
|
|
472
472
|
}
|
|
473
473
|
|
|
@@ -1418,7 +1418,7 @@ async function attachMutationEmbeddingLifecycle(context, result, document) {
|
|
|
1418
1418
|
const lifecycle = require(
|
|
1419
1419
|
'./graph-rag/mutationEmbeddingVectorLifecycle.js'
|
|
1420
1420
|
).createPersistentMutationEmbeddingLifecycle({
|
|
1421
|
-
repositoryRoot:
|
|
1421
|
+
repositoryRoot: context.workspaceRoot,
|
|
1422
1422
|
});
|
|
1423
1423
|
const embeddingLifecycle = await lifecycle.reconcile({
|
|
1424
1424
|
canonicalWrite: {
|
|
@@ -1946,7 +1946,7 @@ async function callTool(name, args = {}, dependencies = undefined) {
|
|
|
1946
1946
|
|
|
1947
1947
|
if (name === 'generateArchitectureDiffPlantuml') {
|
|
1948
1948
|
return toolResult(architectureDiffPlantuml.generateArchitectureDiffPlantuml({
|
|
1949
|
-
workspaceRoot: resolveWorkspaceRoot(),
|
|
1949
|
+
workspaceRoot: resolveWorkspaceRoot(args),
|
|
1950
1950
|
architecturePath: args.architecturePath,
|
|
1951
1951
|
outputDir: args.outputDir,
|
|
1952
1952
|
}));
|
|
@@ -2026,7 +2026,12 @@ async function resolveSemanticOperatorJourney(dependencies) {
|
|
|
2026
2026
|
}
|
|
2027
2027
|
|
|
2028
2028
|
async function executeSemanticSystemArchitectureQuery(args, dependencies) {
|
|
2029
|
-
const context = await loadContext(
|
|
2029
|
+
const context = await loadContext({
|
|
2030
|
+
...(args || {}),
|
|
2031
|
+
...(dependencies && dependencies.repositoryRoot
|
|
2032
|
+
? { workspaceRoot: dependencies.repositoryRoot }
|
|
2033
|
+
: {}),
|
|
2034
|
+
});
|
|
2030
2035
|
const query = args.query;
|
|
2031
2036
|
const contractOptions = semanticContractOptions(args, dependencies);
|
|
2032
2037
|
const canonicalSubsetContract = isCanonicalSubsetSemanticContract(query, contractOptions);
|
|
@@ -2642,6 +2647,7 @@ async function createDefaultProductionSemanticOperatorJourney(options = {}) {
|
|
|
2642
2647
|
querySystemArchitecture: request => executeSemanticSystemArchitectureQuery(request, {
|
|
2643
2648
|
semanticRetrievalBoundary: retrieval,
|
|
2644
2649
|
canonicalSubsetForNoAnchor: true,
|
|
2650
|
+
repositoryRoot: workspaceRoot,
|
|
2645
2651
|
}),
|
|
2646
2652
|
});
|
|
2647
2653
|
return Object.freeze({
|
|
@@ -2650,8 +2656,8 @@ async function createDefaultProductionSemanticOperatorJourney(options = {}) {
|
|
|
2650
2656
|
});
|
|
2651
2657
|
}
|
|
2652
2658
|
|
|
2653
|
-
function createDefaultCanonicalSemanticInitComposition() {
|
|
2654
|
-
const repositoryRoot = resolveWorkspaceRoot();
|
|
2659
|
+
function createDefaultCanonicalSemanticInitComposition(options = {}) {
|
|
2660
|
+
const repositoryRoot = options.repositoryRoot || resolveWorkspaceRoot();
|
|
2655
2661
|
const readinessStore = createProductionSemanticReadinessStore({ repositoryRoot });
|
|
2656
2662
|
const graphPath = resolveWorkspacePath(repositoryRoot, DEFAULT_GRAPH_PATH);
|
|
2657
2663
|
const canonicalGraph = readJson(graphPath.absolutePath, graphPath.relativePath);
|
|
@@ -2671,7 +2677,7 @@ function createDefaultCanonicalSemanticInitComposition() {
|
|
|
2671
2677
|
}),
|
|
2672
2678
|
productionGraphRagRuntime: Object.freeze({
|
|
2673
2679
|
async runSemanticBackfill(request) {
|
|
2674
|
-
const runtime = await createDefaultProductionSemanticRuntime();
|
|
2680
|
+
const runtime = await createDefaultProductionSemanticRuntime({ repositoryRoot });
|
|
2675
2681
|
try {
|
|
2676
2682
|
return await runtime.runSemanticBackfill(request);
|
|
2677
2683
|
} finally {
|
|
@@ -2739,9 +2745,9 @@ function createDefaultCanonicalSemanticInitComposition() {
|
|
|
2739
2745
|
});
|
|
2740
2746
|
}
|
|
2741
2747
|
|
|
2742
|
-
async function createDefaultProductionSemanticRuntime() {
|
|
2743
|
-
const workspaceRoot = resolveWorkspaceRoot();
|
|
2744
|
-
const configuration = await resolveDefaultSemanticConfiguration();
|
|
2748
|
+
async function createDefaultProductionSemanticRuntime(options = {}) {
|
|
2749
|
+
const workspaceRoot = options.repositoryRoot || resolveWorkspaceRoot();
|
|
2750
|
+
const configuration = await resolveDefaultSemanticConfiguration(workspaceRoot);
|
|
2745
2751
|
const neo4j = require('neo4j-driver');
|
|
2746
2752
|
const driver = neo4j.driver(
|
|
2747
2753
|
configuration.neo4jDatabaseUrl,
|
|
@@ -2854,7 +2860,7 @@ async function createDefaultProductionSemanticRuntime() {
|
|
|
2854
2860
|
});
|
|
2855
2861
|
}
|
|
2856
2862
|
|
|
2857
|
-
async function resolveDefaultSemanticConfiguration() {
|
|
2863
|
+
async function resolveDefaultSemanticConfiguration(repositoryRoot) {
|
|
2858
2864
|
let external;
|
|
2859
2865
|
try {
|
|
2860
2866
|
external = resolveExternalProductionConfig({
|
|
@@ -2862,7 +2868,7 @@ async function resolveDefaultSemanticConfiguration() {
|
|
|
2862
2868
|
neo4jUsername: process.env.ARGO_NEO4J_DATABASE_USERNAME,
|
|
2863
2869
|
neo4jPassword: process.env.ARGO_NEO4J_DATABASE_PASSWORD,
|
|
2864
2870
|
embeddingCredential: process.env.QWEN_KEY,
|
|
2865
|
-
neo4jDatabase: process.env.ARGO_NEO4J_DATABASE || getDefaultSemanticNeo4jDatabaseName(),
|
|
2871
|
+
neo4jDatabase: process.env.ARGO_NEO4J_DATABASE || getDefaultSemanticNeo4jDatabaseName(repositoryRoot),
|
|
2866
2872
|
}, {
|
|
2867
2873
|
operation: 'semantic-backfill',
|
|
2868
2874
|
sourceKeys: new Map([
|
|
@@ -2896,8 +2902,8 @@ async function resolveDefaultSemanticConfiguration() {
|
|
|
2896
2902
|
});
|
|
2897
2903
|
}
|
|
2898
2904
|
|
|
2899
|
-
function getDefaultSemanticNeo4jDatabaseName() {
|
|
2900
|
-
const repoName = path.basename(resolveWorkspaceRoot());
|
|
2905
|
+
function getDefaultSemanticNeo4jDatabaseName(repositoryRoot) {
|
|
2906
|
+
const repoName = path.basename(repositoryRoot || resolveWorkspaceRoot());
|
|
2901
2907
|
const normalized = String(repoName)
|
|
2902
2908
|
.toLowerCase()
|
|
2903
2909
|
.replace(/[^a-z0-9.-]+/g, '-')
|
|
@@ -3011,7 +3017,9 @@ async function handleRequest(request, dependencies = undefined) {
|
|
|
3011
3017
|
&& params.arguments.query.purpose !== 'graph-tidy'
|
|
3012
3018
|
) {
|
|
3013
3019
|
activeDependencies = {
|
|
3014
|
-
semanticOperatorJourney: await createDefaultProductionSemanticOperatorJourney(
|
|
3020
|
+
semanticOperatorJourney: await createDefaultProductionSemanticOperatorJourney({
|
|
3021
|
+
repositoryRoot: resolveWorkspaceRoot(params.arguments),
|
|
3022
|
+
}),
|
|
3015
3023
|
canonicalSubsetForNoAnchor: true,
|
|
3016
3024
|
};
|
|
3017
3025
|
}
|
|
@@ -87,12 +87,12 @@ const TOOLS = [
|
|
|
87
87
|
];
|
|
88
88
|
|
|
89
89
|
// Every tool accepts an optional per-call `workspaceRoot` (absolute path,
|
|
90
|
-
// honored
|
|
91
|
-
//
|
|
90
|
+
// honored unconditionally when provided). The DeepSeek Harness bridge injects
|
|
91
|
+
// the current session's workspace directory here automatically.
|
|
92
92
|
const WORKSPACE_ROOT_PARAM = Object.freeze({
|
|
93
93
|
type: 'string',
|
|
94
94
|
description:
|
|
95
|
-
'Optional absolute workspace root for this call.
|
|
95
|
+
'Optional absolute workspace root for this call. When provided it is used as-is; otherwise the server launch directory is used.',
|
|
96
96
|
});
|
|
97
97
|
for (const tool of TOOLS) {
|
|
98
98
|
const inputSchema = tool && tool.inputSchema;
|
|
@@ -104,8 +104,8 @@ for (const tool of TOOLS) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
function resolveWorkspaceRoot(args) {
|
|
107
|
-
// Per-call workspaceRoot override
|
|
108
|
-
//
|
|
107
|
+
// Per-call workspaceRoot override, honored unconditionally when provided;
|
|
108
|
+
// defaults to the launch-directory root.
|
|
109
109
|
return resolveCallWorkspaceRoot(args);
|
|
110
110
|
}
|
|
111
111
|
|
package/install-argo.ps1
CHANGED
|
@@ -389,8 +389,7 @@ function New-DshWorkspaceBridge {
|
|
|
389
389
|
# (SessionHeader.cwd) as the per-call `workspaceRoot`, so ONE dsh instance
|
|
390
390
|
# follows whichever workspace the user switched to - no model-visible
|
|
391
391
|
# parameters, no internal tool names, no restart. The argo server honors
|
|
392
|
-
#
|
|
393
|
-
# -DshWorkspaces).
|
|
392
|
+
# the injected workspaceRoot unconditionally.
|
|
394
393
|
param(
|
|
395
394
|
[string]$DshHome
|
|
396
395
|
)
|
|
@@ -405,8 +404,7 @@ function New-DshWorkspaceBridge {
|
|
|
405
404
|
// directory (SessionHeader.cwd) as the per-call `workspaceRoot` argument, so
|
|
406
405
|
// one dsh instance follows whichever workspace the user switched to - the
|
|
407
406
|
// model sees no extra parameters and no internal tool names. The argo server
|
|
408
|
-
// honors
|
|
409
|
-
// ARGO_WORKSPACE_ROOTS allowlist.
|
|
407
|
+
// honors the injected workspaceRoot unconditionally.
|
|
410
408
|
//
|
|
411
409
|
// Zero dependencies on purpose: implements the minimal MCP stdio client
|
|
412
410
|
// (JSON-RPC 2.0, one JSON object per line) with Node built-ins only, so the
|
|
@@ -495,8 +493,11 @@ export async function apply(ctx, config) {
|
|
|
495
493
|
render: (_args, value) => value.content,
|
|
496
494
|
},
|
|
497
495
|
execute: async (args, exec) => {
|
|
496
|
+
// SessionHeader.cwd (the durable session workspace), NOT
|
|
497
|
+
// requestHeader() — that returns the request EpochHeader
|
|
498
|
+
// (config/system/tools) which has no cwd field.
|
|
498
499
|
const sessionCwd = exec && exec.agent && exec.agent.session
|
|
499
|
-
? exec.agent.session.
|
|
500
|
+
? exec.agent.session.header?.cwd
|
|
500
501
|
: undefined
|
|
501
502
|
const injected = { ...(args && typeof args === 'object' ? args : {}) }
|
|
502
503
|
if (typeof sessionCwd === 'string' && sessionCwd !== '') {
|
|
@@ -699,8 +700,8 @@ if ($SkipDsh) {
|
|
|
699
700
|
# server (no dsh-mcp-client row), registers every tool as mcp__argo__* and
|
|
700
701
|
# injects the current session's workspace (SessionHeader.cwd) as the
|
|
701
702
|
# per-call workspaceRoot, so one dsh instance follows the workspace the
|
|
702
|
-
# user switched to. The server honors
|
|
703
|
-
#
|
|
703
|
+
# user switched to. The server honors the injected workspaceRoot
|
|
704
|
+
# unconditionally.
|
|
704
705
|
$bridgeDshPath = New-DshWorkspaceBridge -DshHome $DshHome
|
|
705
706
|
if ($bridgeDshPath) {
|
|
706
707
|
$bridgeUrl = 'file:///' + (($bridgeDshPath -replace '\\', '/').TrimStart('/'))
|
|
@@ -730,16 +731,9 @@ if ($SkipDsh) {
|
|
|
730
731
|
|
|
731
732
|
Write-Host ' Restart `dsh web` to activate the MCP bridge and the wakeup plugin;'
|
|
732
733
|
Write-Host ' new sessions pick up the global rule and the argo-init skill automatically.'
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
Write-Host ' in one dsh instance - no restart needed between workspaces.'
|
|
737
|
-
} else {
|
|
738
|
-
Write-Host ' Multi-workspace: to let one dsh instance follow whichever workspace the user'
|
|
739
|
-
Write-Host ' switches to, re-run with -DshWorkspaces "D:/proj-a;D:/proj-b" (the argo server'
|
|
740
|
-
Write-Host ' only honors workspaces listed in ARGO_WORKSPACE_ROOTS). Without it the server'
|
|
741
|
-
Write-Host ' keeps resolving from the directory dsh was launched from.'
|
|
742
|
-
}
|
|
734
|
+
Write-Host ' The argo tools (mcp__argo__*) auto-follow the workspace the user switched to'
|
|
735
|
+
Write-Host ' in one dsh instance - no restart needed between workspaces (the server honors'
|
|
736
|
+
Write-Host ' the injected workspaceRoot unconditionally).'
|
|
743
737
|
}
|
|
744
738
|
|
|
745
739
|
if ($SkipDeps) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "archgraph-argo",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6",
|
|
4
4
|
"description": "Deploy the ArchGraph ARGO toolchain, skills, and rules (schema, scripts, argo-init skill, global rule) with one command.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -27,8 +27,5 @@
|
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=18"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {
|
|
32
|
-
"archgraph-argo": "^0.10.3"
|
|
33
30
|
}
|
|
34
31
|
}
|