martty 0.2.18-beta.2 → 0.2.19
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/lib/acp-host.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/** Resolve the embeddable ACP plugin from TUI's own dependency graph. */
|
|
2
2
|
|
|
3
|
-
import { existsSync } from 'node:fs'
|
|
4
3
|
import { createRequire } from 'node:module'
|
|
5
|
-
import { dirname, join } from 'node:path'
|
|
6
4
|
import { pathToFileURL } from 'node:url'
|
|
7
5
|
|
|
8
6
|
export const name = 'dsh-tui-acp-host'
|
|
@@ -20,50 +18,7 @@ function resolvedModule(ctx, specifier) {
|
|
|
20
18
|
return specifier
|
|
21
19
|
}
|
|
22
20
|
|
|
23
|
-
function shippedPresetRoot(ctx) {
|
|
24
|
-
for (const anchor of [ctx.baseUrl, import.meta.url]) {
|
|
25
|
-
if (typeof anchor !== 'string') continue
|
|
26
|
-
try {
|
|
27
|
-
const manifest = createRequire(anchor).resolve('@deepseek-ai/dsh/package.json')
|
|
28
|
-
const root = join(dirname(manifest), 'config', 'agent-presets')
|
|
29
|
-
if (existsSync(root)) return root
|
|
30
|
-
} catch {
|
|
31
|
-
// Try the next resolution anchor.
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
throw new Error('dsh-tui: cannot resolve the dsh shipped agent presets')
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
async function mountService(ctx, service, specifier, config) {
|
|
38
|
-
if (ctx.get(service) !== undefined) return
|
|
39
|
-
const resolved = resolvedModule(ctx, specifier)
|
|
40
|
-
let exports
|
|
41
|
-
try {
|
|
42
|
-
exports = await import(resolved)
|
|
43
|
-
} catch (cause) {
|
|
44
|
-
throw new Error(`dsh-tui: failed to import ${specifier} from ${resolved}`, { cause })
|
|
45
|
-
}
|
|
46
|
-
const plugin = ctx.loader.unwrapExports(exports)
|
|
47
|
-
try {
|
|
48
|
-
await ctx.plugin(plugin, config)
|
|
49
|
-
} catch (cause) {
|
|
50
|
-
throw new Error(`dsh-tui: failed to mount ${specifier}`, { cause })
|
|
51
|
-
}
|
|
52
|
-
if (ctx.get(service) === undefined) {
|
|
53
|
-
throw new Error(`dsh-tui: ${specifier} did not provide ${service}`)
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
|
|
57
21
|
export async function apply(ctx, config) {
|
|
58
|
-
// ACP currently mounts these Host services dynamically. Resolve them here
|
|
59
|
-
// first so Node's Windows ESM loader never receives a raw drive path from
|
|
60
|
-
// Cordis's internal bare-package resolver.
|
|
61
|
-
await mountService(ctx, 'agentPresets', '@deepseek-ai/dsh-agent-presets', {
|
|
62
|
-
default: 'standard',
|
|
63
|
-
roots: [{ path: shippedPresetRoot(ctx), trust: 'system' }],
|
|
64
|
-
})
|
|
65
|
-
await mountService(ctx, 'dynamicCordisRunner', '@deepseek-ai/dsh-cordis-host-runner')
|
|
66
|
-
|
|
67
22
|
const specifier = '@openma/deepseek-harness-acp/plugin'
|
|
68
23
|
const resolved = resolvedModule(ctx, specifier)
|
|
69
24
|
let exports
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "martty",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.19",
|
|
4
4
|
"description": "Terminal-native ACP client UI; Cordis client tree, any ACP agent",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
74
|
-
"@openma/deepseek-harness-acp": "0.4.
|
|
74
|
+
"@openma/deepseek-harness-acp": "0.4.21"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@deepseek-ai/dsh": "0.1.0-rc.6"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/vendor/linux-x64/dsh-tui
CHANGED
|
Binary file
|
|
Binary file
|