@adhdev/daemon-standalone 1.0.56-rc.5 → 1.0.56-rc.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/dist/index.js +104 -20
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/vendor/mcp-server/index.js +41 -4
- package/vendor/mcp-server/index.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adhdev/daemon-standalone",
|
|
3
|
-
"version": "1.0.56-rc.
|
|
3
|
+
"version": "1.0.56-rc.6",
|
|
4
4
|
"description": "ADHDev standalone daemon — embedded HTTP/WS server for local dashboard",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"license": "AGPL-3.0-or-later",
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@adhdev/ghostty-vt-node": "*",
|
|
40
|
-
"@adhdev/session-host-core": "1.0.56-rc.
|
|
40
|
+
"@adhdev/session-host-core": "1.0.56-rc.6",
|
|
41
41
|
"@xterm/addon-serialize": "^0.14.0",
|
|
42
42
|
"@xterm/xterm": "^6.0.0",
|
|
43
43
|
"chalk": "^5.3.0",
|
|
@@ -1085,7 +1085,17 @@ var MESH_ENQUEUE_TASK_TOOL = {
|
|
|
1085
1085
|
block_duplicate: { type: "boolean", description: "G4 (duplicate detection, block mode). Default false = warn-only: if an in-flight (pending/assigned) task with the same message (+ target node when pinned) already exists, the task is still enqueued but the response carries duplicateSuspect. Set true to REFUSE the enqueue with code duplicate_suspect instead (structural TASKBUBBLE-DUP defense \u2014 use when re-sending a task that a slow prior turn may have already enqueued)." },
|
|
1086
1086
|
blockDuplicate: { type: "boolean", description: "CamelCase alias for block_duplicate." },
|
|
1087
1087
|
allow_duplicate: { type: "boolean", description: "G4. Set true to skip duplicate detection entirely (no warning, no block) for an intentional re-enqueue of the same instruction." },
|
|
1088
|
-
allowDuplicate: { type: "boolean", description: "CamelCase alias for allow_duplicate." }
|
|
1088
|
+
allowDuplicate: { type: "boolean", description: "CamelCase alias for allow_duplicate." },
|
|
1089
|
+
// design :692 — "The single tool should require an orchestration_decision".
|
|
1090
|
+
// OPTIONAL here on purpose: Phase F is warn-only (see the discovery-meta note
|
|
1091
|
+
// above), and a required field would break legacy/external clients that
|
|
1092
|
+
// predate it. An omitted record degrades to decision_missing, which is itself
|
|
1093
|
+
// the signal — never an enqueue failure.
|
|
1094
|
+
orchestration_decision: {
|
|
1095
|
+
type: "object",
|
|
1096
|
+
description: "Record of your planning decision, for adoption measurement: {decision, ready_worker_tasks, known_graph_steps, single_reason, capability_blockers}. On this single-task surface, single_reason says why one task was right \u2014 one of only_one_step_known, future_step_not_specifiable, same_session_continuation, legacy_client, operator_override. output_needed / workspace_unresolved / coordinator_action_between are NOT blockers any more (mesh_enqueue_batch covers them via inputs_from, workspace_ref and coordinator gates); reporting one returns a batch_capability_available warning. Optional and never rejected: omitting it is recorded as decision_missing, and declaring known_graph_steps >= 2 here is recorded as a declared eligible single. Provenance only \u2014 it never changes execution."
|
|
1097
|
+
},
|
|
1098
|
+
orchestrationDecision: { type: "object", description: "CamelCase alias for orchestration_decision." }
|
|
1089
1099
|
},
|
|
1090
1100
|
required: ["message", "difficulty"]
|
|
1091
1101
|
}
|
|
@@ -1506,7 +1516,7 @@ var MESH_CHECKPOINT_TOOL = {
|
|
|
1506
1516
|
};
|
|
1507
1517
|
var MESH_MISSION_UPSERT_TOOL = {
|
|
1508
1518
|
name: "mesh_mission_upsert",
|
|
1509
|
-
description: "Create or update a persistent mission record so the plan survives coordinator restarts. Create a mission before enqueueing a multi-task batch,
|
|
1519
|
+
description: "Create or update a persistent mission record so the plan survives coordinator restarts. Create a mission before enqueueing a multi-task batch, then submit that plan as ONE mesh_enqueue_batch carrying the mission_id (a top-level mission_id applies to every entry; mesh_enqueue_task is the single-step fallback). Update status to completed/abandoned when the outcome is decided. Progress is derived from task statuses \u2014 there is no separate progress field. Single mission: pass title (and optionally mission_id to update an existing one). Bulk status transition (e.g. one-time stale cleanup): pass mission_ids (array) + status to apply that status to many missions at once; title/goal are ignored and a per-mission result array is returned. mission_ids takes precedence over mission_id when both are given.",
|
|
1510
1520
|
inputSchema: {
|
|
1511
1521
|
type: "object",
|
|
1512
1522
|
properties: {
|
|
@@ -1636,7 +1646,7 @@ var MESH_PLAN_ONBOARDING_TOOL = {
|
|
|
1636
1646
|
};
|
|
1637
1647
|
var MESH_ADD_NODE_TOOL = {
|
|
1638
1648
|
name: "mesh_add_node",
|
|
1639
|
-
description: "Register a workspace as a node in an EXISTING mesh \u2014 the second bootstrap step after mesh_create (or to add more nodes later). Mirrors `adhdev mesh add-node <mesh_id>` with --workspace / --read-only / --provider-priority. A node is a repo checkout on a daemon that the coordinator can launch agents on and delegate tasks to. mesh_id is REQUIRED in standard mode (pass the id returned by mesh_create); in mesh mode it defaults to the active mesh. workspace is the absolute path to the repo checkout ON THE DAEMON that owns it \u2014 the local base node is added by the daemon that created the mesh. This is a persistent mesh write: call mesh_plan_onboarding first and obtain explicit user approval. The implementation re-runs that preflight before writing. NOTE: this registers an EXISTING directory as a node (including auto-detected linked worktrees). To CREATE a fresh git worktree + branch for isolated parallel work, use mesh_clone_node instead \u2014 that runs the actual `git worktree add`. Returns node_id + workspace so you can immediately target the node with mesh_launch_session / mesh_send_task / mesh_enqueue_task.",
|
|
1649
|
+
description: "Register a workspace as a node in an EXISTING mesh \u2014 the second bootstrap step after mesh_create (or to add more nodes later). Mirrors `adhdev mesh add-node <mesh_id>` with --workspace / --read-only / --provider-priority. A node is a repo checkout on a daemon that the coordinator can launch agents on and delegate tasks to. mesh_id is REQUIRED in standard mode (pass the id returned by mesh_create); in mesh mode it defaults to the active mesh. workspace is the absolute path to the repo checkout ON THE DAEMON that owns it \u2014 the local base node is added by the daemon that created the mesh. This is a persistent mesh write: call mesh_plan_onboarding first and obtain explicit user approval. The implementation re-runs that preflight before writing. NOTE: this registers an EXISTING directory as a node (including auto-detected linked worktrees). To CREATE a fresh git worktree + branch for isolated parallel work, use mesh_clone_node instead \u2014 that runs the actual `git worktree add`. Returns node_id + workspace so you can immediately target the node with mesh_launch_session / mesh_send_task / mesh_enqueue_task. That immediate-targeting path is right when the node is the only thing you were waiting on; when the work behind it is a multi-step plan, prefer declaring the whole plan in one mesh_enqueue_batch instead of registering, then enqueueing step by step.",
|
|
1640
1650
|
inputSchema: {
|
|
1641
1651
|
type: "object",
|
|
1642
1652
|
properties: {
|
|
@@ -1655,7 +1665,7 @@ var MESH_ADD_NODE_TOOL = {
|
|
|
1655
1665
|
};
|
|
1656
1666
|
var MESH_CLONE_NODE_TOOL = {
|
|
1657
1667
|
name: "mesh_clone_node",
|
|
1658
|
-
description: "Create a new worktree-based node from an existing node for isolated parallel work. Creates a git worktree on a new branch so multiple tasks can run on separate branches simultaneously. This writes a branch, worktree and mesh node: call mesh_plan_onboarding with operation=clone_worktree and obtain explicit user approval first; the implementation re-runs the clean/source preflight.",
|
|
1668
|
+
description: "Create a new worktree-based node from an existing node for isolated parallel work. Creates a git worktree on a new branch so multiple tasks can run on separate branches simultaneously. This writes a branch, worktree and mesh node: call mesh_plan_onboarding with operation=clone_worktree and obtain explicit user approval first; the implementation re-runs the clean/source preflight. Call this directly when you need the worktree NOW and will target it right away. When the worktree only exists to host a plan you already know, that plan can be submitted as one mesh_enqueue_batch: declare the worktree in the top-level `workspaces` array and point its tasks at it with `workspace_ref`, so preparation happens as part of the graph instead of a manual clone followed by step-by-step enqueues.",
|
|
1659
1669
|
inputSchema: {
|
|
1660
1670
|
type: "object",
|
|
1661
1671
|
properties: {
|
|
@@ -5042,6 +5052,7 @@ async function meshGraphGateRelease(ctx, args) {
|
|
|
5042
5052
|
duplicate: result.duplicate
|
|
5043
5053
|
});
|
|
5044
5054
|
const queueTrigger = result.materializedNodeIds.length > 0 ? await triggerMeshQueueAndReport(ctx) : void 0;
|
|
5055
|
+
const releasedNothingDownstream = !result.duplicate && result.materializedNodeIds.length === 0 && result.downstreamNodeCount === 0 && result.graphCompleted !== true;
|
|
5045
5056
|
return JSON.stringify({
|
|
5046
5057
|
success: true,
|
|
5047
5058
|
released: true,
|
|
@@ -5054,6 +5065,10 @@ async function meshGraphGateRelease(ctx, args) {
|
|
|
5054
5065
|
outcome,
|
|
5055
5066
|
materializedNodeIds: result.materializedNodeIds,
|
|
5056
5067
|
materializedCount: result.materializedNodeIds.length,
|
|
5068
|
+
...result.downstreamNodeCount !== void 0 ? { downstreamNodeCount: result.downstreamNodeCount } : {},
|
|
5069
|
+
...releasedNothingDownstream ? {
|
|
5070
|
+
noDownstreamAdvisory: "This gate opened nothing downstream: no task declared it in gated_by, so claiming and releasing it bought no scheduling while the rest of the graph is still outstanding. Declare the next step in the same batch and point it at this gate with gated_by, so releasing the gate dispatches it \u2014 or drop the gate and enqueue that step directly."
|
|
5071
|
+
} : {},
|
|
5057
5072
|
...queueTrigger ? { queueTrigger } : {},
|
|
5058
5073
|
...result.duplicate ? { duplicateHint: "This idempotency_key + payload was already committed; nothing changed. Re-sending an identical release is safe." } : {}
|
|
5059
5074
|
});
|
|
@@ -5293,6 +5308,17 @@ async function meshEnqueueTask(ctx, args) {
|
|
|
5293
5308
|
} = normalized.value;
|
|
5294
5309
|
const allowDuplicate = args.allowDuplicate === true || args.allow_duplicate === true;
|
|
5295
5310
|
const blockDuplicate = args.blockDuplicate === true || args.block_duplicate === true;
|
|
5311
|
+
const rawDecision = args.orchestration_decision ?? args.orchestrationDecision;
|
|
5312
|
+
const decisionMissing = rawDecision === void 0 || rawDecision === null;
|
|
5313
|
+
const orchestration = (0, import_daemon_core6.normalizeOrchestrationDecision)(rawDecision, "single");
|
|
5314
|
+
const orchestrationWarning = {
|
|
5315
|
+
...orchestration.batchCapabilityAvailable ? { batchCapabilityAvailable: orchestration.batchCapabilityAvailable } : {},
|
|
5316
|
+
...orchestration.declaredEligibleSingle ? {
|
|
5317
|
+
declaredEligibleSingle: true,
|
|
5318
|
+
declaredEligibleSingleHint: import_daemon_core6.MESH_DECLARED_ELIGIBLE_SINGLE_HINT
|
|
5319
|
+
} : {},
|
|
5320
|
+
...decisionMissing ? { orchestrationDecisionMissing: true } : {}
|
|
5321
|
+
};
|
|
5296
5322
|
const duplicateSuspect = allowDuplicate ? null : findInFlightDuplicate(ctx, message, targetNodeId);
|
|
5297
5323
|
if (duplicateSuspect && blockDuplicate) {
|
|
5298
5324
|
return JSON.stringify({
|
|
@@ -5318,6 +5344,15 @@ async function meshEnqueueTask(ctx, args) {
|
|
|
5318
5344
|
...maxRetries !== void 0 ? { maxRetries } : {},
|
|
5319
5345
|
...ctx.coordinatorSessionId ? { sourceCoordinatorSessionId: ctx.coordinatorSessionId } : {}
|
|
5320
5346
|
});
|
|
5347
|
+
(0, import_daemon_core6.recordSingleEnqueueDecision)(ctx.mesh.id, {
|
|
5348
|
+
taskId: task.id,
|
|
5349
|
+
...missionId ? { missionId } : {},
|
|
5350
|
+
...ctx.coordinatorSessionId ? { coordinatorSessionId: ctx.coordinatorSessionId } : {},
|
|
5351
|
+
decision: orchestration.decision,
|
|
5352
|
+
...decisionMissing ? { decisionMissing: true } : {},
|
|
5353
|
+
...orchestration.declaredEligibleSingle ? { declaredEligibleSingle: true } : {},
|
|
5354
|
+
...orchestration.batchCapabilityAvailable ? { batchCapabilityAvailable: orchestration.batchCapabilityAvailable.reportedReason } : {}
|
|
5355
|
+
});
|
|
5321
5356
|
const duplicateWarning = duplicateSuspect ? { duplicateSuspect: { taskId: duplicateSuspect.id, status: duplicateSuspect.status, assignedNodeId: duplicateSuspect.assignedNodeId, targetNodeId: duplicateSuspect.targetNodeId }, duplicateSuspectHint: "An in-flight task with the same message+target already exists. This new task was enqueued anyway (warn-only). Cancel one via mesh_queue_cancel if it is an accidental re-enqueue, or pass allow_duplicate=true to silence this, or block_duplicate=true to refuse next time." } : {};
|
|
5322
5357
|
const missionWarning = buildMissionInactiveWarning(ctx, missionId) ?? {};
|
|
5323
5358
|
const worktreeAdvisory = buildUntargetedCodeChangeWorktreeAdvisory({
|
|
@@ -5347,6 +5382,7 @@ async function meshEnqueueTask(ctx, args) {
|
|
|
5347
5382
|
...duplicateWarning,
|
|
5348
5383
|
...missionWarning,
|
|
5349
5384
|
...worktreeAdvisory,
|
|
5385
|
+
...orchestrationWarning,
|
|
5350
5386
|
queueTrigger,
|
|
5351
5387
|
...buildQueueTriggerGuidance(queueTrigger)
|
|
5352
5388
|
});
|
|
@@ -5375,6 +5411,7 @@ async function meshEnqueueTask(ctx, args) {
|
|
|
5375
5411
|
...duplicateWarning,
|
|
5376
5412
|
...missionWarning,
|
|
5377
5413
|
...worktreeAdvisory,
|
|
5414
|
+
...orchestrationWarning,
|
|
5378
5415
|
queueTrigger,
|
|
5379
5416
|
...buildQueueTriggerGuidance(queueTrigger)
|
|
5380
5417
|
});
|