Move agent-run orchestration from the legacy supervisor path into the new agentrun worker/service package and wire it through coredata, server, policies, and GraphQL resolvers. This consolidates run lifecycle handling around lease-aware workers and aligns API surface with the new agent-run domain model so reviewers can follow one coherent execution path. Signed-off-by: Bryan Frimin <bryan@probo.com>
61 lines
1.7 KiB
GraphQL
61 lines
1.7 KiB
GraphQL
enum AgentRunStatus
|
|
@goModel(model: "go.probo.inc/probo/pkg/coredata.AgentRunStatus") {
|
|
PENDING
|
|
@goEnum(value: "go.probo.inc/probo/pkg/coredata.AgentRunStatusPending")
|
|
RUNNING
|
|
@goEnum(value: "go.probo.inc/probo/pkg/coredata.AgentRunStatusRunning")
|
|
SUSPENDED
|
|
@goEnum(value: "go.probo.inc/probo/pkg/coredata.AgentRunStatusSuspended")
|
|
AWAITING_APPROVAL
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.AgentRunStatusAwaitingApproval"
|
|
)
|
|
COMPLETED
|
|
@goEnum(value: "go.probo.inc/probo/pkg/coredata.AgentRunStatusCompleted")
|
|
FAILED
|
|
@goEnum(value: "go.probo.inc/probo/pkg/coredata.AgentRunStatusFailed")
|
|
}
|
|
|
|
enum AgentRunOrderField
|
|
@goModel(model: "go.probo.inc/probo/pkg/coredata.AgentRunOrderField") {
|
|
CREATED_AT
|
|
@goEnum(
|
|
value: "go.probo.inc/probo/pkg/coredata.AgentRunOrderFieldCreatedAt"
|
|
)
|
|
}
|
|
|
|
input AgentRunOrder
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.AgentRunOrderBy"
|
|
) {
|
|
direction: OrderDirection!
|
|
field: AgentRunOrderField!
|
|
}
|
|
|
|
type AgentRun implements Node {
|
|
id: ID!
|
|
organization: Organization! @goField(forceResolver: true)
|
|
agentName: String!
|
|
status: AgentRunStatus!
|
|
errorMessage: String
|
|
startedAt: Datetime
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
|
|
permission(action: String!): Boolean! @goField(forceResolver: true)
|
|
}
|
|
|
|
type AgentRunConnection
|
|
@goModel(
|
|
model: "go.probo.inc/probo/pkg/server/api/console/v1/types.AgentRunConnection"
|
|
) {
|
|
totalCount: Int! @goField(forceResolver: true)
|
|
edges: [AgentRunEdge!]!
|
|
pageInfo: PageInfo!
|
|
}
|
|
|
|
type AgentRunEdge {
|
|
cursor: CursorKey!
|
|
node: AgentRun!
|
|
}
|