@indexnetwork/protocol 5.3.1-rc.373.1 → 6.0.0-rc.375.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/CHANGELOG.md +1 -0
- package/dist/index.d.ts +51 -121
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -55
- package/dist/index.js.map +1 -1
- package/dist/intent/intent.graph.d.ts +19 -19
- package/dist/intent/intent.indexer.d.ts +3 -3
- package/dist/intent/intent.inferrer.d.ts +8 -8
- package/dist/intent/intent.reconciler.d.ts +11 -11
- package/dist/intent/intent.state.d.ts +4 -4
- package/dist/intent/intent.verifier.d.ts +6 -6
- package/dist/negotiation/negotiation.graph.d.ts +1 -1
- package/dist/network/indexer/indexer.graph.d.ts +15 -15
- package/dist/network/indexer/indexer.state.d.ts +4 -4
- package/dist/network/membership/membership.graph.d.ts +4 -4
- package/dist/network/membership/membership.state.d.ts +1 -1
- package/dist/network/network.graph.d.ts +4 -4
- package/dist/network/network.state.d.ts +1 -1
- package/dist/opportunity/discriminator/discriminator.assigner.d.ts +4 -4
- package/dist/opportunity/discriminator/discriminator.env.d.ts +18 -0
- package/dist/opportunity/discriminator/discriminator.env.d.ts.map +1 -1
- package/dist/opportunity/discriminator/discriminator.env.js +18 -0
- package/dist/opportunity/discriminator/discriminator.env.js.map +1 -1
- package/dist/opportunity/opportunity.evaluator.d.ts +9 -9
- package/dist/opportunity/opportunity.graph.d.ts +6 -6
- package/dist/opportunity/opportunity.state.d.ts +1 -1
- package/dist/premise/premise.analyzer.d.ts +2 -2
- package/dist/premise/premise.decomposer.d.ts +2 -2
- package/dist/premise/premise.indexer.d.ts +2 -2
- package/dist/shared/hyde/hyde.frame.d.ts +4 -4
- package/dist/shared/hyde/hyde.validator.d.ts +4 -4
- package/dist/shared/hyde/lens.inferrer.d.ts +6 -6
- package/dist/shared/schemas/negotiation-digest.schema.d.ts +2 -2
- package/dist/shared/schemas/question.schema.d.ts +36 -36
- package/package.json +1 -1
|
@@ -20,14 +20,14 @@ export declare class IntentNetworkGraphFactory {
|
|
|
20
20
|
userId: string;
|
|
21
21
|
networkId: string | undefined;
|
|
22
22
|
intentId: string | undefined;
|
|
23
|
-
operationMode: "
|
|
23
|
+
operationMode: "delete" | "create" | "read";
|
|
24
24
|
skipEvaluation: boolean;
|
|
25
25
|
intent: import("./indexer.state.js").IntentForIndexing | null;
|
|
26
26
|
indexContext: import("./indexer.state.js").IndexMemberContext | null;
|
|
27
27
|
evaluation: {
|
|
28
|
+
reasoning: string;
|
|
28
29
|
indexScore: number;
|
|
29
30
|
memberScore: number;
|
|
30
|
-
reasoning: string;
|
|
31
31
|
} | null;
|
|
32
32
|
shouldAssign: boolean | undefined;
|
|
33
33
|
finalScore: number | undefined;
|
|
@@ -59,18 +59,18 @@ export declare class IntentNetworkGraphFactory {
|
|
|
59
59
|
userId?: string | undefined;
|
|
60
60
|
networkId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
61
61
|
intentId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
62
|
-
operationMode?: "
|
|
62
|
+
operationMode?: "delete" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "create" | "read"> | undefined;
|
|
63
63
|
skipEvaluation?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
|
|
64
64
|
intent?: import("./indexer.state.js").IntentForIndexing | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IntentForIndexing | null> | null | undefined;
|
|
65
65
|
indexContext?: import("./indexer.state.js").IndexMemberContext | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IndexMemberContext | null> | null | undefined;
|
|
66
66
|
evaluation?: {
|
|
67
|
+
reasoning: string;
|
|
67
68
|
indexScore: number;
|
|
68
69
|
memberScore: number;
|
|
69
|
-
reasoning: string;
|
|
70
70
|
} | import("@langchain/langgraph").OverwriteValue<{
|
|
71
|
+
reasoning: string;
|
|
71
72
|
indexScore: number;
|
|
72
73
|
memberScore: number;
|
|
73
|
-
reasoning: string;
|
|
74
74
|
} | null> | null | undefined;
|
|
75
75
|
shouldAssign?: boolean | import("@langchain/langgraph").OverwriteValue<boolean | undefined> | undefined;
|
|
76
76
|
finalScore?: number | import("@langchain/langgraph").OverwriteValue<number | undefined> | undefined;
|
|
@@ -124,22 +124,22 @@ export declare class IntentNetworkGraphFactory {
|
|
|
124
124
|
};
|
|
125
125
|
networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
126
126
|
intentId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
127
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
127
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "create" | "read", "delete" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "create" | "read">, unknown>;
|
|
128
128
|
skipEvaluation: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
129
129
|
intent: import("@langchain/langgraph").BaseChannel<import("./indexer.state.js").IntentForIndexing | null, import("./indexer.state.js").IntentForIndexing | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IntentForIndexing | null> | null, unknown>;
|
|
130
130
|
indexContext: import("@langchain/langgraph").BaseChannel<import("./indexer.state.js").IndexMemberContext | null, import("./indexer.state.js").IndexMemberContext | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IndexMemberContext | null> | null, unknown>;
|
|
131
131
|
evaluation: import("@langchain/langgraph").BaseChannel<{
|
|
132
|
+
reasoning: string;
|
|
132
133
|
indexScore: number;
|
|
133
134
|
memberScore: number;
|
|
134
|
-
reasoning: string;
|
|
135
135
|
} | null, {
|
|
136
|
+
reasoning: string;
|
|
136
137
|
indexScore: number;
|
|
137
138
|
memberScore: number;
|
|
138
|
-
reasoning: string;
|
|
139
139
|
} | import("@langchain/langgraph").OverwriteValue<{
|
|
140
|
+
reasoning: string;
|
|
140
141
|
indexScore: number;
|
|
141
142
|
memberScore: number;
|
|
142
|
-
reasoning: string;
|
|
143
143
|
} | null> | null, unknown>;
|
|
144
144
|
shouldAssign: import("@langchain/langgraph").BaseChannel<boolean | undefined, boolean | import("@langchain/langgraph").OverwriteValue<boolean | undefined> | undefined, unknown>;
|
|
145
145
|
finalScore: import("@langchain/langgraph").BaseChannel<number | undefined, number | import("@langchain/langgraph").OverwriteValue<number | undefined> | undefined, unknown>;
|
|
@@ -211,22 +211,22 @@ export declare class IntentNetworkGraphFactory {
|
|
|
211
211
|
};
|
|
212
212
|
networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
213
213
|
intentId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
214
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
214
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "create" | "read", "delete" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "create" | "read">, unknown>;
|
|
215
215
|
skipEvaluation: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
216
216
|
intent: import("@langchain/langgraph").BaseChannel<import("./indexer.state.js").IntentForIndexing | null, import("./indexer.state.js").IntentForIndexing | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IntentForIndexing | null> | null, unknown>;
|
|
217
217
|
indexContext: import("@langchain/langgraph").BaseChannel<import("./indexer.state.js").IndexMemberContext | null, import("./indexer.state.js").IndexMemberContext | import("@langchain/langgraph").OverwriteValue<import("./indexer.state.js").IndexMemberContext | null> | null, unknown>;
|
|
218
218
|
evaluation: import("@langchain/langgraph").BaseChannel<{
|
|
219
|
+
reasoning: string;
|
|
219
220
|
indexScore: number;
|
|
220
221
|
memberScore: number;
|
|
221
|
-
reasoning: string;
|
|
222
222
|
} | null, {
|
|
223
|
+
reasoning: string;
|
|
223
224
|
indexScore: number;
|
|
224
225
|
memberScore: number;
|
|
225
|
-
reasoning: string;
|
|
226
226
|
} | import("@langchain/langgraph").OverwriteValue<{
|
|
227
|
+
reasoning: string;
|
|
227
228
|
indexScore: number;
|
|
228
229
|
memberScore: number;
|
|
229
|
-
reasoning: string;
|
|
230
230
|
} | null> | null, unknown>;
|
|
231
231
|
shouldAssign: import("@langchain/langgraph").BaseChannel<boolean | undefined, boolean | import("@langchain/langgraph").OverwriteValue<boolean | undefined> | undefined, unknown>;
|
|
232
232
|
finalScore: import("@langchain/langgraph").BaseChannel<number | undefined, number | import("@langchain/langgraph").OverwriteValue<number | undefined> | undefined, unknown>;
|
|
@@ -349,9 +349,9 @@ export declare class IntentNetworkGraphFactory {
|
|
|
349
349
|
} | {
|
|
350
350
|
agentTimings: DebugMetaAgent[];
|
|
351
351
|
evaluation: {
|
|
352
|
+
reasoning: string;
|
|
352
353
|
indexScore: number;
|
|
353
354
|
memberScore: number;
|
|
354
|
-
reasoning: string;
|
|
355
355
|
};
|
|
356
356
|
shouldAssign: boolean;
|
|
357
357
|
finalScore: number;
|
|
@@ -364,9 +364,9 @@ export declare class IntentNetworkGraphFactory {
|
|
|
364
364
|
} | {
|
|
365
365
|
agentTimings: DebugMetaAgent[];
|
|
366
366
|
evaluation: {
|
|
367
|
+
reasoning: string;
|
|
367
368
|
indexScore: number;
|
|
368
369
|
memberScore: number;
|
|
369
|
-
reasoning: string;
|
|
370
370
|
};
|
|
371
371
|
shouldAssign: boolean;
|
|
372
372
|
finalScore: number;
|
|
@@ -53,7 +53,7 @@ export declare const IntentNetworkGraphState: import("@langchain/langgraph").Ann
|
|
|
53
53
|
/** Target intent for assign/read-by-intent. From tool arg. */
|
|
54
54
|
intentId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
55
55
|
/** Operation mode. */
|
|
56
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
56
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "create" | "read", "delete" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "create" | "read">, unknown>;
|
|
57
57
|
/**
|
|
58
58
|
* When true, skip LLM evaluation and assign directly.
|
|
59
59
|
* (Migrated from old Network Graph.)
|
|
@@ -65,17 +65,17 @@ export declare const IntentNetworkGraphState: import("@langchain/langgraph").Ann
|
|
|
65
65
|
indexContext: import("@langchain/langgraph").BaseChannel<IndexMemberContext | null, IndexMemberContext | import("@langchain/langgraph").OverwriteValue<IndexMemberContext | null> | null, unknown>;
|
|
66
66
|
/** LLM evaluation result. Null if skipped. */
|
|
67
67
|
evaluation: import("@langchain/langgraph").BaseChannel<{
|
|
68
|
+
reasoning: string;
|
|
68
69
|
indexScore: number;
|
|
69
70
|
memberScore: number;
|
|
70
|
-
reasoning: string;
|
|
71
71
|
} | null, {
|
|
72
|
+
reasoning: string;
|
|
72
73
|
indexScore: number;
|
|
73
74
|
memberScore: number;
|
|
74
|
-
reasoning: string;
|
|
75
75
|
} | import("@langchain/langgraph").OverwriteValue<{
|
|
76
|
+
reasoning: string;
|
|
76
77
|
indexScore: number;
|
|
77
78
|
memberScore: number;
|
|
78
|
-
reasoning: string;
|
|
79
79
|
} | null> | null, unknown>;
|
|
80
80
|
/** Final decision: should intent be in this network? */
|
|
81
81
|
shouldAssign: import("@langchain/langgraph").BaseChannel<boolean | undefined, boolean | import("@langchain/langgraph").OverwriteValue<boolean | undefined> | undefined, unknown>;
|
|
@@ -13,7 +13,7 @@ export declare class NetworkMembershipGraphFactory {
|
|
|
13
13
|
createGraph(): import("@langchain/langgraph").CompiledStateGraph<{
|
|
14
14
|
userId: string;
|
|
15
15
|
networkId: string;
|
|
16
|
-
operationMode: "
|
|
16
|
+
operationMode: "delete" | "create" | "read";
|
|
17
17
|
targetUserId: string | undefined;
|
|
18
18
|
readResult: {
|
|
19
19
|
networkId: string;
|
|
@@ -36,7 +36,7 @@ export declare class NetworkMembershipGraphFactory {
|
|
|
36
36
|
}, {
|
|
37
37
|
userId?: string | undefined;
|
|
38
38
|
networkId?: string | undefined;
|
|
39
|
-
operationMode?: "
|
|
39
|
+
operationMode?: "delete" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "create" | "read"> | undefined;
|
|
40
40
|
targetUserId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
41
41
|
readResult?: {
|
|
42
42
|
networkId: string;
|
|
@@ -82,7 +82,7 @@ export declare class NetworkMembershipGraphFactory {
|
|
|
82
82
|
(): import("@langchain/langgraph").LastValue<string>;
|
|
83
83
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
84
84
|
};
|
|
85
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
85
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "create" | "read", "delete" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "create" | "read">, unknown>;
|
|
86
86
|
targetUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
87
87
|
readResult: import("@langchain/langgraph").BaseChannel<{
|
|
88
88
|
networkId: string;
|
|
@@ -143,7 +143,7 @@ export declare class NetworkMembershipGraphFactory {
|
|
|
143
143
|
(): import("@langchain/langgraph").LastValue<string>;
|
|
144
144
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
145
145
|
};
|
|
146
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
146
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "create" | "read", "delete" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "create" | "read">, unknown>;
|
|
147
147
|
targetUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
148
148
|
readResult: import("@langchain/langgraph").BaseChannel<{
|
|
149
149
|
networkId: string;
|
|
@@ -19,7 +19,7 @@ export declare const NetworkMembershipGraphState: import("@langchain/langgraph")
|
|
|
19
19
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
20
20
|
};
|
|
21
21
|
/** Operation mode. */
|
|
22
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
22
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "create" | "read", "delete" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "create" | "read">, unknown>;
|
|
23
23
|
/** For create/delete: the user being added/removed. */
|
|
24
24
|
targetUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
25
25
|
/** Output for read mode: list of members. */
|
|
@@ -15,7 +15,7 @@ export declare class NetworkGraphFactory {
|
|
|
15
15
|
createGraph(): import("@langchain/langgraph").CompiledStateGraph<{
|
|
16
16
|
userId: string;
|
|
17
17
|
networkId: string | undefined;
|
|
18
|
-
operationMode: "
|
|
18
|
+
operationMode: "delete" | "update" | "create" | "read";
|
|
19
19
|
createInput: {
|
|
20
20
|
title: string;
|
|
21
21
|
prompt?: string;
|
|
@@ -75,7 +75,7 @@ export declare class NetworkGraphFactory {
|
|
|
75
75
|
}, {
|
|
76
76
|
userId?: string | undefined;
|
|
77
77
|
networkId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
78
|
-
operationMode?: "
|
|
78
|
+
operationMode?: "delete" | "update" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "update" | "create" | "read"> | undefined;
|
|
79
79
|
createInput?: {
|
|
80
80
|
title: string;
|
|
81
81
|
prompt?: string;
|
|
@@ -189,7 +189,7 @@ export declare class NetworkGraphFactory {
|
|
|
189
189
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
190
190
|
};
|
|
191
191
|
networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
192
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
192
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "update" | "create" | "read", "delete" | "update" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "update" | "create" | "read">, unknown>;
|
|
193
193
|
createInput: import("@langchain/langgraph").BaseChannel<{
|
|
194
194
|
title: string;
|
|
195
195
|
prompt?: string;
|
|
@@ -353,7 +353,7 @@ export declare class NetworkGraphFactory {
|
|
|
353
353
|
Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
|
|
354
354
|
};
|
|
355
355
|
networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
356
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
356
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "update" | "create" | "read", "delete" | "update" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "update" | "create" | "read">, unknown>;
|
|
357
357
|
createInput: import("@langchain/langgraph").BaseChannel<{
|
|
358
358
|
title: string;
|
|
359
359
|
prompt?: string;
|
|
@@ -15,7 +15,7 @@ export declare const NetworkGraphState: import("@langchain/langgraph").Annotatio
|
|
|
15
15
|
/** Target network ID. Required for read/update/delete. From ChatGraph or tool arg. */
|
|
16
16
|
networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
17
17
|
/** Operation mode. */
|
|
18
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
18
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "update" | "create" | "read", "delete" | "update" | "create" | "read" | import("@langchain/langgraph").OverwriteValue<"delete" | "update" | "create" | "read">, unknown>;
|
|
19
19
|
/** For create mode: index creation data. */
|
|
20
20
|
createInput: import("@langchain/langgraph").BaseChannel<{
|
|
21
21
|
title: string;
|
|
@@ -9,25 +9,25 @@ declare const AxisSchema: z.ZodObject<{
|
|
|
9
9
|
evidence: z.ZodNullable<z.ZodString>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
11
|
evidence: string | null;
|
|
12
|
-
side: string | null;
|
|
13
12
|
candidateId: string;
|
|
13
|
+
side: string | null;
|
|
14
14
|
}, {
|
|
15
15
|
evidence: string | null;
|
|
16
|
-
side: string | null;
|
|
17
16
|
candidateId: string;
|
|
17
|
+
side: string | null;
|
|
18
18
|
}>, "many">;
|
|
19
19
|
}, "strip", z.ZodTypeAny, {
|
|
20
20
|
assignments: {
|
|
21
21
|
evidence: string | null;
|
|
22
|
-
side: string | null;
|
|
23
22
|
candidateId: string;
|
|
23
|
+
side: string | null;
|
|
24
24
|
}[];
|
|
25
25
|
questionId: string;
|
|
26
26
|
}, {
|
|
27
27
|
assignments: {
|
|
28
28
|
evidence: string | null;
|
|
29
|
-
side: string | null;
|
|
30
29
|
candidateId: string;
|
|
30
|
+
side: string | null;
|
|
31
31
|
}[];
|
|
32
32
|
questionId: string;
|
|
33
33
|
}>;
|
|
@@ -32,6 +32,24 @@ export type PoolQuestionsPushMode = "off" | "on";
|
|
|
32
32
|
* require pool-question mode and negotiator availability before delivery.
|
|
33
33
|
*/
|
|
34
34
|
export declare function poolQuestionsPushMode(): PoolQuestionsPushMode;
|
|
35
|
+
/** Visit-triggered pool-mining mode (IND-439 visibility-audit slice). */
|
|
36
|
+
export type PoolQuestionsVisitTriggerMode = "off" | "on";
|
|
37
|
+
/**
|
|
38
|
+
* Current POOL_QUESTIONS_VISIT_TRIGGER mode (default off). When "on", an
|
|
39
|
+
* intent owner's intent-page pending-questions fetch may enqueue a debounced
|
|
40
|
+
* pool-mining pass for that intent when no live pending pool_discovery
|
|
41
|
+
* question exists. The trigger only adds a *when* — every existing mining
|
|
42
|
+
* gate (POOL_QUESTIONS_MODE, k-anonymity floor, VoI threshold, per-intent
|
|
43
|
+
* budgets, fingerprint freshness, push budgets) applies unchanged, so this
|
|
44
|
+
* is a no-op unless {@link poolQuestionsMode} is also "on".
|
|
45
|
+
*/
|
|
46
|
+
export declare function poolQuestionsVisitTrigger(): PoolQuestionsVisitTriggerMode;
|
|
47
|
+
/**
|
|
48
|
+
* Debounce window for visit-triggered pool mining, per intent (IND-439).
|
|
49
|
+
* At most one visit-triggered mining run per intent per window, enforced via
|
|
50
|
+
* BullMQ deduplication — no new tables.
|
|
51
|
+
*/
|
|
52
|
+
export declare const POOL_VISIT_MINING_DEBOUNCE_MS: number;
|
|
35
53
|
/** Newborn-opportunity stamping mode (IND-420 P4b). */
|
|
36
54
|
export type PoolQuestionsStampNewbornMode = "off" | "on";
|
|
37
55
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discriminator.env.d.ts","sourceRoot":"/","sources":["opportunity/discriminator/discriminator.env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,+CAA+C;AAC/C,MAAM,MAAM,uBAAuB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEvD,wDAAwD;AACxD,wBAAgB,uBAAuB,IAAI,uBAAuB,CAEjE;AAED,uDAAuD;AACvD,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,IAAI,CAAC;AAE7C;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,iBAAiB,CAErD;AAED,gEAAgE;AAChE,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,IAAI,CAAC;AAEjD;;;GAGG;AACH,wBAA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wBAAgB,oBAAoB,IAAI,wBAAwB,CAE/D;AAED,4EAA4E;AAC5E,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,6EAA6E;AAC7E,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAElD,8EAA8E;AAC9E,eAAO,MAAM,qBAAqB,MAAM,CAAC;AAEzC,8EAA8E;AAC9E,eAAO,MAAM,sBAAsB,QAAS,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAElD,6DAA6D;AAC7D,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAEpD,qEAAqE;AACrE,eAAO,MAAM,2CAA2C,MAAM,CAAC"}
|
|
@@ -32,6 +32,24 @@ export function poolQuestionsMode() {
|
|
|
32
32
|
export function poolQuestionsPushMode() {
|
|
33
33
|
return process.env.POOL_QUESTIONS_PUSH?.trim() === "on" ? "on" : "off";
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Current POOL_QUESTIONS_VISIT_TRIGGER mode (default off). When "on", an
|
|
37
|
+
* intent owner's intent-page pending-questions fetch may enqueue a debounced
|
|
38
|
+
* pool-mining pass for that intent when no live pending pool_discovery
|
|
39
|
+
* question exists. The trigger only adds a *when* — every existing mining
|
|
40
|
+
* gate (POOL_QUESTIONS_MODE, k-anonymity floor, VoI threshold, per-intent
|
|
41
|
+
* budgets, fingerprint freshness, push budgets) applies unchanged, so this
|
|
42
|
+
* is a no-op unless {@link poolQuestionsMode} is also "on".
|
|
43
|
+
*/
|
|
44
|
+
export function poolQuestionsVisitTrigger() {
|
|
45
|
+
return process.env.POOL_QUESTIONS_VISIT_TRIGGER?.trim() === "on" ? "on" : "off";
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Debounce window for visit-triggered pool mining, per intent (IND-439).
|
|
49
|
+
* At most one visit-triggered mining run per intent per window, enforced via
|
|
50
|
+
* BullMQ deduplication — no new tables.
|
|
51
|
+
*/
|
|
52
|
+
export const POOL_VISIT_MINING_DEBOUNCE_MS = 6 * 60 * 60 * 1000;
|
|
35
53
|
/**
|
|
36
54
|
* Current POOL_QUESTIONS_STAMP_NEWBORN mode (default off). Effective callers
|
|
37
55
|
* additionally require {@link poolQuestionsMode} to be on.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discriminator.env.js","sourceRoot":"/","sources":["opportunity/discriminator/discriminator.env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,wDAAwD;AACxD,MAAM,UAAU,uBAAuB;IACrC,OAAO,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;AACnF,CAAC;AAKD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AACzE,CAAC;AAKD;;;GAGG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AACzE,CAAC;AAKD;;;GAGG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AAClF,CAAC;AAED,uEAAuE;AACvE,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC,mFAAmF;AACnF,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAC;AAEnD,gFAAgF;AAChF,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC;AAElD,uEAAuE;AACvE,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC;AAEtD,kEAAkE;AAClE,MAAM,CAAC,MAAM,2BAA2B,GAAG,GAAG,CAAC;AAE/C,uEAAuE;AACvE,MAAM,CAAC,MAAM,kCAAkC,GAAG,IAAI,CAAC;AAEvD,uEAAuE;AACvE,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC;AAElD,uEAAuE;AACvE,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC;AAK9C;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AAC5E,CAAC;AAED,4EAA4E;AAC5E,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAEhD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAElD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC,8EAA8E;AAC9E,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAM,CAAC;AAE7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC;AAElD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAEpD,qEAAqE;AACrE,MAAM,CAAC,MAAM,2CAA2C,GAAG,GAAG,CAAC","sourcesContent":["/**\n * Centralized accessors for pool-question environment variables (IND-416).\n *\n * POOL_QUESTIONS_MINING off | shadow — P1 shadow axis mining on\n * discovery-run completion. `shadow` mines and\n * scores axes and logs them; no questions are\n * generated and no user-facing behavior changes.\n * Any value other than \"shadow\" (including unset)\n * means off.\n *\n * All reads go through this module — do not read these variables via\n * `process.env` elsewhere. Values are read on every call (no caching) so\n * tests and long-lived processes observe changes.\n */\n\n/** Mining mode for pool discriminator axes. */\nexport type PoolQuestionsMiningMode = \"off\" | \"shadow\";\n\n/** Current POOL_QUESTIONS_MINING mode (default off). */\nexport function poolQuestionsMiningMode(): PoolQuestionsMiningMode {\n return process.env.POOL_QUESTIONS_MINING?.trim() === \"shadow\" ? \"shadow\" : \"off\";\n}\n\n/** Question mode for pool discriminators (IND-418). */\nexport type PoolQuestionsMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_MODE (default off). When \"on\", the mining hook also\n * enqueues a pool_discovery question for the top eligible discriminator\n * (still subject to the QUESTIONER_ENABLED master gate and per-intent budget).\n * \"on\" implies mining runs even when POOL_QUESTIONS_MINING is off.\n */\nexport function poolQuestionsMode(): PoolQuestionsMode {\n return process.env.POOL_QUESTIONS_MODE?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Push delivery mode for high-VoI pool questions (IND-421). */\nexport type PoolQuestionsPushMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_PUSH mode (default off). Callers must additionally\n * require pool-question mode and negotiator availability before delivery.\n */\nexport function poolQuestionsPushMode(): PoolQuestionsPushMode {\n return process.env.POOL_QUESTIONS_PUSH?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Newborn-opportunity stamping mode (IND-420 P4b). */\nexport type PoolQuestionsStampNewbornMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_STAMP_NEWBORN mode (default off). Effective callers\n * additionally require {@link poolQuestionsMode} to be on.\n */\nexport function poolQuestionsStampNewborn(): PoolQuestionsStampNewbornMode {\n return process.env.POOL_QUESTIONS_STAMP_NEWBORN?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Minimum VoI for a discriminator to become (or chain) a question. */\nexport const POOL_QUESTION_MIN_VOI = 0.2;\n\n/** Minimum evidence-verification rate for a discriminator to become a question. */\nexport const POOL_QUESTION_MIN_EVIDENCE_RATE = 0.6;\n\n/** Max eligible discriminators carried per mining pass (asked + alternates). */\nexport const POOL_QUESTION_MAX_DISCRIMINATORS = 3;\n\n/** Unattended budget: max pending questions of ANY mode per intent. */\nexport const POOL_QUESTION_MAX_PENDING_PER_INTENT = 3;\n\n/** Initial internal VoI threshold for proactive push delivery. */\nexport const POOL_QUESTION_PUSH_BASE_VOI = 0.6;\n\n/** Multiplicative VoI threshold increase per consecutive dismissal. */\nexport const POOL_QUESTION_PUSH_DISMISSAL_DECAY = 1.15;\n\n/** Minimum pool size for proactive delivery (stricter than mining). */\nexport const POOL_QUESTION_PUSH_MIN_POOL_SIZE = 8;\n\n/** Maximum claimed proactive pool pushes per recipient per UTC day. */\nexport const POOL_QUESTION_PUSH_DAILY_CAP = 2;\n\n/** Ranking mode for pool adjustments (IND-419). */\nexport type PoolQuestionsRankingMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_RANKING (default off). When \"on\", the home feed\n * orders by adjusted confidence (confidence × Π poolAdjustments.factor,\n * floor {@link POOL_ADJUSTMENT_FLOOR}). Adjustments are WRITTEN regardless of\n * this flag — it only gates whether ordering reads them, so the apply path\n * can ship first.\n */\nexport function poolQuestionsRanking(): PoolQuestionsRankingMode {\n return process.env.POOL_QUESTIONS_RANKING?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Adjustment factor for candidates on the side the user did NOT choose. */\nexport const POOL_ADJUSTMENT_FACTOR_OTHER = 0.6;\n\n/** Adjustment factor for candidates the miner could not assign (unknown). */\nexport const POOL_ADJUSTMENT_FACTOR_UNKNOWN = 0.9;\n\n/** Floor for the cumulative adjustment multiplier — demoted, never hidden. */\nexport const POOL_ADJUSTMENT_FLOOR = 0.3;\n\n/** Debounce window for answer-triggered re-discovery (Tier 1), per intent. */\nexport const POOL_RERUN_DEBOUNCE_MS = 60_000;\n\n/**\n * k-anonymity floor: axes are only mined when the pool has at least this many\n * candidates, so no axis (or later, question option) can be traced back to a\n * specific individual.\n */\nexport const POOL_DISCRIMINATOR_MIN_POOL_SIZE = 5;\n\n/** Max candidates sent to the miner LLM (top-N by score). */\nexport const POOL_DISCRIMINATOR_MAX_CANDIDATES = 24;\n\n/** Max chars of public context per candidate in the miner prompt. */\nexport const POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS = 400;\n"]}
|
|
1
|
+
{"version":3,"file":"discriminator.env.js","sourceRoot":"/","sources":["opportunity/discriminator/discriminator.env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,wDAAwD;AACxD,MAAM,UAAU,uBAAuB;IACrC,OAAO,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;AACnF,CAAC;AAKD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AACzE,CAAC;AAKD;;;GAGG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AACzE,CAAC;AAKD;;;;;;;;GAQG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AAClF,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAKhE;;;GAGG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,C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esContent":["/**\n * Centralized accessors for pool-question environment variables (IND-416).\n *\n * POOL_QUESTIONS_MINING off | shadow — P1 shadow axis mining on\n * discovery-run completion. `shadow` mines and\n * scores axes and logs them; no questions are\n * generated and no user-facing behavior changes.\n * Any value other than \"shadow\" (including unset)\n * means off.\n *\n * All reads go through this module — do not read these variables via\n * `process.env` elsewhere. Values are read on every call (no caching) so\n * tests and long-lived processes observe changes.\n */\n\n/** Mining mode for pool discriminator axes. */\nexport type PoolQuestionsMiningMode = \"off\" | \"shadow\";\n\n/** Current POOL_QUESTIONS_MINING mode (default off). */\nexport function poolQuestionsMiningMode(): PoolQuestionsMiningMode {\n return process.env.POOL_QUESTIONS_MINING?.trim() === \"shadow\" ? \"shadow\" : \"off\";\n}\n\n/** Question mode for pool discriminators (IND-418). */\nexport type PoolQuestionsMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_MODE (default off). When \"on\", the mining hook also\n * enqueues a pool_discovery question for the top eligible discriminator\n * (still subject to the QUESTIONER_ENABLED master gate and per-intent budget).\n * \"on\" implies mining runs even when POOL_QUESTIONS_MINING is off.\n */\nexport function poolQuestionsMode(): PoolQuestionsMode {\n return process.env.POOL_QUESTIONS_MODE?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Push delivery mode for high-VoI pool questions (IND-421). */\nexport type PoolQuestionsPushMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_PUSH mode (default off). Callers must additionally\n * require pool-question mode and negotiator availability before delivery.\n */\nexport function poolQuestionsPushMode(): PoolQuestionsPushMode {\n return process.env.POOL_QUESTIONS_PUSH?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Visit-triggered pool-mining mode (IND-439 visibility-audit slice). */\nexport type PoolQuestionsVisitTriggerMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_VISIT_TRIGGER mode (default off). When \"on\", an\n * intent owner's intent-page pending-questions fetch may enqueue a debounced\n * pool-mining pass for that intent when no live pending pool_discovery\n * question exists. The trigger only adds a *when* — every existing mining\n * gate (POOL_QUESTIONS_MODE, k-anonymity floor, VoI threshold, per-intent\n * budgets, fingerprint freshness, push budgets) applies unchanged, so this\n * is a no-op unless {@link poolQuestionsMode} is also \"on\".\n */\nexport function poolQuestionsVisitTrigger(): PoolQuestionsVisitTriggerMode {\n return process.env.POOL_QUESTIONS_VISIT_TRIGGER?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/**\n * Debounce window for visit-triggered pool mining, per intent (IND-439).\n * At most one visit-triggered mining run per intent per window, enforced via\n * BullMQ deduplication — no new tables.\n */\nexport const POOL_VISIT_MINING_DEBOUNCE_MS = 6 * 60 * 60 * 1000;\n\n/** Newborn-opportunity stamping mode (IND-420 P4b). */\nexport type PoolQuestionsStampNewbornMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_STAMP_NEWBORN mode (default off). Effective callers\n * additionally require {@link poolQuestionsMode} to be on.\n */\nexport function poolQuestionsStampNewborn(): PoolQuestionsStampNewbornMode {\n return process.env.POOL_QUESTIONS_STAMP_NEWBORN?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Minimum VoI for a discriminator to become (or chain) a question. */\nexport const POOL_QUESTION_MIN_VOI = 0.2;\n\n/** Minimum evidence-verification rate for a discriminator to become a question. */\nexport const POOL_QUESTION_MIN_EVIDENCE_RATE = 0.6;\n\n/** Max eligible discriminators carried per mining pass (asked + alternates). */\nexport const POOL_QUESTION_MAX_DISCRIMINATORS = 3;\n\n/** Unattended budget: max pending questions of ANY mode per intent. */\nexport const POOL_QUESTION_MAX_PENDING_PER_INTENT = 3;\n\n/** Initial internal VoI threshold for proactive push delivery. */\nexport const POOL_QUESTION_PUSH_BASE_VOI = 0.6;\n\n/** Multiplicative VoI threshold increase per consecutive dismissal. */\nexport const POOL_QUESTION_PUSH_DISMISSAL_DECAY = 1.15;\n\n/** Minimum pool size for proactive delivery (stricter than mining). */\nexport const POOL_QUESTION_PUSH_MIN_POOL_SIZE = 8;\n\n/** Maximum claimed proactive pool pushes per recipient per UTC day. */\nexport const POOL_QUESTION_PUSH_DAILY_CAP = 2;\n\n/** Ranking mode for pool adjustments (IND-419). */\nexport type PoolQuestionsRankingMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_RANKING (default off). When \"on\", the home feed\n * orders by adjusted confidence (confidence × Π poolAdjustments.factor,\n * floor {@link POOL_ADJUSTMENT_FLOOR}). Adjustments are WRITTEN regardless of\n * this flag — it only gates whether ordering reads them, so the apply path\n * can ship first.\n */\nexport function poolQuestionsRanking(): PoolQuestionsRankingMode {\n return process.env.POOL_QUESTIONS_RANKING?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Adjustment factor for candidates on the side the user did NOT choose. */\nexport const POOL_ADJUSTMENT_FACTOR_OTHER = 0.6;\n\n/** Adjustment factor for candidates the miner could not assign (unknown). */\nexport const POOL_ADJUSTMENT_FACTOR_UNKNOWN = 0.9;\n\n/** Floor for the cumulative adjustment multiplier — demoted, never hidden. */\nexport const POOL_ADJUSTMENT_FLOOR = 0.3;\n\n/** Debounce window for answer-triggered re-discovery (Tier 1), per intent. */\nexport const POOL_RERUN_DEBOUNCE_MS = 60_000;\n\n/**\n * k-anonymity floor: axes are only mined when the pool has at least this many\n * candidates, so no axis (or later, question option) can be traced back to a\n * specific individual.\n */\nexport const POOL_DISCRIMINATOR_MIN_POOL_SIZE = 5;\n\n/** Max candidates sent to the miner LLM (top-N by score). */\nexport const POOL_DISCRIMINATOR_MAX_CANDIDATES = 24;\n\n/** Max chars of public context per candidate in the miner prompt. */\nexport const POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS = 400;\n"]}
|
|
@@ -10,15 +10,15 @@ declare const OpportunitySchema: z.ZodObject<{
|
|
|
10
10
|
sourceId: z.ZodString;
|
|
11
11
|
candidateId: z.ZodString;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
reasoning: string;
|
|
13
14
|
score: number;
|
|
14
15
|
sourceId: string;
|
|
15
|
-
reasoning: string;
|
|
16
16
|
valencyRole: "Agent" | "Patient" | "Peer";
|
|
17
17
|
candidateId: string;
|
|
18
18
|
}, {
|
|
19
|
+
reasoning: string;
|
|
19
20
|
score: number;
|
|
20
21
|
sourceId: string;
|
|
21
|
-
reasoning: string;
|
|
22
22
|
valencyRole: "Agent" | "Patient" | "Peer";
|
|
23
23
|
candidateId: string;
|
|
24
24
|
}>;
|
|
@@ -97,8 +97,8 @@ declare const OpportunityWithActorsSchema: z.ZodObject<{
|
|
|
97
97
|
evidenceKey?: string | null | undefined;
|
|
98
98
|
}>, "many">;
|
|
99
99
|
}, "strip", z.ZodTypeAny, {
|
|
100
|
-
score: number;
|
|
101
100
|
reasoning: string;
|
|
101
|
+
score: number;
|
|
102
102
|
actors: {
|
|
103
103
|
userId: string;
|
|
104
104
|
role: "agent" | "patient" | "peer";
|
|
@@ -106,8 +106,8 @@ declare const OpportunityWithActorsSchema: z.ZodObject<{
|
|
|
106
106
|
evidenceKey?: string | null | undefined;
|
|
107
107
|
}[];
|
|
108
108
|
}, {
|
|
109
|
-
score: number;
|
|
110
109
|
reasoning: string;
|
|
110
|
+
score: number;
|
|
111
111
|
actors: {
|
|
112
112
|
userId: string;
|
|
113
113
|
role: "agent" | "patient" | "peer";
|
|
@@ -136,8 +136,8 @@ declare const entityBundleResponseFormat: z.ZodObject<{
|
|
|
136
136
|
evidenceKey?: string | null | undefined;
|
|
137
137
|
}>, "many">;
|
|
138
138
|
}, "strip", z.ZodTypeAny, {
|
|
139
|
-
score: number;
|
|
140
139
|
reasoning: string;
|
|
140
|
+
score: number;
|
|
141
141
|
actors: {
|
|
142
142
|
userId: string;
|
|
143
143
|
role: "agent" | "patient" | "peer";
|
|
@@ -145,8 +145,8 @@ declare const entityBundleResponseFormat: z.ZodObject<{
|
|
|
145
145
|
evidenceKey?: string | null | undefined;
|
|
146
146
|
}[];
|
|
147
147
|
}, {
|
|
148
|
-
score: number;
|
|
149
148
|
reasoning: string;
|
|
149
|
+
score: number;
|
|
150
150
|
actors: {
|
|
151
151
|
userId: string;
|
|
152
152
|
role: "agent" | "patient" | "peer";
|
|
@@ -156,8 +156,8 @@ declare const entityBundleResponseFormat: z.ZodObject<{
|
|
|
156
156
|
}>, "many">;
|
|
157
157
|
}, "strip", z.ZodTypeAny, {
|
|
158
158
|
opportunities: {
|
|
159
|
-
score: number;
|
|
160
159
|
reasoning: string;
|
|
160
|
+
score: number;
|
|
161
161
|
actors: {
|
|
162
162
|
userId: string;
|
|
163
163
|
role: "agent" | "patient" | "peer";
|
|
@@ -167,8 +167,8 @@ declare const entityBundleResponseFormat: z.ZodObject<{
|
|
|
167
167
|
}[];
|
|
168
168
|
}, {
|
|
169
169
|
opportunities: {
|
|
170
|
-
score: number;
|
|
171
170
|
reasoning: string;
|
|
171
|
+
score: number;
|
|
172
172
|
actors: {
|
|
173
173
|
userId: string;
|
|
174
174
|
role: "agent" | "patient" | "peer";
|
|
@@ -265,9 +265,9 @@ export declare class OpportunityEvaluator {
|
|
|
265
265
|
minScore?: number | undefined;
|
|
266
266
|
candidatesJson?: string | undefined;
|
|
267
267
|
}, {
|
|
268
|
+
reasoning: string;
|
|
268
269
|
score: number;
|
|
269
270
|
sourceId: string;
|
|
270
|
-
reasoning: string;
|
|
271
271
|
valencyRole: "Agent" | "Patient" | "Peer";
|
|
272
272
|
candidateId: string;
|
|
273
273
|
}[], unknown, "opportunity_evaluator">;
|
|
@@ -145,7 +145,7 @@ export declare class OpportunityGraphFactory {
|
|
|
145
145
|
opportunityId: string;
|
|
146
146
|
counterpartyUserId: string;
|
|
147
147
|
}[];
|
|
148
|
-
operationMode: "
|
|
148
|
+
operationMode: "delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction";
|
|
149
149
|
introductionEntities: EvaluatorEntity[];
|
|
150
150
|
introductionHint: string | undefined;
|
|
151
151
|
requiredNetworkId: Id<"networks"> | undefined;
|
|
@@ -258,7 +258,7 @@ export declare class OpportunityGraphFactory {
|
|
|
258
258
|
opportunityId: string;
|
|
259
259
|
counterpartyUserId: string;
|
|
260
260
|
}[]> | undefined;
|
|
261
|
-
operationMode?: "
|
|
261
|
+
operationMode?: "delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction" | import("@langchain/langgraph").OverwriteValue<"delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction"> | undefined;
|
|
262
262
|
introductionEntities?: EvaluatorEntity[] | import("@langchain/langgraph").OverwriteValue<EvaluatorEntity[]> | undefined;
|
|
263
263
|
introductionHint?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
264
264
|
requiredNetworkId?: Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined;
|
|
@@ -416,7 +416,7 @@ export declare class OpportunityGraphFactory {
|
|
|
416
416
|
seedAssessmentScore?: number | undefined;
|
|
417
417
|
}[]> | undefined;
|
|
418
418
|
discoverySummary?: import("../index.js").DiscoverySummary | import("@langchain/langgraph").OverwriteValue<import("../index.js").DiscoverySummary | null> | null | undefined;
|
|
419
|
-
}, "scope" | "send" | "update" | "discovery" | "read" | "
|
|
419
|
+
}, "scope" | "send" | "update" | "discovery" | "read" | "negotiate_existing" | "approve_introduction" | "__start__" | "prep" | "persist" | "resolve" | "evaluation" | "ranking" | "intro_validation" | "intro_evaluation" | "delete_opp" | "negotiate", {
|
|
420
420
|
userId: import("@langchain/langgraph").BaseChannel<Id<"users">, Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users">>, unknown>;
|
|
421
421
|
searchQuery: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
422
422
|
networkId: import("@langchain/langgraph").BaseChannel<Id<"networks"> | undefined, Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined, unknown>;
|
|
@@ -436,7 +436,7 @@ export declare class OpportunityGraphFactory {
|
|
|
436
436
|
opportunityId: string;
|
|
437
437
|
counterpartyUserId: string;
|
|
438
438
|
}[]>, unknown>;
|
|
439
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
439
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction", "delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction" | import("@langchain/langgraph").OverwriteValue<"delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction">, unknown>;
|
|
440
440
|
introductionEntities: import("@langchain/langgraph").BaseChannel<EvaluatorEntity[], EvaluatorEntity[] | import("@langchain/langgraph").OverwriteValue<EvaluatorEntity[]>, unknown>;
|
|
441
441
|
introductionHint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
442
442
|
requiredNetworkId: import("@langchain/langgraph").BaseChannel<Id<"networks"> | undefined, Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined, unknown>;
|
|
@@ -676,7 +676,7 @@ export declare class OpportunityGraphFactory {
|
|
|
676
676
|
opportunityId: string;
|
|
677
677
|
counterpartyUserId: string;
|
|
678
678
|
}[]>, unknown>;
|
|
679
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
679
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction", "delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction" | import("@langchain/langgraph").OverwriteValue<"delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction">, unknown>;
|
|
680
680
|
introductionEntities: import("@langchain/langgraph").BaseChannel<EvaluatorEntity[], EvaluatorEntity[] | import("@langchain/langgraph").OverwriteValue<EvaluatorEntity[]>, unknown>;
|
|
681
681
|
introductionHint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
682
682
|
requiredNetworkId: import("@langchain/langgraph").BaseChannel<Id<"networks"> | undefined, Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined, unknown>;
|
|
@@ -1215,7 +1215,7 @@ export declare class OpportunityGraphFactory {
|
|
|
1215
1215
|
opportunityId: string;
|
|
1216
1216
|
counterpartyUserId: string;
|
|
1217
1217
|
}[]>, unknown>;
|
|
1218
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
1218
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction", "delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction" | import("@langchain/langgraph").OverwriteValue<"delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction">, unknown>;
|
|
1219
1219
|
introductionEntities: import("@langchain/langgraph").BaseChannel<EvaluatorEntity[], EvaluatorEntity[] | import("@langchain/langgraph").OverwriteValue<EvaluatorEntity[]>, unknown>;
|
|
1220
1220
|
introductionHint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
1221
1221
|
requiredNetworkId: import("@langchain/langgraph").BaseChannel<Id<"networks"> | undefined, Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined, unknown>;
|
|
@@ -231,7 +231,7 @@ export declare const OpportunityGraphState: import("@langchain/langgraph").Annot
|
|
|
231
231
|
*
|
|
232
232
|
* Defaults to 'create' for backward compatibility.
|
|
233
233
|
*/
|
|
234
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
234
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction", "delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction" | import("@langchain/langgraph").OverwriteValue<"delete" | "send" | "update" | "create" | "create_introduction" | "continue_discovery" | "read" | "negotiate_existing" | "approve_introduction">, unknown>;
|
|
235
235
|
/** Introduction mode: pre-gathered entities (profiles + intents per party). */
|
|
236
236
|
introductionEntities: import("@langchain/langgraph").BaseChannel<EvaluatorEntity[], EvaluatorEntity[] | import("@langchain/langgraph").OverwriteValue<EvaluatorEntity[]>, unknown>;
|
|
237
237
|
/** Introduction mode: optional hint from the introducer. */
|
|
@@ -7,19 +7,19 @@ declare const responseFormat: z.ZodObject<{
|
|
|
7
7
|
felicityClarity: z.ZodNumber;
|
|
8
8
|
semanticEntropy: z.ZodNumber;
|
|
9
9
|
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
reasoning: string;
|
|
10
11
|
semanticEntropy: number;
|
|
11
12
|
felicityAuthority: number;
|
|
12
13
|
felicitySincerity: number;
|
|
13
14
|
felicityClarity: number;
|
|
14
15
|
speechActType: "DECLARATIVE" | "ASSERTIVE";
|
|
15
|
-
reasoning: string;
|
|
16
16
|
}, {
|
|
17
|
+
reasoning: string;
|
|
17
18
|
semanticEntropy: number;
|
|
18
19
|
felicityAuthority: number;
|
|
19
20
|
felicitySincerity: number;
|
|
20
21
|
felicityClarity: number;
|
|
21
22
|
speechActType: "DECLARATIVE" | "ASSERTIVE";
|
|
22
|
-
reasoning: string;
|
|
23
23
|
}>;
|
|
24
24
|
export type PremiseAnalyzerOutput = z.infer<typeof responseFormat>;
|
|
25
25
|
/**
|
|
@@ -30,21 +30,21 @@ declare const responseFormat: z.ZodObject<{
|
|
|
30
30
|
retractedPremiseIds: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
31
31
|
revisedBio: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
32
32
|
}, "strip", z.ZodTypeAny, {
|
|
33
|
+
reasoning: string;
|
|
33
34
|
premises: {
|
|
34
35
|
text: string;
|
|
35
36
|
tier: "assertive" | "contextual";
|
|
36
37
|
validityDays: number | null;
|
|
37
38
|
}[];
|
|
38
|
-
reasoning: string;
|
|
39
39
|
retractedPremiseIds: string[];
|
|
40
40
|
revisedBio: string | null;
|
|
41
41
|
}, {
|
|
42
|
+
reasoning: string;
|
|
42
43
|
premises: {
|
|
43
44
|
text: string;
|
|
44
45
|
tier: "assertive" | "contextual";
|
|
45
46
|
validityDays: number | null;
|
|
46
47
|
}[];
|
|
47
|
-
reasoning: string;
|
|
48
48
|
retractedPremiseIds?: string[] | undefined;
|
|
49
49
|
revisedBio?: string | null | undefined;
|
|
50
50
|
}>;
|
|
@@ -4,13 +4,13 @@ declare const responseFormat: z.ZodObject<{
|
|
|
4
4
|
memberScore: z.ZodNumber;
|
|
5
5
|
reasoning: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
reasoning: string;
|
|
7
8
|
indexScore: number;
|
|
8
9
|
memberScore: number;
|
|
9
|
-
reasoning: string;
|
|
10
10
|
}, {
|
|
11
|
+
reasoning: string;
|
|
11
12
|
indexScore: number;
|
|
12
13
|
memberScore: number;
|
|
13
|
-
reasoning: string;
|
|
14
14
|
}>;
|
|
15
15
|
export type PremiseIndexerOutput = z.infer<typeof responseFormat>;
|
|
16
16
|
/**
|