@overmap-ai/core 1.0.53-add-agent-slice.0 → 1.0.53-add-agent-sdk.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,7 @@
1
1
  import { BaseApiService } from "./BaseApiService";
2
- import { OptionalFileModel, Payload } from "../../typings";
2
+ import { Payload } from "../../typings";
3
3
  import { JSONContent } from "@tiptap/core";
4
- export interface AgentProfile extends OptionalFileModel {
5
- /**
6
- * The name of the agent.
7
- */
8
- name: string;
9
- /**
10
- * The description of the agent.
11
- */
12
- description: string;
13
- }
4
+ import { AgentConversation, AgentProfile } from "../../typings/models/agents";
14
5
  export interface PromptAgentResponse {
15
6
  /**
16
7
  * The response from the agent.
@@ -35,6 +26,7 @@ export declare class AgentService extends BaseApiService {
35
26
  * @param request The message to prompt the agent with.
36
27
  * @param conversationId If continuing an existing message, the UUID of that conversation.
37
28
  */
38
- prompt(request: Payload<string>, conversationId?: string): Promise<PromptAgentResponse>;
29
+ prompt(request: Payload<string>, conversationId?: string | null | undefined): Promise<PromptAgentResponse>;
30
+ fetchAll(): Promise<AgentConversation[]>;
39
31
  rate(responseId: string, rating: 1 | 5): Promise<undefined>;
40
32
  }
@@ -70,7 +70,6 @@ export declare const selectCategories: ((state: import("redux").EmptyObject & {
70
70
  licenseReducer: import('..').LicenseState;
71
71
  documentsReducer: import('..').DocumentState;
72
72
  teamReducer: import('..').TeamState;
73
- agentReducer: import('..').AgentState;
74
73
  } & {
75
74
  offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
76
75
  }) => Category[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Category>, args_1: string | null) => Category[], {
@@ -262,7 +262,6 @@ export declare const selectRootDocuments: ((state: import("redux").EmptyObject &
262
262
  licenseReducer: import('..').LicenseState;
263
263
  documentsReducer: DocumentState;
264
264
  teamReducer: import('..').TeamState;
265
- agentReducer: import('..').AgentState;
266
265
  } & {
267
266
  offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
268
267
  }) => ((import('../../typings/models/base').OfflineModel & import('../../typings/models/base').CreatedByModel & {
@@ -49,7 +49,6 @@ export declare const selectFormRevisions: ((state: import("redux").EmptyObject &
49
49
  licenseReducer: import('..').LicenseState;
50
50
  documentsReducer: import('..').DocumentState;
51
51
  teamReducer: import('..').TeamState;
52
- agentReducer: import('..').AgentState;
53
52
  } & {
54
53
  offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
55
54
  }) => Stored<UserFormRevision<import('../../forms').ISerializedField>>[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Stored<UserFormRevision<import('../../forms').ISerializedField>>>) => Stored<UserFormRevision<import('../../forms').ISerializedField>>[], {
@@ -25,4 +25,3 @@ export * from "./emailDomainsSlice";
25
25
  export * from "./licenseSlice";
26
26
  export * from "./documentSlice";
27
27
  export * from "./teamSlice";
28
- export * from "./agentSlice";
@@ -146,7 +146,6 @@ export declare const selectAllAttachments: ((state: import("redux").EmptyObject
146
146
  licenseReducer: import('..').LicenseState;
147
147
  documentsReducer: import('..').DocumentState;
148
148
  teamReducer: import('..').TeamState;
149
- agentReducer: import('..').AgentState;
150
149
  } & {
151
150
  offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
152
151
  }) => Stored<IssueAttachment>[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Stored<IssueAttachment>>) => Stored<IssueAttachment>[], {
@@ -78,7 +78,6 @@ export declare const selectProjectFiles: ((state: import("redux").EmptyObject &
78
78
  licenseReducer: import('..').LicenseState;
79
79
  documentsReducer: import('..').DocumentState;
80
80
  teamReducer: import('..').TeamState;
81
- agentReducer: import('..').AgentState;
82
81
  } & {
83
82
  offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
84
83
  }) => ProjectFile[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, ProjectFile>, args_1: number | null) => ProjectFile[], {
@@ -56,7 +56,6 @@ export declare const selectWorkspaces: ((state: import("redux").EmptyObject & {
56
56
  licenseReducer: import('..').LicenseState;
57
57
  documentsReducer: import('..').DocumentState;
58
58
  teamReducer: import('..').TeamState;
59
- agentReducer: import('..').AgentState;
60
59
  } & {
61
60
  offline: import("@redux-offline/redux-offline/lib/types").OfflineState;
62
61
  }) => Workspace[]) & import("reselect").OutputSelectorFields<(args_0: Record<string, Workspace>) => Workspace[], {
@@ -6,7 +6,6 @@ import { type OfflineMetaEffect, type OvermapSDK, RequestDetails } from "../sdk"
6
6
  import { AuthState, CategoryState, ComponentStageCompletionState, ComponentStageState, ComponentState, ComponentTypeState, DocumentState, EmailDomainState, FileState, IssueState, IssueTypeState, LicenseState, MapState, OrganizationAccessState, OrganizationState, OutboxState, ProjectAccessState, ProjectFileState, ProjectState, RehydratedState, SettingState, FormState, FormRevisionState, FormSubmissionState, UserState, WorkspaceState, TeamState } from "./slices";
7
7
  import { VersioningState } from "./slices/versioningSlice";
8
8
  import { RootState } from "../typings";
9
- import { AgentState } from "./slices/agentSlice";
10
9
  export declare const overmapReducers: {
11
10
  versioning: Reducer<VersioningState>;
12
11
  fileReducer: Reducer<FileState>;
@@ -36,7 +35,6 @@ export declare const overmapReducers: {
36
35
  licenseReducer: Reducer<LicenseState>;
37
36
  documentsReducer: Reducer<DocumentState>;
38
37
  teamReducer: Reducer<TeamState>;
39
- agentReducer: Reducer<AgentState>;
40
38
  };
41
39
  export declare const overmapReducer: Reducer<import("redux").CombinedState<{
42
40
  versioning: VersioningState;
@@ -67,7 +65,6 @@ export declare const overmapReducer: Reducer<import("redux").CombinedState<{
67
65
  licenseReducer: LicenseState;
68
66
  documentsReducer: DocumentState;
69
67
  teamReducer: TeamState;
70
- agentReducer: AgentState;
71
68
  }>, AnyAction>;
72
69
  export declare const resetStore = "RESET";
73
70
  export declare const rootReducer: Reducer<RootState>;
@@ -116,7 +113,6 @@ export declare const defaultStore: import("@reduxjs/toolkit/dist/configureStore"
116
113
  licenseReducer: LicenseState;
117
114
  documentsReducer: DocumentState;
118
115
  teamReducer: TeamState;
119
- agentReducer: AgentState;
120
116
  } & {
121
117
  offline: OfflineState;
122
118
  }, AnyAction, import("@reduxjs/toolkit").MiddlewareArray<[import("@reduxjs/toolkit").ThunkMiddleware<RootState, AnyAction>]>>;
@@ -0,0 +1,17 @@
1
+ import { JSONContent } from "@tiptap/core";
2
+ import { OptionalFileModel, TimestampedModel } from "./base";
3
+ export interface AgentProfile extends OptionalFileModel {
4
+ /**
5
+ * The name of the agent.
6
+ */
7
+ name: string;
8
+ /**
9
+ * The description of the agent.
10
+ */
11
+ description: string;
12
+ }
13
+ export type AgentConversation = Omit<TimestampedModel, "updated_at"> & {
14
+ id: string;
15
+ profile?: AgentProfile | null;
16
+ history: JSONContent[];
17
+ };
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Core functionality for Overmap",
4
4
  "author": "Wôrdn Inc.",
5
5
  "license": "UNLICENSED",
6
- "version": "1.0.53-add-agent-slice.0",
6
+ "version": "1.0.53-add-agent-sdk.0",
7
7
  "type": "module",
8
8
  "main": "dist/overmap-core.umd.cjs",
9
9
  "module": "dist/overmap-core.js",
@@ -1,14 +0,0 @@
1
- import { PayloadAction, Reducer } from "@reduxjs/toolkit";
2
- import { RootState } from "../../typings";
3
- export interface AgentState {
4
- conversationId: string | undefined;
5
- }
6
- /**
7
- * Stores the state of the user's chats with the agent
8
- */
9
- export declare const agentSlice: import("@reduxjs/toolkit").Slice<AgentState, {
10
- setConversationId: (state: import("immer/dist/internal.js").WritableDraft<AgentState>, action: PayloadAction<string | undefined>) => void;
11
- }, "agents">;
12
- export declare const setConversationId: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<string | undefined, "agents/setConversationId">;
13
- export declare const selectConversationId: (state: RootState) => string | undefined;
14
- export declare const agentReducer: Reducer<AgentState>;