mirror of
https://github.com/deepseek-ai/deepseek-harness.git
synced 2026-09-09 04:02:35 +00:00
Cover the missing SDK projections through shipped dsh profiles. TypeScript reuses the headless read-completion composition and records SDK notifications. Python all includes a focused minimal-profile variant with an ordinary prompt section updated after shell completion, unchanged tools, persisted/subscribed append events, and independently checked editor output. Observed: focused TS refresh and built replay passed (1 test); Python sdk-minimal-in-history and sdk-minimal passed against apps/cli/lib/bin.js using uv; unchanged-prompt negative control failed as expected then restored scenario passed; corpus 3 tests, doc-sync 33 gates, and lint:contracts-ready passed. Host-only build initially left SDK built startup incomplete; build:lib:client completed the prerequisites. Native packaged/wheel and Windows validation remain pending parent integration.
19 lines
677 B
JavaScript
19 lines
677 B
JavaScript
/** Change one ordinary section after a successful persistent shell call. */
|
|
export const name = 'python-sdk-in-history-prompt'
|
|
export const inject = ['systemPrompt']
|
|
|
|
/** @param {import('@deepseek-ai/cordis').Context} ctx - Composed runtime services. */
|
|
export function apply(ctx) {
|
|
let version = 1
|
|
ctx.effect(() => ctx.systemPrompt.section({
|
|
name: 'python-sdk:in-history',
|
|
order: 400,
|
|
text: () => `Python SDK prompt version ${version}.`,
|
|
}))
|
|
ctx.on('tools/post-execute', async (exec, result, next) => {
|
|
const downstream = await next()
|
|
if (!result.isError && (exec.name === 'bash' || exec.name === 'pwsh')) version = 2
|
|
return downstream
|
|
})
|
|
}
|