@indexnetwork/protocol 8.3.0-rc.424.1 → 8.4.0-rc.426.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.
- package/IMPLEMENTATION.md +2 -2
- package/dist/capabilities/opportunities.facade.d.ts +5 -5
- package/dist/capabilities/opportunities.facade.js +4 -4
- package/dist/index.d.ts +6 -6
- package/dist/index.js +4 -4
- package/dist/maintenance/maintenance.graph.d.ts +9 -9
- package/dist/maintenance/maintenance.graph.js +20 -20
- package/dist/maintenance/maintenance.state.d.ts +5 -5
- package/dist/maintenance/maintenance.state.js +3 -3
- package/dist/opportunity/application/delivery-card.cache.js +1 -1
- package/dist/opportunity/application/index.d.ts +2 -3
- package/dist/opportunity/application/index.js +3 -4
- package/dist/opportunity/application/negotiation-context.loader.d.ts +1 -1
- package/dist/opportunity/application/negotiation-context.loader.js +1 -1
- package/dist/opportunity/application/opportunity.enricher.js +2 -2
- package/dist/opportunity/application/opportunity.presenter.d.ts +15 -15
- package/dist/opportunity/application/opportunity.presenter.js +17 -17
- package/dist/opportunity/application/opportunity.tools.d.ts +1 -1
- package/dist/opportunity/application/opportunity.tools.js +3 -3
- package/dist/opportunity/discriminator/discriminator.adjustments.js +1 -1
- package/dist/opportunity/discriminator/discriminator.env.d.ts +1 -1
- package/dist/opportunity/discriminator/discriminator.env.js +1 -1
- package/dist/opportunity/domain/index.d.ts +3 -3
- package/dist/opportunity/domain/index.js +3 -3
- package/dist/opportunity/domain/opportunity.presentation-cache.d.ts +1 -2
- package/dist/opportunity/domain/opportunity.presentation-cache.js +2 -5
- package/dist/opportunity/domain/opportunity.presentation.d.ts +1 -1
- package/dist/opportunity/domain/opportunity.presentation.js +1 -1
- package/dist/opportunity/domain/opportunity.safe-presentation.d.ts +2 -2
- package/dist/opportunity/domain/opportunity.safe-presentation.js +1 -1
- package/dist/opportunity/domain/opportunity.utils.d.ts +5 -5
- package/dist/opportunity/domain/opportunity.utils.js +8 -8
- package/dist/opportunity/index.d.ts +1 -1
- package/dist/opportunity/index.js +1 -1
- package/dist/opportunity/opportunity.presenter.d.ts +3 -3
- package/dist/opportunity/opportunity.presenter.js +2 -2
- package/dist/opportunity/public/index.d.ts +5 -5
- package/dist/opportunity/public/index.js +6 -6
- package/dist/opportunity/{feed/feed.graph.d.ts → radar/radar.graph.d.ts} +42 -73
- package/dist/opportunity/{feed/feed.graph.js → radar/radar.graph.js} +60 -222
- package/dist/opportunity/{feed/feed.health.d.ts → radar/radar.health.d.ts} +7 -7
- package/dist/opportunity/{feed/feed.health.js → radar/radar.health.js} +8 -8
- package/dist/opportunity/{feed/feed.state.d.ts → radar/radar.state.d.ts} +21 -47
- package/dist/opportunity/{feed/feed.state.js → radar/radar.state.js} +15 -24
- package/dist/shared/agent/tool.helpers.d.ts +1 -1
- package/dist/shared/interfaces/database.interface.d.ts +3 -3
- package/package.json +1 -1
- package/dist/opportunity/feed/feed.categorizer.d.ts +0 -27
- package/dist/opportunity/feed/feed.categorizer.js +0 -168
- package/dist/shared/ui/lucide.icon-catalog.d.ts +0 -21
- package/dist/shared/ui/lucide.icon-catalog.js +0 -100
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* Radar Graph: Build the opportunity radar view — a flat, presenter-texted
|
|
3
|
+
* list of opportunity cards for a viewer, optionally scoped to one intent.
|
|
3
4
|
*
|
|
4
5
|
* Independent of ChatGraph. Flow:
|
|
5
|
-
* loadOpportunities → checkPresenterCache → [generateCardText if misses]
|
|
6
|
-
* →
|
|
6
|
+
* loadOpportunities → checkPresenterCache → [generateCardText if misses]
|
|
7
|
+
* → cachePresenterResults → normalizeItems
|
|
7
8
|
*
|
|
8
|
-
* Uses OpportunityPresenter for card text and
|
|
9
|
-
*
|
|
9
|
+
* Uses OpportunityPresenter for card text and caches presenter results via
|
|
10
|
+
* OpportunityCache. Responses are a flat `items` array; clients bucket by
|
|
11
|
+
* lifecycle status themselves.
|
|
10
12
|
*/
|
|
11
|
-
import type {
|
|
13
|
+
import type { RadarGraphDatabase, OpportunityStatus } from '../../shared/interfaces/database.interface.js';
|
|
12
14
|
import type { OpportunityCache } from '../../shared/interfaces/cache.interface.js';
|
|
13
|
-
import { type
|
|
15
|
+
import { type RadarCardItem, type RadarResponseItem } from './radar.state.js';
|
|
14
16
|
import type { DebugMetaAgent } from '../../capabilities/participant-agents.debug.facade.js';
|
|
15
|
-
/** Database must satisfy both
|
|
16
|
-
type
|
|
17
|
-
export type
|
|
17
|
+
/** Database must satisfy both RadarGraphDatabase and presenter context (getProfile, getActiveIntents, getNetwork, getUser). */
|
|
18
|
+
type RadarGraphDb = RadarGraphDatabase;
|
|
19
|
+
export type RadarGraphInvokeInput = {
|
|
18
20
|
userId: string;
|
|
19
21
|
networkId?: string;
|
|
20
22
|
scopeType?: 'intent';
|
|
@@ -23,43 +25,42 @@ export type HomeGraphInvokeInput = {
|
|
|
23
25
|
noCache?: boolean;
|
|
24
26
|
/**
|
|
25
27
|
* 'skeleton' returns immediately without LLM work: cached cards complete,
|
|
26
|
-
* uncached cards with identity fields only + `presentationPending: true
|
|
27
|
-
*
|
|
28
|
-
*
|
|
28
|
+
* uncached cards with identity fields only + `presentationPending: true`.
|
|
29
|
+
* Meant as the fast first phase of a two-phase fetch — follow up with a
|
|
30
|
+
* full request to fill in the text.
|
|
29
31
|
*/
|
|
30
32
|
presentation?: 'full' | 'skeleton';
|
|
31
33
|
/**
|
|
32
|
-
* When set, filter loaded opportunities to these lifecycle statuses. Defaults to `
|
|
34
|
+
* When set, filter loaded opportunities to these lifecycle statuses. Defaults to `DEFAULT_RADAR_STATUSES`.
|
|
33
35
|
* Explicit statuses switch the graph to "lifecycle view" mode: terminal/internal
|
|
34
36
|
* statuses pass through (only latent/pending stay gated by viewer actionability),
|
|
35
|
-
* ordering is newest-first, and
|
|
37
|
+
* ordering is newest-first, and composition capping is skipped.
|
|
36
38
|
*/
|
|
37
39
|
statuses?: OpportunityStatus[];
|
|
38
40
|
};
|
|
39
|
-
export type
|
|
40
|
-
|
|
41
|
+
export type RadarGraphInvokeResult = {
|
|
42
|
+
items: RadarResponseItem[];
|
|
41
43
|
meta: {
|
|
42
44
|
totalOpportunities: number;
|
|
43
|
-
totalSections: number;
|
|
44
45
|
};
|
|
45
46
|
error?: string;
|
|
46
47
|
};
|
|
47
|
-
/** Default
|
|
48
|
-
export declare const
|
|
49
|
-
/** Full status enumeration. Pass this to `
|
|
48
|
+
/** Default radar statuses: the lifecycle stages a viewer can act on today. */
|
|
49
|
+
export declare const DEFAULT_RADAR_STATUSES: OpportunityStatus[];
|
|
50
|
+
/** Full status enumeration. Pass this to `RadarGraphInvokeInput.statuses` to restore pre-Issue-3 (unfiltered) behavior. */
|
|
50
51
|
export declare const ALL_OPPORTUNITY_STATUSES: OpportunityStatus[];
|
|
51
52
|
/** Pure cache policy for presenter cards; degraded current-request copy retries later. */
|
|
52
|
-
export declare function
|
|
53
|
+
export declare function isRadarPresentationCacheable(card: Pick<RadarCardItem, 'presentationPending' | '_presentationFallback' | 'name'>, status: OpportunityStatus | undefined): boolean;
|
|
53
54
|
/**
|
|
54
55
|
* Strip leading narrator name from remark when the UI already prepends "Name: " to the chip.
|
|
55
56
|
* Avoids duplication like "Yankı Ekin Yüksel: Yankı Ekin Yüksel introduced you two..."
|
|
56
57
|
* Repeats until no leading name (handles "Name: Name rest").
|
|
57
58
|
*/
|
|
58
59
|
export declare function stripLeadingNarratorName(remark: string, narratorName: string): string;
|
|
59
|
-
export declare class
|
|
60
|
+
export declare class RadarGraphFactory {
|
|
60
61
|
private database;
|
|
61
62
|
private cache;
|
|
62
|
-
constructor(database:
|
|
63
|
+
constructor(database: RadarGraphDb, cache: OpportunityCache);
|
|
63
64
|
createGraph(): import("@langchain/langgraph").CompiledStateGraph<{
|
|
64
65
|
userId: string;
|
|
65
66
|
networkId: string | undefined;
|
|
@@ -70,16 +71,13 @@ export declare class HomeGraphFactory {
|
|
|
70
71
|
presentation: "full" | "skeleton";
|
|
71
72
|
statuses: OpportunityStatus[] | undefined;
|
|
72
73
|
opportunities: import("../../shared/interfaces/database.interface.js").Opportunity[];
|
|
73
|
-
cards:
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
cachedCards: Map<string, HomeCardItem>;
|
|
74
|
+
cards: RadarCardItem[];
|
|
75
|
+
items: RadarResponseItem[];
|
|
76
|
+
cachedCards: Map<string, RadarCardItem>;
|
|
77
77
|
uncachedOpportunities: import("../../shared/interfaces/database.interface.js").Opportunity[];
|
|
78
|
-
categoryCacheHit: boolean;
|
|
79
78
|
error: string | undefined;
|
|
80
79
|
meta: {
|
|
81
80
|
totalOpportunities: number;
|
|
82
|
-
totalSections: number;
|
|
83
81
|
};
|
|
84
82
|
agentTimings: DebugMetaAgent[];
|
|
85
83
|
}, {
|
|
@@ -92,22 +90,18 @@ export declare class HomeGraphFactory {
|
|
|
92
90
|
presentation?: "full" | "skeleton" | import("@langchain/langgraph").OverwriteValue<"full" | "skeleton"> | undefined;
|
|
93
91
|
statuses?: OpportunityStatus[] | import("@langchain/langgraph").OverwriteValue<OpportunityStatus[] | undefined> | undefined;
|
|
94
92
|
opportunities?: import("../../shared/interfaces/database.interface.js").Opportunity[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.interface.js").Opportunity[]> | undefined;
|
|
95
|
-
cards?:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
cachedCards?: Map<string, HomeCardItem> | import("@langchain/langgraph").OverwriteValue<Map<string, HomeCardItem>> | undefined;
|
|
93
|
+
cards?: RadarCardItem[] | import("@langchain/langgraph").OverwriteValue<RadarCardItem[]> | undefined;
|
|
94
|
+
items?: RadarResponseItem[] | import("@langchain/langgraph").OverwriteValue<RadarResponseItem[]> | undefined;
|
|
95
|
+
cachedCards?: Map<string, RadarCardItem> | import("@langchain/langgraph").OverwriteValue<Map<string, RadarCardItem>> | undefined;
|
|
99
96
|
uncachedOpportunities?: import("../../shared/interfaces/database.interface.js").Opportunity[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.interface.js").Opportunity[]> | undefined;
|
|
100
|
-
categoryCacheHit?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
|
|
101
97
|
error?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
102
98
|
meta?: {
|
|
103
99
|
totalOpportunities: number;
|
|
104
|
-
totalSections: number;
|
|
105
100
|
} | import("@langchain/langgraph").OverwriteValue<{
|
|
106
101
|
totalOpportunities: number;
|
|
107
|
-
totalSections: number;
|
|
108
102
|
}> | undefined;
|
|
109
103
|
agentTimings?: DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<DebugMetaAgent[]> | undefined;
|
|
110
|
-
}, "__start__" | "loadOpportunities" | "checkPresenterCache" | "generateCardText" | "cachePresenterResults" | "
|
|
104
|
+
}, "__start__" | "loadOpportunities" | "checkPresenterCache" | "generateCardText" | "cachePresenterResults" | "normalizeItems", {
|
|
111
105
|
userId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
112
106
|
networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
113
107
|
scopeType: import("@langchain/langgraph").BaseChannel<"intent" | undefined, "intent" | import("@langchain/langgraph").OverwriteValue<"intent" | undefined> | undefined, unknown>;
|
|
@@ -117,22 +111,17 @@ export declare class HomeGraphFactory {
|
|
|
117
111
|
presentation: import("@langchain/langgraph").BaseChannel<"full" | "skeleton", "full" | "skeleton" | import("@langchain/langgraph").OverwriteValue<"full" | "skeleton">, unknown>;
|
|
118
112
|
statuses: import("@langchain/langgraph").BaseChannel<OpportunityStatus[] | undefined, OpportunityStatus[] | import("@langchain/langgraph").OverwriteValue<OpportunityStatus[] | undefined> | undefined, unknown>;
|
|
119
113
|
opportunities: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.interface.js").Opportunity[], import("../../shared/interfaces/database.interface.js").Opportunity[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.interface.js").Opportunity[]>, unknown>;
|
|
120
|
-
cards: import("@langchain/langgraph").BaseChannel<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
cachedCards: import("@langchain/langgraph").BaseChannel<Map<string, HomeCardItem>, Map<string, HomeCardItem> | import("@langchain/langgraph").OverwriteValue<Map<string, HomeCardItem>>, unknown>;
|
|
114
|
+
cards: import("@langchain/langgraph").BaseChannel<RadarCardItem[], RadarCardItem[] | import("@langchain/langgraph").OverwriteValue<RadarCardItem[]>, unknown>;
|
|
115
|
+
items: import("@langchain/langgraph").BaseChannel<RadarResponseItem[], RadarResponseItem[] | import("@langchain/langgraph").OverwriteValue<RadarResponseItem[]>, unknown>;
|
|
116
|
+
cachedCards: import("@langchain/langgraph").BaseChannel<Map<string, RadarCardItem>, Map<string, RadarCardItem> | import("@langchain/langgraph").OverwriteValue<Map<string, RadarCardItem>>, unknown>;
|
|
124
117
|
uncachedOpportunities: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.interface.js").Opportunity[], import("../../shared/interfaces/database.interface.js").Opportunity[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.interface.js").Opportunity[]>, unknown>;
|
|
125
|
-
categoryCacheHit: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
126
118
|
error: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
127
119
|
meta: import("@langchain/langgraph").BaseChannel<{
|
|
128
120
|
totalOpportunities: number;
|
|
129
|
-
totalSections: number;
|
|
130
121
|
}, {
|
|
131
122
|
totalOpportunities: number;
|
|
132
|
-
totalSections: number;
|
|
133
123
|
} | import("@langchain/langgraph").OverwriteValue<{
|
|
134
124
|
totalOpportunities: number;
|
|
135
|
-
totalSections: number;
|
|
136
125
|
}>, unknown>;
|
|
137
126
|
agentTimings: import("@langchain/langgraph").BaseChannel<DebugMetaAgent[], DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<DebugMetaAgent[]>, unknown>;
|
|
138
127
|
}, {
|
|
@@ -145,22 +134,17 @@ export declare class HomeGraphFactory {
|
|
|
145
134
|
presentation: import("@langchain/langgraph").BaseChannel<"full" | "skeleton", "full" | "skeleton" | import("@langchain/langgraph").OverwriteValue<"full" | "skeleton">, unknown>;
|
|
146
135
|
statuses: import("@langchain/langgraph").BaseChannel<OpportunityStatus[] | undefined, OpportunityStatus[] | import("@langchain/langgraph").OverwriteValue<OpportunityStatus[] | undefined> | undefined, unknown>;
|
|
147
136
|
opportunities: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.interface.js").Opportunity[], import("../../shared/interfaces/database.interface.js").Opportunity[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.interface.js").Opportunity[]>, unknown>;
|
|
148
|
-
cards: import("@langchain/langgraph").BaseChannel<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
cachedCards: import("@langchain/langgraph").BaseChannel<Map<string, HomeCardItem>, Map<string, HomeCardItem> | import("@langchain/langgraph").OverwriteValue<Map<string, HomeCardItem>>, unknown>;
|
|
137
|
+
cards: import("@langchain/langgraph").BaseChannel<RadarCardItem[], RadarCardItem[] | import("@langchain/langgraph").OverwriteValue<RadarCardItem[]>, unknown>;
|
|
138
|
+
items: import("@langchain/langgraph").BaseChannel<RadarResponseItem[], RadarResponseItem[] | import("@langchain/langgraph").OverwriteValue<RadarResponseItem[]>, unknown>;
|
|
139
|
+
cachedCards: import("@langchain/langgraph").BaseChannel<Map<string, RadarCardItem>, Map<string, RadarCardItem> | import("@langchain/langgraph").OverwriteValue<Map<string, RadarCardItem>>, unknown>;
|
|
152
140
|
uncachedOpportunities: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.interface.js").Opportunity[], import("../../shared/interfaces/database.interface.js").Opportunity[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.interface.js").Opportunity[]>, unknown>;
|
|
153
|
-
categoryCacheHit: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
154
141
|
error: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
155
142
|
meta: import("@langchain/langgraph").BaseChannel<{
|
|
156
143
|
totalOpportunities: number;
|
|
157
|
-
totalSections: number;
|
|
158
144
|
}, {
|
|
159
145
|
totalOpportunities: number;
|
|
160
|
-
totalSections: number;
|
|
161
146
|
} | import("@langchain/langgraph").OverwriteValue<{
|
|
162
147
|
totalOpportunities: number;
|
|
163
|
-
totalSections: number;
|
|
164
148
|
}>, unknown>;
|
|
165
149
|
agentTimings: import("@langchain/langgraph").BaseChannel<DebugMetaAgent[], DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<DebugMetaAgent[]>, unknown>;
|
|
166
150
|
}, import("@langchain/langgraph").StateDefinition, {
|
|
@@ -179,37 +163,22 @@ export declare class HomeGraphFactory {
|
|
|
179
163
|
uncachedOpportunities: import("../../shared/interfaces/database.interface.js").Opportunity[];
|
|
180
164
|
};
|
|
181
165
|
generateCardText: {
|
|
182
|
-
cards:
|
|
166
|
+
cards: RadarCardItem[];
|
|
183
167
|
agentTimings: DebugMetaAgent[];
|
|
184
168
|
meta: {
|
|
185
169
|
totalOpportunities: number;
|
|
186
|
-
totalSections: number;
|
|
187
170
|
};
|
|
188
171
|
};
|
|
189
172
|
cachePresenterResults: {
|
|
190
|
-
cards:
|
|
173
|
+
cards: RadarCardItem[];
|
|
191
174
|
meta: {
|
|
192
175
|
totalOpportunities: number;
|
|
193
|
-
totalSections: number;
|
|
194
176
|
};
|
|
195
177
|
};
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
sectionProposals?: undefined;
|
|
199
|
-
} | {
|
|
200
|
-
sectionProposals: HomeSectionProposal[];
|
|
201
|
-
categoryCacheHit: boolean;
|
|
202
|
-
};
|
|
203
|
-
categorizeDynamically: {
|
|
204
|
-
sectionProposals: HomeSectionProposal[];
|
|
205
|
-
agentTimings: DebugMetaAgent[];
|
|
206
|
-
};
|
|
207
|
-
cacheCategorizerResults: {};
|
|
208
|
-
normalizeAndSort: {
|
|
209
|
-
sections: HomeSection[];
|
|
178
|
+
normalizeItems: {
|
|
179
|
+
items: RadarResponseItem[];
|
|
210
180
|
meta: {
|
|
211
181
|
totalOpportunities: number;
|
|
212
|
-
totalSections: number;
|
|
213
182
|
};
|
|
214
183
|
};
|
|
215
184
|
}, unknown, unknown, []>;
|