Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2aef4c9
feat(dsh): resume projects and adopt saved results
prettygirlisnotme Nov 10, 2026
62ffd1e
feat(dsh): add direct image, edit, and voiceover controls
prettygirlisnotme Nov 10, 2026
1fd0db4
ci(dsh): verify installable bundle contents
prettygirlisnotme Nov 10, 2026
a1fa86f
feat(dsh): add media actions and result filters
prettygirlisnotme Nov 10, 2026
bad012d
feat(dsh): select ordered references for image edits
prettygirlisnotme Nov 10, 2026
ae60d46
fix(dsh): preserve the selected image size when switching models
prettygirlisnotme Nov 10, 2026
ceeb2aa
feat(dsh): reorder additional image references before editing
prettygirlisnotme Nov 10, 2026
0cc78fd
feat(dsh): generate and compare candidates on the same node
prettygirlisnotme Nov 10, 2026
883a812
feat(dsh): show media details and view original images
prettygirlisnotme Nov 10, 2026
f7d1f37
fix(dsh): recover generation failures without duplicating jobs
prettygirlisnotme Nov 10, 2026
e66dc88
feat(dsh): generate and continue video from result cards
prettygirlisnotme Nov 10, 2026
6683158
feat(dsh): find and follow saved generation tasks
prettygirlisnotme Nov 11, 2026
939ac96
fix(dsh): prepare rc.2 compatibility and align scaled menus
prettygirlisnotme Nov 11, 2026
5614649
ci(dsh): check the plugin on Linux Windows and macOS
prettygirlisnotme Nov 11, 2026
c4727e2
feat(dsh): request and recover job cancellation from task dialogs
prettygirlisnotme Nov 12, 2026
048fc11
feat(dsh): restore unsubmitted media drafts after closing and reloading
prettygirlisnotme Nov 12, 2026
11f66f2
feat(dsh): reuse image and voiceover settings from saved results
prettygirlisnotme Nov 12, 2026
5efe309
feat(dsh): search saved media and filter task status
prettygirlisnotme Nov 14, 2026
170c9f3
fix(dsh): accept the verified rc.3 tool runtime
prettygirlisnotme Nov 14, 2026
6c2fc0b
feat(dsh): compare saved images and pause inactive status checks
prettygirlisnotme Nov 14, 2026
6120cc3
perf(dsh): keep saved-work browsing within one page
prettygirlisnotme Nov 14, 2026
23430f1
fix(dsh): recover unconfirmed submissions after reload
prettygirlisnotme Nov 14, 2026
19416b7
style(dsh): put media and adoption ahead of submitted settings
prettygirlisnotme Nov 14, 2026
3635393
fix(core): reconcile cancellation during job checkpoints
prettygirlisnotme Nov 14, 2026
6d29d1a
feat(dsh): generate and review candidate groups
prettygirlisnotme Nov 14, 2026
df9d814
feat(dsh): build persistent character action packs
prettygirlisnotme Nov 14, 2026
e1cddc8
feat(dsh): refine actions and prepare plugin delivery
prettygirlisnotme Nov 14, 2026
c884c12
fix(dsh): keep recovery controls idle until submission returns
prettygirlisnotme Nov 14, 2026
df8aaa5
feat(dsh): add connection diagnostics and desktop setup guide
prettygirlisnotme Nov 14, 2026
b4cd5af
feat(dsh): add creation examples and repeatable release previews
prettygirlisnotme Nov 15, 2026
71a83f6
docs(dsh): add recorded workflow and responsive showcase
prettygirlisnotme Nov 15, 2026
c8207ae
Remember creation context and clarify media candidate versions
prettygirlisnotme Nov 15, 2026
da71e11
docs(dsh): refresh demo with version labels and resumed selection
prettygirlisnotme Nov 16, 2026
8fb29da
fix(dsh): reload discovery without losing form edits
prettygirlisnotme Nov 17, 2026
bc6391b
fix(dsh): retry saved media previews in place
prettygirlisnotme Nov 18, 2026
7171b90
fix(dsh): support rc.5 and check the install gate
prettygirlisnotme Nov 20, 2026
542fcf9
fix(dsh): preserve explicit image sizes across creation workflows
prettygirlisnotme Nov 20, 2026
05e9550
Guide media creation and explain candidate dimensions in DSH
prettygirlisnotme Nov 20, 2026
b6fb335
Show a live image generation and saved result in DSH rc.5
prettygirlisnotme Nov 20, 2026
17ffb4e
Save a video frame in DSH and respect the source model’s continuation…
prettygirlisnotme Nov 20, 2026
93d7748
Load a paused video preview when its card comes into view
prettygirlisnotme Nov 20, 2026
eadf8cc
Review saved takes in DSH and carry the selected reference into an edit
prettygirlisnotme Nov 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 80 additions & 1 deletion .github/workflows/dsh-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ permissions:

jobs:
tests:
runs-on: ubuntu-22.04
name: Plugin checks (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest, macos-latest]
timeout-minutes: 15
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
Expand All @@ -33,3 +38,77 @@ jobs:
- name: DSH plugin tests
working-directory: plugins/deepseek-harness
run: npm test
- name: Check the installable DSH bundle
shell: bash
working-directory: plugins/deepseek-harness
run: |
npm pack --json > package-check.json
node --input-type=module <<'NODE'
import assert from 'node:assert/strict'
import { execFileSync } from 'node:child_process'
import { readFileSync, writeFileSync, unlinkSync } from 'node:fs'
import { createHash } from 'node:crypto'

const run = (command, args) => execFileSync(command, args, { encoding: 'utf8' })
const [{ filename }] = JSON.parse(readFileSync('package-check.json', 'utf8'))
try {
const entries = new Set(run('tar', ['-tzf', filename]).trim().split(/\r?\n/))
const manifest = JSON.parse(run('tar', ['-xOzf', filename, 'package/package.json']))
for (const entry of [manifest.dsh?.bundle?.patch, manifest.exports?.['./client'], manifest.icon,
...['en', 'zh'].map(language => manifest.exports?.['./locale/*.json']?.replace('*', language))]) {
assert.ok(entry?.startsWith('./') && entries.has('package/' + entry.slice(2)), entry)
}
assert.ok(manifest.version && manifest.engines?.dsh)
const sha256 = createHash('sha256').update(readFileSync(filename)).digest('hex')
writeFileSync(filename + '.sha256', sha256 + ' ' + filename + '\n')
if (process.env.RUNNER_OS === 'Linux') {
execFileSync(process.execPath, ['scripts/prepare-release.mjs', '--tarball', filename,
'--output', process.env.RUNNER_TEMP + '/opendirector-dsh-release'], { stdio: 'inherit' })
}
} finally {
unlinkSync('package-check.json')
}
NODE
- name: Save the installable plugin
if: matrix.os == 'ubuntu-22.04'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: opendirector-dsh-plugin-${{ github.sha }}
path: ${{ runner.temp }}/opendirector-dsh-release/*
if-no-files-found: error
retention-days: 7

latest-tools:
name: Plugin compatibility
runs-on: ubuntu-22.04
timeout-minutes: 15
env:
DSH_VERSION: 0.2.2-rc.5
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- uses: actions/setup-node@249970729cb0ef3589644e2896645e5dc5ba9c38 # v6.5.0
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: plugins/deepseek-harness/package-lock.json
- name: Install plugin dependencies
working-directory: plugins/deepseek-harness
run: npm ci
- name: Install the DSH compatibility checker and tool runtime
working-directory: plugins/deepseek-harness
run: >-
npm install --ignore-scripts --no-save --package-lock=false
"@deepseek-ai/dsh-app-boot@$DSH_VERSION"
"@deepseek-ai/dsh-tools@$DSH_VERSION"
"@deepseek-ai/dsh-tool-executor-native@$DSH_VERSION"
"@deepseek-ai/dsh-system-prompt@$DSH_VERSION"
- name: Check plugin loading and execution
working-directory: plugins/deepseek-harness
run: |
node --input-type=module <<'JS'
import assert from 'node:assert/strict'
import { evaluatePluginCompatibility } from '@deepseek-ai/dsh-app-boot'
import manifest from './package.json' with { type: 'json' }
assert.equal(evaluatePluginCompatibility(manifest, {}, process.env.DSH_VERSION), undefined)
JS
npm test
6 changes: 6 additions & 0 deletions docs/development/lessons.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ When work exposes a consequential risk or a recurring problem, add a lesson or u
- **Check:** As relevant to the change, inspect persisted object identities, references, and execution inputs after conversion or recovery. Reopen the project or reconnect to the run when needed, and verify the actual result.
- **Async projection follow-up:** PR #193's structured-editor CI failure prompted a real-browser delayed-read regression. An older background projection could finish after an acknowledged editor save and restore an obsolete CAS basis, making the next save/publication fail. Recheck the editor transaction and captured snapshot at completion before installing either changed or apparently identical content. Keep publication versions fixed, test the actual save/retry/provenance path with a deterministic interleaving, and retain the original CI failure rather than treating a longer timeout or a rerun as its explanation.

## Cancellation can race with a worker checkpoint

- **Trigger:** A worker reads a running job, then cancellation advances its revision before the worker saves the next phase.
- **Lesson:** Commit 3635393 reconciles only the checkpoint on revision conflict. The old path converted this race into a provider failure even though cancellation was saved. A stale checkpoint could also lose a saved remote task identity.
- **Check:** Inject cancellation between the snapshot read and commit. Preserve stop intent, terminal cancellation and the accepted remote identity; do not repeat provider submission. Keep unrelated rejections as errors. The deterministic regressions in [test_creation_generation_service.py](../../tests/test_creation_generation_service.py) cover the interleaving, no provider call, terminal states and remote identity preservation.

## Baseline failures still need tracking

- **Trigger:** A relevant test fails and comparison shows that it also fails on the baseline.
Expand Down
80 changes: 58 additions & 22 deletions packages/core/src/opendirector/application/creation_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
_INPUTS = ContextVar('creation_generation_inputs', default=None)
# Connection facts a job freezes for a helper model; credentials stay in the model settings.
SNAPSHOT_KEYS = ('kind', 'modelId', 'url', 'protocol', 'connectionType')
# A checkpoint can lose a race with cancellation or another state write. Only
# the state checkpoint is repeated, never a provider submission.
CHECKPOINT_ATTEMPTS = 8


def version(kind, obj):
Expand Down Expand Up @@ -416,28 +419,61 @@ def control(before):
return receipt

def checkpoint(self, project_id, task, pinned):
before = self.projects.snapshot(project_id)
job = next(j for j in before.jobs if str(j.id) == task['id'])
if job.status == 'succeeded':
return
changes = {key: task[key] for key in ('status', 'phase', 'recovery', 'resumeAllowed', 'externalTaskId', 'errorDetails', 'technicalCheck') if key in task}
changes['adopted'] = task.get('adopted', job.adopted)
if changes['status'] == 'cancelled' and job.cancelRequested:
changes['remoteCancellation'] = ('unknown' if task.get('errorDetails') else 'requested') if task.get('externalTaskId') else 'not_requested'
if changes['recovery'] == 'submit':
changes['resumeAllowed'] = False
if job.cancelRequested and (task.get('errorDetails') or {}).get('providerStatus') == 'cancelled':
changes.update(status='cancelled', remoteCancellation='confirmed', resumeAllowed=False, recovery='retry')
updated = Job.model_validate({**job.model_dump(), **changes, 'revision': job.revision + 1})
if updated.model_copy(update={'revision': job.revision}) == job:
return
command = parse_command(dict(commandId=uuid4(), projectId=project_id, type='job.checkpoint',
expectedVersions=[version('job', job)], payload=dict(job=updated)))
def apply(current):
return current.model_copy(update={'jobs': tuple(updated if j.id == job.id else j for j in current.jobs)})
receipt = self.projects.commit(command, apply, source='background')
if receipt.status == 'rejected':
raise ProjectError('任务状态发生并发修改,请重新读取原任务。', 409)
# Cancellation and another worker can commit between the snapshot read
# and this write. A revision conflict is a state race, not an execution
# failure: reread authoritative state and redo only this checkpoint,
# with bounded attempts. Provider calls are never repeated here.
for attempt in range(CHECKPOINT_ATTEMPTS):
before = self.projects.snapshot(project_id)
job = next(j for j in before.jobs if str(j.id) == task['id'])
if job.status == 'succeeded':
return
changes = {key: task[key] for key in ('status', 'phase', 'recovery', 'resumeAllowed', 'externalTaskId', 'errorDetails', 'technicalCheck') if key in task}
changes['adopted'] = task.get('adopted', job.adopted)
# An accepted remote identity belongs to this job even if the
# checkpoint was prepared before it was recorded.
if job.externalTaskId:
changes['externalTaskId'] = job.externalTaskId
if job.cancelRequested:
# The stop intent is part of the authoritative state. Preserve
# it even when this save was planned before the cancellation.
changes['cancelRequested'] = True
if changes['status'] == 'cancelled' and job.cancelRequested:
changes['remoteCancellation'] = ('unknown' if task.get('errorDetails') else 'requested') if task.get('externalTaskId') else 'not_requested'
if changes['recovery'] == 'submit':
changes['resumeAllowed'] = False
if job.cancelRequested and (task.get('errorDetails') or {}).get('providerStatus') == 'cancelled':
changes.update(status='cancelled', remoteCancellation='confirmed', resumeAllowed=False, recovery='retry')
if job.status == 'cancelled':
# Cancellation is terminal. A stale worker may still carry
# running, interrupted or failed facts; keep the committed
# cancellation and only fill in an execution identity that was
# not known when cancellation was recorded.
confirmed = (task.get('errorDetails') or {}).get('providerStatus') == 'cancelled'
changes['status'] = 'cancelled'
if not confirmed:
changes.update(phase=job.phase, recovery=job.recovery, resumeAllowed=job.resumeAllowed,
remoteCancellation=job.remoteCancellation, errorDetails=job.errorDetails,
technicalCheck=job.technicalCheck, adopted=job.adopted)
if job.cancelRequested and not job.externalTaskId and task.get('externalTaskId'):
changes['externalTaskId'] = task['externalTaskId']
if changes.get('remoteCancellation', job.remoteCancellation) == 'not_requested':
changes['remoteCancellation'] = 'unknown'
updated = Job.model_validate({**job.model_dump(), **changes, 'revision': job.revision + 1})
if updated.model_copy(update={'revision': job.revision}) == job:
return
command = parse_command(dict(commandId=uuid4(), projectId=project_id, type='job.checkpoint',
expectedVersions=[version('job', job)], payload=dict(job=updated)))
def apply(current):
return current.model_copy(update={'jobs': tuple(updated if j.id == job.id else j for j in current.jobs)})
receipt = self.projects.commit(command, apply, source='background')
if receipt.status != 'rejected':
return
# Only a concurrent object-version change can be reconciled by
# rereading state. Validation or storage rejection remains a real
# failure instead of being retried with a stale execution record.
if not receipt.issues or any(issue.code != 'revision_conflict' for issue in receipt.issues) or attempt == CHECKPOINT_ATTEMPTS - 1:
raise ProjectError('任务状态发生并发修改,请重新读取原任务。', 409)

def _result_asset(self, task, directory):
job = self.get_job(task['projectId'], task['id'])
Expand Down
Loading
Loading