Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 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
0a370cb
Merge main into the DSH media workspace and preserve checkpoint confl…
Nov 28, 2026
713d001
Merge main and consolidate cancellation guidance
prettygirlisnotme Nov 30, 2026
2a103b7
Preserve the remote job state across a stale cancellation checkpoint
prettygirlisnotme Nov 30, 2026
fa0a7fb
Recover interrupted adoption and stop requests in DSH
prettygirlisnotme Nov 30, 2026
5901062
Read current selections when a chat card recovers an adoption
prettygirlisnotme Nov 30, 2026
417a7c1
Keep the candidate group when a receipt lookup fails
prettygirlisnotme Dec 1, 2026
223d83f
Merge commit 'cf566d4941b059b03686370f7dc97a819865d2bc' into private/…
prettygirlisnotme Dec 1, 2026
ef2cd9a
Preserve client request fingerprints in command receipts
prettygirlisnotme Dec 1, 2026
b805810
Match action pack retries to the original request
prettygirlisnotme Dec 1, 2026
90671b1
Keep DSH behavior in tests and document the browser check
prettygirlisnotme Dec 1, 2026
1abd83d
Bind action pack generation to its original selection
prettygirlisnotme Dec 1, 2026
5a55a7b
Resume the original media request without starting extra jobs
prettygirlisnotme Dec 1, 2026
7dfe698
Show one status check for an interrupted candidate group
prettygirlisnotme Dec 1, 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 @@ -17,7 +17,12 @@ concurrency:

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 Down Expand Up @@ -45,3 +50,77 @@ jobs:
if: steps.scope.outputs.run-dsh != 'false'
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
2 changes: 1 addition & 1 deletion docs/development/lessons.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ When work exposes a consequential risk or a recurring problem, add a lesson or u
## A pending checkpoint can race with accepted cancellation

- **Evidence:** The generation-feedback test in [Nightly run 45734069088](https://github.com/ThinkFlowLab/OpenDirector/actions/runs/45734069088/job/139622924333) timed out waiting for durable cancellation. Holding the initial running checkpoint until cancellation committed reproduced an accepted cancel that ended in `failed`.
- **Check:** Drain the in-flight write and preserve explicit cancellation when that write loses its revision check. Verify the original job reaches `cancelled` and that the provider was never called when cancellation wins before submission.
- **Check:** Drain the in-flight write and preserve explicit cancellation when that write loses its revision check. Verify the original job reaches `cancelled` and that the provider was never called when cancellation wins before submission. Persist a late provider task ID without reviving a cancelled job; a worker that never saw the ID cannot confirm remote cancellation.

## Canvas media readiness depends on the viewport

Expand Down
74 changes: 49 additions & 25 deletions packages/core/src/opendirector/application/creation_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,39 @@
_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')
CHECKPOINT_ATTEMPTS = 8


def version(kind, obj):
return ObjectVersion(objectType=kind, id=obj.id, revision=obj.revision)


def _checkpoint_changes(job, task):
reported_id = task.get('externalTaskId')
details = task.get('errorDetails') or {}
confirmed = job.cancelRequested and details.get('providerStatus') == 'cancelled'
if job.status == 'cancelled' and not confirmed:
if not reported_id or job.externalTaskId:
return {}
changes = {'externalTaskId': reported_id}
if job.cancelRequested and job.remoteCancellation == 'not_requested':
changes['remoteCancellation'] = 'unknown'
return changes

changes = {key: task[key] for key in (
'status', 'phase', 'recovery', 'resumeAllowed', 'adopted', 'errorDetails', 'technicalCheck',
) if key in task}
changes['externalTaskId'] = job.externalTaskId or reported_id
if confirmed:
changes.update(status='cancelled', remoteCancellation='confirmed', resumeAllowed=False, recovery='retry')
elif job.cancelRequested and changes['status'] == 'cancelled':
if changes['externalTaskId']:
changes['remoteCancellation'] = 'requested' if reported_id and not details else 'unknown'
if changes['recovery'] == 'submit':
changes['resumeAllowed'] = False
return changes


def media_record(asset):
meta = asset.metadata
return dict(id=str(asset.id), name=asset.name, kind=asset.kind, type=meta.mimeType, size=meta.size,
Expand Down Expand Up @@ -493,7 +520,7 @@ async def execute(self, command, *, session=None, source='ui', agent_origin=None
operation_id=command.commandId, input_fingerprint=fingerprint,
)
return CommandReceipt(commandId=command.commandId, projectId=command.projectId,
inputFingerprint=fingerprint, status='applied',
inputFingerprint=fingerprint, clientIntentFingerprint=command.clientIntentFingerprint, status='applied',
pipelineExecutionId=execution['executionId'])
if command.type == 'generation.submit':
pending = asyncio.create_task(asyncio.to_thread(self.prepare, command, session=session, source=source, agent_origin=agent_origin))
Expand Down Expand Up @@ -535,30 +562,27 @@ 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':
code = 'revision_conflict' if receipt.issues and all(
issue.code == 'revision_conflict' for issue in receipt.issues) else None
raise ProjectError('任务状态发生并发修改,请重新读取原任务。', 409, code=code)
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 = _checkpoint_changes(job, task)
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
revision_conflict = bool(receipt.issues) and all(
issue.code == 'revision_conflict' for issue in receipt.issues)
if not revision_conflict or attempt == CHECKPOINT_ATTEMPTS - 1:
code = 'revision_conflict' if revision_conflict else None
raise ProjectError('任务状态发生并发修改,请重新读取原任务。', 409, code=code)

def _result_asset(self, task, directory):
job = self.get_job(task['projectId'], task['id'])
Expand Down
4 changes: 4 additions & 0 deletions packages/core/src/opendirector/domain/creation/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ class CommandBase(Contract):
type: str = Field(description='Operation or variant discriminator.')
expectedVersions: tuple[ObjectVersion, ...] = Field(default=(), description='Current versions of mutated existing objects; payload revision fields do not replace these.')
expectedPreview: Digest | None = Field(default=None, description='Fingerprint of the confirmed impact preview.')
clientIntentFingerprint: Digest | None = Field(default=None, exclude_if=lambda value: value is None,
description='Caller-supplied SHA-256 of its original request before it was expanded into a command.')

@model_validator(mode='after')
def scope_and_versions(self):
Expand Down Expand Up @@ -549,6 +551,8 @@ class CommandReceipt(Contract):
commandId: UUID = Field(description='Stable command ID for idempotent replay.')
projectId: UUID = Field(description='Owning project ID.')
inputFingerprint: Digest = Field(description='Fingerprint of the fixed execution input.')
clientIntentFingerprint: Digest | None = Field(default=None, exclude_if=lambda value: value is None,
description='Original request fingerprint supplied by the caller, if present in the recorded command.')
status: Literal['applied', 'accepted', 'noop', 'rejected'] = Field(description='Current operation lifecycle state.')
changed: tuple[ObjectVersion, ...] = Field(default=(), description='Business objects changed by the operation.')
jobIds: tuple[UUID, ...] = Field(default=(), description='Generation jobs associated with this operation.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ def _make_record(command, head, snapshot, changed, source, issue=None, *, placem
event = ProjectEvent(projectId=command.projectId, cursor=snapshot.eventCursor, commandId=command.commandId,
source=source, changed=changed, jobIds=job_ids) if changed else None
receipt = CommandReceipt(commandId=command.commandId, projectId=command.projectId,
inputFingerprint=command_fingerprint(command), status='rejected' if issue else 'accepted' if job_ids else 'applied' if changed else 'noop',
inputFingerprint=command_fingerprint(command), clientIntentFingerprint=command.clientIntentFingerprint,
status='rejected' if issue else 'accepted' if job_ids else 'applied' if changed else 'noop',
changed=[item['version'] for item in changed], jobIds=job_ids, issues=[issue] if issue else [], eventCursor=snapshot.eventCursor,
canvasPlacements=placements)
return CommitRecord(command=command, previousHead=head, snapshot=snapshot, receipt=receipt, event=event)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def consistent(self):
or self.receipt.projectId != self.command.projectId
or self.receipt.commandId != self.command.commandId
or self.receipt.inputFingerprint != command_fingerprint(self.command)
or self.receipt.clientIntentFingerprint != self.command.clientIntentFingerprint
or self.receipt.eventCursor != self.snapshot.eventCursor):
raise ValueError('Commit identity is inconsistent')
applied = self.receipt.status in {'applied', 'accepted'}
Expand Down
Loading
Loading