@indexnetwork/protocol 3.0.0 → 3.1.0-rc.248.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/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/intent/intent.indexer.d.ts +3 -3
- package/dist/intent/intent.reconciler.d.ts +6 -6
- package/dist/intent/intent.tools.d.ts.map +1 -1
- package/dist/intent/intent.tools.js +9 -3
- package/dist/intent/intent.tools.js.map +1 -1
- package/dist/network/indexer/indexer.graph.d.ts +22 -11
- package/dist/network/indexer/indexer.graph.d.ts.map +1 -1
- package/dist/network/indexer/indexer.graph.js +47 -44
- package/dist/network/indexer/indexer.graph.js.map +1 -1
- package/dist/network/indexer/indexer.state.d.ts +3 -3
- package/dist/opportunity/opportunity.evaluator.d.ts +27 -9
- package/dist/opportunity/opportunity.evaluator.d.ts.map +1 -1
- package/dist/opportunity/opportunity.evaluator.js +9 -1
- package/dist/opportunity/opportunity.evaluator.js.map +1 -1
- package/dist/opportunity/opportunity.evidence.d.ts +22 -0
- package/dist/opportunity/opportunity.evidence.d.ts.map +1 -0
- package/dist/opportunity/opportunity.evidence.js +72 -0
- package/dist/opportunity/opportunity.evidence.js.map +1 -0
- package/dist/opportunity/opportunity.graph.d.ts +8 -7
- package/dist/opportunity/opportunity.graph.d.ts.map +1 -1
- package/dist/opportunity/opportunity.graph.js +74 -28
- package/dist/opportunity/opportunity.graph.js.map +1 -1
- package/dist/opportunity/opportunity.state.d.ts +10 -2
- package/dist/opportunity/opportunity.state.d.ts.map +1 -1
- package/dist/opportunity/opportunity.state.js.map +1 -1
- package/dist/premise/premise.graph.d.ts +14 -2
- package/dist/premise/premise.graph.d.ts.map +1 -1
- package/dist/premise/premise.graph.js +49 -20
- package/dist/premise/premise.graph.js.map +1 -1
- package/dist/premise/premise.indexer.d.ts +2 -2
- package/dist/premise/premise.state.d.ts +2 -0
- package/dist/premise/premise.state.d.ts.map +1 -1
- package/dist/premise/premise.state.js +8 -0
- package/dist/premise/premise.state.js.map +1 -1
- package/dist/shared/assignment/network-assignment.policy.d.ts +59 -0
- package/dist/shared/assignment/network-assignment.policy.d.ts.map +1 -0
- package/dist/shared/assignment/network-assignment.policy.js +101 -0
- package/dist/shared/assignment/network-assignment.policy.js.map +1 -0
- package/dist/shared/hyde/hyde.graph.d.ts +6 -6
- package/dist/shared/hyde/hyde.state.d.ts +2 -2
- package/dist/shared/interfaces/database.interface.d.ts +31 -17
- package/dist/shared/interfaces/database.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/database.interface.js.map +1 -1
- package/dist/shared/schemas/network-assignment.schema.d.ts +135 -0
- package/dist/shared/schemas/network-assignment.schema.d.ts.map +1 -0
- package/dist/shared/schemas/network-assignment.schema.js +55 -0
- package/dist/shared/schemas/network-assignment.schema.js.map +1 -0
- package/dist/shared/schemas/question.schema.d.ts +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared assignment and opportunity-evidence DTOs.
|
|
3
|
+
*
|
|
4
|
+
* These schemas are graph-agnostic protocol contracts. Protocol graphs and
|
|
5
|
+
* backend workers may use the inferred TypeScript types, while backend storage
|
|
6
|
+
* remains responsible for schema/SQL details.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
export declare const NetworkAssignmentResourceTypeSchema: z.ZodEnum<["premise", "intent"]>;
|
|
10
|
+
export type NetworkAssignmentResourceType = z.infer<typeof NetworkAssignmentResourceTypeSchema>;
|
|
11
|
+
export declare const NetworkAssignmentModeSchema: z.ZodEnum<["automatic", "manual_override"]>;
|
|
12
|
+
export type NetworkAssignmentMode = z.infer<typeof NetworkAssignmentModeSchema>;
|
|
13
|
+
export declare const NetworkAssignmentScopeSchema: z.ZodEnum<["global", "network"]>;
|
|
14
|
+
export type NetworkAssignmentScope = z.infer<typeof NetworkAssignmentScopeSchema>;
|
|
15
|
+
export declare const NetworkAssignmentPromptPresenceSchema: z.ZodEnum<["none", "index", "member", "both"]>;
|
|
16
|
+
export type NetworkAssignmentPromptPresence = z.infer<typeof NetworkAssignmentPromptPresenceSchema>;
|
|
17
|
+
export declare const NetworkAssignmentPolicySchema: z.ZodEnum<["unified-threshold-v1"]>;
|
|
18
|
+
export type NetworkAssignmentPolicy = z.infer<typeof NetworkAssignmentPolicySchema>;
|
|
19
|
+
export declare const NetworkAssignmentRawScoresSchema: z.ZodObject<{
|
|
20
|
+
indexScore: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
memberScore: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
indexScore?: number | undefined;
|
|
24
|
+
memberScore?: number | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
indexScore?: number | undefined;
|
|
27
|
+
memberScore?: number | undefined;
|
|
28
|
+
}>;
|
|
29
|
+
export type NetworkAssignmentRawScores = z.infer<typeof NetworkAssignmentRawScoresSchema>;
|
|
30
|
+
export declare const NetworkAssignmentMetadataSchema: z.ZodObject<{
|
|
31
|
+
resourceType: z.ZodEnum<["premise", "intent"]>;
|
|
32
|
+
mode: z.ZodEnum<["automatic", "manual_override"]>;
|
|
33
|
+
scope: z.ZodEnum<["global", "network"]>;
|
|
34
|
+
policy: z.ZodEnum<["unified-threshold-v1"]>;
|
|
35
|
+
threshold: z.ZodNumber;
|
|
36
|
+
promptPresence: z.ZodEnum<["none", "index", "member", "both"]>;
|
|
37
|
+
rawScores: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
indexScore: z.ZodOptional<z.ZodNumber>;
|
|
39
|
+
memberScore: z.ZodOptional<z.ZodNumber>;
|
|
40
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
|
+
indexScore?: number | undefined;
|
|
42
|
+
memberScore?: number | undefined;
|
|
43
|
+
}, {
|
|
44
|
+
indexScore?: number | undefined;
|
|
45
|
+
memberScore?: number | undefined;
|
|
46
|
+
}>>;
|
|
47
|
+
finalScore: z.ZodNumber;
|
|
48
|
+
assigned: z.ZodBoolean;
|
|
49
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
50
|
+
evaluator: z.ZodOptional<z.ZodString>;
|
|
51
|
+
source: z.ZodOptional<z.ZodString>;
|
|
52
|
+
createdAt: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
resourceType: "premise" | "intent";
|
|
55
|
+
mode: "automatic" | "manual_override";
|
|
56
|
+
scope: "global" | "network";
|
|
57
|
+
policy: "unified-threshold-v1";
|
|
58
|
+
threshold: number;
|
|
59
|
+
promptPresence: "none" | "index" | "member" | "both";
|
|
60
|
+
finalScore: number;
|
|
61
|
+
assigned: boolean;
|
|
62
|
+
rawScores?: {
|
|
63
|
+
indexScore?: number | undefined;
|
|
64
|
+
memberScore?: number | undefined;
|
|
65
|
+
} | undefined;
|
|
66
|
+
reason?: string | undefined;
|
|
67
|
+
evaluator?: string | undefined;
|
|
68
|
+
source?: string | undefined;
|
|
69
|
+
createdAt?: string | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
resourceType: "premise" | "intent";
|
|
72
|
+
mode: "automatic" | "manual_override";
|
|
73
|
+
scope: "global" | "network";
|
|
74
|
+
policy: "unified-threshold-v1";
|
|
75
|
+
threshold: number;
|
|
76
|
+
promptPresence: "none" | "index" | "member" | "both";
|
|
77
|
+
finalScore: number;
|
|
78
|
+
assigned: boolean;
|
|
79
|
+
rawScores?: {
|
|
80
|
+
indexScore?: number | undefined;
|
|
81
|
+
memberScore?: number | undefined;
|
|
82
|
+
} | undefined;
|
|
83
|
+
reason?: string | undefined;
|
|
84
|
+
evaluator?: string | undefined;
|
|
85
|
+
source?: string | undefined;
|
|
86
|
+
createdAt?: string | undefined;
|
|
87
|
+
}>;
|
|
88
|
+
export type NetworkAssignmentMetadata = z.infer<typeof NetworkAssignmentMetadataSchema>;
|
|
89
|
+
export declare const OpportunityEvidenceKindSchema: z.ZodEnum<["query_intent", "query_premise", "premise_similarity", "context_to_intent", "profile"]>;
|
|
90
|
+
export type OpportunityEvidenceKind = z.infer<typeof OpportunityEvidenceKindSchema>;
|
|
91
|
+
export declare const OpportunityEvidenceSchema: z.ZodObject<{
|
|
92
|
+
kind: z.ZodEnum<["query_intent", "query_premise", "premise_similarity", "context_to_intent", "profile"]>;
|
|
93
|
+
networkId: z.ZodString;
|
|
94
|
+
score: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
lens: z.ZodOptional<z.ZodString>;
|
|
96
|
+
discoverySource: z.ZodOptional<z.ZodEnum<["query", "premise-similarity", "context-to-intent"]>>;
|
|
97
|
+
matchedStrategies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
98
|
+
sourcePremiseId: z.ZodOptional<z.ZodString>;
|
|
99
|
+
candidatePremiseId: z.ZodOptional<z.ZodString>;
|
|
100
|
+
candidateIntentId: z.ZodOptional<z.ZodString>;
|
|
101
|
+
sourceContextId: z.ZodOptional<z.ZodString>;
|
|
102
|
+
payload: z.ZodOptional<z.ZodString>;
|
|
103
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
104
|
+
assertionText: z.ZodOptional<z.ZodString>;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
kind: "query_intent" | "query_premise" | "premise_similarity" | "context_to_intent" | "profile";
|
|
107
|
+
networkId: string;
|
|
108
|
+
score?: number | undefined;
|
|
109
|
+
lens?: string | undefined;
|
|
110
|
+
discoverySource?: "query" | "premise-similarity" | "context-to-intent" | undefined;
|
|
111
|
+
matchedStrategies?: string[] | undefined;
|
|
112
|
+
sourcePremiseId?: string | undefined;
|
|
113
|
+
candidatePremiseId?: string | undefined;
|
|
114
|
+
candidateIntentId?: string | undefined;
|
|
115
|
+
sourceContextId?: string | undefined;
|
|
116
|
+
payload?: string | undefined;
|
|
117
|
+
summary?: string | undefined;
|
|
118
|
+
assertionText?: string | undefined;
|
|
119
|
+
}, {
|
|
120
|
+
kind: "query_intent" | "query_premise" | "premise_similarity" | "context_to_intent" | "profile";
|
|
121
|
+
networkId: string;
|
|
122
|
+
score?: number | undefined;
|
|
123
|
+
lens?: string | undefined;
|
|
124
|
+
discoverySource?: "query" | "premise-similarity" | "context-to-intent" | undefined;
|
|
125
|
+
matchedStrategies?: string[] | undefined;
|
|
126
|
+
sourcePremiseId?: string | undefined;
|
|
127
|
+
candidatePremiseId?: string | undefined;
|
|
128
|
+
candidateIntentId?: string | undefined;
|
|
129
|
+
sourceContextId?: string | undefined;
|
|
130
|
+
payload?: string | undefined;
|
|
131
|
+
summary?: string | undefined;
|
|
132
|
+
assertionText?: string | undefined;
|
|
133
|
+
}>;
|
|
134
|
+
export type OpportunityEvidence = z.infer<typeof OpportunityEvidenceSchema>;
|
|
135
|
+
//# sourceMappingURL=network-assignment.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network-assignment.schema.d.ts","sourceRoot":"/","sources":["shared/schemas/network-assignment.schema.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,mCAAmC,kCAAgC,CAAC;AACjF,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAEhG,eAAO,MAAM,2BAA2B,6CAA2C,CAAC;AACpF,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,4BAA4B,kCAAgC,CAAC;AAC1E,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF,eAAO,MAAM,qCAAqC,gDAA8C,CAAC;AACjG,MAAM,MAAM,+BAA+B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qCAAqC,CAAC,CAAC;AAEpG,eAAO,MAAM,6BAA6B,qCAAmC,CAAC;AAC9E,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,gCAAgC;;;;;;;;;EAG3C,CAAC;AACH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc1C,CAAC;AACH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AAExF,eAAO,MAAM,6BAA6B,oGAMxC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAEpF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared assignment and opportunity-evidence DTOs.
|
|
3
|
+
*
|
|
4
|
+
* These schemas are graph-agnostic protocol contracts. Protocol graphs and
|
|
5
|
+
* backend workers may use the inferred TypeScript types, while backend storage
|
|
6
|
+
* remains responsible for schema/SQL details.
|
|
7
|
+
*/
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
export const NetworkAssignmentResourceTypeSchema = z.enum(["premise", "intent"]);
|
|
10
|
+
export const NetworkAssignmentModeSchema = z.enum(["automatic", "manual_override"]);
|
|
11
|
+
export const NetworkAssignmentScopeSchema = z.enum(["global", "network"]);
|
|
12
|
+
export const NetworkAssignmentPromptPresenceSchema = z.enum(["none", "index", "member", "both"]);
|
|
13
|
+
export const NetworkAssignmentPolicySchema = z.enum(["unified-threshold-v1"]);
|
|
14
|
+
export const NetworkAssignmentRawScoresSchema = z.object({
|
|
15
|
+
indexScore: z.number().min(0).max(1).optional(),
|
|
16
|
+
memberScore: z.number().min(0).max(1).optional(),
|
|
17
|
+
});
|
|
18
|
+
export const NetworkAssignmentMetadataSchema = z.object({
|
|
19
|
+
resourceType: NetworkAssignmentResourceTypeSchema,
|
|
20
|
+
mode: NetworkAssignmentModeSchema,
|
|
21
|
+
scope: NetworkAssignmentScopeSchema,
|
|
22
|
+
policy: NetworkAssignmentPolicySchema,
|
|
23
|
+
threshold: z.number().min(0).max(1),
|
|
24
|
+
promptPresence: NetworkAssignmentPromptPresenceSchema,
|
|
25
|
+
rawScores: NetworkAssignmentRawScoresSchema.optional(),
|
|
26
|
+
finalScore: z.number().min(0).max(1),
|
|
27
|
+
assigned: z.boolean(),
|
|
28
|
+
reason: z.string().optional(),
|
|
29
|
+
evaluator: z.string().optional(),
|
|
30
|
+
source: z.string().optional(),
|
|
31
|
+
createdAt: z.string().optional(),
|
|
32
|
+
});
|
|
33
|
+
export const OpportunityEvidenceKindSchema = z.enum([
|
|
34
|
+
"query_intent",
|
|
35
|
+
"query_premise",
|
|
36
|
+
"premise_similarity",
|
|
37
|
+
"context_to_intent",
|
|
38
|
+
"profile",
|
|
39
|
+
]);
|
|
40
|
+
export const OpportunityEvidenceSchema = z.object({
|
|
41
|
+
kind: OpportunityEvidenceKindSchema,
|
|
42
|
+
networkId: z.string(),
|
|
43
|
+
score: z.number().min(0).max(1).optional(),
|
|
44
|
+
lens: z.string().optional(),
|
|
45
|
+
discoverySource: z.enum(["query", "premise-similarity", "context-to-intent"]).optional(),
|
|
46
|
+
matchedStrategies: z.array(z.string()).optional(),
|
|
47
|
+
sourcePremiseId: z.string().optional(),
|
|
48
|
+
candidatePremiseId: z.string().optional(),
|
|
49
|
+
candidateIntentId: z.string().optional(),
|
|
50
|
+
sourceContextId: z.string().optional(),
|
|
51
|
+
payload: z.string().optional(),
|
|
52
|
+
summary: z.string().optional(),
|
|
53
|
+
assertionText: z.string().optional(),
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=network-assignment.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network-assignment.schema.js","sourceRoot":"/","sources":["shared/schemas/network-assignment.schema.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Shared assignment and opportunity-evidence DTOs.\n *\n * These schemas are graph-agnostic protocol contracts. Protocol graphs and\n * backend workers may use the inferred TypeScript types, while backend storage\n * remains responsible for schema/SQL details.\n */\nimport { z } from \"zod\";\n\nexport const NetworkAssignmentResourceTypeSchema = z.enum([\"premise\", \"intent\"]);\nexport type NetworkAssignmentResourceType = z.infer<typeof NetworkAssignmentResourceTypeSchema>;\n\nexport const NetworkAssignmentModeSchema = z.enum([\"automatic\", \"manual_override\"]);\nexport type NetworkAssignmentMode = z.infer<typeof NetworkAssignmentModeSchema>;\n\nexport const NetworkAssignmentScopeSchema = z.enum([\"global\", \"network\"]);\nexport type NetworkAssignmentScope = z.infer<typeof NetworkAssignmentScopeSchema>;\n\nexport const NetworkAssignmentPromptPresenceSchema = z.enum([\"none\", \"index\", \"member\", \"both\"]);\nexport type NetworkAssignmentPromptPresence = z.infer<typeof NetworkAssignmentPromptPresenceSchema>;\n\nexport const NetworkAssignmentPolicySchema = z.enum([\"unified-threshold-v1\"]);\nexport type NetworkAssignmentPolicy = z.infer<typeof NetworkAssignmentPolicySchema>;\n\nexport const NetworkAssignmentRawScoresSchema = z.object({\n indexScore: z.number().min(0).max(1).optional(),\n memberScore: z.number().min(0).max(1).optional(),\n});\nexport type NetworkAssignmentRawScores = z.infer<typeof NetworkAssignmentRawScoresSchema>;\n\nexport const NetworkAssignmentMetadataSchema = z.object({\n resourceType: NetworkAssignmentResourceTypeSchema,\n mode: NetworkAssignmentModeSchema,\n scope: NetworkAssignmentScopeSchema,\n policy: NetworkAssignmentPolicySchema,\n threshold: z.number().min(0).max(1),\n promptPresence: NetworkAssignmentPromptPresenceSchema,\n rawScores: NetworkAssignmentRawScoresSchema.optional(),\n finalScore: z.number().min(0).max(1),\n assigned: z.boolean(),\n reason: z.string().optional(),\n evaluator: z.string().optional(),\n source: z.string().optional(),\n createdAt: z.string().optional(),\n});\nexport type NetworkAssignmentMetadata = z.infer<typeof NetworkAssignmentMetadataSchema>;\n\nexport const OpportunityEvidenceKindSchema = z.enum([\n \"query_intent\",\n \"query_premise\",\n \"premise_similarity\",\n \"context_to_intent\",\n \"profile\",\n]);\nexport type OpportunityEvidenceKind = z.infer<typeof OpportunityEvidenceKindSchema>;\n\nexport const OpportunityEvidenceSchema = z.object({\n kind: OpportunityEvidenceKindSchema,\n networkId: z.string(),\n score: z.number().min(0).max(1).optional(),\n lens: z.string().optional(),\n discoverySource: z.enum([\"query\", \"premise-similarity\", \"context-to-intent\"]).optional(),\n matchedStrategies: z.array(z.string()).optional(),\n sourcePremiseId: z.string().optional(),\n candidatePremiseId: z.string().optional(),\n candidateIntentId: z.string().optional(),\n sourceContextId: z.string().optional(),\n payload: z.string().optional(),\n summary: z.string().optional(),\n assertionText: z.string().optional(),\n});\nexport type OpportunityEvidence = z.infer<typeof OpportunityEvidenceSchema>;\n"]}
|
|
@@ -194,16 +194,16 @@ export declare const QuestionDetectionSchema: z.ZodObject<{
|
|
|
194
194
|
/** ID of the assistant message that triggered this question. Used by the frontend to anchor the question card inline. */
|
|
195
195
|
messageId: z.ZodOptional<z.ZodString>;
|
|
196
196
|
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
mode: "intent" | "profile" | "discovery" | "negotiation";
|
|
197
198
|
sourceType: string;
|
|
198
199
|
sourceId: string;
|
|
199
|
-
mode: "profile" | "intent" | "discovery" | "negotiation";
|
|
200
200
|
timestamp: string;
|
|
201
201
|
triggeredBy?: string | undefined;
|
|
202
202
|
messageId?: string | undefined;
|
|
203
203
|
}, {
|
|
204
|
+
mode: "intent" | "profile" | "discovery" | "negotiation";
|
|
204
205
|
sourceType: string;
|
|
205
206
|
sourceId: string;
|
|
206
|
-
mode: "profile" | "intent" | "discovery" | "negotiation";
|
|
207
207
|
timestamp: string;
|
|
208
208
|
triggeredBy?: string | undefined;
|
|
209
209
|
messageId?: string | undefined;
|