@feedmepos/mf-remy-panel 0.17.0-dev.3 → 0.18.0-dev.1

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,5 +1,5 @@
1
1
  import { defineComponent as C, ref as a, openBlock as l, createElementBlock as i, createElementVNode as e, unref as E, createTextVNode as b, createStaticVNode as x, toDisplayString as p, createCommentVNode as m } from "vue";
2
- import { u as w, a as B, b as _, R as N, _ as R } from "./app-da81b5a0.js";
2
+ import { u as w, a as B, b as _, R as N, _ as R } from "./app-b703bd4a.js";
3
3
  import "pinia";
4
4
  import "@feedmepos/mf-common";
5
5
  import "vue-router";
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as s, computed as o, openBlock as i, createElementBlock as l, normalizeClass as t, createElementVNode as p, unref as u, createCommentVNode as d } from "vue";
2
- import { u as y, R as _ } from "./app-da81b5a0.js";
2
+ import { u as y, R as _ } from "./app-b703bd4a.js";
3
3
  import "pinia";
4
4
  import "@feedmepos/mf-common";
5
5
  import "vue-router";
@@ -2,6 +2,8 @@ export interface ConversationResponseDto {
2
2
  id: string;
3
3
  userId: string;
4
4
  businessId: string;
5
+ restaurantId?: string;
6
+ restaurantName?: string;
5
7
  title: string;
6
8
  lastMessageAt: string;
7
9
  messageCount?: number;
@@ -15,14 +17,9 @@ export interface PaginatedConversationsResponseDto {
15
17
  limit: number;
16
18
  hasMore: boolean;
17
19
  }
18
- export interface CreateConversationDto {
19
- businessId: string;
20
- }
21
- export interface UpdateConversationDto {
22
- title: string;
23
- }
24
- export declare function createConversation(businessId: string): Promise<ConversationResponseDto>;
25
- export declare function fetchConversations(businessId: string, page?: number, limit?: number): Promise<PaginatedConversationsResponseDto>;
26
- export declare function fetchConversation(conversationId: string): Promise<ConversationResponseDto>;
27
- export declare function updateConversation(conversationId: string, data: UpdateConversationDto): Promise<ConversationResponseDto>;
28
- export declare function deleteConversation(conversationId: string): Promise<void>;
20
+ export declare function createConversation(businessId: string, restaurant?: {
21
+ id: string;
22
+ name: string;
23
+ }): Promise<ConversationResponseDto>;
24
+ export declare function fetchConversations(businessId: string, restaurantId?: string, page?: number, limit?: number): Promise<PaginatedConversationsResponseDto>;
25
+ export declare function deleteConversation(conversationId: string, businessId: string): Promise<void>;
@@ -0,0 +1,34 @@
1
+ export interface DreamerWorkItem {
2
+ conversationId: string;
3
+ title: string;
4
+ status: 'running' | 'queued';
5
+ lastMessageAt: string;
6
+ leaseUntil: string | null;
7
+ leaseOwner: string | null;
8
+ }
9
+ export interface DreamerResolvedItem {
10
+ conversationId: string;
11
+ conversationTitle: string;
12
+ title: string;
13
+ summary: string;
14
+ messageCount: number;
15
+ resolvedAt: string;
16
+ changes: Array<{
17
+ id: string;
18
+ text: string;
19
+ category: string;
20
+ status: string;
21
+ action: string;
22
+ }>;
23
+ }
24
+ export interface DreamerMonitorResponse {
25
+ observedAt: string;
26
+ counts: {
27
+ running: number;
28
+ queued: number;
29
+ resolved: number;
30
+ };
31
+ work: DreamerWorkItem[];
32
+ resolved: DreamerResolvedItem[];
33
+ }
34
+ export declare function fetchDreamerMonitor(businessId: string): Promise<DreamerMonitorResponse>;
@@ -1,15 +1,21 @@
1
1
  export declare enum RemyFeatureFlag {
2
2
  Task = "portal_remy_task",
3
- ConnectedApp = "portal_remy_connected_app"
3
+ ConnectedApp = "portal_remy_connected_app",
4
+ MemoryEngine = "portal_remy_memory_engine"
4
5
  }
5
6
  export interface FeatureFlags {
6
7
  [RemyFeatureFlag.Task]: boolean;
7
8
  [RemyFeatureFlag.ConnectedApp]: boolean;
9
+ [RemyFeatureFlag.MemoryEngine]: boolean;
10
+ }
11
+ interface FeatureFlagRequestOptions {
12
+ forceRefresh?: boolean;
8
13
  }
9
14
  /**
10
- * Feature flags for the current business, resolved by the backend
11
- * (env override → Flagsmith → false). The backend owns the flag environment
12
- * and key, so there is nothing to configure on the frontend. Fails closed:
13
- * any error resolves every flag to false.
15
+ * Global environment feature flags, resolved by the backend
16
+ * (env override → Flagsmith → false). `businessId` is request context for
17
+ * tenant-safe UI updates, not a rollout-target identity. The backend owns the
18
+ * environment and key. Any error fails closed for that call.
14
19
  */
15
- export declare function getFeatureFlags(): Promise<FeatureFlags>;
20
+ export declare function getFeatureFlags(explicitBusinessId?: string, options?: FeatureFlagRequestOptions): Promise<FeatureFlags>;
21
+ export {};
@@ -0,0 +1,28 @@
1
+ export interface McpPromptArgumentDto {
2
+ name: string;
3
+ description?: string;
4
+ required?: boolean;
5
+ }
6
+ export interface McpPromptDto {
7
+ name: string;
8
+ title?: string;
9
+ description?: string;
10
+ arguments: McpPromptArgumentDto[];
11
+ }
12
+ /** Fetches every prompt remy-mcp advertises (standard `prompts/list`), via
13
+ * remy-agent-api's `McpController`. Resolves to an empty array (never
14
+ * throws) if the backend has no MCP server connected or the request fails
15
+ * for any reason — mirrors remy-cli's fault-tolerant "no prompts = no
16
+ * slash commands" convention. */
17
+ export declare function fetchMcpPrompts(): Promise<McpPromptDto[]>;
18
+ /** Resolves a single MCP prompt (standard `prompts/get`) into plain text via
19
+ * remy-agent-api. Throws on failure — callers decide how to surface the
20
+ * error (unlike `fetchMcpPrompts`, this is called at send-time so silently
21
+ * swallowing a failure would drop the user's message). */
22
+ export declare function resolveMcpPrompt(name: string, args: Record<string, string>): Promise<string>;
23
+ /** Live autocomplete suggestions for one prompt argument (standard MCP
24
+ * `completion/complete`, proxied by remy-agent-api's `McpController`) —
25
+ * consumed by `McpPromptArgsForm.vue` while the user types. Never throws
26
+ * and resolves to `[]` on any failure — this only powers optional
27
+ * suggestions, never something that should block typing. */
28
+ export declare function completeMcpPromptArgument(name: string, argumentName: string, value: string, context?: Record<string, string>): Promise<string[]>;
@@ -1,52 +1,39 @@
1
- export type MemoryCategory = 'profile' | 'concern' | 'preference' | 'pattern';
2
- export type MemoryScope = 'general' | 'report' | 'menu' | 'marketing';
3
- export type MemoryStatus = 'active' | 'superseded' | 'archived' | 'deleted' | 'pending_review';
1
+ export type KnownMemoryCategory = 'profile' | 'concern' | 'preference' | 'pattern' | 'experience';
2
+ export type MemoryCategory = KnownMemoryCategory | (string & {});
3
+ export type MemoryEvidence = 'explicit' | 'observed' | 'inferred';
4
+ export type KnownMemoryScope = 'general' | 'report' | 'menu' | 'marketing';
5
+ export type MemoryScope = KnownMemoryScope | (string & {});
6
+ export type MemoryStatus = 'active' | 'superseded' | 'archived';
4
7
  export interface MemoryDto {
5
8
  id: string;
9
+ spaceKey: string;
10
+ subjectKey: string;
11
+ restaurantId?: string;
12
+ restaurantName?: string;
6
13
  text: string;
7
14
  category: MemoryCategory;
15
+ evidence?: MemoryEvidence;
8
16
  scope: MemoryScope;
9
17
  status: MemoryStatus;
10
18
  confidence: number;
11
19
  evidenceCount: number;
12
- useCount: number;
13
20
  pinned: boolean;
14
21
  userEdited: boolean;
15
22
  lastConfirmedAt: string;
16
- lastUsedAt: string | null;
17
23
  supersededBy: string | null;
18
- conflictWith: string | null;
19
24
  episodeIds: string[];
20
25
  conversationIds: string[];
21
26
  createdAt: string;
22
27
  updatedAt: string;
23
28
  }
24
- export interface MemoryHistoryEntryDto {
25
- at: string;
26
- action: string;
27
- detail?: string;
28
- actor: 'system' | 'user';
29
- }
30
29
  export interface MemoryEdgeDto {
31
30
  id: string;
32
31
  from: string;
33
32
  fromType: 'memory' | 'episode';
34
33
  to: string;
35
34
  toType: 'memory' | 'episode';
36
- relation: 'supersedes' | 'related_to' | 'contradicts' | 'derived_from';
35
+ relation: 'supersedes' | 'related_to' | 'derived_from';
37
36
  weight: number;
38
- resolution: 'kept_this' | 'kept_other' | 'kept_both' | null;
39
- }
40
- export interface MemoryDetailDto extends MemoryDto {
41
- history: MemoryHistoryEntryDto[];
42
- sourceMessageIds: string[];
43
- edges: MemoryEdgeDto[];
44
- episodes: Array<{
45
- id: string;
46
- title: string;
47
- endedAt: string;
48
- conversationId: string;
49
- }>;
50
37
  }
51
38
  export interface MemoryListResponse {
52
39
  data: MemoryDto[];
@@ -54,23 +41,21 @@ export interface MemoryListResponse {
54
41
  page: number;
55
42
  limit: number;
56
43
  hasMore: boolean;
57
- unresolvedConflicts: Array<{
58
- edgeId: string;
59
- from: string;
60
- to: string;
61
- }>;
62
44
  }
63
45
  export interface GraphNodeDto {
64
46
  id: string;
65
47
  type: 'memory' | 'episode';
66
48
  label: string;
49
+ spaceKey: string;
50
+ subjectKey: string;
51
+ restaurantId?: string;
52
+ restaurantName?: string;
67
53
  category?: MemoryCategory;
68
54
  scope?: MemoryScope;
69
55
  status?: MemoryStatus;
70
56
  confidence?: number;
71
57
  pinned?: boolean;
72
58
  endedAt?: string;
73
- conversationId?: string;
74
59
  }
75
60
  export interface MemoryGraphResponse {
76
61
  nodes: GraphNodeDto[];
@@ -78,17 +63,17 @@ export interface MemoryGraphResponse {
78
63
  }
79
64
  export interface EpisodeDto {
80
65
  id: string;
66
+ spaceKey: string;
67
+ subjectKey: string;
68
+ restaurantId?: string;
69
+ restaurantName?: string;
81
70
  conversationId: string;
82
71
  title: string;
83
72
  summary: string;
84
- topics: string[];
85
- outcome: string | null;
86
73
  startedAt: string;
87
74
  endedAt: string;
88
75
  messageCount: number;
89
76
  memoryIds: string[];
90
- /** Read-time cluster id (newest episode of the cluster). Display-only. */
91
- groupId?: string;
92
77
  }
93
78
  export interface EpisodeListResponse {
94
79
  data: EpisodeDto[];
@@ -108,7 +93,6 @@ export declare function fetchMemories(businessId: string, opts?: {
108
93
  page?: number;
109
94
  limit?: number;
110
95
  }): Promise<MemoryListResponse>;
111
- export declare function fetchMemory(businessId: string, id: string): Promise<MemoryDetailDto>;
112
96
  export declare function updateMemory(businessId: string, id: string, patch: {
113
97
  text?: string;
114
98
  category?: string;
@@ -116,8 +100,6 @@ export declare function updateMemory(businessId: string, id: string, patch: {
116
100
  }): Promise<MemoryDto>;
117
101
  export declare function forgetMemory(businessId: string, id: string): Promise<void>;
118
102
  export declare function pinMemory(businessId: string, id: string, pinned: boolean): Promise<MemoryDto>;
119
- export declare function restoreMemory(businessId: string, id: string): Promise<MemoryDto>;
120
- export declare function resolveConflict(businessId: string, edgeId: string, keep: 'from' | 'to' | 'both'): Promise<void>;
121
103
  export declare function fetchMemoryGraph(businessId: string): Promise<MemoryGraphResponse>;
122
104
  export declare function fetchEpisodes(businessId: string, page?: number, limit?: number): Promise<EpisodeListResponse>;
123
105
  export declare function fetchEpisode(businessId: string, id: string): Promise<EpisodeDetailDto>;
@@ -19,5 +19,5 @@ export interface PaginatedMessagesResponseDto {
19
19
  limit: number;
20
20
  hasMore: boolean;
21
21
  }
22
- export declare function fetchMessages(conversationId: string, page?: number, limit?: number): Promise<PaginatedMessagesResponseDto>;
22
+ export declare function fetchMessages(conversationId: string, businessId: string, page?: number, limit?: number): Promise<PaginatedMessagesResponseDto>;
23
23
  export declare function convertToChMessage(dto: MessageResponseDto): ChatMessage;