type: agent/inbox/spliced

target: next-turn

type: text

text: Run this advanced flow exactly once: define a host-only dynamic Cordis Package named Snapshot Marker; run and inspect snap-1/pkg-1 through run_code; delegate once to a direct spawn child; run one workflow that delegates to another spawn child; remove snap-1; then reply with exactly ADVANCED_ACP_OK.

kind: user

role: user


type: user/message

surfaceOp: append


text:
Current runtime context. This snapshot supersedes earlier runtime-context snapshots.

Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.

Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`).

kind: plugin

form: snapshot


type: session/title

title: Run this advanced flow exactly

kind: fallback


type: request/header

provider: deepseek-official

[System] {{system}}

tools: {{tools}}

reason: initial


type: assistant/chunk

type: tool-call-delta

Snapshot Marker

kind: new

idPrefix: snap

purpose: Exercise the dynamic Cordis Package lifecycle in the snapshot.

host: return { apply() {} }


type: block-end

type: tool-call


type: assistant/message

role: assistant

kind: model


type: tool/call

callId: advanced-define


type: tool/result

kind: tool

type: tool-result

toolCallId: advanced-define

text: Defined snap-1/pkg-1 (Snapshot Marker); it is not running yet. Use cordis_run to activate this Package.


code:
const run = await tools.cordis_run({ pluginId: 'snap-1', packageId: 'pkg-1', mode: 'run' });
const inspected = await tools.cordis_inspect_self({ pluginId: 'snap-1' });
return { run, inspected };

description: Run and inspect the dynamic Cordis Package


callId: advanced-code


type: tool/code-dispatch-start

rootCallId: advanced-code

parentCallId: advanced-code

mode: run


type: tool/code-dispatch

text: snap-1/pkg-1 is running (run-1).


mode: plugin

state: running


toolCallId: advanced-code

status: running

status: absent


subagent

description: Check direct child

prompt: Reply with exactly DIRECT_CHILD_OK and nothing else.


description: Check direct child

prompt: Reply with exactly DIRECT_CHILD_OK and nothing else.


description: Check direct child

prompt: Reply with exactly DIRECT_CHILD_OK and nothing else.


callId: advanced-direct-child

description: Check direct child

prompt: Reply with exactly DIRECT_CHILD_OK and nothing else.


toolCallId: advanced-direct-child


workflow

script:
phase('Delegate')
const reply = await agent('Reply with exactly WORKFLOW_CHILD_OK and nothing else.', { label: 'workflow-child' })
return { reply }

advanced-acp-snapshot

description: exercise one workflow child through ACP


advanced-acp-snapshot

description: exercise one workflow child through ACP


workflow

description: exercise one workflow child through ACP


callId: advanced-workflow

advanced-acp-snapshot

description: exercise one workflow child through ACP


type: tool-workflow/agent-start

label: workflow-child

phase: Delegate


toolCallId: advanced-workflow

text:
workflow "advanced-acp-snapshot" completed (1 agent).
Return value:
{
  "reply": "WORKFLOW_CHILD_OK"
}


callId: advanced-undefine

toolCallId: advanced-undefine

text: Removed dynamic Plugin snap-1 and all of its Packages.