Общий схема-контракт `AgentAnswerPackage` для структурированных выходных данных агентов

## Что это ## Резюме (RU) Общий схема-контракт `AgentAnswerPackage` для структурированных выходных данных агентов *Полный перевод тела — в работе. Английский оригинал ниже.* --- # Original (EN) ### Objective Introduce a typed shared schema for agent answers so future artifacts, notes, tasks, retrieval traces, audit metadata, and memory promotion can be handled as structured packages instead of markdown-only chat messages. ### Source Links * GitHub issue: [https://github.com/agisota/rox.one/issues/271]() * GitHub PR: none yet * GitHub branch: `feat/rox-design-clean` * GitHub Project item: [https://github.com/users/agisota/projects/9]() (API update blocked by current PAT: `user.projectV2` not accessible) * DeepWiki/repo context: [https://deepwiki.com/agisota/rox.one]() * Local branch / cwd: `feat/rox-design-clean` / `/home/dev/craft/rox-one-terminal` * Parent Linear issue: PZD-10 * Local Graphify artifact: `/home/dev/craft/rox-one-graphify-deepwiki-2026-05-20/source/graphify-out/graph.json` ### Current State Completed in commit `15b2c85e`. Added `packages/shared/src/workbench/answer-package.ts`, exported it from `packages/shared/src/workbench/index.ts`, and added `packages/shared/src/workbench/__tests__/answer-package.test.ts`. ### Requirements Schema must be strict enough for downstream runtime use but not wire into active artifact/session surfaces yet because parallel artifact-panel work owns those files. It must avoid leaking full markdown/content from summary helpers. Confidence uses repo-native 0..100 percent scale. ### Specification * Define Zod schemas/types for AgentAnswerPackage, NoteDraft, BlockDraft, TaskDraft, AgentRunDraft, RetrievalTrace, ToolUse, ContextRef, SourceRef, and related primitives. * Provide `createAgentAnswerPackage(input)` parser and `summarizeAgentAnswerPackage(package)` safe summary. * Export from shared workbench index. * Keep compatibility by adding only new shared exports; no runtime behavior change yet. ### Acceptance Criteria * Given a complete structured answer package, when parsed, then schema accepts it and preserves typed fields. * Given invalid confidence or empty promptId, when parsed, then schema rejects it. * Given caller input, when `createAgentAnswerPackage` runs, then caller input is not mutated. * Given summary generation, when called, then it returns counts/m... ## Статус Это задача из текущего backlog'а ROX.ONE (Linear). Текущий статус в Linear: `На ревью — In Review`. Метки: —. ## 🔗 Linear - [PZD-15](https://linear.app/kuhjie/issue/PZD-15/obshij-shema-kontrakt-agentanswerpackage-dlya-strukturirovannyh) — backing ticket - Parent epic: [PZD-116](https://linear.app/kuhjie/issue/PZD-116)

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
🌊

Frictionless UX

Date

About 15 hours ago

Author

agi

Subscribe to post

Get notified by email when there are changes.