adhdev 0.9.76-rc.26 → 0.9.76-rc.27
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/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/vendor/mcp-server/index.js +88 -3
- package/vendor/mcp-server/index.js.map +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -93603,7 +93603,7 @@ var init_adhdev_daemon = __esm({
|
|
|
93603
93603
|
init_version();
|
|
93604
93604
|
init_src();
|
|
93605
93605
|
init_runtime_defaults();
|
|
93606
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.
|
|
93606
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.27" });
|
|
93607
93607
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
93608
93608
|
localHttpServer = null;
|
|
93609
93609
|
localWss = null;
|
package/dist/index.js
CHANGED
|
@@ -62461,7 +62461,7 @@ var init_adhdev_daemon = __esm({
|
|
|
62461
62461
|
init_version();
|
|
62462
62462
|
init_src();
|
|
62463
62463
|
init_runtime_defaults();
|
|
62464
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.
|
|
62464
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.27" });
|
|
62465
62465
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
62466
62466
|
localHttpServer = null;
|
|
62467
62467
|
localWss = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adhdev",
|
|
3
|
-
"version": "0.9.76-rc.
|
|
3
|
+
"version": "0.9.76-rc.27",
|
|
4
4
|
"description": "ADHDev — Agent Dashboard Hub for Dev. Remote-control AI coding agents from anywhere.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"node": ">=18"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@adhdev/daemon-core": "0.9.76-rc.
|
|
50
|
+
"@adhdev/daemon-core": "0.9.76-rc.27",
|
|
51
51
|
"@adhdev/ghostty-vt-node": "*",
|
|
52
52
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
53
53
|
"@xterm/addon-serialize": "^0.14.0",
|
|
@@ -35223,6 +35223,40 @@ function normalizeReleaseChannel(value) {
|
|
|
35223
35223
|
function resolveUpgradeChannel(args) {
|
|
35224
35224
|
return normalizeReleaseChannel(args?.channel) || normalizeReleaseChannel(args?.updatePolicy?.channel) || normalizeReleaseChannel(args?.npmTag) || normalizeReleaseChannel(loadConfig().updateChannel) || "stable";
|
|
35225
35225
|
}
|
|
35226
|
+
function readProviderPriorityFromPolicy(policy) {
|
|
35227
|
+
const record2 = policy && typeof policy === "object" && !Array.isArray(policy) ? policy : {};
|
|
35228
|
+
const raw = record2.providerPriority;
|
|
35229
|
+
if (!Array.isArray(raw)) return [];
|
|
35230
|
+
const seen = /* @__PURE__ */ new Set();
|
|
35231
|
+
return raw.map((type2) => typeof type2 === "string" ? type2.trim() : "").filter(Boolean).filter((type2) => {
|
|
35232
|
+
if (seen.has(type2)) return false;
|
|
35233
|
+
seen.add(type2);
|
|
35234
|
+
return true;
|
|
35235
|
+
});
|
|
35236
|
+
}
|
|
35237
|
+
async function resolveProviderTypeFromPriority(args) {
|
|
35238
|
+
if (!args.providerPriority.length) {
|
|
35239
|
+
return { error: `Node '${args.nodeId}' has no providerPriority policy; pass cliType explicitly or configure node.policy.providerPriority` };
|
|
35240
|
+
}
|
|
35241
|
+
const failed = [];
|
|
35242
|
+
for (const requestedType of args.providerPriority) {
|
|
35243
|
+
const normalizedType = args.providerLoader.resolveAlias(requestedType);
|
|
35244
|
+
if (!args.providerLoader.isMachineProviderEnabled(normalizedType)) {
|
|
35245
|
+
failed.push(`${requestedType}: disabled`);
|
|
35246
|
+
continue;
|
|
35247
|
+
}
|
|
35248
|
+
const detected = await detectCLI(normalizedType, args.providerLoader, { includeVersion: false });
|
|
35249
|
+
args.providerLoader.setCliDetectionResults([{
|
|
35250
|
+
id: normalizedType,
|
|
35251
|
+
installed: !!detected,
|
|
35252
|
+
path: detected?.path
|
|
35253
|
+
}], false);
|
|
35254
|
+
args.onStatusChange?.();
|
|
35255
|
+
if (detected) return { providerType: normalizedType };
|
|
35256
|
+
failed.push(`${requestedType}: not detected`);
|
|
35257
|
+
}
|
|
35258
|
+
return { error: `No usable provider detected for node '${args.nodeId}' from providerPriority: ${failed.join("; ")}` };
|
|
35259
|
+
}
|
|
35226
35260
|
function loadYamlModule() {
|
|
35227
35261
|
return js_yaml_exports;
|
|
35228
35262
|
}
|
|
@@ -46834,7 +46868,19 @@ ${effect.notification.body || ""}`.trim();
|
|
|
46834
46868
|
}
|
|
46835
46869
|
}
|
|
46836
46870
|
pushEvent(event) {
|
|
46837
|
-
|
|
46871
|
+
const enrichedEvent = {
|
|
46872
|
+
...event,
|
|
46873
|
+
instanceId: typeof event.instanceId === "string" && event.instanceId.trim() ? event.instanceId : this.instanceId,
|
|
46874
|
+
targetSessionId: typeof event.targetSessionId === "string" && event.targetSessionId.trim() ? event.targetSessionId : this.instanceId,
|
|
46875
|
+
providerType: typeof event.providerType === "string" && event.providerType.trim() ? event.providerType : this.type,
|
|
46876
|
+
workspaceName: typeof event.workspaceName === "string" && event.workspaceName.trim() ? event.workspaceName : this.workingDir,
|
|
46877
|
+
providerSessionId: typeof event.providerSessionId === "string" && event.providerSessionId.trim() ? event.providerSessionId : this.providerSessionId
|
|
46878
|
+
};
|
|
46879
|
+
if (this.context?.emitProviderEvent) {
|
|
46880
|
+
this.context.emitProviderEvent(enrichedEvent);
|
|
46881
|
+
return;
|
|
46882
|
+
}
|
|
46883
|
+
this.events.push(enrichedEvent);
|
|
46838
46884
|
}
|
|
46839
46885
|
flushEvents() {
|
|
46840
46886
|
const events = [...this.events];
|
|
@@ -51418,7 +51464,7 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
51418
51464
|
// ─── Mesh Coordinator Launch ───
|
|
51419
51465
|
case "launch_mesh_coordinator": {
|
|
51420
51466
|
const meshId = typeof args?.meshId === "string" ? args.meshId.trim() : "";
|
|
51421
|
-
|
|
51467
|
+
let cliType = typeof args?.cliType === "string" ? args.cliType.trim() : "";
|
|
51422
51468
|
if (!meshId) return { success: false, error: "meshId required" };
|
|
51423
51469
|
try {
|
|
51424
51470
|
const { buildCoordinatorSystemPrompt: buildCoordinatorSystemPrompt2 } = await Promise.resolve().then(() => (init_coordinator_prompt(), coordinator_prompt_exports));
|
|
@@ -51446,6 +51492,25 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
51446
51492
|
}
|
|
51447
51493
|
const workspace = typeof coordinatorNode.workspace === "string" ? coordinatorNode.workspace.trim() : "";
|
|
51448
51494
|
if (!workspace) return { success: false, error: "Coordinator node workspace required", meshId, cliType };
|
|
51495
|
+
if (!cliType) {
|
|
51496
|
+
const resolved = await resolveProviderTypeFromPriority({
|
|
51497
|
+
nodeId: String(coordinatorNode.id || coordinatorNode.nodeId || preferredCoordinatorNodeId || "coordinator"),
|
|
51498
|
+
providerPriority: readProviderPriorityFromPolicy(coordinatorNode.policy),
|
|
51499
|
+
providerLoader: this.deps.providerLoader,
|
|
51500
|
+
onStatusChange: this.deps.onStatusChange
|
|
51501
|
+
});
|
|
51502
|
+
if (!resolved.providerType) {
|
|
51503
|
+
return {
|
|
51504
|
+
success: false,
|
|
51505
|
+
code: "mesh_coordinator_provider_priority_unusable",
|
|
51506
|
+
error: resolved.error || "No usable provider found from node providerPriority",
|
|
51507
|
+
meshId,
|
|
51508
|
+
cliType,
|
|
51509
|
+
workspace
|
|
51510
|
+
};
|
|
51511
|
+
}
|
|
51512
|
+
cliType = resolved.providerType;
|
|
51513
|
+
}
|
|
51449
51514
|
const providerMeta = this.deps.providerLoader.resolve?.(cliType) || this.deps.providerLoader.getMeta(cliType);
|
|
51450
51515
|
const coordinatorSetup = resolveMeshCoordinatorSetup({
|
|
51451
51516
|
provider: providerMeta,
|
|
@@ -51758,6 +51823,12 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
51758
51823
|
if (providerType) {
|
|
51759
51824
|
payload.providerType = providerType;
|
|
51760
51825
|
}
|
|
51826
|
+
if (typeof event.providerSessionId === "string" && event.providerSessionId.trim()) {
|
|
51827
|
+
payload.providerSessionId = event.providerSessionId.trim();
|
|
51828
|
+
}
|
|
51829
|
+
if (typeof event.workspaceName === "string" && event.workspaceName.trim()) {
|
|
51830
|
+
payload.workspaceName = event.workspaceName.trim();
|
|
51831
|
+
}
|
|
51761
51832
|
if (typeof event.duration === "number" && Number.isFinite(event.duration)) {
|
|
51762
51833
|
payload.duration = event.duration;
|
|
51763
51834
|
}
|
|
@@ -52805,7 +52876,10 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
52805
52876
|
this.instances.get(id).dispose();
|
|
52806
52877
|
}
|
|
52807
52878
|
this.instances.set(id, instance);
|
|
52808
|
-
await instance.init(
|
|
52879
|
+
await instance.init({
|
|
52880
|
+
...context,
|
|
52881
|
+
emitProviderEvent: (event) => this.emitProviderEvent(instance.type, id, event)
|
|
52882
|
+
});
|
|
52809
52883
|
}
|
|
52810
52884
|
/**
|
|
52811
52885
|
* Instance remove
|
|
@@ -52967,6 +53041,17 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
52967
53041
|
onEvent(listener) {
|
|
52968
53042
|
this.eventListeners.push(listener);
|
|
52969
53043
|
}
|
|
53044
|
+
emitProviderEvent(providerType, instanceId, event) {
|
|
53045
|
+
const payload = {
|
|
53046
|
+
...event,
|
|
53047
|
+
providerType,
|
|
53048
|
+
instanceId: typeof event.instanceId === "string" && event.instanceId.trim() ? event.instanceId : instanceId,
|
|
53049
|
+
targetSessionId: typeof event.targetSessionId === "string" && event.targetSessionId.trim() ? event.targetSessionId : instanceId
|
|
53050
|
+
};
|
|
53051
|
+
for (const listener of this.eventListeners) {
|
|
53052
|
+
listener(payload);
|
|
53053
|
+
}
|
|
53054
|
+
}
|
|
52970
53055
|
emitPendingEvents(providerType, state, extra = {}) {
|
|
52971
53056
|
for (const event of state.pendingEvents) {
|
|
52972
53057
|
for (const listener of this.eventListeners) {
|