@yemi33/minions 0.1.2181 → 0.1.2183
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/dashboard.js +20 -3
- package/package.json +1 -1
package/dashboard.js
CHANGED
|
@@ -3596,6 +3596,15 @@ const CC_API_FALLBACK_BLOCKED_PREFIXES = [
|
|
|
3596
3596
|
// captures no-op via the truthy guard.
|
|
3597
3597
|
let _ccApiRoutesMeta = null;
|
|
3598
3598
|
|
|
3599
|
+
// Cache for the GET /api/routes public payload (P-d0e1f2a3 — Phase 3 cheap-win
|
|
3600
|
+
// #5). The ROUTES array is rebuilt per request (the literal lives inside the
|
|
3601
|
+
// http.createServer callback), but its CONTENTS are static — the routes table
|
|
3602
|
+
// is deterministic at boot. Recomputing _routesAsMeta(ROUTES).map(...) on
|
|
3603
|
+
// every /api/routes hit allocated ~180 wrapper objects + reran the param /
|
|
3604
|
+
// readOnly / destructive classification per route. The cache stores the
|
|
3605
|
+
// already-projected response shape so the hot path is a single array read.
|
|
3606
|
+
let _publicApiRoutesCache = null;
|
|
3607
|
+
|
|
3599
3608
|
function _routePathForMeta(route) {
|
|
3600
3609
|
if (!route) return '';
|
|
3601
3610
|
if (typeof route.path === 'string') return route.path;
|
|
@@ -3720,6 +3729,10 @@ function _resetCcApiRoutesMetaForTest() {
|
|
|
3720
3729
|
_ccApiRoutesMeta = null;
|
|
3721
3730
|
}
|
|
3722
3731
|
|
|
3732
|
+
function _resetPublicApiRoutesCacheForTest() {
|
|
3733
|
+
_publicApiRoutesCache = null;
|
|
3734
|
+
}
|
|
3735
|
+
|
|
3723
3736
|
function _formatCcApiRoutesIndex() {
|
|
3724
3737
|
if (!Array.isArray(_ccApiRoutesMeta) || _ccApiRoutesMeta.length === 0) return '';
|
|
3725
3738
|
return _ccApiRoutesMeta
|
|
@@ -9854,7 +9867,8 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
9854
9867
|
duplicate = items.find(i =>
|
|
9855
9868
|
i._scheduleId === item._scheduleId &&
|
|
9856
9869
|
i.status !== WI_STATUS.DONE &&
|
|
9857
|
-
i.status !== WI_STATUS.FAILED
|
|
9870
|
+
i.status !== WI_STATUS.FAILED &&
|
|
9871
|
+
i.status !== WI_STATUS.CANCELLED
|
|
9858
9872
|
);
|
|
9859
9873
|
if (!duplicate) items.push(item);
|
|
9860
9874
|
return items;
|
|
@@ -11962,8 +11976,10 @@ What would you like to discuss or change? When you're happy, say "approve" and I
|
|
|
11962
11976
|
});
|
|
11963
11977
|
}},
|
|
11964
11978
|
{ method: 'GET', path: '/api/routes', desc: 'List all available API endpoints', handler: (req, res) => {
|
|
11965
|
-
|
|
11966
|
-
|
|
11979
|
+
if (!_publicApiRoutesCache) {
|
|
11980
|
+
_publicApiRoutesCache = _routesAsMeta(ROUTES).map(({ desc, ...rest }) => ({ ...rest, description: desc }));
|
|
11981
|
+
}
|
|
11982
|
+
return jsonReply(res, 200, { routes: _publicApiRoutesCache });
|
|
11967
11983
|
}},
|
|
11968
11984
|
|
|
11969
11985
|
// Status & health
|
|
@@ -13302,6 +13318,7 @@ module.exports = {
|
|
|
13302
13318
|
_ccRuntimeNeedsResumeBookkeepingGuard,
|
|
13303
13319
|
_joinCcPromptParts,
|
|
13304
13320
|
_captureApiRoutesMeta,
|
|
13321
|
+
_resetPublicApiRoutesCacheForTest,
|
|
13305
13322
|
_formatCcApiRoutesIndex,
|
|
13306
13323
|
_formatCcCliCommandsIndex,
|
|
13307
13324
|
_resetPreambleCache,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yemi33/minions",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2183",
|
|
4
4
|
"description": "Multi-agent AI dev team that runs from ~/.minions/ — five autonomous agents share a single engine, dashboard, and knowledge base",
|
|
5
5
|
"bin": {
|
|
6
6
|
"minions": "bin/minions.js"
|