nomadcode/services/core/internal/model/model.go
toki fad5627ae6 feat: milestone work item creation/sync 구현 및 roadmap sync 기능 추가
- Plane Todo projection 및 idempotency/retry 메커니즘 구현
- Roadmap sync identity 및 step 모델/DB 마이그레이션/쿼리 추가
- OpenAI 및 Plane adapter 개선
- roadmaps sync package: plane_format, plane_projection, retry 모듈 추가
- Storage layer: roadmap_sync_identities, roadmap_sync_steps 추가
- agent-task 아카이브 정리
2026-06-14 04:08:15 +09:00

46 lines
1 KiB
Go

package model
import (
"context"
"encoding/json"
)
type Client interface {
Generate(ctx context.Context, input GenerateInput) (GenerateResult, error)
}
// WorkspaceMetadata carries workspace-bound authoring context. On the wire,
// only the Path is serialized as a flat string to metadata.workspace in the
// /v1/responses payload. Other fields are used on the client-side/authoring
// logic.
type WorkspaceMetadata struct {
Path string `json:"path"`
SourceBranch string `json:"source_branch,omitempty"`
Provider string `json:"provider,omitempty"`
WorkItemID string `json:"work_item_id,omitempty"`
}
type GenerateInput struct {
Model string
Instructions string
Input string
Metadata map[string]string
WorkspaceMetadata *WorkspaceMetadata
MaxOutputTokens int
Temperature *float64
TopP *float64
}
type GenerateResult struct {
ID string
Model string
Text string
Usage Usage
Raw json.RawMessage
}
type Usage struct {
InputTokens int
OutputTokens int
TotalTokens int
}