Add permission aware search

This commit is contained in:
ZacharyZhang-NY committed 2026-05-23 17:34:50 -04:00
1 parent 38c68ca4af
commit 1ee877e630
17 files changed
+608 -4

No files matched your search

+9
View File
@@ -5,6 +5,7 @@ import type {
LegalHoldEntityType,
RetentionFreezeScopeType,
RiskLevel,
SearchEntityType,
SocialPlatform,
TaskPriority,
TaskStatus,
@@ -176,6 +177,14 @@ export interface CreateMigrationReportInput {
sourceDatabasePath: string;
}
export interface SearchInput {
orgId: string;
employeeId: string;
query: string;
entityTypes?: SearchEntityType[];
limit?: number;
}
export interface CreateComplianceExportInput {
orgId: string;
subjectType: ComplianceSubjectType;
+3 -1
View File
@@ -1,5 +1,5 @@
import type { DesktopResult } from "./result";
import type { AppSnapshot } from "./domain";
import type { AppSnapshot, SearchResultRecord } from "./domain";
import type {
BindSkillInput,
BootstrapOnboardingInput,
@@ -26,6 +26,7 @@ import type {
LaunchSocialLoginInput,
ResolveAgentSkillsInput,
SaveProviderCredentialInput,
SearchInput,
SendMessageInput,
SetActiveOrganizationInput,
SetFilePinnedInput,
@@ -73,6 +74,7 @@ export interface DesktopApi {
setLegalHoldState(input: SetLegalHoldStateInput): Promise<DesktopResult<AppSnapshot>>;
createRetentionFreeze(input: CreateRetentionFreezeInput): Promise<DesktopResult<AppSnapshot>>;
setRetentionFreezeState(input: SetRetentionFreezeStateInput): Promise<DesktopResult<AppSnapshot>>;
search(input: SearchInput): Promise<DesktopResult<SearchResultRecord[]>>;
subscribe(callback: (event: RendererEvent) => void): () => void;
platform: "win32" | "darwin" | "linux";
windowMinimize(): Promise<void>;
+1
View File
@@ -2,6 +2,7 @@ import type { BoardInterventionRecord as BoardInterventionRecordModel, ChatThrea
import type { ComplianceExportRecord, LegalHoldRecord, RetentionFreezeRecord } from "./compliance-domain";
export { BOARD_INTERVENTION_ACTION, BOARD_INTERVENTION_MODE, CHAT_THREAD_BOARD_STATE, type BoardInterventionAction, type BoardInterventionMode, type BoardInterventionRecord, type ChatThreadBoardState } from "./board-domain";
export { COMPLIANCE_EXPORT_STATE, COMPLIANCE_EXPORT_TYPE, type ComplianceExportRecord, type ComplianceExportState, type ComplianceExportType, type ComplianceSubjectType, type LegalHoldEntityType, type LegalHoldRecord, type RetentionFreezeRecord, type RetentionFreezeScopeType } from "./compliance-domain";
export { SEARCH_ENTITY_TYPES, type SearchEntityType, type SearchResultRecord } from "./search-domain";
export const TASK_STATUS = {
BACKLOG: "backlog",
IN_PROGRESS: "in_progress",
+1
View File
@@ -32,6 +32,7 @@ export const IPC_CHANNELS = {
setLegalHoldState: "agentcompany:set-legal-hold-state",
createRetentionFreeze: "agentcompany:create-retention-freeze",
setRetentionFreezeState: "agentcompany:set-retention-freeze-state",
search: "agentcompany:search",
rendererEvent: "agentcompany:renderer-event",
windowMinimize: "agentcompany:window-minimize",
windowMaximize: "agentcompany:window-maximize",
@@ -0,0 +1,25 @@
export const SEARCH_ENTITY_TYPES = [
"employee",
"agent",
"task",
"goal",
"project",
"workspace",
"approval",
"chat_space",
"chat_message",
"file",
"provider",
"social_account",
"scheduled_post",
] as const;
export type SearchEntityType = (typeof SEARCH_ENTITY_TYPES)[number];
export interface SearchResultRecord {
entityType: SearchEntityType;
entityId: string;
title: string;
preview: string;
facets: Record<string, string>;
}