Skip to content

Commit d504619

Browse files
committed
more fixes
1 parent 1217f18 commit d504619

7 files changed

Lines changed: 21 additions & 24 deletions

File tree

.vscode/mcp.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"servers": {
3-
"boxlang-mcp": {
4-
"url": "http://127.0.0.1:8181/~bxmcp/boxlang.bxm",
3+
"cbMCP": {
4+
"url": "http://127.0.0.1:60299/cbmcp",
55
"type": "http"
66
}
77
},

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Every tool method uses `<tool-prefix>_<action>_<subject>` format in `snake_case`
6161

6262
| Tool Class | Prefix | Examples |
6363
|---|---|---|
64-
| `AsyncTools` | `async_` | `async_get_all()`, `async_get_names()` |
64+
| `AsyncTools` | `async_` | `async_get_executors()`, `async_get_executor_names()` |
6565
| `CacheBoxTools` | `cachebox_` | `cachebox_get_all()`, `cachebox_has_key()`, `cachebox_clear_all()` |
6666
| `HandlerTools` | `handler_` | `handler_get_all()`, `handler_get()` |
6767
| `InterceptorTools` | `interceptor_` | `interceptor_get_all()`, `interceptor_get_states()` |

models/tools/AsyncTools.bx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class extends="BaseTool"{
1111
*/
1212
@mcpTool
1313
@AITool
14-
function async_get_all() {
14+
function async_get_executors() {
1515
return application.cbController.getAsyncManager().getExecutorStatusMap()
1616
}
1717

@@ -21,7 +21,7 @@ class extends="BaseTool"{
2121
*/
2222
@mcpTool
2323
@AITool
24-
function async_get_names() {
24+
function async_get_executor_names() {
2525
return application.cbController.getAsyncManager().getExecutors().keyArray().sort()
2626
}
2727

@@ -37,7 +37,7 @@ class extends="BaseTool"{
3737
*/
3838
@mcpTool
3939
@AITool
40-
function async_get_health() {
40+
function async_get_executors_health() {
4141
var executors = application.cbController.getAsyncManager().getExecutorStatusMap()
4242
var report = _newHealthReport()
4343
var total = executors.len()
@@ -57,17 +57,17 @@ class extends="BaseTool"{
5757
case "idle": idle++; break
5858
case "degraded":
5959
degraded++
60-
_addIssue( report, "warning", "EXECUTOR_DEGRADED", "Executor '#name#' is degraded", "Review executor stats using async_get_all()", name, { "status" : status } )
60+
_addIssue( report, "warning", "EXECUTOR_DEGRADED", "Executor '#name#' is degraded", "Review executor stats using async_get_executors()", name, { "status" : status } )
6161
break
6262
case "shutdown":
6363
shutdown++
6464
critical++
65-
_addIssue( report, "critical", "EXECUTOR_SHUTDOWN", "Executor '#name#' is shutdown", "Review executor stats using async_get_all()", name, { "status" : status } )
65+
_addIssue( report, "critical", "EXECUTOR_SHUTDOWN", "Executor '#name#' is shutdown", "Review executor stats using async_get_executors()", name, { "status" : status } )
6666
break
6767
case "terminated":
6868
terminated++
6969
critical++
70-
_addIssue( report, "critical", "EXECUTOR_TERMINATED", "Executor '#name#' is terminated", "Review executor stats using async_get_all()", name, { "status" : status } )
70+
_addIssue( report, "critical", "EXECUTOR_TERMINATED", "Executor '#name#' is terminated", "Review executor stats using async_get_executors()", name, { "status" : status } )
7171
break
7272
}
7373
} )

models/tools/SystemTools.bx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class extends="BaseTool"{
116116
function system_get_health() {
117117
var subsystems = {}
118118

119-
subsystems.async = _safeHealthCall( () => new AsyncTools().async_get_health(), "async" )
119+
subsystems.async = _safeHealthCall( () => new AsyncTools().async_get_executors_health(), "async" )
120120
subsystems.cachebox = _safeHealthCall( () => new CacheBoxTools().cachebox_get_health(), "cachebox" )
121121
subsystems.scheduler = _safeHealthCall( () => new SchedulerTools().scheduler_get_health(), "scheduler" )
122122
subsystems.logbox = _safeHealthCall( () => new LogBoxTools().logbox_get_health(), "logbox" )

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,8 @@ The server exposes tools across 11 ColdBox domains. Each tool is an `@mcpTool`-a
387387

388388
| Tool | Description |
389389
|---|---|
390-
| `async_get_all` | All registered async executors with status, thread pool info, and task statistics |
391-
| `async_get_names` | Sorted list of registered executor names |
390+
| `async_get_executors` | All registered async executors with status, thread pool info, and task statistics |
391+
| `async_get_executor_names` | Sorted list of registered executor names |
392392

393393
---
394394

test-harness/Application.bx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ class{
8080
// ormReload();
8181
}
8282

83-
structDelete( application, "cbController" )
84-
application.cbBootstrap.onApplicationStart();
85-
8683
// Process ColdBox Request
8784
application.cbBootstrap.onRequestStart( arguments.targetPage );
8885

test-harness/tests/specs/tools/AsyncToolsSpec.bx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ class extends="coldbox.system.testing.BaseTestCase" {
2121
} )
2222

2323
it( "can get all async executors as a struct", function() {
24-
var result = tool.async_get_all()
24+
var result = tool.async_get_executors()
2525
expect( result ).toBeStruct()
2626
expect( result.len() ).toBeGT( 0 )
2727
} )
2828

2929
it( "returns executor entries with expected keys", function() {
30-
var result = tool.async_get_all()
30+
var result = tool.async_get_executors()
3131
var firstKey = result.keyArray()[ 1 ]
3232
var first = result[ firstKey ]
3333
expect( first ).toHaveKey( "type" )
@@ -41,30 +41,30 @@ class extends="coldbox.system.testing.BaseTestCase" {
4141
} )
4242

4343
it( "all executors report a shutdown and terminated status", function() {
44-
var result = tool.async_get_all()
44+
var result = tool.async_get_executors()
4545
result.each( ( name, executor ) => {
4646
expect( executor.isShutdown ).toBeBoolean()
4747
expect( executor.isTerminated ).toBeBoolean()
4848
} )
4949
} )
5050

5151
it( "can get all async executor names", function() {
52-
var result = tool.async_get_names()
52+
var result = tool.async_get_executor_names()
5353
expect( result ).toBeArray()
5454
expect( result.len() ).toBeGT( 0 )
5555
expect( result[ 1 ] ).toBeString()
5656
} )
5757

58-
it( "executor names match the keys from async_get_all", function() {
59-
var names = tool.async_get_names()
60-
var statuses = tool.async_get_all()
58+
it( "executor names match the keys from async_get_executors", function() {
59+
var names = tool.async_get_executor_names()
60+
var statuses = tool.async_get_executors()
6161
names.each( ( name ) => {
6262
expect( statuses ).toHaveKey( name )
6363
} )
6464
} )
6565

6666
it( "can get async executor health", function() {
67-
var result = tool.async_get_health()
67+
var result = tool.async_get_executors_health()
6868
expect( result ).toBeStruct()
6969
expect( result ).toHaveKey( "status" )
7070
expect( result ).toHaveKey( "score" )
@@ -75,7 +75,7 @@ class extends="coldbox.system.testing.BaseTestCase" {
7575
} )
7676

7777
it( "async health issues are structurally valid", function() {
78-
var result = tool.async_get_health()
78+
var result = tool.async_get_executors_health()
7979
result.issues.each( ( issue ) => {
8080
expect( issue ).toHaveKey( "severity" )
8181
expect( issue ).toHaveKey( "code" )

0 commit comments

Comments
 (0)