adhdev 0.8.50 → 0.8.52
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 +30 -5
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +30 -5
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/vendor/terminal-mux-cli/index.d.mts +1 -0
- package/vendor/terminal-mux-cli/index.d.ts +1 -0
- package/vendor/terminal-mux-cli/index.js +2056 -0
- package/vendor/terminal-mux-cli/index.mjs +2048 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/session-host-core/index.d.mts +427 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/session-host-core/index.d.ts +427 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/session-host-core/index.js +617 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/session-host-core/index.js.map +1 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/session-host-core/index.mjs +573 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/session-host-core/index.mjs.map +1 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/session-host-core/package.json +7 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/api.d.mts +16 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/api.d.ts +16 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/api.js +206 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/api.mjs +17 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/chunk-7RNMRPVZ.mjs +183 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/chunk-R4EFW6W3.mjs +46 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/chunk-XZWWVN5W.mjs +164 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/control-socket.d.mts +35 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/control-socket.d.ts +35 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/control-socket.js +219 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/control-socket.mjs +13 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/index.d.mts +5 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/index.d.ts +5 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/index.js +427 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/index.mjs +34 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/package.json +33 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/storage.d.mts +49 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/storage.d.ts +49 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/storage.js +222 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-control/storage.mjs +16 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-core/index.d.mts +162 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-core/index.d.ts +162 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-core/index.js +985 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-core/index.mjs +948 -0
- package/vendor/terminal-mux-cli/node_modules/@adhdev/terminal-mux-core/package.json +7 -0
package/dist/cli/index.js
CHANGED
|
@@ -28549,6 +28549,19 @@ var init_acp_provider_instance = __esm({
|
|
|
28549
28549
|
}
|
|
28550
28550
|
});
|
|
28551
28551
|
|
|
28552
|
+
// ../../oss/packages/daemon-core/src/commands/hosted-runtime-restore.ts
|
|
28553
|
+
function shouldRestoreHostedRuntime(record2, managerTag) {
|
|
28554
|
+
if (!managerTag) return true;
|
|
28555
|
+
const managedBy = typeof record2.managedBy === "string" ? record2.managedBy.trim() : "";
|
|
28556
|
+
if (!managedBy) return true;
|
|
28557
|
+
return managedBy === managerTag;
|
|
28558
|
+
}
|
|
28559
|
+
var init_hosted_runtime_restore = __esm({
|
|
28560
|
+
"../../oss/packages/daemon-core/src/commands/hosted-runtime-restore.ts"() {
|
|
28561
|
+
"use strict";
|
|
28562
|
+
}
|
|
28563
|
+
});
|
|
28564
|
+
|
|
28552
28565
|
// ../../oss/packages/daemon-core/src/commands/cli-manager.ts
|
|
28553
28566
|
function colorize(color, text) {
|
|
28554
28567
|
const fn = chalkApi?.[color];
|
|
@@ -28679,6 +28692,7 @@ var init_cli_manager = __esm({
|
|
|
28679
28692
|
init_cli_provider_instance();
|
|
28680
28693
|
init_acp_provider_instance();
|
|
28681
28694
|
init_logger();
|
|
28695
|
+
init_hosted_runtime_restore();
|
|
28682
28696
|
chalkModule = import_chalk.default;
|
|
28683
28697
|
chalkApi = typeof chalkModule.yellow === "function" ? chalkModule : chalkModule.default || null;
|
|
28684
28698
|
DaemonCliManager = class {
|
|
@@ -29063,8 +29077,16 @@ Run 'adhdev doctor' for detailed diagnostics.`
|
|
|
29063
29077
|
const sessions = records || await this.deps.listHostedCliRuntimes?.() || [];
|
|
29064
29078
|
let restored = 0;
|
|
29065
29079
|
const restoredBindings = /* @__PURE__ */ new Set();
|
|
29080
|
+
const managerTag = this.deps.hostedRuntimeManagerTag;
|
|
29066
29081
|
for (const record2 of sessions) {
|
|
29067
29082
|
if (!record2?.runtimeId || !record2?.cliType || !record2?.workspace) continue;
|
|
29083
|
+
if (!shouldRestoreHostedRuntime(record2, managerTag)) {
|
|
29084
|
+
LOG.info(
|
|
29085
|
+
"CLI",
|
|
29086
|
+
`\u21B7 Skipping hosted runtime restore owned by ${record2.managedBy}: ${record2.runtimeKey || record2.runtimeId}`
|
|
29087
|
+
);
|
|
29088
|
+
continue;
|
|
29089
|
+
}
|
|
29068
29090
|
if (this.adapters.has(record2.runtimeId) || instanceManager.getInstance(record2.runtimeId)) continue;
|
|
29069
29091
|
const normalizedType = this.providerLoader.resolveAlias(record2.cliType);
|
|
29070
29092
|
const providerMeta = this.providerLoader.getMeta(normalizedType);
|
|
@@ -40921,7 +40943,8 @@ async function listHostedCliRuntimes(endpoint) {
|
|
|
40921
40943
|
cliType: record2.providerType,
|
|
40922
40944
|
workspace: record2.workspace,
|
|
40923
40945
|
cliArgs: Array.isArray(record2.meta?.cliArgs) ? record2.meta.cliArgs : [],
|
|
40924
|
-
providerSessionId: typeof record2.meta?.providerSessionId === "string" ? String(record2.meta.providerSessionId) : void 0
|
|
40946
|
+
providerSessionId: typeof record2.meta?.providerSessionId === "string" ? String(record2.meta.providerSessionId) : void 0,
|
|
40947
|
+
managedBy: typeof record2.meta?.managedBy === "string" ? String(record2.meta.managedBy) : void 0
|
|
40925
40948
|
}));
|
|
40926
40949
|
} finally {
|
|
40927
40950
|
await client.close().catch(() => {
|
|
@@ -50420,7 +50443,7 @@ var init_adhdev_daemon = __esm({
|
|
|
50420
50443
|
import_ws3 = require("ws");
|
|
50421
50444
|
import_chalk2 = __toESM(require("chalk"));
|
|
50422
50445
|
init_version();
|
|
50423
|
-
pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.
|
|
50446
|
+
pkgVersion = resolvePackageVersion({ injectedVersion: "0.8.52" });
|
|
50424
50447
|
ACTIVE_CHAT_POLL_STATUSES = /* @__PURE__ */ new Set([
|
|
50425
50448
|
"generating",
|
|
50426
50449
|
"waiting_approval",
|
|
@@ -50889,6 +50912,7 @@ ${err?.stack || ""}`);
|
|
|
50889
50912
|
}),
|
|
50890
50913
|
onStatusChange: () => this.statusReporter?.onStatusChange(),
|
|
50891
50914
|
removeAgentTracking: (key) => this.statusReporter?.removeAgentTracking(key),
|
|
50915
|
+
hostedRuntimeManagerTag: "adhdev-cloud",
|
|
50892
50916
|
createPtyTransportFactory: ({ runtimeId, providerType, workspace, cliArgs, providerSessionId, attachExisting }) => new SessionHostPtyTransportFactory({
|
|
50893
50917
|
endpoint: sessionHostEndpoint,
|
|
50894
50918
|
ensureReady: async () => {
|
|
@@ -50899,12 +50923,13 @@ ${err?.stack || ""}`);
|
|
|
50899
50923
|
runtimeId,
|
|
50900
50924
|
providerType,
|
|
50901
50925
|
workspace,
|
|
50926
|
+
attachExisting,
|
|
50902
50927
|
appName: process.env.ADHDEV_SESSION_HOST_NAME || "adhdev",
|
|
50903
50928
|
meta: {
|
|
50904
50929
|
cliArgs,
|
|
50905
|
-
providerSessionId
|
|
50906
|
-
|
|
50907
|
-
|
|
50930
|
+
providerSessionId,
|
|
50931
|
+
managedBy: "adhdev-cloud"
|
|
50932
|
+
}
|
|
50908
50933
|
}),
|
|
50909
50934
|
listHostedCliRuntimes: async () => listHostedCliRuntimes2(sessionHostEndpoint)
|
|
50910
50935
|
},
|