Skip to content

Commit

Permalink
chore: refactor to prepare for projects and threads
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Jan 30, 2025
1 parent e6f8ca4 commit af61075
Show file tree
Hide file tree
Showing 93 changed files with 2,055 additions and 1,210 deletions.
19 changes: 15 additions & 4 deletions apiclient/types/authorization.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
package types

type Authorization struct {
AuthorizationManifest
type AgentAuthorization struct {
AgentAuthorizationManifest
User *User `json:"user,omitempty"`
}

type AuthorizationManifest struct {
type AgentAuthorizationManifest struct {
UserID string `json:"userID,omitempty"`
AgentID string `json:"agentId,omitempty"`
}

type AuthorizationList List[Authorization]
type AuthorizationList List[AgentAuthorization]

type ThreadAuthorization struct {
ThreadAuthorizationManifest
}

type ThreadAuthorizationManifest struct {
UserID string `json:"userID,omitempty"`
ThreadID string `json:"threadID,omitempty"`
}

type ThreadAuthorizationList List[ThreadAuthorization]
12 changes: 12 additions & 0 deletions apiclient/types/project.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package types

type Project struct {
Metadata
ProjectManifest
}

type ProjectManifest struct {
Name string `json:"name,omitempty"`
}

type ProjectList List[Project]
3 changes: 1 addition & 2 deletions apiclient/types/thread.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ type Thread struct {
State string `json:"state,omitempty"`
LastRunID string `json:"lastRunID,omitempty"`
CurrentRunID string `json:"currentRunID,omitempty"`
ParentThreadID string `json:"parentThreadID,omitempty"`
ProjectID string `json:"projectID,omitempty"`
UserID string `json:"userID,omitempty"`
AgentAlias string `json:"agentAlias,omitempty"`
Abort bool `json:"abort,omitempty"`
SystemTask bool `json:"systemTask,omitempty"`
Env []string `json:"env,omitempty"`
Expand Down
179 changes: 142 additions & 37 deletions apiclient/types/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit af61075

Please sign in to comment.