claude-flow-novice 1.6.1 → 1.6.2
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/.claude/agents/cfn-loop/product-owner.md +54 -4
- package/.claude/commands/cfn-claude-sync.md +303 -0
- package/.claude/commands/cfn-loop-epic.md +290 -0
- package/.claude/commands/cfn-loop-single.md +168 -0
- package/.claude/commands/cfn-loop-sprints.md +384 -0
- package/.claude/commands/cfn-loop.md +180 -0
- package/.claude/commands/metrics-summary.md +58 -0
- package/.claude/commands/parse-epic.md +357 -0
- package/.claude/settings.json +4 -4
- package/.claude/settings.local.json +9 -2
- package/.claude-flow-novice/.claude/agents/cfn-loop/product-owner.md +792 -0
- package/.claude-flow-novice/dist/mcp/server.js +21 -2
- package/.claude-flow-novice/dist/src/api/claude-client.js +138 -3
- package/.claude-flow-novice/dist/src/api/claude-client.js.map +1 -1
- package/.claude-flow-novice/dist/src/cfn-loop/phase-orchestrator-example.js +1 -1
- package/.claude-flow-novice/dist/src/cfn-loop/scope-control.js +247 -0
- package/.claude-flow-novice/dist/src/cfn-loop/scope-control.js.map +1 -0
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js +32 -15
- package/.claude-flow-novice/dist/src/cli/commands/swarm.js.map +1 -1
- package/.claude-flow-novice/dist/src/cli/commands/transparency.js +455 -0
- package/.claude-flow-novice/dist/src/cli/commands/transparency.js.map +1 -0
- package/.claude-flow-novice/dist/src/cli/simple-commands/init/templates/CLAUDE.md +129 -13
- package/.claude-flow-novice/dist/src/components/visualizations/index.js +9 -0
- package/.claude-flow-novice/dist/src/components/visualizations/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js +462 -0
- package/.claude-flow-novice/dist/src/coordination/adapters/v1-coordinator-adapter.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/config-translator.js +248 -0
- package/.claude-flow-novice/dist/src/coordination/config-translator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js +287 -0
- package/.claude-flow-novice/dist/src/coordination/coordination-toggle.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/distributed-consensus.js +68 -9
- package/.claude-flow-novice/dist/src/coordination/distributed-consensus.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/feature-flags.js +166 -0
- package/.claude-flow-novice/dist/src/coordination/feature-flags.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/queen-agent.js +18 -4
- package/.claude-flow-novice/dist/src/coordination/queen-agent.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/role-assignment.js +6 -110
- package/.claude-flow-novice/dist/src/coordination/role-assignment.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/cache/artifact-cache-optimizer.js +632 -0
- package/.claude-flow-novice/dist/src/coordination/v2/cache/artifact-cache-optimizer.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/cache/index.js +11 -0
- package/.claude-flow-novice/dist/src/coordination/v2/cache/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/checkpoints/checkpoint-compressor.js +318 -0
- package/.claude-flow-novice/dist/src/coordination/v2/checkpoints/checkpoint-compressor.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.example.js +364 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.example.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.js +492 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/cascading-shutdown.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/hierarchical-coordinator.js +786 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/hierarchical-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/index.js +16 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/parent-child-manager.js +342 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/parent-child-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/swarm-coordinator-v2.js +601 -0
- package/.claude-flow-novice/dist/src/coordination/v2/coordinators/swarm-coordinator-v2.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/help-request-metrics.js +211 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/help-request-metrics.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/index.js +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/core/message-broker.js +365 -6
- package/.claude-flow-novice/dist/src/coordination/v2/core/message-broker.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/core/resource-manager-safe.js +478 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/resource-manager-safe.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine-config.js +5 -2
- package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine-config.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine.js +189 -0
- package/.claude-flow-novice/dist/src/coordination/v2/core/state-machine.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/deadlock-detector.js +424 -0
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/deadlock-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/index.js +9 -0
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/resource-manager.js +669 -0
- package/.claude-flow-novice/dist/src/coordination/v2/deadlock/resource-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/artifact-storage.js +451 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/artifact-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/cycle-detector.js +271 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/cycle-detector.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-graph.js +335 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-graph.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-manager.js +439 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-manager.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-request.js +92 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/dependency-request.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/index.js +21 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/topological-sort.js +223 -0
- package/.claude-flow-novice/dist/src/coordination/v2/dependency/topological-sort.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-coordinator.js +436 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-matcher.js +278 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-matcher.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request-handler.js +317 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request-handler.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request.js +273 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/help-request.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/index.js +15 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/waiting-agent-pool.js +512 -0
- package/.claude-flow-novice/dist/src/coordination/v2/help-system/waiting-agent-pool.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/index.js +6 -0
- package/.claude-flow-novice/dist/src/coordination/v2/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/integration/help-deadlock-integration.js +557 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/help-deadlock-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/index.js +14 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.example.js +212 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.example.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.js +552 -0
- package/.claude-flow-novice/dist/src/coordination/v2/integration/message-bus-completion-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/memory/dependency-storage.js +367 -0
- package/.claude-flow-novice/dist/src/coordination/v2/memory/dependency-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/memory/index.js +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/memory/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channel.js +371 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/dependency-channel.js +355 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/dependency-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/help-channel.js +424 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/help-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/index.js +16 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/state-channel.js +295 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/state-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/task-channel.js +411 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/channels/task-channel.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/index.js +14 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-bus.js +387 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-bus.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-persistence.js +589 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-persistence.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-router.js +444 -0
- package/.claude-flow-novice/dist/src/coordination/v2/messaging/message-router.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/checkpoint-manager.js +29 -8
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/checkpoint-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/help-coordinator.js +470 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/help-coordinator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/hierarchical-background-integration.js +450 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/hierarchical-background-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/index.js +5 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/index.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/multi-level-control.js +545 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/multi-level-control.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-controller.js +44 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-controller.js.map +1 -1
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-message-integration.js +415 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/query-message-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/session-pool-optimizer.js +615 -0
- package/.claude-flow-novice/dist/src/coordination/v2/sdk/session-pool-optimizer.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/security/payload-validator.js +259 -0
- package/.claude-flow-novice/dist/src/coordination/v2/security/payload-validator.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/index.js +17 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-integration.js +357 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-integration.js.map +1 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-system.js +679 -0
- package/.claude-flow-novice/dist/src/coordination/v2/transparency/transparency-system.js.map +1 -0
- package/.claude-flow-novice/dist/src/core/agent-manager.js +30 -0
- package/.claude-flow-novice/dist/src/core/agent-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/mcp/server.js +21 -2
- package/.claude-flow-novice/dist/src/mcp/server.js.map +1 -1
- package/.claude-flow-novice/dist/src/observability/metrics-counter.js +268 -0
- package/.claude-flow-novice/dist/src/observability/metrics-counter.js.map +1 -0
- package/.claude-flow-novice/dist/src/observability/metrics-storage.js +265 -0
- package/.claude-flow-novice/dist/src/observability/metrics-storage.js.map +1 -0
- package/.claude-flow-novice/dist/src/observability/telemetry.js +26 -0
- package/.claude-flow-novice/dist/src/observability/telemetry.js.map +1 -1
- package/.claude-flow-novice/dist/src/providers/tiered-router.js +64 -10
- package/.claude-flow-novice/dist/src/providers/tiered-router.js.map +1 -1
- package/.claude-flow-novice/dist/src/providers/zai-provider.js +196 -97
- package/.claude-flow-novice/dist/src/providers/zai-provider.js.map +1 -1
- package/.claude-flow-novice/dist/src/slash-commands/cfn-claude-sync.js +533 -0
- package/.claude-flow-novice/dist/src/slash-commands/index.js +5 -0
- package/.claude-flow-novice/dist/src/slash-commands/metrics-summary-class.js +74 -0
- package/.claude-flow-novice/dist/src/slash-commands/metrics-summary.js +335 -0
- package/.claude-flow-novice/dist/src/slash-commands/register-all-commands.js +12 -0
- package/.claude-flow-novice/dist/src/verification/checkpoint-compression-demo.js +96 -0
- package/.claude-flow-novice/dist/src/verification/checkpoint-compression-demo.js.map +1 -0
- package/.claude-flow-novice/dist/src/verification/checkpoint-compression.js +406 -0
- package/.claude-flow-novice/dist/src/verification/checkpoint-compression.js.map +1 -0
- package/.claude-flow-novice/dist/src/verification/checkpoint-manager.js +35 -5
- package/.claude-flow-novice/dist/src/verification/checkpoint-manager.js.map +1 -1
- package/.claude-flow-novice/dist/src/web/api/config/api-config.js +186 -0
- package/.claude-flow-novice/dist/src/web/api/config/api-config.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/auth.js +205 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/auth.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/cache.js +262 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/cache.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/error-handler.js +250 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/error-handler.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/request-logger.js +217 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/request-logger.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/validation.js +325 -0
- package/.claude-flow-novice/dist/src/web/api/middleware/validation.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/routes/events.js +465 -0
- package/.claude-flow-novice/dist/src/web/api/routes/events.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/routes/hierarchy.js +302 -0
- package/.claude-flow-novice/dist/src/web/api/routes/hierarchy.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/routes/index.js +14 -0
- package/.claude-flow-novice/dist/src/web/api/routes/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/routes/metrics.js +561 -0
- package/.claude-flow-novice/dist/src/web/api/routes/metrics.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/routes/status.js +450 -0
- package/.claude-flow-novice/dist/src/web/api/routes/status.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/api/server.js +451 -0
- package/.claude-flow-novice/dist/src/web/api/server.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/dashboard/hooks/useWebSocket.js +385 -0
- package/.claude-flow-novice/dist/src/web/dashboard/hooks/useWebSocket.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/dashboard/index.js +87 -0
- package/.claude-flow-novice/dist/src/web/dashboard/index.js.map +1 -0
- package/.claude-flow-novice/dist/src/web/dashboard/types.js +6 -0
- package/.claude-flow-novice/dist/src/web/dashboard/types.js.map +1 -0
- package/.claude-flow-novice/metrics.db +0 -0
- package/.claude-flow-novice/metrics.db-shm +0 -0
- package/.claude-flow-novice/metrics.db-wal +0 -0
- package/CLAUDE.md +29 -0
- package/README.md +27 -0
- package/config/hooks/post-edit-pipeline.js +36 -2
- package/examples/metrics-counter-demo.ts +106 -0
- package/examples/persistent-metrics-demo.ts +83 -0
- package/examples/phase-5-multi-level-control.ts +282 -0
- package/examples/session-pool-optimizer-example.ts +311 -0
- package/package.json +15 -3
- package/scripts/check-routing-stats.cjs +122 -0
- package/scripts/pre-publish-validation.cjs +212 -0
- package/scripts/test-provider-routing.cjs +228 -0
- package/scripts/test-routing-telemetry.cjs +147 -0
- package/scripts/test-zai-10k.cjs +81 -0
- package/scripts/test-zai-api.cjs +191 -0
- package/scripts/test-zai-diagnostic.cjs +151 -0
- package/scripts/test-zai-final.cjs +128 -0
- package/scripts/test-zai-with-env.cjs +85 -0
- package/scripts/validate-coordination-cli.js +69 -0
- package/scripts/validate-coordination-toggle-integration.cjs +501 -0
- package/src/cli/simple-commands/init/templates/CLAUDE.md +29 -0
- package/src/observability/metrics-counter.ts +347 -0
- package/src/observability/metrics-storage.ts +356 -0
- package/src/observability/telemetry.ts +658 -0
- package/src/slash-commands/cfn-claude-sync.js +533 -0
- package/src/slash-commands/index.js +5 -0
- package/src/slash-commands/metrics-summary-class.js +74 -0
- package/src/slash-commands/metrics-summary.js +335 -0
- package/src/slash-commands/register-all-commands.js +12 -0
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hierarchy API Routes
|
|
3
|
+
*
|
|
4
|
+
* REST API endpoints for agent hierarchy management and visualization
|
|
5
|
+
*
|
|
6
|
+
* @module web/api/routes/hierarchy
|
|
7
|
+
*/ import { Router } from 'express';
|
|
8
|
+
import { asyncHandler } from '../middleware/error-handler.js';
|
|
9
|
+
import { validationMiddleware, commonSchemas } from '../middleware/validation.js';
|
|
10
|
+
/**
|
|
11
|
+
* Create hierarchy routes
|
|
12
|
+
*/ export function hierarchyRoutes(transparencySystem, logger) {
|
|
13
|
+
const router = Router();
|
|
14
|
+
/**
|
|
15
|
+
* GET /api/v1/hierarchy
|
|
16
|
+
* Get complete agent hierarchy tree
|
|
17
|
+
*/ router.get('/', asyncHandler(async (req, res)=>{
|
|
18
|
+
logger.info('Getting complete agent hierarchy');
|
|
19
|
+
const hierarchy = await transparencySystem.getAgentHierarchy();
|
|
20
|
+
res.json({
|
|
21
|
+
data: hierarchy,
|
|
22
|
+
meta: {
|
|
23
|
+
totalAgents: hierarchy.length,
|
|
24
|
+
timestamp: new Date().toISOString()
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}));
|
|
28
|
+
/**
|
|
29
|
+
* GET /api/v1/hierarchy/level/:level
|
|
30
|
+
* Get agents at specific hierarchy level
|
|
31
|
+
*/ router.get('/level/:level', validationMiddleware({
|
|
32
|
+
params: commonSchemas.levelFilter
|
|
33
|
+
}), asyncHandler(async (req, res)=>{
|
|
34
|
+
const level = parseInt(req.params.level, 10);
|
|
35
|
+
logger.info(`Getting agents at level ${level}`);
|
|
36
|
+
const agents = await transparencySystem.getAgentsAtLevel(level);
|
|
37
|
+
res.json({
|
|
38
|
+
data: agents,
|
|
39
|
+
meta: {
|
|
40
|
+
level,
|
|
41
|
+
count: agents.length,
|
|
42
|
+
timestamp: new Date().toISOString()
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
}));
|
|
46
|
+
/**
|
|
47
|
+
* GET /api/v1/hierarchy/root
|
|
48
|
+
* Get root agents (level 1, no parent)
|
|
49
|
+
*/ router.get('/root', asyncHandler(async (req, res)=>{
|
|
50
|
+
logger.info('Getting root agents');
|
|
51
|
+
const rootAgents = await transparencySystem.getRootAgents();
|
|
52
|
+
res.json({
|
|
53
|
+
data: rootAgents,
|
|
54
|
+
meta: {
|
|
55
|
+
count: rootAgents.length,
|
|
56
|
+
timestamp: new Date().toISOString()
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}));
|
|
60
|
+
/**
|
|
61
|
+
* GET /api/v1/hierarchy/parent/:parentAgentId
|
|
62
|
+
* Get child agents of specified parent
|
|
63
|
+
*/ router.get('/parent/:parentAgentId', validationMiddleware({
|
|
64
|
+
params: commonSchemas.agentIdParam
|
|
65
|
+
}), asyncHandler(async (req, res)=>{
|
|
66
|
+
const { parentAgentId } = req.params;
|
|
67
|
+
logger.info(`Getting child agents of parent ${parentAgentId}`);
|
|
68
|
+
const childAgents = await transparencySystem.getChildAgents(parentAgentId);
|
|
69
|
+
res.json({
|
|
70
|
+
data: childAgents,
|
|
71
|
+
meta: {
|
|
72
|
+
parentAgentId,
|
|
73
|
+
count: childAgents.length,
|
|
74
|
+
timestamp: new Date().toISOString()
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}));
|
|
78
|
+
/**
|
|
79
|
+
* GET /api/v1/hierarchy/agent/:agentId
|
|
80
|
+
* Get specific agent hierarchy information
|
|
81
|
+
*/ router.get('/agent/:agentId', validationMiddleware({
|
|
82
|
+
params: commonSchemas.agentIdParam
|
|
83
|
+
}), asyncHandler(async (req, res)=>{
|
|
84
|
+
const { agentId } = req.params;
|
|
85
|
+
logger.info(`Getting hierarchy info for agent ${agentId}`);
|
|
86
|
+
const hierarchy = await transparencySystem.getAgentHierarchy();
|
|
87
|
+
const agentInfo = hierarchy.find((agent)=>agent.agentId === agentId);
|
|
88
|
+
if (!agentInfo) {
|
|
89
|
+
return res.status(404).json({
|
|
90
|
+
error: 'NOT_FOUND',
|
|
91
|
+
message: `Agent ${agentId} not found in hierarchy`,
|
|
92
|
+
timestamp: new Date().toISOString()
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
// Get child agents if any
|
|
96
|
+
const childAgents = await transparencySystem.getChildAgents(agentId);
|
|
97
|
+
res.json({
|
|
98
|
+
data: {
|
|
99
|
+
...agentInfo,
|
|
100
|
+
childAgents
|
|
101
|
+
},
|
|
102
|
+
meta: {
|
|
103
|
+
timestamp: new Date().toISOString()
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}));
|
|
107
|
+
/**
|
|
108
|
+
* GET /api/v1/hierarchy/tree
|
|
109
|
+
* Get hierarchy as a tree structure (nested)
|
|
110
|
+
*/ router.get('/tree', asyncHandler(async (req, res)=>{
|
|
111
|
+
logger.info('Getting hierarchy as tree structure');
|
|
112
|
+
const hierarchy = await transparencySystem.getAgentHierarchy();
|
|
113
|
+
const tree = buildHierarchyTree(hierarchy);
|
|
114
|
+
res.json({
|
|
115
|
+
data: tree,
|
|
116
|
+
meta: {
|
|
117
|
+
totalAgents: hierarchy.length,
|
|
118
|
+
treeDepth: calculateTreeDepth(tree),
|
|
119
|
+
timestamp: new Date().toISOString()
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}));
|
|
123
|
+
/**
|
|
124
|
+
* GET /api/v1/hierarchy/stats
|
|
125
|
+
* Get hierarchy statistics
|
|
126
|
+
*/ router.get('/stats', asyncHandler(async (req, res)=>{
|
|
127
|
+
logger.info('Getting hierarchy statistics');
|
|
128
|
+
const hierarchy = await transparencySystem.getAgentHierarchy();
|
|
129
|
+
const stats = calculateHierarchyStats(hierarchy);
|
|
130
|
+
res.json({
|
|
131
|
+
data: stats,
|
|
132
|
+
meta: {
|
|
133
|
+
timestamp: new Date().toISOString()
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
}));
|
|
137
|
+
/**
|
|
138
|
+
* GET /api/v1/hierarchy/search
|
|
139
|
+
* Search agents in hierarchy
|
|
140
|
+
*/ router.get('/search', validationMiddleware({
|
|
141
|
+
query: {
|
|
142
|
+
type: 'object',
|
|
143
|
+
properties: {
|
|
144
|
+
q: {
|
|
145
|
+
type: 'string',
|
|
146
|
+
minLength: 1,
|
|
147
|
+
description: 'Search query'
|
|
148
|
+
},
|
|
149
|
+
type: {
|
|
150
|
+
type: 'string',
|
|
151
|
+
description: 'Agent type filter'
|
|
152
|
+
},
|
|
153
|
+
state: {
|
|
154
|
+
type: 'string',
|
|
155
|
+
enum: [
|
|
156
|
+
'idle',
|
|
157
|
+
'active',
|
|
158
|
+
'paused',
|
|
159
|
+
'terminated',
|
|
160
|
+
'error',
|
|
161
|
+
'completing',
|
|
162
|
+
'checkpointing',
|
|
163
|
+
'waiting_for_dependency'
|
|
164
|
+
],
|
|
165
|
+
description: 'Agent state filter'
|
|
166
|
+
},
|
|
167
|
+
level: {
|
|
168
|
+
type: 'integer',
|
|
169
|
+
minimum: 1,
|
|
170
|
+
description: 'Hierarchy level filter'
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
required: [
|
|
174
|
+
'q'
|
|
175
|
+
]
|
|
176
|
+
}
|
|
177
|
+
}), asyncHandler(async (req, res)=>{
|
|
178
|
+
const { q, type, state, level } = req.query;
|
|
179
|
+
logger.info(`Searching hierarchy with query: ${q}`);
|
|
180
|
+
const hierarchy = await transparencySystem.getAgentHierarchy();
|
|
181
|
+
const results = searchHierarchy(hierarchy, {
|
|
182
|
+
query: q,
|
|
183
|
+
type,
|
|
184
|
+
state,
|
|
185
|
+
level: level ? parseInt(level, 10) : undefined
|
|
186
|
+
});
|
|
187
|
+
res.json({
|
|
188
|
+
data: results,
|
|
189
|
+
meta: {
|
|
190
|
+
query: {
|
|
191
|
+
q,
|
|
192
|
+
type,
|
|
193
|
+
state,
|
|
194
|
+
level
|
|
195
|
+
},
|
|
196
|
+
count: results.length,
|
|
197
|
+
timestamp: new Date().toISOString()
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}));
|
|
201
|
+
return router;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Build hierarchical tree structure from flat agent list
|
|
205
|
+
*/ function buildHierarchyTree(agents) {
|
|
206
|
+
const agentMap = new Map();
|
|
207
|
+
// Create map of all agents with empty children arrays
|
|
208
|
+
agents.forEach((agent)=>{
|
|
209
|
+
agentMap.set(agent.agentId, {
|
|
210
|
+
...agent,
|
|
211
|
+
children: []
|
|
212
|
+
});
|
|
213
|
+
});
|
|
214
|
+
// Build tree structure
|
|
215
|
+
const roots = [];
|
|
216
|
+
agentMap.forEach((agent)=>{
|
|
217
|
+
if (agent.parentAgentId && agentMap.has(agent.parentAgentId)) {
|
|
218
|
+
// Add to parent's children
|
|
219
|
+
const parent = agentMap.get(agent.parentAgentId);
|
|
220
|
+
parent.children.push(agent);
|
|
221
|
+
} else {
|
|
222
|
+
// This is a root agent
|
|
223
|
+
roots.push(agent);
|
|
224
|
+
}
|
|
225
|
+
});
|
|
226
|
+
return roots;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Calculate tree depth
|
|
230
|
+
*/ function calculateTreeDepth(tree) {
|
|
231
|
+
if (!tree || tree.length === 0) return 0;
|
|
232
|
+
let maxDepth = 0;
|
|
233
|
+
function calculateDepth(node, currentDepth) {
|
|
234
|
+
maxDepth = Math.max(maxDepth, currentDepth);
|
|
235
|
+
if (node.children && node.children.length > 0) {
|
|
236
|
+
node.children.forEach((child)=>calculateDepth(child, currentDepth + 1));
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
tree.forEach((node)=>calculateDepth(node, 1));
|
|
240
|
+
return maxDepth;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Calculate hierarchy statistics
|
|
244
|
+
*/ function calculateHierarchyStats(agents) {
|
|
245
|
+
const stats = {
|
|
246
|
+
totalAgents: agents.length,
|
|
247
|
+
agentsByLevel: {},
|
|
248
|
+
agentsByType: {},
|
|
249
|
+
agentsByState: {},
|
|
250
|
+
averageTokensUsed: 0,
|
|
251
|
+
totalTokensUsed: 0,
|
|
252
|
+
totalTokenBudget: 0,
|
|
253
|
+
parentAgents: 0,
|
|
254
|
+
leafAgents: 0,
|
|
255
|
+
maxChildrenPerParent: 0,
|
|
256
|
+
averageChildrenPerParent: 0
|
|
257
|
+
};
|
|
258
|
+
let totalChildren = 0;
|
|
259
|
+
let parentCount = 0;
|
|
260
|
+
agents.forEach((agent)=>{
|
|
261
|
+
// Count by level
|
|
262
|
+
stats.agentsByLevel[agent.level] = (stats.agentsByLevel[agent.level] || 0) + 1;
|
|
263
|
+
// Count by type
|
|
264
|
+
stats.agentsByType[agent.type] = (stats.agentsByType[agent.type] || 0) + 1;
|
|
265
|
+
// Count by state
|
|
266
|
+
stats.agentsByState[agent.state] = (stats.agentsByState[agent.state] || 0) + 1;
|
|
267
|
+
// Token metrics
|
|
268
|
+
stats.totalTokensUsed += agent.tokensUsed;
|
|
269
|
+
stats.totalTokenBudget += agent.tokenBudget;
|
|
270
|
+
// Parent/leaf metrics
|
|
271
|
+
if (agent.childAgentIds.length > 0) {
|
|
272
|
+
parentCount++;
|
|
273
|
+
totalChildren += agent.childAgentIds.length;
|
|
274
|
+
stats.maxChildrenPerParent = Math.max(stats.maxChildrenPerParent, agent.childAgentIds.length);
|
|
275
|
+
} else {
|
|
276
|
+
stats.leafAgents++;
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
stats.averageTokensUsed = agents.length > 0 ? stats.totalTokensUsed / agents.length : 0;
|
|
280
|
+
stats.averageChildrenPerParent = parentCount > 0 ? totalChildren / parentCount : 0;
|
|
281
|
+
stats.parentAgents = parentCount;
|
|
282
|
+
return stats;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Search hierarchy with filters
|
|
286
|
+
*/ function searchHierarchy(agents, filters) {
|
|
287
|
+
const query = filters.query.toLowerCase();
|
|
288
|
+
return agents.filter((agent)=>{
|
|
289
|
+
// Text search in agent ID, type, current task, and metadata
|
|
290
|
+
const textMatch = agent.agentId.toLowerCase().includes(query) || agent.type.toLowerCase().includes(query) || agent.currentTask && agent.currentTask.toLowerCase().includes(query) || JSON.stringify(agent.metadata).toLowerCase().includes(query);
|
|
291
|
+
if (!textMatch) return false;
|
|
292
|
+
// Type filter
|
|
293
|
+
if (filters.type && agent.type !== filters.type) return false;
|
|
294
|
+
// State filter
|
|
295
|
+
if (filters.state && agent.state !== filters.state) return false;
|
|
296
|
+
// Level filter
|
|
297
|
+
if (filters.level !== undefined && agent.level !== filters.level) return false;
|
|
298
|
+
return true;
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
//# sourceMappingURL=hierarchy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/web/api/routes/hierarchy.ts"],"names":["Router","asyncHandler","validationMiddleware","commonSchemas","hierarchyRoutes","transparencySystem","logger","router","get","req","res","info","hierarchy","getAgentHierarchy","json","data","meta","totalAgents","length","timestamp","Date","toISOString","params","levelFilter","level","parseInt","agents","getAgentsAtLevel","count","rootAgents","getRootAgents","agentIdParam","parentAgentId","childAgents","getChildAgents","agentId","agentInfo","find","agent","status","error","message","tree","buildHierarchyTree","treeDepth","calculateTreeDepth","stats","calculateHierarchyStats","query","type","properties","q","minLength","description","state","enum","minimum","required","results","searchHierarchy","undefined","agentMap","Map","forEach","set","children","roots","has","parent","push","maxDepth","calculateDepth","node","currentDepth","Math","max","child","agentsByLevel","agentsByType","agentsByState","averageTokensUsed","totalTokensUsed","totalTokenBudget","parentAgents","leafAgents","maxChildrenPerParent","averageChildrenPerParent","totalChildren","parentCount","tokensUsed","tokenBudget","childAgentIds","filters","toLowerC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B;IACF;IAEAtC,MAAMkC,iBAAiB,GAAGtD,OAAOR,MAAM,GAAG,IAAI4B,MAAMmC,eAAe,GAAGvD,OAAOR,MAAM,GAAG;IACtF4B,MAAMwC,wBAAwB,GAAGE,cAAc,IAAID,gBAAgBC,cAAc;IACjF1C,MAAMqC,YAAY,GAAGK;IAErB,OAAO1C;AACT;AAEA;;CAEC,GACD,SAASa,gBACPjC,MAA4B,EAC5BkE,OAKC;IAED,MAAM5C,QAAQ4C,QAAQ5C,KAAK,CAAC6C,WAAW;IAEvC,OAAOnE,OAAOoE,MAAM,CAACxD,CAAAA;QACnB,4DAA4D;QAC5D,MAAMyD,YACJzD,MAAMH,OAAO,CAAC0D,WAAW,GAAGG,QAAQ,CAAChD,UACrCV,MAAMW,IAAI,CAAC4C,WAAW,GAAGG,QAAQ,CAAChD,UACjCV,MAAM2D,WAAW,IAAI3D,MAAM2D,WAAW,CAACJ,WAAW,GAAGG,QAAQ,CAAChD,UAC/DkD,KAAKC,SAAS,CAAC7D,MAAM8D,QAAQ,EAAEP,WAAW,GAAGG,QAAQ,CAAChD;QAExD,IAAI,CAAC+C,WAAW,OAAO;QAEvB,cAAc;QACd,IAAIH,QAAQ3C,IAAI,IAAIX,MAAMW,IAAI,KAAK2C,QAAQ3C,IAAI,EAAE,OAAO;QAExD,eAAe;QACf,IAAI2C,QAAQtC,KAAK,IAAIhB,MAAMgB,KAAK,KAAKsC,QAAQtC,KAAK,EAAE,OAAO;QAE3D,eAAe;QACf,IAAIsC,QAAQpE,KAAK,KAAKoC,aAAatB,MAAMd,KAAK,KAAKoE,QAAQpE,KAAK,EAAE,OAAO;QAEzE,OAAO;IACT;AACF"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* API Routes Index
|
|
3
|
+
*
|
|
4
|
+
* Exports all API routes for the transparency dashboard
|
|
5
|
+
*
|
|
6
|
+
* @module web/api/routes
|
|
7
|
+
*/ export { hierarchyRoutes } from './hierarchy.js';
|
|
8
|
+
export { statusRoutes } from './status.js';
|
|
9
|
+
export { eventsRoutes } from './events.js';
|
|
10
|
+
export { metricsRoutes } from './metrics.js';
|
|
11
|
+
export { analyticsRoutes } from './analytics.js';
|
|
12
|
+
export { systemRoutes } from './system.js';
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/web/api/routes/index.ts"],"names":["hierarchyRoutes","statusRoutes","eventsRoutes","metricsRoutes","analyticsRoutes","systemRoutes"],"mappings":"AAAA;;;;;;CAMC,GAED,SAASA,eAAe,QAAQ,iBAAiB;AACjD,SAASC,YAAY,QAAQ,cAAc;AAC3C,SAASC,YAAY,QAAQ,cAAc;AAC3C,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,YAAY,QAAQ,cAAc"}
|