@adhdev/daemon-standalone 0.9.82-rc.48 → 0.9.82-rc.49
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/dist/index.js +20965 -20239
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/index-BzfqwAXl.js +98 -0
- package/public/assets/index-DcAeIiVq.css +1 -0
- package/public/index.html +2 -2
- package/vendor/mcp-server/index.js +95 -0
- package/vendor/mcp-server/index.js.map +1 -1
|
@@ -245,6 +245,11 @@ var meshSessionProviderMetadata = /* @__PURE__ */ new Map();
|
|
|
245
245
|
function readString(value) {
|
|
246
246
|
return typeof value === "string" && value.trim() ? value.trim() : void 0;
|
|
247
247
|
}
|
|
248
|
+
function findNode(mesh, nodeId) {
|
|
249
|
+
const node = mesh.nodes.find((n) => n.id === nodeId);
|
|
250
|
+
if (!node) throw new Error(`Node '${nodeId}' is not a member of mesh '${mesh.name}'`);
|
|
251
|
+
return node;
|
|
252
|
+
}
|
|
248
253
|
var DUPLICATE_DISPATCH_WINDOW_MS = 6e4;
|
|
249
254
|
var STALE_ASSIGNED_QUEUE_MS = 30 * 6e4;
|
|
250
255
|
var OLD_HISTORICAL_QUEUE_RECORD_MS = 7 * 24 * 60 * 6e4;
|
|
@@ -1535,6 +1540,43 @@ var MESH_REFINE_NODE_TOOL = {
|
|
|
1535
1540
|
required: ["node_id"]
|
|
1536
1541
|
}
|
|
1537
1542
|
};
|
|
1543
|
+
var MESH_REFINE_CONFIG_SCHEMA_TOOL = {
|
|
1544
|
+
name: "mesh_refine_config_schema",
|
|
1545
|
+
description: "Return the Repo Mesh Refinery config JSON schema and supported repo-local config locations. This is the validation source of truth; heuristic command detection is suggestions-only.",
|
|
1546
|
+
inputSchema: { type: "object", properties: {} }
|
|
1547
|
+
};
|
|
1548
|
+
var MESH_VALIDATE_REFINE_CONFIG_TOOL = {
|
|
1549
|
+
name: "mesh_validate_refine_config",
|
|
1550
|
+
description: "Validate the repo mesh/refine config for a node/workspace without running validation commands or merging.",
|
|
1551
|
+
inputSchema: {
|
|
1552
|
+
type: "object",
|
|
1553
|
+
properties: {
|
|
1554
|
+
node_id: { type: "string", description: "Optional node/workspace whose refine config should be loaded. Defaults to the first mesh node." },
|
|
1555
|
+
config: { type: "object", description: "Optional inline config object to validate instead of loading from the repo." }
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
};
|
|
1559
|
+
var MESH_SUGGEST_REFINE_CONFIG_TOOL = {
|
|
1560
|
+
name: "mesh_suggest_refine_config",
|
|
1561
|
+
description: "Suggest a repo mesh/refine config scaffold from project context/package scripts. Suggestions are never executed until saved as explicit refine config.",
|
|
1562
|
+
inputSchema: {
|
|
1563
|
+
type: "object",
|
|
1564
|
+
properties: {
|
|
1565
|
+
node_id: { type: "string", description: "Optional node/workspace used for suggestions. Defaults to the first mesh node." }
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
};
|
|
1569
|
+
var MESH_REFINE_PLAN_TOOL = {
|
|
1570
|
+
name: "mesh_refine_plan",
|
|
1571
|
+
description: "Dry-run Refinery plan for a worktree node: reports config source, validation commands, suggestions/unavailable reason, and merge/cleanup intent without executing validation or git merge.",
|
|
1572
|
+
inputSchema: {
|
|
1573
|
+
type: "object",
|
|
1574
|
+
properties: {
|
|
1575
|
+
node_id: { type: "string", description: "Node ID of the worktree node to plan." }
|
|
1576
|
+
},
|
|
1577
|
+
required: ["node_id"]
|
|
1578
|
+
}
|
|
1579
|
+
};
|
|
1538
1580
|
var ALL_MESH_TOOLS = [
|
|
1539
1581
|
MESH_STATUS_TOOL,
|
|
1540
1582
|
MESH_LIST_NODES_TOOL,
|
|
@@ -1552,6 +1594,10 @@ var ALL_MESH_TOOLS = [
|
|
|
1552
1594
|
MESH_CLONE_NODE_TOOL,
|
|
1553
1595
|
MESH_REMOVE_NODE_TOOL,
|
|
1554
1596
|
MESH_REFINE_NODE_TOOL,
|
|
1597
|
+
MESH_REFINE_CONFIG_SCHEMA_TOOL,
|
|
1598
|
+
MESH_VALIDATE_REFINE_CONFIG_TOOL,
|
|
1599
|
+
MESH_SUGGEST_REFINE_CONFIG_TOOL,
|
|
1600
|
+
MESH_REFINE_PLAN_TOOL,
|
|
1555
1601
|
MESH_CLEANUP_SESSIONS_TOOL,
|
|
1556
1602
|
MESH_TASK_HISTORY_TOOL,
|
|
1557
1603
|
MESH_RECONCILE_LEDGER_TOOL
|
|
@@ -2549,6 +2595,43 @@ async function meshRemoveNode(ctx, args) {
|
|
|
2549
2595
|
return JSON.stringify({ error: "Cloud mesh remove_node requires node daemonId" });
|
|
2550
2596
|
}
|
|
2551
2597
|
}
|
|
2598
|
+
function resolveRefineConfigNode(ctx, nodeId) {
|
|
2599
|
+
if (nodeId) return findNode(ctx.mesh, nodeId);
|
|
2600
|
+
const node = ctx.mesh.nodes.find((entry) => !!entry.workspace);
|
|
2601
|
+
if (!node) throw new Error("No mesh node with a workspace is available");
|
|
2602
|
+
return node;
|
|
2603
|
+
}
|
|
2604
|
+
async function meshRefineConfigSchema(ctx) {
|
|
2605
|
+
const node = resolveRefineConfigNode(ctx);
|
|
2606
|
+
const result = await commandForNode(ctx, node, "get_mesh_refine_config_schema", {});
|
|
2607
|
+
return JSON.stringify(result, null, 2);
|
|
2608
|
+
}
|
|
2609
|
+
async function meshValidateRefineConfig(ctx, args) {
|
|
2610
|
+
const node = resolveRefineConfigNode(ctx, args.node_id);
|
|
2611
|
+
const result = await commandForNode(ctx, node, "validate_mesh_refine_config", {
|
|
2612
|
+
workspace: node.workspace,
|
|
2613
|
+
inlineMesh: ctx.mesh,
|
|
2614
|
+
...args.config ? { config: args.config } : {}
|
|
2615
|
+
});
|
|
2616
|
+
return JSON.stringify(result, null, 2);
|
|
2617
|
+
}
|
|
2618
|
+
async function meshSuggestRefineConfig(ctx, args) {
|
|
2619
|
+
const node = resolveRefineConfigNode(ctx, args.node_id);
|
|
2620
|
+
const result = await commandForNode(ctx, node, "suggest_mesh_refine_config", {
|
|
2621
|
+
workspace: node.workspace,
|
|
2622
|
+
inlineMesh: ctx.mesh
|
|
2623
|
+
});
|
|
2624
|
+
return JSON.stringify(result, null, 2);
|
|
2625
|
+
}
|
|
2626
|
+
async function meshRefinePlan(ctx, args) {
|
|
2627
|
+
const node = await findNodeWithRefresh(ctx, args.node_id);
|
|
2628
|
+
const result = await commandForNode(ctx, node, "plan_mesh_refine_node", {
|
|
2629
|
+
meshId: ctx.mesh.id,
|
|
2630
|
+
nodeId: args.node_id,
|
|
2631
|
+
inlineMesh: ctx.mesh
|
|
2632
|
+
});
|
|
2633
|
+
return JSON.stringify(result, null, 2);
|
|
2634
|
+
}
|
|
2552
2635
|
async function meshRefineNode(ctx, args) {
|
|
2553
2636
|
const node = await findNodeWithRefresh(ctx, args.node_id);
|
|
2554
2637
|
if (isLocalTransport(ctx.transport)) {
|
|
@@ -4321,6 +4404,18 @@ async function startMcpServer(opts) {
|
|
|
4321
4404
|
case "mesh_refine_node":
|
|
4322
4405
|
text = await meshRefineNode(meshCtx, a);
|
|
4323
4406
|
break;
|
|
4407
|
+
case "mesh_refine_config_schema":
|
|
4408
|
+
text = await meshRefineConfigSchema(meshCtx);
|
|
4409
|
+
break;
|
|
4410
|
+
case "mesh_validate_refine_config":
|
|
4411
|
+
text = await meshValidateRefineConfig(meshCtx, a);
|
|
4412
|
+
break;
|
|
4413
|
+
case "mesh_suggest_refine_config":
|
|
4414
|
+
text = await meshSuggestRefineConfig(meshCtx, a);
|
|
4415
|
+
break;
|
|
4416
|
+
case "mesh_refine_plan":
|
|
4417
|
+
text = await meshRefinePlan(meshCtx, a);
|
|
4418
|
+
break;
|
|
4324
4419
|
case "mesh_cleanup_sessions":
|
|
4325
4420
|
text = await meshCleanupSessions(meshCtx, a);
|
|
4326
4421
|
break;
|