diff --git a/CODE_SIGNING_POLICY.md b/CODE_SIGNING_POLICY.md index 32756f0..8c224f6 100644 --- a/CODE_SIGNING_POLICY.md +++ b/CODE_SIGNING_POLICY.md @@ -4,7 +4,7 @@ Last updated: 2026-07-19 ## Current status -DS Agent `v1.1.0` is intentionally published unsigned. Both `ds-agent.exe` and +DS Agent `v1.2.0` is intentionally published unsigned. Both `ds-agent.exe` and the Windows x64 NSIS installer are expected to report Authenticode `NotSigned`. Windows may therefore display `Unknown publisher` or a Microsoft Defender SmartScreen warning. Users should download only over HTTPS from the official @@ -13,8 +13,8 @@ GitHub Release and verify the published SHA-256 before running the installer. The SignPath Foundation application is submitted and approval is pending. No DS Agent binary may be represented as SignPath-signed until the application is approved and a later-version artifact independently verifies as Authenticode -`Valid`. The project will not replace the immutable `v1.1.0` tag or asset if -signing becomes available later. +`Valid`. The project will not replace the immutable `v1.1.0` or `v1.2.0` tag, +Release, or asset if signing becomes available later. For releases accepted into that program: **Free code signing provided by [SignPath.io](https://signpath.io/), certificate by @@ -57,7 +57,7 @@ them; guessed or placeholder identifiers are forbidden. ## Release verification -For the unsigned `v1.1.0` exception, maintainers verify and disclose the actual +For the unsigned `v1.1.0` and `v1.2.0` exceptions, maintainers verify and disclose the actual `NotSigned` status of both the application executable and installer. Evidence must bind the exact source commit, file name, product version, byte size, and SHA-256. The installer downloaded back from GitHub must match the reviewed diff --git a/PRIVACY.md b/PRIVACY.md index 32a5501..58d7f35 100644 --- a/PRIVACY.md +++ b/PRIVACY.md @@ -14,7 +14,7 @@ User-selected workspaces hold approved evidence, exports, reports, work packages, screenshots, and other artifacts. This information is not silently synced to a DS Agent-operated server. -The current stable `v1.1.0` accepts one user-supplied DeepSeek API key through +The current stable `v1.2.0` accepts one user-supplied DeepSeek API key through the onboarding screen and stores it in a dedicated Windows DPAPI-protected local vault. A process-environment key remains an explicit compatibility fallback and is never silently copied into that vault. The project does not @@ -22,6 +22,12 @@ provide a shared key. The raw key exists in frontend memory only while it is being entered and submitted; it must not be retained in UI state, events, logs, exports, screenshots, work packages, or verification receipts. +Goal contracts, lifecycle events, and UI projections are bounded and designed +to exclude raw secrets, provider bodies, absolute app-data or vault paths, +local authority material, and internal claim tokens. The read-only UI receives +stable status/reason codes, bounded goal text, revision/fingerprint values, and +coverage counts; it does not receive a local completion writer. + Uninstalling the application may not delete a user-selected workspace or every application-data file. Review and remove those local locations separately when you no longer want to retain them. @@ -58,7 +64,7 @@ the user or person operating the application: The optional local desktop bridge accepts only loopback addresses and is started and controlled by the user. DS Agent does not install or supervise that service. Production Microsoft and Google account registration and live -mail/calendar writes are disabled in `v1.1.0`; offline connector contracts do +mail/calendar writes are disabled in `v1.2.0`; offline connector contracts do not authorize a production account or external write. ## What can be included in a model request diff --git a/README.md b/README.md index 0d0a0a8..830f3e4 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@
- v1.1.0 stable · - Download for Windows · + v1.2.0 stable · + Download for Windows · Apache-2.0
@@ -132,6 +132,11 @@ does not claim completion from model confidence alone. Local files, browser actions, Office artifacts, and Computer Use are complete only when observable evidence satisfies the task's completion criteria. +In v1.2.0, DeepSeek may propose a bounded `GoalEnvelope`, but only the local +Kernel can validate and freeze it. The chat UI shows a read-only projection; +completion remains blocked until locally authoritative verifier evidence covers +every frozen `done_when` condition and required artifact identity. + ## DeepSeek and DS Agent boundary | Layer | Responsibility | @@ -155,7 +160,7 @@ high-risk action. See the full [model boundary](docs/AGENT_MODEL_BOUNDARY.md). reconciliation contracts validated with offline adversarial fake providers. Production Microsoft/Google account registration and live external-write -authority remain disabled in v1.1.0. The release does not sign in to real +authority remain disabled in v1.2.0. The release does not sign in to real accounts, send real email, or create, change, or cancel real calendar events. ## Why Rust @@ -168,7 +173,7 @@ remain thin; the Kernel and persistent projections own business state. ## Quick start -1. Download the [Windows x64 installer](https://github.com/Lee-take/dsagent/releases/download/v1.1.0/DS.Agent_1.1.0_x64-setup.exe). +1. Download the [Windows x64 installer](https://github.com/Lee-take/dsagent/releases/download/v1.2.0/DS.Agent_1.2.0_x64-setup.exe). 2. Enter your own valid DeepSeek API key in onboarding and run the explicit balance/model verification. The key is stored locally with Windows DPAPI. 3. Choose one local workspace and let the readiness doctor verify its managed @@ -180,7 +185,7 @@ A user-supplied DeepSeek API key is a required prerequisite. DS Agent does not bundle a shared key or bypass DeepSeek access requirements; use remains subject to DeepSeek's terms and account policies. -The v1.1.0 application executable and installer are Authenticode `NotSigned`. +The v1.2.0 application executable and installer are Authenticode `NotSigned`. Windows may display `Unknown publisher` or a Microsoft Defender SmartScreen warning. Download only over HTTPS from this repository, verify the SHA-256 in the GitHub Release, and read the [installation guide](docs/INSTALLATION.md) @@ -188,10 +193,10 @@ before running the installer. ## Code signing policy -DS Agent `v1.1.0` is intentionally unsigned. The SignPath Foundation application +DS Agent `v1.2.0` is intentionally unsigned. The SignPath Foundation application is submitted and approval is pending; no release is represented as signed. If the project is accepted, signing starts with a later new version and does not -replace this immutable tag or asset. For releases accepted into the program: +replace the immutable v1.1.0 or v1.2.0 tag or asset. For releases accepted into the program: **Free code signing provided by SignPath.io, certificate by SignPath Foundation.** See the full [code signing policy](CODE_SIGNING_POLICY.md) and [privacy policy](PRIVACY.md). @@ -209,8 +214,8 @@ example `D:\build-target\ds-agent-v1-release`. ## Stable release -- Release: [DS Agent v1.1.0](https://github.com/Lee-take/dsagent/releases/tag/v1.1.0) -- Installer: `DS.Agent_1.1.0_x64-setup.exe` +- Release: [DS Agent v1.2.0](https://github.com/Lee-take/dsagent/releases/tag/v1.2.0) +- Installer: `DS.Agent_1.2.0_x64-setup.exe` - Integrity: verify the final byte size and SHA-256 published in the GitHub Release before running the installer. - Onboarding: one user-supplied Key, Windows DPAPI storage, explicit DeepSeek @@ -218,12 +223,16 @@ example `D:\build-target\ds-agent-v1-release`. - Compatibility: existing workspace settings remain readable; environment-key operators require explicit verification; conversations and connector vaults are not rewritten. +- Goal contract: bounded model proposal, Kernel validation/freeze, read-only UI + state, and fail-closed evidence coverage for every completion condition and + required artifact. ## Documentation - [Installation](docs/INSTALLATION.md) - [DS Agent and DeepSeek boundary](docs/AGENT_MODEL_BOUNDARY.md) - [v1 architecture](docs/architecture/DS_AGENT_V1_ARCHITECTURE_PLAN.md) +- [v1.2.0 release notes](docs/RELEASE_NOTES_v1.2.0.md) - [v1.1.0 release notes](docs/RELEASE_NOTES_v1.1.0.md) - [v1 completion audit](docs/DS_AGENT_V1_COMPLETION_AUDIT.md) - [Security](SECURITY.md) · [Privacy](PRIVACY.md) · diff --git a/README.zh-CN.md b/README.zh-CN.md index 1b5fa17..ccf6ec6 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -11,8 +11,8 @@- v1.1.0 正式稳定版 · - 下载 Windows 安装包 · + v1.2.0 正式稳定版 · + 下载 Windows 安装包 · Apache-2.0
@@ -118,6 +118,10 @@ Kernel 会持久保存任务和审核状态,只对失败步骤进行有边界 宣告完成。本地文件、浏览器操作、Office 产物和 Computer Use,只有在可观察证据满足任务 完成条件后才算真正完成。 +在 v1.2.0 中,DeepSeek 可以提出有界 `GoalEnvelope`,但只有本地 Kernel 能校验并冻结它。 +聊天界面只显示只读投影;只有本地权威 verifier 证据覆盖冻结目标的全部 `done_when` 和 +必需产物身份后,任务才可能进入完成状态。 + ## DeepSeek 与 DS Agent 的工作边界 | 层 | 负责内容 | @@ -138,7 +142,7 @@ DeepSeek 可以提出动作,DS Agent 决定动作是否安全、是否允许 - 已通过离线对抗性 fake provider 验证的 Microsoft/Google 形态邮件、日历、同步、草稿、 外部变更和对账契约。 -v1.1.0 仍未开放生产 Microsoft/Google 账号注册和真实外部写入权限。当前正式版不会登录 +v1.2.0 仍未开放生产 Microsoft/Google 账号注册和真实外部写入权限。当前正式版不会登录 真实账号、发送真实邮件,也不会创建、修改或取消真实日历事件。 ## 为什么使用 Rust @@ -149,7 +153,7 @@ command 与 React UI 保持薄层,业务状态由 Kernel 和持久投影统一 ## 快速开始 -1. 下载 [Windows x64 安装包](https://github.com/Lee-take/dsagent/releases/download/v1.1.0/DS.Agent_1.1.0_x64-setup.exe)。 +1. 下载 [Windows x64 安装包](https://github.com/Lee-take/dsagent/releases/download/v1.2.0/DS.Agent_1.2.0_x64-setup.exe)。 2. 在首次设置中输入你自己的有效 DeepSeek API Key,并显式验证余额和模型;Key 使用 Windows DPAPI 保存在本机。 3. 选择一个本地工作目录,由 readiness doctor 检查受管目录和可写状态。 @@ -159,16 +163,16 @@ command 与 React UI 保持薄层,业务状态由 Kernel 和持久投影统一 用户自行提供有效的 DeepSeek API Key 是必备前提。DS Agent 不内置共享 Key,也不会 绕过 DeepSeek 的访问条件;实际使用仍须遵守 DeepSeek 的服务条款和账号规则。 -v1.1.0 应用程序和安装包的 Authenticode 状态均为 `NotSigned`。Windows 可能显示 +v1.2.0 应用程序和安装包的 Authenticode 状态均为 `NotSigned`。Windows 可能显示 `Unknown publisher`(未知发布者)或 Microsoft Defender SmartScreen 警告。请只通过 本仓库的 HTTPS 链接下载,运行前核对 GitHub Release 中的 SHA-256,并阅读 [安装指南](docs/INSTALLATION.md)。 ## Code signing policy(代码签名政策) -DS Agent `v1.1.0` 是如实披露的未签名版本。SignPath Foundation 申请已经提交、仍在等待 +DS Agent `v1.2.0` 是如实披露的未签名版本。SignPath Foundation 申请已经提交、仍在等待 审批,本版本不会被描述为已签名。若以后获批,只从后续新版本开始签名,不替换本版本不可 -移动的 tag 或资产。获准加入该计划的 Release 将遵循:**Free code signing provided by +移动的 tag 或资产,也不改写 v1.1.0。获准加入该计划的 Release 将遵循:**Free code signing provided by SignPath.io, certificate by SignPath Foundation.** 完整说明见 [代码签名政策](CODE_SIGNING_POLICY.md)和[隐私政策](PRIVACY.md)。 @@ -185,19 +189,22 @@ npx pnpm@9.15.9 --filter @deepseek-agent-os/desktop tauri:dev ## 正式稳定版 -- Release:[DS Agent v1.1.0](https://github.com/Lee-take/dsagent/releases/tag/v1.1.0) -- 安装包:`DS.Agent_1.1.0_x64-setup.exe` +- Release:[DS Agent v1.2.0](https://github.com/Lee-take/dsagent/releases/tag/v1.2.0) +- 安装包:`DS.Agent_1.2.0_x64-setup.exe` - 完整性:运行安装包前,核对 GitHub Release 中发布的最终字节数和 SHA-256。 - 首次设置:单一用户 Key、Windows DPAPI 本机存储、显式 DeepSeek 余额/V4 模型验证、 无密 readiness 和 workspace doctor。 - 兼容性:既有 workspace 设置继续可读;环境 Key 需要显式验证;不会重写历史会话或 connector vault。 +- 目标契约:有界模型提议、Kernel 校验/冻结、只读 UI 状态,以及覆盖全部完成条件和 + 必需产物身份的 fail-closed 证据门。 ## 文档 - [安装指南](docs/INSTALLATION.md) - [DS Agent 与 DeepSeek 的工作边界](docs/AGENT_MODEL_BOUNDARY.md) - [v1 架构计划](docs/architecture/DS_AGENT_V1_ARCHITECTURE_PLAN.md) +- [v1.2.0 发布说明](docs/RELEASE_NOTES_v1.2.0.md) - [v1.1.0 发布说明](docs/RELEASE_NOTES_v1.1.0.md) - [v1 完成审计](docs/DS_AGENT_V1_COMPLETION_AUDIT.md) - [安全说明](SECURITY.md) · [隐私政策](PRIVACY.md) · diff --git a/SECURITY.md b/SECURITY.md index 4b8bf65..8ee86f2 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,6 +1,6 @@ # Security Policy -DS Agent is a local-first Windows desktop agent. DS Agent v1.1.0 is the current +DS Agent is a local-first Windows desktop agent. DS Agent v1.2.0 is the current published stable release and is not an official DeepSeek product. Security reports are welcome, especially around local credentials, permission gates, audit records, Computer Use boundaries, update integrity, code signing, and @@ -10,6 +10,7 @@ package import/export behavior. | Version | Supported | | --- | --- | +| 1.2.0 | Supported | | 1.1.0 | Supported | | 1.0.2 | Supported | @@ -30,13 +31,18 @@ Include: ## Security Boundaries -- Current stable v1.1.0 stores one user-supplied DeepSeek API key in a dedicated +- Current stable v1.2.0 stores one user-supplied DeepSeek API key in a dedicated Windows DPAPI vault. A process-environment key is an explicit compatibility fallback and is not copied into the vault. Presence alone is never treated as verified readiness; balance and required V4 model checks produce only a secret-free local receipt. Raw keys, provider bodies, account details, and absolute vault paths must not be stored in events, retained UI state, logs, screenshots, or exported work packages. +- A model-returned `GoalEnvelope` is untrusted input. The Kernel owns validation, + freeze, revision/fingerprint binding, verifier evidence, and completion. Model + text, frontend state, approval state, or artifact existence cannot directly + mark a goal complete; stale, unknown, failed, duplicate, mismatched, or + incomplete evidence fails closed. - `pnpm test:secrets` scans tracked and unignored repository files for live `sk-` style keys and non-empty `DEEPSEEK_API_KEY` assignments without printing candidate values. @@ -51,7 +57,7 @@ Include: memory. - Release identity must follow the [code signing policy](CODE_SIGNING_POLICY.md). An unsigned or invalidly signed artifact must not be represented as a signed - release. DS Agent v1.1.0 is explicitly disclosed as Authenticode `NotSigned`; + release. DS Agent v1.2.0 is explicitly disclosed as Authenticode `NotSigned`; Windows may show `Unknown publisher` or a Microsoft Defender SmartScreen warning. See also the [privacy policy](PRIVACY.md). diff --git a/apps/desktop/package.json b/apps/desktop/package.json index 1b4d45d..53451e9 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -1,7 +1,7 @@ { "name": "@deepseek-agent-os/desktop", "private": true, - "version": "1.1.0", + "version": "1.2.0", "author": "Lee take", "license": "Apache-2.0", "type": "module", diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index e1f2880..e214b63 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -794,7 +794,7 @@ dependencies = [ [[package]] name = "deepseek-agent-os-desktop" -version = "1.1.0" +version = "1.2.0" dependencies = [ "base64 0.22.1", "chrono", diff --git a/apps/desktop/src-tauri/Cargo.toml b/apps/desktop/src-tauri/Cargo.toml index e42a443..1462483 100644 --- a/apps/desktop/src-tauri/Cargo.toml +++ b/apps/desktop/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deepseek-agent-os-desktop" -version = "1.1.0" +version = "1.2.0" description = "Local-first DeepSeek AI work platform" edition = "2021" license = "Apache-2.0" diff --git a/apps/desktop/src-tauri/src/commands.rs b/apps/desktop/src-tauri/src/commands.rs index 89e9265..00b7d28 100644 --- a/apps/desktop/src-tauri/src/commands.rs +++ b/apps/desktop/src-tauri/src/commands.rs @@ -96,12 +96,16 @@ use crate::kernel::expert_team::{ ExpertCapability, ExpertEvidenceRef, ExpertExternalEffectState, ExpertMergeReceipt, ExpertOutput, ExpertQualityGate, ExpertReviewDecision, ExpertRole, ExpertTeamPlanItem, }; +use crate::kernel::goal_envelope::GoalEnvelopeProposal; +use crate::kernel::goal_lifecycle::{ + GoalEnvelopeUiProjection, GoalLifecycleStatus, GoalTargetBindingKind, GoalValidationContext, +}; use crate::kernel::local_directory::{ load_local_directory_state, local_directory_readiness_from_state, save_local_directory_settings as persist_local_directory_settings, workspace_readiness_projection_from_setup_error, workspace_readiness_projection_from_state, LocalDirectoryReadinessStatus, LocalDirectorySettings, LocalDirectoryState, - WorkspaceReadinessProjection, LOCAL_MEMORY_DIR_NAME, + WorkspaceReadinessCode, WorkspaceReadinessProjection, LOCAL_MEMORY_DIR_NAME, }; use crate::kernel::models::FoundationState; use crate::kernel::models::TaskRecord; @@ -134,7 +138,7 @@ use crate::kernel::policy::{ builtin_capability_catalog, decide as decide_capability_policy, request_capability_access as build_capability_access_request, CapabilityAccessRecord, CapabilityDescriptor, CapabilityGrantState, CapabilityKind, PermissionAuditEntry, - PermissionResolution, PolicyDecision, + PermissionResolution, PolicyDecision, RiskLevel, }; use crate::kernel::sandbox::{ enforce_local_mutation_path, enforce_local_read_path, enforce_workspace_relative_mutation_path, @@ -157,12 +161,12 @@ use crate::kernel::soul::{ use crate::kernel::tool_runtime::{ builtin_tool_catalog, prepare_tool_execution, tool_approval_preview, tool_request_fingerprint, AgentToolExecutor, ToolEvidence, ToolExecutionOutput, ToolExecutionPlan, ToolExecutionRequest, - ToolExecutionStatus, ToolInvocationRecord, ToolResourceAccess, ToolVerificationResult, - APP_UPDATE_CHECK_TOOL_ID, APP_UPDATE_DOWNLOAD_TOOL_ID, APP_UPDATE_INSTALL_TOOL_ID, - BROWSER_BROWSE_TOOL_ID, BROWSER_OPEN_TOOL_ID, COMPUTER_CONTROL_TOOL_ID, - COMPUTER_SCREENSHOT_TOOL_ID, CONNECTOR_ATTACHMENT_DOWNLOAD_TOOL_ID, FILESYSTEM_MUTATE_TOOL_ID, - FILE_READ_TOOL_ID, FILE_WRITE_TOOL_ID, NETWORK_SEARCH_TOOL_ID, OFFICE_CREATE_TOOL_ID, - OFFICE_OPEN_TOOL_ID, OFFICE_UPDATE_TOOL_ID, OPERATIONS_BRIEFING_TOOL_ID, + ToolExecutionStatus, ToolInvocationRecord, ToolPathScope, ToolResourceAccess, + ToolVerificationResult, APP_UPDATE_CHECK_TOOL_ID, APP_UPDATE_DOWNLOAD_TOOL_ID, + APP_UPDATE_INSTALL_TOOL_ID, BROWSER_BROWSE_TOOL_ID, BROWSER_OPEN_TOOL_ID, + COMPUTER_CONTROL_TOOL_ID, COMPUTER_SCREENSHOT_TOOL_ID, CONNECTOR_ATTACHMENT_DOWNLOAD_TOOL_ID, + FILESYSTEM_MUTATE_TOOL_ID, FILE_READ_TOOL_ID, FILE_WRITE_TOOL_ID, NETWORK_SEARCH_TOOL_ID, + OFFICE_CREATE_TOOL_ID, OFFICE_OPEN_TOOL_ID, OFFICE_UPDATE_TOOL_ID, OPERATIONS_BRIEFING_TOOL_ID, SKILL_ACTIVATE_TOOL_ID, TERMINAL_READ_TOOL_ID, }; use crate::kernel::tool_strategy::{ @@ -309,7 +313,7 @@ const AGENT_TOOL_LOOP_MAX_ROUNDS: usize = 4; const AGENT_RUN_GUIDANCE_MAX_ITEMS_PER_ROUND: usize = 8; const AGENT_RUN_GUIDANCE_PROMPT_CHAR_LIMIT: usize = 12_000; const AGENT_SKILL_CATALOG_MAX_ITEMS: usize = 24; -const AGENT_CHAT_SYSTEM_PROMPT: &str = "You are the DeepSeek reasoning layer for DS Agent. DS Agent is the local execution layer. Read the full user message and return one structured agent envelope as JSON. Separate reply_to_user from agent_actions, missing_prerequisites, required_confirmations, artifact_targets, memory_candidates, soul_profile_update, subagent_plan, and expert_output. Soul is the durable cross-conversation identity and collaboration profile, not an ordinary memory candidate. Whenever the current user message explicitly defines, changes, or confirms any Soul setting, soul_profile_update must contain fields, clear_fields, current_message_evidence, and optional confirmation_context. This includes short confirmations such as yes when the immediately preceding context proposed a Soul setting. current_message_evidence must be an exact non-empty excerpt of the current user message; confirmation_context, when needed, must be an exact excerpt of the supplied conversation context. Use only the allowed Soul field names supplied by DS Agent. Keep identity roles exact: preferred_name is the user's own name, address_as is how DS Agent addresses the user, user_calls_ds_agent is the user's name for DS Agent, and ds_agent_should_refer_to_itself_as is DS Agent's self-reference. Never put DS Agent's name into preferred_name. Do not propose Soul updates for guesses, third-party statements, transient one-turn instructions, or sensitive values. Do not tell the user the setting was saved; DS Agent appends a persistence receipt only after the update is validated and written. For a complex task that materially benefits from specialists, subagent_plan may contain 2-4 unique roles chosen from research, analysis, production, review. Every item requires key, role, prompt, depends_on, capabilities, resources, budget, output_contract, and retry_policy. Use an acyclic flow: research and analysis may run in parallel when independent; production depends on relevant evidence/analysis; review depends on production. Only production may request managed_staging_write and a logical write resource. A child never writes an approved destination. Review cannot mutate staged output and must bind its decision to the exact production revision. Never create nested subagents or desktop-control subtasks. Leave subagent_plan empty for simple work. When executing an expert attempt, return expert_output with summary, evidence-linked claims, optional staged_content/staged_relative_path for production, and an exact-revision review verdict for review; never return another subagent_plan. Do not claim local tools ran; propose actions for DS Agent to validate and execute. Write reply_to_user for an ordinary user in the user's language. Lead with the useful conclusion or next step. Do not expose internal action types, tool IDs, protocol or schema names, policy enums, target=/evidence=/output= fields, raw JSON, or English verification receipts unless the user explicitly asks for technical details."; +const AGENT_CHAT_SYSTEM_PROMPT: &str = "You are the DeepSeek reasoning layer for DS Agent. DS Agent is the local execution layer. Read the full user message and return one structured agent envelope as JSON. Separate reply_to_user, goal_envelope, agent_actions, missing_prerequisites, required_confirmations, artifact_targets, memory_candidates, soul_profile_update, subagent_plan, and expert_output. When proposing a goal_envelope, use version ds-agent.goal-envelope-proposal/v1 and include user_goal, assumptions, constraints, done_when, required_artifacts, verifiers, proposed_capabilities, external_targets, and stop_conditions. assumptions, constraints, proposed_capabilities, and stop_conditions are string arrays. Each done_when item has done_when_id and description; each required_artifact has artifact_id and description; each verifier has verifier_id, done_when_id, description, and evidence_kind; each external_target has target_id and description. The goal_envelope is only a proposal: it cannot approve execution, trust a path or external target, handle a secret, or declare completion. Soul is the durable cross-conversation identity and collaboration profile, not an ordinary memory candidate. Whenever the current user message explicitly defines, changes, or confirms any Soul setting, soul_profile_update must contain fields, clear_fields, current_message_evidence, and optional confirmation_context. This includes short confirmations such as yes when the immediately preceding context proposed a Soul setting. current_message_evidence must be an exact non-empty excerpt of the current user message; confirmation_context, when needed, must be an exact excerpt of the supplied conversation context. Use only the allowed Soul field names supplied by DS Agent. Keep identity roles exact: preferred_name is the user's own name, address_as is how DS Agent addresses the user, user_calls_ds_agent is the user's name for DS Agent, and ds_agent_should_refer_to_itself_as is DS Agent's self-reference. Never put DS Agent's name into preferred_name. Do not propose Soul updates for guesses, third-party statements, transient one-turn instructions, or sensitive values. Do not tell the user the setting was saved; DS Agent appends a persistence receipt only after the update is validated and written. For a complex task that materially benefits from specialists, subagent_plan may contain 2-4 unique roles chosen from research, analysis, production, review. Every item requires key, role, prompt, depends_on, capabilities, resources, budget, output_contract, and retry_policy. Use an acyclic flow: research and analysis may run in parallel when independent; production depends on relevant evidence/analysis; review depends on production. Only production may request managed_staging_write and a logical write resource. A child never writes an approved destination. Review cannot mutate staged output and must bind its decision to the exact production revision. Never create nested subagents or desktop-control subtasks. Leave subagent_plan empty for simple work. When executing an expert attempt, return expert_output with summary, evidence-linked claims, optional staged_content/staged_relative_path for production, and an exact-revision review verdict for review; never return another subagent_plan. Do not claim local tools ran; propose actions for DS Agent to validate and execute. Write reply_to_user for an ordinary user in the user's language. Lead with the useful conclusion or next step. Do not expose internal action types, tool IDs, protocol or schema names, policy enums, target=/evidence=/output= fields, raw JSON, or English verification receipts unless the user explicitly asks for technical details."; const AGENT_OFFICE_CREATE_EVIDENCE_TEXT_LIMIT: usize = 1200; const AGENT_SOUL_PROFILE_FILE_NAME: &str = "soul.md"; const AGENT_SOUL_PROFILE_CONTEXT_MAX_BYTES: usize = 800; @@ -342,7 +346,9 @@ struct AgentChatRuntimeContext { active_run_id: Option