Wire real page actions to persisted data
This commit is contained in:
1 parent
6992b3e70e
commit
83a51c6881
16 files changed
+411
-94
No files matched your search
@@ -2,6 +2,7 @@ import type {
|
||||
ApprovalState,
|
||||
RiskLevel,
|
||||
SocialPlatform,
|
||||
TaskPriority,
|
||||
TaskStatus,
|
||||
} from "./domain";
|
||||
|
||||
@@ -40,6 +41,11 @@ export interface CreateTaskInput {
|
||||
status: TaskStatus;
|
||||
assigneeAgentId: string | null;
|
||||
risk: RiskLevel;
|
||||
projectId: string | null;
|
||||
goalId: string | null;
|
||||
workspaceId: string | null;
|
||||
priority: TaskPriority;
|
||||
requiresFilesystem: boolean;
|
||||
}
|
||||
|
||||
export interface UpdateTaskStatusInput {
|
||||
@@ -75,6 +81,14 @@ export interface SendMessageInput {
|
||||
attachmentFileIds?: string[];
|
||||
}
|
||||
|
||||
export interface CreateChatSpaceInput {
|
||||
orgId: string;
|
||||
spaceType: "company" | "department" | "project" | "direct";
|
||||
name: string;
|
||||
topic: string;
|
||||
visibility: "workspace" | "restricted";
|
||||
}
|
||||
|
||||
export interface SaveProviderCredentialInput {
|
||||
orgId: string;
|
||||
providerId: string;
|
||||
|
||||
@@ -6,6 +6,7 @@ import type {
|
||||
BootstrapOnboardingSummary,
|
||||
CreateAgentInput,
|
||||
CreateApprovalInput,
|
||||
CreateChatSpaceInput,
|
||||
CreateMigrationReportInput,
|
||||
CreateOrganizationInput,
|
||||
CreateProviderResponseInput,
|
||||
@@ -34,6 +35,7 @@ export interface DesktopApi {
|
||||
updateTaskStatus(input: UpdateTaskStatusInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
createApproval(input: CreateApprovalInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
decideApproval(input: DecideApprovalInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
createChatSpace(input: CreateChatSpaceInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
sendMessage(input: SendMessageInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
saveProviderCredential(input: SaveProviderCredentialInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
createProviderResponse(input: CreateProviderResponseInput): Promise<DesktopResult<AppSnapshot>>;
|
||||
|
||||
@@ -17,6 +17,12 @@ export const RISK_LEVEL = {
|
||||
HIGH: "high",
|
||||
} as const;
|
||||
|
||||
export const TASK_PRIORITY = {
|
||||
LOW: "low",
|
||||
NORMAL: "normal",
|
||||
HIGH: "high",
|
||||
} as const;
|
||||
|
||||
export const PROVIDER_AUTH_TYPE = {
|
||||
API_KEY: "api_key",
|
||||
OAUTH_PKCE: "oauth_pkce",
|
||||
@@ -41,6 +47,7 @@ export type ValueOf<T> = T[keyof T];
|
||||
export type TaskStatus = ValueOf<typeof TASK_STATUS>;
|
||||
export type ApprovalState = ValueOf<typeof APPROVAL_STATE>;
|
||||
export type RiskLevel = ValueOf<typeof RISK_LEVEL>;
|
||||
export type TaskPriority = ValueOf<typeof TASK_PRIORITY>;
|
||||
export type ProviderAuthType = ValueOf<typeof PROVIDER_AUTH_TYPE>;
|
||||
export type SocialPlatform = ValueOf<typeof SOCIAL_PLATFORM>;
|
||||
export type ProviderRequestState = ValueOf<typeof PROVIDER_REQUEST_STATE>;
|
||||
@@ -96,7 +103,7 @@ export interface TaskRecord {
|
||||
projectId: string | null;
|
||||
goalId: string | null;
|
||||
workspaceId: string | null;
|
||||
priority: string;
|
||||
priority: TaskPriority;
|
||||
requiresFilesystem: boolean;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
|
||||
@@ -7,6 +7,7 @@ export const IPC_CHANNELS = {
|
||||
updateTaskStatus: "agentcompany:update-task-status",
|
||||
createApproval: "agentcompany:create-approval",
|
||||
decideApproval: "agentcompany:decide-approval",
|
||||
createChatSpace: "agentcompany:create-chat-space",
|
||||
sendMessage: "agentcompany:send-message",
|
||||
saveProviderCredential: "agentcompany:save-provider-credential",
|
||||
createProviderResponse: "agentcompany:create-provider-response",
|
||||
|
||||
Reference in new issue
Block a user