@openma/deepseek-harness-acp 0.4.19 → 0.4.20
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/plugin.js +12 -1
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -48,6 +48,7 @@ var init_self_harness = __esm({
|
|
|
48
48
|
import { existsSync } from "node:fs";
|
|
49
49
|
import { createRequire as createRequire2 } from "node:module";
|
|
50
50
|
import { dirname, join } from "node:path";
|
|
51
|
+
import { pathToFileURL } from "node:url";
|
|
51
52
|
|
|
52
53
|
// src/bridge/index.ts
|
|
53
54
|
var bridge_exports = {};
|
|
@@ -3283,6 +3284,16 @@ function apply4(ctx, config = {}) {
|
|
|
3283
3284
|
// src/plugin.ts
|
|
3284
3285
|
var name5 = "dsh-acp-plugin";
|
|
3285
3286
|
var inject5 = [.../* @__PURE__ */ new Set([...inject3.filter((service) => service !== "agentPresets"), "loader"])];
|
|
3287
|
+
function resolvedHostModule(ctx, specifier) {
|
|
3288
|
+
const anchors = [ctx.baseUrl, import.meta.url].filter((value) => typeof value === "string");
|
|
3289
|
+
for (const anchor of anchors) {
|
|
3290
|
+
try {
|
|
3291
|
+
return pathToFileURL(createRequire2(anchor).resolve(specifier)).href;
|
|
3292
|
+
} catch {
|
|
3293
|
+
}
|
|
3294
|
+
}
|
|
3295
|
+
return specifier;
|
|
3296
|
+
}
|
|
3286
3297
|
function shippedPresetRoot(ctx) {
|
|
3287
3298
|
const anchors = [ctx.baseUrl, import.meta.url].filter((value) => typeof value === "string");
|
|
3288
3299
|
for (const anchor of anchors) {
|
|
@@ -3297,7 +3308,7 @@ function shippedPresetRoot(ctx) {
|
|
|
3297
3308
|
}
|
|
3298
3309
|
async function mountService(ctx, service, specifier, config) {
|
|
3299
3310
|
if (ctx.get(service) !== void 0) return;
|
|
3300
|
-
const exports = await ctx.loader.import(specifier);
|
|
3311
|
+
const exports = await ctx.loader.import(resolvedHostModule(ctx, specifier));
|
|
3301
3312
|
const plugin = ctx.loader.unwrapExports(exports);
|
|
3302
3313
|
await ctx.plugin(plugin, config);
|
|
3303
3314
|
if (ctx.get(service) === void 0) {
|