Files
Agent-System-Backend/internal/docgen/operation.go
weichen fec2d16cc6 Close Task 10 renderer delivery gaps
Why:
- Independent review found trusted-boundary, semantic parity, replay-budget,
  comparison, persistence, cancellation, provenance, and routing gaps.
- Storage migration must include the new durable delivery table.

Evidence:
- go test -count=1 ./...
- go test -race ./internal/docgen ./internal/tools ./internal/runmgr
- go test ./... (deps/agent-document-renderer)
- go vet ./...
- go build ./...
- CGO_ENABLED=0 go build -trimpath ./cmd/agent-system
- Python house-style unittest suite and git diff --check

Impact:
- Word delivery now uses host-owned freezes, Markdown-first resumable persistence,
  closed registration boundaries, semantic shared rendering, and real comparison.
- Controlled/project documents still fail closed to RDM and non-Word flows remain
  unchanged.

Refs:
- Unified Document Renderer implementation plan Task 10
- /tmp/task10-backend-review-last.md
- Renderer d5cd8c126045a27d5a5cc5da23f64d3c737e116a
2026-10-15 21:44:03 +00:00

41 lines
1.3 KiB
Go

package docgen
import (
"time"
"agent-document-renderer/render"
)
type OperationRequest struct {
OperationID string `json:"operationId"`
DocumentID string `json:"documentId"`
Title string `json:"name"`
DocumentType string `json:"documentType,omitempty"`
Language string `json:"language,omitempty"`
Markdown []byte `json:"-"`
Mode render.Mode `json:"mode"`
Controlled bool `json:"controlled"`
ProjectDocument bool `json:"projectDocument"`
}
type ReceiptArtifact struct {
Role string `json:"role"`
ID string `json:"id"`
Name string `json:"name"`
MIME string `json:"mime"`
Size int64 `json:"size"`
SHA256 string `json:"sha256"`
}
type OperationReceipt struct {
OperationID string `json:"operationId"`
Outcome string `json:"outcome"`
State string `json:"state"`
FrozenAt time.Time `json:"frozenAt"`
DeliveryKey string `json:"deliveryKey,omitempty"`
Renderer string `json:"rendererIdentity"`
CacheHit bool `json:"cacheHit,omitempty"`
Artifacts []ReceiptArtifact `json:"artifacts,omitempty"`
Error string `json:"error,omitempty"`
}