adhdev 0.9.76-rc.64 → 0.9.76-rc.66
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 +40 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +40 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/vendor/mcp-server/index.js +6 -0
- package/vendor/mcp-server/index.js.map +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -566,6 +566,7 @@ var init_repo_mesh_types = __esm({
|
|
|
566
566
|
requireApprovalForDestructiveGit: true,
|
|
567
567
|
dirtyWorkspaceBehavior: "warn",
|
|
568
568
|
maxParallelTasks: 2,
|
|
569
|
+
spawnedSessionVisibility: "visible",
|
|
569
570
|
sessionCleanupOnNodeRemove: "preserve"
|
|
570
571
|
};
|
|
571
572
|
}
|
|
@@ -2890,6 +2891,9 @@ function mergeMeshPolicy(base, patch) {
|
|
|
2890
2891
|
if (!SESSION_CLEANUP_MODES.has(String(policy.sessionCleanupOnNodeRemove))) {
|
|
2891
2892
|
policy.sessionCleanupOnNodeRemove = "preserve";
|
|
2892
2893
|
}
|
|
2894
|
+
if (!SPAWNED_SESSION_VISIBILITY_MODES.has(String(policy.spawnedSessionVisibility))) {
|
|
2895
|
+
policy.spawnedSessionVisibility = "visible";
|
|
2896
|
+
}
|
|
2893
2897
|
return policy;
|
|
2894
2898
|
}
|
|
2895
2899
|
function listMeshes() {
|
|
@@ -2994,7 +2998,7 @@ function updateNode(meshId, nodeId, opts) {
|
|
|
2994
2998
|
saveMeshConfig(config2);
|
|
2995
2999
|
return node;
|
|
2996
3000
|
}
|
|
2997
|
-
var import_fs2, import_path2, import_crypto3, SESSION_CLEANUP_MODES;
|
|
3001
|
+
var import_fs2, import_path2, import_crypto3, SESSION_CLEANUP_MODES, SPAWNED_SESSION_VISIBILITY_MODES;
|
|
2998
3002
|
var init_mesh_config = __esm({
|
|
2999
3003
|
"../../oss/packages/daemon-core/src/config/mesh-config.ts"() {
|
|
3000
3004
|
"use strict";
|
|
@@ -3004,6 +3008,7 @@ var init_mesh_config = __esm({
|
|
|
3004
3008
|
init_config();
|
|
3005
3009
|
init_repo_mesh_types();
|
|
3006
3010
|
SESSION_CLEANUP_MODES = /* @__PURE__ */ new Set(["preserve", "stop", "delete_stopped", "stop_and_delete"]);
|
|
3011
|
+
SPAWNED_SESSION_VISIBILITY_MODES = /* @__PURE__ */ new Set(["visible", "hidden"]);
|
|
3007
3012
|
}
|
|
3008
3013
|
});
|
|
3009
3014
|
|
|
@@ -17186,8 +17191,29 @@ function materializeImageDataPart(part, index, dir) {
|
|
|
17186
17191
|
fs6.mkdirSync(dir, { recursive: true });
|
|
17187
17192
|
const filePath = path17.join(dir, safeInputImageBasename(index, part.mimeType));
|
|
17188
17193
|
fs6.writeFileSync(filePath, Buffer.from(rawData, "base64"));
|
|
17194
|
+
cleanupStaleMaterializedImages(dir);
|
|
17189
17195
|
return filePath;
|
|
17190
17196
|
}
|
|
17197
|
+
function cleanupStaleMaterializedImages(dir) {
|
|
17198
|
+
const now = Date.now();
|
|
17199
|
+
if (now - lastMaterializedImageCleanupAt < MATERIALIZED_IMAGE_CLEANUP_INTERVAL_MS) return;
|
|
17200
|
+
lastMaterializedImageCleanupAt = now;
|
|
17201
|
+
try {
|
|
17202
|
+
const entries = fs6.readdirSync(dir);
|
|
17203
|
+
for (const entry of entries) {
|
|
17204
|
+
if (!entry.startsWith("adhdev-input-image-")) continue;
|
|
17205
|
+
const fullPath = path17.join(dir, entry);
|
|
17206
|
+
try {
|
|
17207
|
+
const stat5 = fs6.statSync(fullPath);
|
|
17208
|
+
if (now - stat5.mtimeMs > MATERIALIZED_IMAGE_MAX_AGE_MS) {
|
|
17209
|
+
fs6.unlinkSync(fullPath);
|
|
17210
|
+
}
|
|
17211
|
+
} catch {
|
|
17212
|
+
}
|
|
17213
|
+
}
|
|
17214
|
+
} catch {
|
|
17215
|
+
}
|
|
17216
|
+
}
|
|
17191
17217
|
function buildCliStructuredInputPrompt(input, options = {}) {
|
|
17192
17218
|
const promptParts = [];
|
|
17193
17219
|
const imageRefs = [];
|
|
@@ -17214,7 +17240,10 @@ function buildCliStructuredInputPrompt(input, options = {}) {
|
|
|
17214
17240
|
resourceRefs.push([part.name, part.text, part.uri].filter(Boolean).join("\n"));
|
|
17215
17241
|
}
|
|
17216
17242
|
});
|
|
17217
|
-
|
|
17243
|
+
const hasExplicitTextParts = input.parts.some((part) => part.type === "text" && part.text.trim());
|
|
17244
|
+
if (!hasExplicitTextParts && input.textFallback.trim()) {
|
|
17245
|
+
promptParts.push(input.textFallback.trim());
|
|
17246
|
+
}
|
|
17218
17247
|
const ordered = [
|
|
17219
17248
|
...imageRefs,
|
|
17220
17249
|
...promptParts,
|
|
@@ -17297,7 +17326,7 @@ async function waitForCliAdapterReady(adapter, options) {
|
|
|
17297
17326
|
}
|
|
17298
17327
|
throw new Error(`CLI runtime did not become ready within ${timeoutMs}ms`);
|
|
17299
17328
|
}
|
|
17300
|
-
var os15, path17, crypto3, fs6, import_node_module, IMAGE_MIME_EXTENSIONS, CachedDatabaseSync, CliProviderInstance;
|
|
17329
|
+
var os15, path17, crypto3, fs6, import_node_module, IMAGE_MIME_EXTENSIONS, MATERIALIZED_IMAGE_MAX_AGE_MS, MATERIALIZED_IMAGE_CLEANUP_INTERVAL_MS, lastMaterializedImageCleanupAt, CachedDatabaseSync, CliProviderInstance;
|
|
17301
17330
|
var init_cli_provider_instance = __esm({
|
|
17302
17331
|
"../../oss/packages/daemon-core/src/providers/cli-provider-instance.ts"() {
|
|
17303
17332
|
"use strict";
|
|
@@ -17328,6 +17357,9 @@ var init_cli_provider_instance = __esm({
|
|
|
17328
17357
|
"image/tiff": ".tiff",
|
|
17329
17358
|
"image/svg+xml": ".svg"
|
|
17330
17359
|
};
|
|
17360
|
+
MATERIALIZED_IMAGE_MAX_AGE_MS = 60 * 60 * 1e3;
|
|
17361
|
+
MATERIALIZED_IMAGE_CLEANUP_INTERVAL_MS = 5 * 60 * 1e3;
|
|
17362
|
+
lastMaterializedImageCleanupAt = 0;
|
|
17331
17363
|
CachedDatabaseSync = null;
|
|
17332
17364
|
CliProviderInstance = class {
|
|
17333
17365
|
constructor(provider, workingDir, cliArgs = [], instanceId, transportFactory, options) {
|
|
@@ -43825,7 +43857,10 @@ function setupMeshEventForwarding(components) {
|
|
|
43825
43857
|
const workspace = readNonEmptyString(state.workspace);
|
|
43826
43858
|
if (!workspace) return;
|
|
43827
43859
|
const settings = state.settings && typeof state.settings === "object" ? state.settings : {};
|
|
43860
|
+
if (readNonEmptyString(settings.meshCoordinatorFor)) return;
|
|
43828
43861
|
const meshIdFromRuntime = readNonEmptyString(settings.meshNodeFor);
|
|
43862
|
+
const isMeshDelegate = Boolean(meshIdFromRuntime || settings.launchedByCoordinator);
|
|
43863
|
+
if (!isMeshDelegate) return;
|
|
43829
43864
|
const mesh = meshIdFromRuntime ? getMesh(meshIdFromRuntime) : getMeshByRepo(workspace);
|
|
43830
43865
|
const meshId = meshIdFromRuntime || readNonEmptyString(mesh?.id);
|
|
43831
43866
|
if (!meshId) return;
|
|
@@ -46381,7 +46416,7 @@ function prepareSessionChatTailUpdate(input) {
|
|
|
46381
46416
|
};
|
|
46382
46417
|
}
|
|
46383
46418
|
const fullMessages = normalizeChatMessages(Array.isArray(result.messages) ? result.messages : []);
|
|
46384
|
-
const messages =
|
|
46419
|
+
const messages = fullMessages;
|
|
46385
46420
|
const title = typeof result.title === "string" ? result.title : void 0;
|
|
46386
46421
|
const activeModal = normalizeChatTailActiveModal(result.activeModal);
|
|
46387
46422
|
const status = typeof result.status === "string" ? result.status : "idle";
|
|
@@ -94602,7 +94637,7 @@ var init_adhdev_daemon = __esm({
|
|
|
94602
94637
|
init_version();
|
|
94603
94638
|
init_src();
|
|
94604
94639
|
init_runtime_defaults();
|
|
94605
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.
|
|
94640
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.9.76-rc.66" });
|
|
94606
94641
|
AdhdevDaemon = class _AdhdevDaemon {
|
|
94607
94642
|
localHttpServer = null;
|
|
94608
94643
|
localWss = null;
|