@zaclinley/dsh-mailharbor 0.5.0 → 0.5.1
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/CHANGELOG.md +11 -0
- package/lib/client.js +163 -91
- package/lib/client.js.map +2 -2
- package/lib/index.js +17 -4
- package/lib/index.js.map +2 -2
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -2430,7 +2430,7 @@ ${conversation.trim()}
|
|
|
2430
2430
|
}
|
|
2431
2431
|
|
|
2432
2432
|
// src/host/version.ts
|
|
2433
|
-
var VERSION = "0.5.
|
|
2433
|
+
var VERSION = "0.5.1";
|
|
2434
2434
|
|
|
2435
2435
|
// src/host/api.ts
|
|
2436
2436
|
init_smtp();
|
|
@@ -4283,7 +4283,7 @@ var MailHarborRuntime = class {
|
|
|
4283
4283
|
aiStores = /* @__PURE__ */ new Map();
|
|
4284
4284
|
backups = /* @__PURE__ */ new Map();
|
|
4285
4285
|
llmProvider;
|
|
4286
|
-
|
|
4286
|
+
workspaceRegistryProvider;
|
|
4287
4287
|
sessions;
|
|
4288
4288
|
aiService = null;
|
|
4289
4289
|
projectStore = null;
|
|
@@ -4293,9 +4293,12 @@ var MailHarborRuntime = class {
|
|
|
4293
4293
|
this.config = loadConfig();
|
|
4294
4294
|
this.credentials = options.credentials ?? new CredentialManager();
|
|
4295
4295
|
this.llmProvider = options.llm ?? (() => void 0);
|
|
4296
|
-
this.
|
|
4296
|
+
this.workspaceRegistryProvider = options.workspaceRegistry ?? (() => void 0);
|
|
4297
4297
|
this.sessions = options.sessions;
|
|
4298
4298
|
}
|
|
4299
|
+
get workspaceRegistry() {
|
|
4300
|
+
return this.workspaceRegistryProvider();
|
|
4301
|
+
}
|
|
4299
4302
|
projects() {
|
|
4300
4303
|
if (this.projectStore === null) {
|
|
4301
4304
|
this.projectStore = new ProjectStore(join7(this.config.dataDir, "projects.json"));
|
|
@@ -4915,8 +4918,18 @@ function optionalService(ctx, name2) {
|
|
|
4915
4918
|
}
|
|
4916
4919
|
}
|
|
4917
4920
|
function apply(ctx) {
|
|
4921
|
+
let registry;
|
|
4922
|
+
if (typeof ctx.inject === "function") {
|
|
4923
|
+
ctx.inject(["workspaceRegistry"], (scope) => {
|
|
4924
|
+
try {
|
|
4925
|
+
registry = scope.workspaceRegistry;
|
|
4926
|
+
} catch {
|
|
4927
|
+
registry = void 0;
|
|
4928
|
+
}
|
|
4929
|
+
});
|
|
4930
|
+
}
|
|
4918
4931
|
const runtime = new MailHarborRuntime({
|
|
4919
|
-
workspaceRegistry:
|
|
4932
|
+
workspaceRegistry: () => registry,
|
|
4920
4933
|
sessions: optionalService(ctx, "sessions"),
|
|
4921
4934
|
llm: () => {
|
|
4922
4935
|
if (typeof ctx.get !== "function") return void 0;
|