准备公开发布 dsh-unrestricted 0.1.0

This commit is contained in:
yexi committed 2026-08-22 15:39:17 +08:00
1 parent aceb93ccd4
commit 4e68568fa8
19 files changed
+252 -80

No files matched your search

+8 -2
View File
@@ -27,6 +27,7 @@ function arg(name) {
const repo = resolve(arg('repo'))
const out = resolve(arg('out'))
const FIXTURE_CWD = '/workspace/dsh-unrestricted'
async function importPackage(relativeDir) {
const manifestPath = join(repo, relativeDir, 'package.json')
@@ -96,7 +97,12 @@ try {
commit = execSync('git rev-parse HEAD', { cwd: repo, encoding: 'utf8' }).trim()
} catch { /* not a git checkout */ }
const meta = { repo, commit, capturedAt: new Date().toISOString(), dumps: {} }
const meta = {
fixtureCwd: FIXTURE_CWD,
commit,
capturedAt: new Date().toISOString(),
dumps: {},
}
async function dumpAgent(label, agent) {
const assembly = await ctx.systemPrompt.assemble({ agent, scope: agent })
@@ -121,7 +127,7 @@ async function dumpAgent(label, agent) {
async function withPreset(id, fn) {
const handle = await ctx.agents.create({
sessionId: SessionId(`dump-${id}`),
meta: { cwd: process.cwd() },
meta: { cwd: FIXTURE_CWD },
agentOptions: { provider: 'deepseek', model: 'deepseek-chat' },
setup: agentCtx => ctx.agentPresets.mount(agentCtx, id).then(() => undefined),
})
+1 -1
View File
@@ -52,7 +52,7 @@ async function rpc(method, payload) {
async function createSession(preset, title) {
const value = await rpc('session.create', {
cwd: 'D:\\work\\dsh\\plugin\\unrestricted',
cwd: pluginDir,
agentPreset: preset,
})
const sessionId = value.sessionId ?? value.id ?? value
+1 -1
View File
@@ -59,7 +59,7 @@ void settings
await rpc('settings.update', { ns: 'unrestricted', patch: { enabled: true } })
const created = await rpc('session.create', {
cwd: 'D:\\work\\dsh\\plugin\\unrestricted',
cwd: pluginDir,
agentPreset: 'standard',
})
const sessionId = created.sessionId ?? created.id ?? created