-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmodels.go
More file actions
125 lines (106 loc) · 4.13 KB
/
models.go
File metadata and controls
125 lines (106 loc) · 4.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
package jules
import "time"
type SessionState string
const (
StateUnspecified SessionState = "STATE_UNSPECIFIED"
Queued SessionState = "QUEUED"
Planning SessionState = "PLANNING"
AwaitingPlanApproval SessionState = "AWAITING_PLAN_APPROVAL"
AwaitingUserFeedback SessionState = "AWAITING_USER_FEEDBACK"
InProgress SessionState = "IN_PROGRESS"
Paused SessionState = "PAUSED"
Failed SessionState = "FAILED"
Completed SessionState = "COMPLETED"
)
type GitHubBranch struct {
DisplayName string `json:"displayName"`
}
type GitHubRepo struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
IsPrivate bool `json:"isPrivate"`
DefaultBranch *GitHubBranch `json:"defaultBranch,omitempty"`
Branches []GitHubBranch `json:"branches,omitempty"`
}
type Source struct {
Name string `json:"name"`
ID string `json:"id"`
GithubRepo *GitHubRepo `json:"githubRepo,omitempty"`
}
type GitHubRepoContext struct {
StartingBranch string `json:"startingBranch"`
}
type SourceContext struct {
Source string `json:"source"`
GithubRepoContext *GitHubRepoContext `json:"githubRepoContext,omitempty"`
}
type PullRequest struct {
URL string `json:"url"`
Title string `json:"title"`
Description string `json:"description"`
}
type SessionOutput struct {
PullRequest *PullRequest `json:"pullRequest,omitempty"`
}
type Session struct {
Prompt string `json:"prompt"`
SourceContext SourceContext `json:"sourceContext"`
Name string `json:"name,omitempty"`
ID string `json:"id,omitempty"`
Title string `json:"title,omitempty"`
RequirePlanApproval bool `json:"requirePlanApproval,omitempty"`
CreateTime time.Time `json:"createTime,omitempty"`
UpdateTime time.Time `json:"updateTime,omitempty"`
State SessionState `json:"state,omitempty"`
URL string `json:"url,omitempty"`
Outputs []SessionOutput `json:"outputs,omitempty"`
}
type PlanStep struct {
ID string `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Index int `json:"index"`
}
type Plan struct {
ID string `json:"id"`
Steps []PlanStep `json:"steps"`
CreateTime time.Time `json:"createTime,omitempty"`
}
type GitPatch struct {
UnidiffPatch string `json:"unidiffPatch"`
BaseCommitID string `json:"baseCommitId"`
SuggestedCommitMessage string `json:"suggestedCommitMessage"`
}
type ChangeSet struct {
Source string `json:"source"`
GitPatch *GitPatch `json:"gitPatch,omitempty"`
}
type Media struct {
Data string `json:"data"`
MimeType string `json:"mimeType"`
}
type BashOutput struct {
Command string `json:"command"`
Output string `json:"output"`
ExitCode int `json:"exitCode"`
}
type Artifact struct {
ChangeSet *ChangeSet `json:"changeSet,omitempty"`
Media *Media `json:"media,omitempty"`
BashOutput *BashOutput `json:"bashOutput,omitempty"`
}
type Activity struct {
Name string `json:"name"`
ID string `json:"id,omitempty"`
Description string `json:"description,omitempty"`
CreateTime time.Time `json:"createTime,omitempty"`
Originator string `json:"originator,omitempty"`
Artifacts []Artifact `json:"artifacts,omitempty"`
AgentMessaged map[string]string `json:"agentMessaged,omitempty"`
UserMessaged map[string]string `json:"userMessaged,omitempty"`
PlanGenerated map[string]interface{} `json:"planGenerated,omitempty"`
PlanApproved map[string]string `json:"planApproved,omitempty"`
ProgressUpdated map[string]string `json:"progressUpdated,omitempty"`
SessionCompleted map[string]interface{} `json:"sessionCompleted,omitempty"`
SessionFailed map[string]string `json:"sessionFailed,omitempty"`
}