@indexnetwork/protocol 6.8.0-rc.395.1 → 6.10.0-rc.397.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 +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/negotiation/negotiation.agent.d.ts +3 -1
- package/dist/negotiation/negotiation.agent.d.ts.map +1 -1
- package/dist/negotiation/negotiation.agent.js +4 -1
- package/dist/negotiation/negotiation.agent.js.map +1 -1
- package/dist/negotiation/negotiation.consultation-policy.d.ts +40 -0
- package/dist/negotiation/negotiation.consultation-policy.d.ts.map +1 -0
- package/dist/negotiation/negotiation.consultation-policy.js +69 -0
- package/dist/negotiation/negotiation.consultation-policy.js.map +1 -0
- package/dist/negotiation/negotiation.graph.d.ts +86 -28
- package/dist/negotiation/negotiation.graph.d.ts.map +1 -1
- package/dist/negotiation/negotiation.graph.js +311 -81
- package/dist/negotiation/negotiation.graph.js.map +1 -1
- package/dist/negotiation/negotiation.question-safety.d.ts +26 -0
- package/dist/negotiation/negotiation.question-safety.d.ts.map +1 -0
- package/dist/negotiation/negotiation.question-safety.js +56 -0
- package/dist/negotiation/negotiation.question-safety.js.map +1 -0
- package/dist/negotiation/negotiation.state.d.ts +25 -2
- package/dist/negotiation/negotiation.state.d.ts.map +1 -1
- package/dist/negotiation/negotiation.state.js +35 -0
- package/dist/negotiation/negotiation.state.js.map +1 -1
- package/dist/opportunity/opportunity.graph.d.ts +12 -1
- package/dist/opportunity/opportunity.graph.d.ts.map +1 -1
- package/dist/opportunity/opportunity.graph.js +43 -5
- package/dist/opportunity/opportunity.graph.js.map +1 -1
- package/dist/opportunity/opportunity.state.d.ts +5 -2
- package/dist/opportunity/opportunity.state.d.ts.map +1 -1
- package/dist/opportunity/opportunity.state.js +5 -0
- package/dist/opportunity/opportunity.state.js.map +1 -1
- package/dist/questioner/questioner.agent.d.ts +1 -1
- package/dist/questioner/questioner.agent.d.ts.map +1 -1
- package/dist/questioner/questioner.agent.js +5 -0
- package/dist/questioner/questioner.agent.js.map +1 -1
- package/dist/questioner/questioner.presets.d.ts.map +1 -1
- package/dist/questioner/questioner.presets.js +9 -13
- package/dist/questioner/questioner.presets.js.map +1 -1
- package/dist/questioner/questioner.types.d.ts +47 -10
- package/dist/questioner/questioner.types.d.ts.map +1 -1
- package/dist/questioner/questioner.types.js +61 -1
- package/dist/questioner/questioner.types.js.map +1 -1
- package/dist/shared/agent/tool.factory.d.ts.map +1 -1
- package/dist/shared/agent/tool.factory.js +1 -0
- package/dist/shared/agent/tool.factory.js.map +1 -1
- package/dist/shared/interfaces/agent-dispatcher.interface.d.ts +3 -0
- package/dist/shared/interfaces/agent-dispatcher.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/agent-dispatcher.interface.js.map +1 -1
- package/dist/shared/interfaces/database.interface.d.ts +81 -6
- package/dist/shared/interfaces/database.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/database.interface.js.map +1 -1
- package/dist/shared/interfaces/negotiation-events.interface.d.ts +14 -2
- package/dist/shared/interfaces/negotiation-events.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/negotiation-events.interface.js.map +1 -1
- package/dist/shared/schemas/question.schema.d.ts +347 -28
- package/dist/shared/schemas/question.schema.d.ts.map +1 -1
- package/dist/shared/schemas/question.schema.js +132 -2
- package/dist/shared/schemas/question.schema.js.map +1 -1
- package/package.json +1 -1
|
@@ -46,11 +46,23 @@ export interface NegotiationTimeoutQueue {
|
|
|
46
46
|
}
|
|
47
47
|
/** Payload carried by an ask_user answer-window expiry job. */
|
|
48
48
|
export interface AskUserExpiryPayload {
|
|
49
|
+
/** Deterministic durable settlement/outbox key for this exact paused task. */
|
|
50
|
+
settlementId: string;
|
|
49
51
|
/** Opportunity to resume via the run-existing continuation path. */
|
|
50
52
|
opportunityId: string;
|
|
51
53
|
/** The asking side's client (the user who was asked and did not answer). */
|
|
52
54
|
userId: string;
|
|
53
|
-
/**
|
|
54
|
-
|
|
55
|
+
/** Exact owned signal consulted by the paused negotiator. */
|
|
56
|
+
recipientIntentId: string;
|
|
57
|
+
/** Exact non-personal network shared by the opportunity actors. */
|
|
58
|
+
networkId: string;
|
|
59
|
+
/** Admission-time canonical hash of the recipient intent payload/summary. */
|
|
60
|
+
intentFingerprint: string;
|
|
61
|
+
/** Admission-time opportunity lifecycle marker. */
|
|
62
|
+
opportunityStatus: string;
|
|
63
|
+
opportunityUpdatedAt: string;
|
|
64
|
+
/** Exact counterparty provenance for settlement-time eligibility checks. */
|
|
65
|
+
counterpartyUserId: string;
|
|
66
|
+
counterpartyIntentId: string;
|
|
55
67
|
}
|
|
56
68
|
//# sourceMappingURL=negotiation-events.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"negotiation-events.interface.d.ts","sourceRoot":"/","sources":["shared/interfaces/negotiation-events.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;OAMG;IACH,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE5F;;;OAGG;IACH,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,CACnB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;OAIG;IACH,mBAAmB,CAAC,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAED,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB;IACnC,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,
|
|
1
|
+
{"version":3,"file":"negotiation-events.interface.d.ts","sourceRoot":"/","sources":["shared/interfaces/negotiation-events.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,WAAW,uBAAuB;IACtC;;;;;;OAMG;IACH,cAAc,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE5F;;;OAGG;IACH,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpD;;;;;;;;;;;;;OAaG;IACH,oBAAoB,CAAC,CACnB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;OAIG;IACH,mBAAmB,CAAC,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5D;AAED,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAC;IACrB,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,iBAAiB,EAAE,MAAM,CAAC;IAC1B,mDAAmD;IACnD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,4EAA4E;IAC5E,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;CAC9B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"negotiation-events.interface.js","sourceRoot":"/","sources":["shared/interfaces/negotiation-events.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/**\n * Interfaces for negotiation yield/resume support.\n * Used by the negotiation graph and dispatcher to manage timeouts\n * for external agents that haven't responded yet.\n */\n\n/**\n * Manages delayed timeout jobs for negotiations waiting on external agents.\n * When a negotiation yields, a timeout is enqueued. If the external agent\n * responds before the timeout, the job is cancelled.\n */\nexport interface NegotiationTimeoutQueue {\n /**\n * Enqueue a delayed timeout job.\n * @param negotiationId - The negotiation task ID\n * @param turnNumber - Current turn number (used to detect stale jobs)\n * @param delayMs - Delay in milliseconds before the timeout fires\n * @returns The BullMQ job ID for cancellation\n */\n enqueueTimeout(negotiationId: string, turnNumber: number, delayMs: number): Promise<string>;\n\n /**\n * Cancel a pending timeout job for a negotiation.\n * @param negotiationId - The negotiation task ID\n */\n cancelTimeout(negotiationId: string): Promise<void>;\n\n /**\n * Arm the answer-window timer for an `ask_user` pause (P3.2). Fires after\n * `delayMs` (typically 24 h); the worker resumes the negotiation with a\n * conservative no-disclosure default when the task is still\n * `input_required`, and no-ops otherwise (stale job).\n *\n * Optional so fakes and pre-P3.2 implementations stay valid; the graph only\n * offers `ask_user` when this method is present.\n *\n * @param negotiationId - The paused negotiation task ID\n * @param payload - Resume coordinates + observability context\n * @param delayMs - Delay before the expiry fires\n * @returns The job ID for cancellation\n */\n enqueueAskUserExpiry?(\n negotiationId: string,\n payload: AskUserExpiryPayload,\n delayMs: number,\n ): Promise<string>;\n\n /**\n * Cancel a pending ask_user answer-window timer (the client answered in\n * time, or the negotiation reached a terminal state another way).\n * @param negotiationId - The paused negotiation task ID\n */\n cancelAskUserExpiry?(negotiationId: string): Promise<void>;\n}\n\n/** Payload carried by an ask_user answer-window expiry job. */\nexport interface AskUserExpiryPayload {\n /** Opportunity to resume via the run-existing continuation path. */\n opportunityId: string;\n /** The asking side's client (the user who was asked and did not answer). */\n userId: string;\n /**
|
|
1
|
+
{"version":3,"file":"negotiation-events.interface.js","sourceRoot":"/","sources":["shared/interfaces/negotiation-events.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG","sourcesContent":["/**\n * Interfaces for negotiation yield/resume support.\n * Used by the negotiation graph and dispatcher to manage timeouts\n * for external agents that haven't responded yet.\n */\n\n/**\n * Manages delayed timeout jobs for negotiations waiting on external agents.\n * When a negotiation yields, a timeout is enqueued. If the external agent\n * responds before the timeout, the job is cancelled.\n */\nexport interface NegotiationTimeoutQueue {\n /**\n * Enqueue a delayed timeout job.\n * @param negotiationId - The negotiation task ID\n * @param turnNumber - Current turn number (used to detect stale jobs)\n * @param delayMs - Delay in milliseconds before the timeout fires\n * @returns The BullMQ job ID for cancellation\n */\n enqueueTimeout(negotiationId: string, turnNumber: number, delayMs: number): Promise<string>;\n\n /**\n * Cancel a pending timeout job for a negotiation.\n * @param negotiationId - The negotiation task ID\n */\n cancelTimeout(negotiationId: string): Promise<void>;\n\n /**\n * Arm the answer-window timer for an `ask_user` pause (P3.2). Fires after\n * `delayMs` (typically 24 h); the worker resumes the negotiation with a\n * conservative no-disclosure default when the task is still\n * `input_required`, and no-ops otherwise (stale job).\n *\n * Optional so fakes and pre-P3.2 implementations stay valid; the graph only\n * offers `ask_user` when this method is present.\n *\n * @param negotiationId - The paused negotiation task ID\n * @param payload - Resume coordinates + observability context\n * @param delayMs - Delay before the expiry fires\n * @returns The job ID for cancellation\n */\n enqueueAskUserExpiry?(\n negotiationId: string,\n payload: AskUserExpiryPayload,\n delayMs: number,\n ): Promise<string>;\n\n /**\n * Cancel a pending ask_user answer-window timer (the client answered in\n * time, or the negotiation reached a terminal state another way).\n * @param negotiationId - The paused negotiation task ID\n */\n cancelAskUserExpiry?(negotiationId: string): Promise<void>;\n}\n\n/** Payload carried by an ask_user answer-window expiry job. */\nexport interface AskUserExpiryPayload {\n /** Deterministic durable settlement/outbox key for this exact paused task. */\n settlementId: string;\n /** Opportunity to resume via the run-existing continuation path. */\n opportunityId: string;\n /** The asking side's client (the user who was asked and did not answer). */\n userId: string;\n /** Exact owned signal consulted by the paused negotiator. */\n recipientIntentId: string;\n /** Exact non-personal network shared by the opportunity actors. */\n networkId: string;\n /** Admission-time canonical hash of the recipient intent payload/summary. */\n intentFingerprint: string;\n /** Admission-time opportunity lifecycle marker. */\n opportunityStatus: string;\n opportunityUpdatedAt: string;\n /** Exact counterparty provenance for settlement-time eligibility checks. */\n counterpartyUserId: string;\n counterpartyIntentId: string;\n}\n"]}
|
|
@@ -220,7 +220,156 @@ export interface QuestionGenerationResult {
|
|
|
220
220
|
underspecificationTypes: Array<UnderspecificationType | null>;
|
|
221
221
|
}
|
|
222
222
|
/** Internal reason a question was generated, orthogonal to mode and QUD metadata. */
|
|
223
|
-
export declare const
|
|
223
|
+
export declare const NegotiationQuestionPurposeSchema: z.ZodEnum<["uptake", "stalled_followup", "inflight_consultation"]>;
|
|
224
|
+
export declare const QuestionPurposeSchema: z.ZodEnum<["uptake", "recovery", "stalled_followup", "inflight_consultation"]>;
|
|
225
|
+
/**
|
|
226
|
+
* Producer-supplied candidate binding. The API re-resolves every field from
|
|
227
|
+
* authoritative rows before generation; callers cannot mint provenance.
|
|
228
|
+
*/
|
|
229
|
+
export declare const NegotiationQuestionCandidateSchema: z.ZodEffects<z.ZodObject<{
|
|
230
|
+
purpose: z.ZodEnum<["uptake", "stalled_followup", "inflight_consultation"]>;
|
|
231
|
+
recipientUserId: z.ZodString;
|
|
232
|
+
recipientIntentId: z.ZodString;
|
|
233
|
+
opportunityId: z.ZodString;
|
|
234
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
235
|
+
networkId: z.ZodString;
|
|
236
|
+
/** Uptake only: exact low-authority counterparty eligibility binding. */
|
|
237
|
+
counterpartyUserId: z.ZodOptional<z.ZodString>;
|
|
238
|
+
counterpartyIntentId: z.ZodOptional<z.ZodString>;
|
|
239
|
+
counterpartyFelicityAuthority: z.ZodOptional<z.ZodNumber>;
|
|
240
|
+
}, "strip", z.ZodTypeAny, {
|
|
241
|
+
networkId: string;
|
|
242
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
243
|
+
recipientUserId: string;
|
|
244
|
+
recipientIntentId: string;
|
|
245
|
+
opportunityId: string;
|
|
246
|
+
taskId?: string | undefined;
|
|
247
|
+
counterpartyUserId?: string | undefined;
|
|
248
|
+
counterpartyIntentId?: string | undefined;
|
|
249
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
250
|
+
}, {
|
|
251
|
+
networkId: string;
|
|
252
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
253
|
+
recipientUserId: string;
|
|
254
|
+
recipientIntentId: string;
|
|
255
|
+
opportunityId: string;
|
|
256
|
+
taskId?: string | undefined;
|
|
257
|
+
counterpartyUserId?: string | undefined;
|
|
258
|
+
counterpartyIntentId?: string | undefined;
|
|
259
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
260
|
+
}>, {
|
|
261
|
+
networkId: string;
|
|
262
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
263
|
+
recipientUserId: string;
|
|
264
|
+
recipientIntentId: string;
|
|
265
|
+
opportunityId: string;
|
|
266
|
+
taskId?: string | undefined;
|
|
267
|
+
counterpartyUserId?: string | undefined;
|
|
268
|
+
counterpartyIntentId?: string | undefined;
|
|
269
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
270
|
+
}, {
|
|
271
|
+
networkId: string;
|
|
272
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
273
|
+
recipientUserId: string;
|
|
274
|
+
recipientIntentId: string;
|
|
275
|
+
opportunityId: string;
|
|
276
|
+
taskId?: string | undefined;
|
|
277
|
+
counterpartyUserId?: string | undefined;
|
|
278
|
+
counterpartyIntentId?: string | undefined;
|
|
279
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
280
|
+
}>;
|
|
281
|
+
/**
|
|
282
|
+
* Durable server-only routing and freshness envelope for negotiation-family
|
|
283
|
+
* questions. This object is stripped from every REST/MCP projection.
|
|
284
|
+
*/
|
|
285
|
+
export declare const NegotiationQuestionProvenanceSchema: z.ZodEffects<z.ZodObject<{
|
|
286
|
+
version: z.ZodLiteral<1>;
|
|
287
|
+
purpose: z.ZodEnum<["uptake", "stalled_followup", "inflight_consultation"]>;
|
|
288
|
+
recipientUserId: z.ZodString;
|
|
289
|
+
recipientIntentId: z.ZodString;
|
|
290
|
+
opportunityId: z.ZodString;
|
|
291
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
292
|
+
networkId: z.ZodString;
|
|
293
|
+
intentFingerprint: z.ZodString;
|
|
294
|
+
opportunityStatus: z.ZodEnum<["latent", "draft", "negotiating", "pending", "stalled", "accepted", "rejected", "expired"]>;
|
|
295
|
+
opportunityUpdatedAt: z.ZodString;
|
|
296
|
+
taskState: z.ZodOptional<z.ZodEnum<["submitted", "working", "input_required", "completed", "canceled", "failed", "rejected", "auth_required", "waiting_for_agent", "claimed"]>>;
|
|
297
|
+
taskUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
298
|
+
/** Uptake only: exact low-authority counterparty eligibility binding. */
|
|
299
|
+
counterpartyUserId: z.ZodOptional<z.ZodString>;
|
|
300
|
+
counterpartyIntentId: z.ZodOptional<z.ZodString>;
|
|
301
|
+
counterpartyFelicityAuthority: z.ZodOptional<z.ZodNumber>;
|
|
302
|
+
/** Stable per-generation position so retries dedupe without reducing cardinality. */
|
|
303
|
+
questionOrdinal: z.ZodNumber;
|
|
304
|
+
}, "strip", z.ZodTypeAny, {
|
|
305
|
+
networkId: string;
|
|
306
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
307
|
+
recipientUserId: string;
|
|
308
|
+
recipientIntentId: string;
|
|
309
|
+
opportunityId: string;
|
|
310
|
+
version: 1;
|
|
311
|
+
intentFingerprint: string;
|
|
312
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
313
|
+
opportunityUpdatedAt: string;
|
|
314
|
+
questionOrdinal: number;
|
|
315
|
+
taskId?: string | undefined;
|
|
316
|
+
counterpartyUserId?: string | undefined;
|
|
317
|
+
counterpartyIntentId?: string | undefined;
|
|
318
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
319
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
320
|
+
taskUpdatedAt?: string | undefined;
|
|
321
|
+
}, {
|
|
322
|
+
networkId: string;
|
|
323
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
324
|
+
recipientUserId: string;
|
|
325
|
+
recipientIntentId: string;
|
|
326
|
+
opportunityId: string;
|
|
327
|
+
version: 1;
|
|
328
|
+
intentFingerprint: string;
|
|
329
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
330
|
+
opportunityUpdatedAt: string;
|
|
331
|
+
questionOrdinal: number;
|
|
332
|
+
taskId?: string | undefined;
|
|
333
|
+
counterpartyUserId?: string | undefined;
|
|
334
|
+
counterpartyIntentId?: string | undefined;
|
|
335
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
336
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
337
|
+
taskUpdatedAt?: string | undefined;
|
|
338
|
+
}>, {
|
|
339
|
+
networkId: string;
|
|
340
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
341
|
+
recipientUserId: string;
|
|
342
|
+
recipientIntentId: string;
|
|
343
|
+
opportunityId: string;
|
|
344
|
+
version: 1;
|
|
345
|
+
intentFingerprint: string;
|
|
346
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
347
|
+
opportunityUpdatedAt: string;
|
|
348
|
+
questionOrdinal: number;
|
|
349
|
+
taskId?: string | undefined;
|
|
350
|
+
counterpartyUserId?: string | undefined;
|
|
351
|
+
counterpartyIntentId?: string | undefined;
|
|
352
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
353
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
354
|
+
taskUpdatedAt?: string | undefined;
|
|
355
|
+
}, {
|
|
356
|
+
networkId: string;
|
|
357
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
358
|
+
recipientUserId: string;
|
|
359
|
+
recipientIntentId: string;
|
|
360
|
+
opportunityId: string;
|
|
361
|
+
version: 1;
|
|
362
|
+
intentFingerprint: string;
|
|
363
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
364
|
+
opportunityUpdatedAt: string;
|
|
365
|
+
questionOrdinal: number;
|
|
366
|
+
taskId?: string | undefined;
|
|
367
|
+
counterpartyUserId?: string | undefined;
|
|
368
|
+
counterpartyIntentId?: string | undefined;
|
|
369
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
370
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
371
|
+
taskUpdatedAt?: string | undefined;
|
|
372
|
+
}>;
|
|
224
373
|
export declare const QuestionModeSchema: z.ZodEnum<["discovery", "intent", "enrichment", "negotiation", "negotiation_inflight", "chat", "pool_discovery"]>;
|
|
225
374
|
/** One server-side candidate→side assignment (never serialized to clients). */
|
|
226
375
|
export declare const QuestionPoolAssignmentSchema: z.ZodObject<{
|
|
@@ -436,8 +585,8 @@ export declare const QuestionPoolSnapshotSchema: z.ZodObject<{
|
|
|
436
585
|
embeddingModel?: string | undefined;
|
|
437
586
|
}[];
|
|
438
587
|
runId?: string | undefined;
|
|
439
|
-
intentText?: string | undefined;
|
|
440
588
|
intentFingerprint?: string | undefined;
|
|
589
|
+
intentText?: string | undefined;
|
|
441
590
|
opportunityIds?: string[] | undefined;
|
|
442
591
|
}, {
|
|
443
592
|
poolSize: number;
|
|
@@ -471,8 +620,8 @@ export declare const QuestionPoolSnapshotSchema: z.ZodObject<{
|
|
|
471
620
|
embeddingModel?: string | undefined;
|
|
472
621
|
}[];
|
|
473
622
|
runId?: string | undefined;
|
|
474
|
-
intentText?: string | undefined;
|
|
475
623
|
intentFingerprint?: string | undefined;
|
|
624
|
+
intentText?: string | undefined;
|
|
476
625
|
opportunityIds?: string[] | undefined;
|
|
477
626
|
}>;
|
|
478
627
|
/** Internal delivery ledger for proactive pool-question pushes (IND-421). */
|
|
@@ -531,27 +680,116 @@ export declare const QuestionRecoverySnapshotSchema: z.ZodObject<{
|
|
|
531
680
|
/** Bounded internal correlation id for an asynchronous discovery run. */
|
|
532
681
|
runId: z.ZodOptional<z.ZodString>;
|
|
533
682
|
}, "strip", z.ZodTypeAny, {
|
|
534
|
-
intentFingerprint: string;
|
|
535
683
|
version: 1;
|
|
684
|
+
intentFingerprint: string;
|
|
536
685
|
completionSource: "from_intent" | "discovery_run";
|
|
537
686
|
runId?: string | undefined;
|
|
538
687
|
rejectedNegotiationCount?: number | undefined;
|
|
539
688
|
}, {
|
|
540
|
-
intentFingerprint: string;
|
|
541
689
|
version: 1;
|
|
690
|
+
intentFingerprint: string;
|
|
542
691
|
completionSource: "from_intent" | "discovery_run";
|
|
543
692
|
runId?: string | undefined;
|
|
544
693
|
rejectedNegotiationCount?: number | undefined;
|
|
545
694
|
}>;
|
|
546
695
|
/** Internal reason a pending question was voided. */
|
|
547
|
-
export declare const QuestionVoidedReasonSchema: z.ZodEnum<["pool_drift", "intent_edit", "recovery_drift"]>;
|
|
696
|
+
export declare const QuestionVoidedReasonSchema: z.ZodEnum<["pool_drift", "intent_edit", "recovery_drift", "negotiation_stale"]>;
|
|
548
697
|
/** Permanent reasons that terminalize an unclaimed proactive push request. */
|
|
549
698
|
export declare const QuestionPoolPushRequestReasonSchema: z.ZodEnum<["question_lifecycle", "intent_lifecycle", "malformed_source", "malformed_actor", "malformed_pool", "malformed_cycle", "visited", "pool_size", "voi", "cycle_budget"]>;
|
|
550
699
|
export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
551
700
|
/** Which preset mode generated this question. */
|
|
552
701
|
mode: z.ZodEnum<["discovery", "intent", "enrichment", "negotiation", "negotiation_inflight", "chat", "pool_discovery"]>;
|
|
553
702
|
/** Internal reason for generation; independent of mode and QUD repair metadata. */
|
|
554
|
-
purpose: z.ZodOptional<z.ZodEnum<["uptake", "recovery"]>>;
|
|
703
|
+
purpose: z.ZodOptional<z.ZodEnum<["uptake", "recovery", "stalled_followup", "inflight_consultation"]>>;
|
|
704
|
+
/** Exact negotiation recipient/intent/task routing provenance. Internal only. */
|
|
705
|
+
negotiation: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
706
|
+
version: z.ZodLiteral<1>;
|
|
707
|
+
purpose: z.ZodEnum<["uptake", "stalled_followup", "inflight_consultation"]>;
|
|
708
|
+
recipientUserId: z.ZodString;
|
|
709
|
+
recipientIntentId: z.ZodString;
|
|
710
|
+
opportunityId: z.ZodString;
|
|
711
|
+
taskId: z.ZodOptional<z.ZodString>;
|
|
712
|
+
networkId: z.ZodString;
|
|
713
|
+
intentFingerprint: z.ZodString;
|
|
714
|
+
opportunityStatus: z.ZodEnum<["latent", "draft", "negotiating", "pending", "stalled", "accepted", "rejected", "expired"]>;
|
|
715
|
+
opportunityUpdatedAt: z.ZodString;
|
|
716
|
+
taskState: z.ZodOptional<z.ZodEnum<["submitted", "working", "input_required", "completed", "canceled", "failed", "rejected", "auth_required", "waiting_for_agent", "claimed"]>>;
|
|
717
|
+
taskUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
718
|
+
/** Uptake only: exact low-authority counterparty eligibility binding. */
|
|
719
|
+
counterpartyUserId: z.ZodOptional<z.ZodString>;
|
|
720
|
+
counterpartyIntentId: z.ZodOptional<z.ZodString>;
|
|
721
|
+
counterpartyFelicityAuthority: z.ZodOptional<z.ZodNumber>;
|
|
722
|
+
/** Stable per-generation position so retries dedupe without reducing cardinality. */
|
|
723
|
+
questionOrdinal: z.ZodNumber;
|
|
724
|
+
}, "strip", z.ZodTypeAny, {
|
|
725
|
+
networkId: string;
|
|
726
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
727
|
+
recipientUserId: string;
|
|
728
|
+
recipientIntentId: string;
|
|
729
|
+
opportunityId: string;
|
|
730
|
+
version: 1;
|
|
731
|
+
intentFingerprint: string;
|
|
732
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
733
|
+
opportunityUpdatedAt: string;
|
|
734
|
+
questionOrdinal: number;
|
|
735
|
+
taskId?: string | undefined;
|
|
736
|
+
counterpartyUserId?: string | undefined;
|
|
737
|
+
counterpartyIntentId?: string | undefined;
|
|
738
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
739
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
740
|
+
taskUpdatedAt?: string | undefined;
|
|
741
|
+
}, {
|
|
742
|
+
networkId: string;
|
|
743
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
744
|
+
recipientUserId: string;
|
|
745
|
+
recipientIntentId: string;
|
|
746
|
+
opportunityId: string;
|
|
747
|
+
version: 1;
|
|
748
|
+
intentFingerprint: string;
|
|
749
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
750
|
+
opportunityUpdatedAt: string;
|
|
751
|
+
questionOrdinal: number;
|
|
752
|
+
taskId?: string | undefined;
|
|
753
|
+
counterpartyUserId?: string | undefined;
|
|
754
|
+
counterpartyIntentId?: string | undefined;
|
|
755
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
756
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
757
|
+
taskUpdatedAt?: string | undefined;
|
|
758
|
+
}>, {
|
|
759
|
+
networkId: string;
|
|
760
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
761
|
+
recipientUserId: string;
|
|
762
|
+
recipientIntentId: string;
|
|
763
|
+
opportunityId: string;
|
|
764
|
+
version: 1;
|
|
765
|
+
intentFingerprint: string;
|
|
766
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
767
|
+
opportunityUpdatedAt: string;
|
|
768
|
+
questionOrdinal: number;
|
|
769
|
+
taskId?: string | undefined;
|
|
770
|
+
counterpartyUserId?: string | undefined;
|
|
771
|
+
counterpartyIntentId?: string | undefined;
|
|
772
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
773
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
774
|
+
taskUpdatedAt?: string | undefined;
|
|
775
|
+
}, {
|
|
776
|
+
networkId: string;
|
|
777
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
778
|
+
recipientUserId: string;
|
|
779
|
+
recipientIntentId: string;
|
|
780
|
+
opportunityId: string;
|
|
781
|
+
version: 1;
|
|
782
|
+
intentFingerprint: string;
|
|
783
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
784
|
+
opportunityUpdatedAt: string;
|
|
785
|
+
questionOrdinal: number;
|
|
786
|
+
taskId?: string | undefined;
|
|
787
|
+
counterpartyUserId?: string | undefined;
|
|
788
|
+
counterpartyIntentId?: string | undefined;
|
|
789
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
790
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
791
|
+
taskUpdatedAt?: string | undefined;
|
|
792
|
+
}>>;
|
|
555
793
|
/** Entity type that triggered generation (e.g. "opportunity", "intent", "profile"). */
|
|
556
794
|
sourceType: z.ZodString;
|
|
557
795
|
/** ID of the triggering entity. */
|
|
@@ -566,6 +804,8 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
566
804
|
underspecificationType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["missing_constituent", "missing_constraint", "open_alternative_set"]>>>;
|
|
567
805
|
/** ID of the assistant message that triggered this question. Used by the frontend to anchor the question card inline. */
|
|
568
806
|
messageId: z.ZodOptional<z.ZodString>;
|
|
807
|
+
/** Durable server-only conversation session binding used to validate messageId. */
|
|
808
|
+
sessionId: z.ZodOptional<z.ZodString>;
|
|
569
809
|
/**
|
|
570
810
|
* pool_discovery only: the mined pool snapshot (assignments + alternates).
|
|
571
811
|
* INTERNAL — stripped from every client-facing read (web + MCP).
|
|
@@ -716,8 +956,8 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
716
956
|
embeddingModel?: string | undefined;
|
|
717
957
|
}[];
|
|
718
958
|
runId?: string | undefined;
|
|
719
|
-
intentText?: string | undefined;
|
|
720
959
|
intentFingerprint?: string | undefined;
|
|
960
|
+
intentText?: string | undefined;
|
|
721
961
|
opportunityIds?: string[] | undefined;
|
|
722
962
|
}, {
|
|
723
963
|
poolSize: number;
|
|
@@ -751,8 +991,8 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
751
991
|
embeddingModel?: string | undefined;
|
|
752
992
|
}[];
|
|
753
993
|
runId?: string | undefined;
|
|
754
|
-
intentText?: string | undefined;
|
|
755
994
|
intentFingerprint?: string | undefined;
|
|
995
|
+
intentText?: string | undefined;
|
|
756
996
|
opportunityIds?: string[] | undefined;
|
|
757
997
|
}>>;
|
|
758
998
|
/** Post-discovery intent recovery snapshot. Internal only. */
|
|
@@ -765,14 +1005,14 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
765
1005
|
/** Bounded internal correlation id for an asynchronous discovery run. */
|
|
766
1006
|
runId: z.ZodOptional<z.ZodString>;
|
|
767
1007
|
}, "strip", z.ZodTypeAny, {
|
|
768
|
-
intentFingerprint: string;
|
|
769
1008
|
version: 1;
|
|
1009
|
+
intentFingerprint: string;
|
|
770
1010
|
completionSource: "from_intent" | "discovery_run";
|
|
771
1011
|
runId?: string | undefined;
|
|
772
1012
|
rejectedNegotiationCount?: number | undefined;
|
|
773
1013
|
}, {
|
|
774
|
-
intentFingerprint: string;
|
|
775
1014
|
version: 1;
|
|
1015
|
+
intentFingerprint: string;
|
|
776
1016
|
completionSource: "from_intent" | "discovery_run";
|
|
777
1017
|
runId?: string | undefined;
|
|
778
1018
|
rejectedNegotiationCount?: number | undefined;
|
|
@@ -832,7 +1072,7 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
832
1072
|
failure?: string | undefined;
|
|
833
1073
|
}>>;
|
|
834
1074
|
/** Internal reason this question was voided after pool or intent drift. */
|
|
835
|
-
voidedReason: z.ZodOptional<z.ZodEnum<["pool_drift", "intent_edit", "recovery_drift"]>>;
|
|
1075
|
+
voidedReason: z.ZodOptional<z.ZodEnum<["pool_drift", "intent_edit", "recovery_drift", "negotiation_stale"]>>;
|
|
836
1076
|
/** Authoritative successful-delivery ledger timestamp. Internal only. */
|
|
837
1077
|
pushedAt: z.ZodOptional<z.ZodString>;
|
|
838
1078
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -858,15 +1098,34 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
858
1098
|
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
859
1099
|
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
860
1100
|
recovery?: {
|
|
861
|
-
intentFingerprint: string;
|
|
862
1101
|
version: 1;
|
|
1102
|
+
intentFingerprint: string;
|
|
863
1103
|
completionSource: "from_intent" | "discovery_run";
|
|
864
1104
|
runId?: string | undefined;
|
|
865
1105
|
rejectedNegotiationCount?: number | undefined;
|
|
866
1106
|
} | undefined;
|
|
1107
|
+
purpose?: "uptake" | "stalled_followup" | "inflight_consultation" | "recovery" | undefined;
|
|
1108
|
+
negotiation?: {
|
|
1109
|
+
networkId: string;
|
|
1110
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
1111
|
+
recipientUserId: string;
|
|
1112
|
+
recipientIntentId: string;
|
|
1113
|
+
opportunityId: string;
|
|
1114
|
+
version: 1;
|
|
1115
|
+
intentFingerprint: string;
|
|
1116
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
1117
|
+
opportunityUpdatedAt: string;
|
|
1118
|
+
questionOrdinal: number;
|
|
1119
|
+
taskId?: string | undefined;
|
|
1120
|
+
counterpartyUserId?: string | undefined;
|
|
1121
|
+
counterpartyIntentId?: string | undefined;
|
|
1122
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
1123
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
1124
|
+
taskUpdatedAt?: string | undefined;
|
|
1125
|
+
} | undefined;
|
|
867
1126
|
messageId?: string | undefined;
|
|
868
|
-
purpose?: "uptake" | "recovery" | undefined;
|
|
869
1127
|
triggeredBy?: string | undefined;
|
|
1128
|
+
sessionId?: string | undefined;
|
|
870
1129
|
pool?: {
|
|
871
1130
|
poolSize: number;
|
|
872
1131
|
minedAt: string;
|
|
@@ -899,8 +1158,8 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
899
1158
|
embeddingModel?: string | undefined;
|
|
900
1159
|
}[];
|
|
901
1160
|
runId?: string | undefined;
|
|
902
|
-
intentText?: string | undefined;
|
|
903
1161
|
intentFingerprint?: string | undefined;
|
|
1162
|
+
intentText?: string | undefined;
|
|
904
1163
|
opportunityIds?: string[] | undefined;
|
|
905
1164
|
} | undefined;
|
|
906
1165
|
pushRequestedAt?: string | undefined;
|
|
@@ -908,7 +1167,7 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
908
1167
|
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
909
1168
|
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
910
1169
|
pushRequestSuppressedAt?: string | undefined;
|
|
911
|
-
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | undefined;
|
|
1170
|
+
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | "negotiation_stale" | undefined;
|
|
912
1171
|
pushedAt?: string | undefined;
|
|
913
1172
|
}, {
|
|
914
1173
|
mode: "chat" | "intent" | "enrichment" | "discovery" | "negotiation" | "negotiation_inflight" | "pool_discovery";
|
|
@@ -933,15 +1192,34 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
933
1192
|
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
934
1193
|
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
935
1194
|
recovery?: {
|
|
936
|
-
intentFingerprint: string;
|
|
937
1195
|
version: 1;
|
|
1196
|
+
intentFingerprint: string;
|
|
938
1197
|
completionSource: "from_intent" | "discovery_run";
|
|
939
1198
|
runId?: string | undefined;
|
|
940
1199
|
rejectedNegotiationCount?: number | undefined;
|
|
941
1200
|
} | undefined;
|
|
1201
|
+
purpose?: "uptake" | "stalled_followup" | "inflight_consultation" | "recovery" | undefined;
|
|
1202
|
+
negotiation?: {
|
|
1203
|
+
networkId: string;
|
|
1204
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
1205
|
+
recipientUserId: string;
|
|
1206
|
+
recipientIntentId: string;
|
|
1207
|
+
opportunityId: string;
|
|
1208
|
+
version: 1;
|
|
1209
|
+
intentFingerprint: string;
|
|
1210
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
1211
|
+
opportunityUpdatedAt: string;
|
|
1212
|
+
questionOrdinal: number;
|
|
1213
|
+
taskId?: string | undefined;
|
|
1214
|
+
counterpartyUserId?: string | undefined;
|
|
1215
|
+
counterpartyIntentId?: string | undefined;
|
|
1216
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
1217
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
1218
|
+
taskUpdatedAt?: string | undefined;
|
|
1219
|
+
} | undefined;
|
|
942
1220
|
messageId?: string | undefined;
|
|
943
|
-
purpose?: "uptake" | "recovery" | undefined;
|
|
944
1221
|
triggeredBy?: string | undefined;
|
|
1222
|
+
sessionId?: string | undefined;
|
|
945
1223
|
pool?: {
|
|
946
1224
|
poolSize: number;
|
|
947
1225
|
minedAt: string;
|
|
@@ -974,8 +1252,8 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
974
1252
|
embeddingModel?: string | undefined;
|
|
975
1253
|
}[];
|
|
976
1254
|
runId?: string | undefined;
|
|
977
|
-
intentText?: string | undefined;
|
|
978
1255
|
intentFingerprint?: string | undefined;
|
|
1256
|
+
intentText?: string | undefined;
|
|
979
1257
|
opportunityIds?: string[] | undefined;
|
|
980
1258
|
} | undefined;
|
|
981
1259
|
pushRequestedAt?: string | undefined;
|
|
@@ -983,7 +1261,7 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
983
1261
|
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
984
1262
|
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
985
1263
|
pushRequestSuppressedAt?: string | undefined;
|
|
986
|
-
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | undefined;
|
|
1264
|
+
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | "negotiation_stale" | undefined;
|
|
987
1265
|
pushedAt?: string | undefined;
|
|
988
1266
|
}>, {
|
|
989
1267
|
mode: "chat" | "intent" | "enrichment" | "discovery" | "negotiation" | "negotiation_inflight" | "pool_discovery";
|
|
@@ -1008,15 +1286,34 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1008
1286
|
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
1009
1287
|
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
1010
1288
|
recovery?: {
|
|
1011
|
-
intentFingerprint: string;
|
|
1012
1289
|
version: 1;
|
|
1290
|
+
intentFingerprint: string;
|
|
1013
1291
|
completionSource: "from_intent" | "discovery_run";
|
|
1014
1292
|
runId?: string | undefined;
|
|
1015
1293
|
rejectedNegotiationCount?: number | undefined;
|
|
1016
1294
|
} | undefined;
|
|
1295
|
+
purpose?: "uptake" | "stalled_followup" | "inflight_consultation" | "recovery" | undefined;
|
|
1296
|
+
negotiation?: {
|
|
1297
|
+
networkId: string;
|
|
1298
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
1299
|
+
recipientUserId: string;
|
|
1300
|
+
recipientIntentId: string;
|
|
1301
|
+
opportunityId: string;
|
|
1302
|
+
version: 1;
|
|
1303
|
+
intentFingerprint: string;
|
|
1304
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
1305
|
+
opportunityUpdatedAt: string;
|
|
1306
|
+
questionOrdinal: number;
|
|
1307
|
+
taskId?: string | undefined;
|
|
1308
|
+
counterpartyUserId?: string | undefined;
|
|
1309
|
+
counterpartyIntentId?: string | undefined;
|
|
1310
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
1311
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
1312
|
+
taskUpdatedAt?: string | undefined;
|
|
1313
|
+
} | undefined;
|
|
1017
1314
|
messageId?: string | undefined;
|
|
1018
|
-
purpose?: "uptake" | "recovery" | undefined;
|
|
1019
1315
|
triggeredBy?: string | undefined;
|
|
1316
|
+
sessionId?: string | undefined;
|
|
1020
1317
|
pool?: {
|
|
1021
1318
|
poolSize: number;
|
|
1022
1319
|
minedAt: string;
|
|
@@ -1049,8 +1346,8 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1049
1346
|
embeddingModel?: string | undefined;
|
|
1050
1347
|
}[];
|
|
1051
1348
|
runId?: string | undefined;
|
|
1052
|
-
intentText?: string | undefined;
|
|
1053
1349
|
intentFingerprint?: string | undefined;
|
|
1350
|
+
intentText?: string | undefined;
|
|
1054
1351
|
opportunityIds?: string[] | undefined;
|
|
1055
1352
|
} | undefined;
|
|
1056
1353
|
pushRequestedAt?: string | undefined;
|
|
@@ -1058,7 +1355,7 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1058
1355
|
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
1059
1356
|
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
1060
1357
|
pushRequestSuppressedAt?: string | undefined;
|
|
1061
|
-
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | undefined;
|
|
1358
|
+
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | "negotiation_stale" | undefined;
|
|
1062
1359
|
pushedAt?: string | undefined;
|
|
1063
1360
|
}, {
|
|
1064
1361
|
mode: "chat" | "intent" | "enrichment" | "discovery" | "negotiation" | "negotiation_inflight" | "pool_discovery";
|
|
@@ -1083,15 +1380,34 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1083
1380
|
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
1084
1381
|
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
1085
1382
|
recovery?: {
|
|
1086
|
-
intentFingerprint: string;
|
|
1087
1383
|
version: 1;
|
|
1384
|
+
intentFingerprint: string;
|
|
1088
1385
|
completionSource: "from_intent" | "discovery_run";
|
|
1089
1386
|
runId?: string | undefined;
|
|
1090
1387
|
rejectedNegotiationCount?: number | undefined;
|
|
1091
1388
|
} | undefined;
|
|
1389
|
+
purpose?: "uptake" | "stalled_followup" | "inflight_consultation" | "recovery" | undefined;
|
|
1390
|
+
negotiation?: {
|
|
1391
|
+
networkId: string;
|
|
1392
|
+
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
1393
|
+
recipientUserId: string;
|
|
1394
|
+
recipientIntentId: string;
|
|
1395
|
+
opportunityId: string;
|
|
1396
|
+
version: 1;
|
|
1397
|
+
intentFingerprint: string;
|
|
1398
|
+
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
1399
|
+
opportunityUpdatedAt: string;
|
|
1400
|
+
questionOrdinal: number;
|
|
1401
|
+
taskId?: string | undefined;
|
|
1402
|
+
counterpartyUserId?: string | undefined;
|
|
1403
|
+
counterpartyIntentId?: string | undefined;
|
|
1404
|
+
counterpartyFelicityAuthority?: number | undefined;
|
|
1405
|
+
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
1406
|
+
taskUpdatedAt?: string | undefined;
|
|
1407
|
+
} | undefined;
|
|
1092
1408
|
messageId?: string | undefined;
|
|
1093
|
-
purpose?: "uptake" | "recovery" | undefined;
|
|
1094
1409
|
triggeredBy?: string | undefined;
|
|
1410
|
+
sessionId?: string | undefined;
|
|
1095
1411
|
pool?: {
|
|
1096
1412
|
poolSize: number;
|
|
1097
1413
|
minedAt: string;
|
|
@@ -1124,8 +1440,8 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1124
1440
|
embeddingModel?: string | undefined;
|
|
1125
1441
|
}[];
|
|
1126
1442
|
runId?: string | undefined;
|
|
1127
|
-
intentText?: string | undefined;
|
|
1128
1443
|
intentFingerprint?: string | undefined;
|
|
1444
|
+
intentText?: string | undefined;
|
|
1129
1445
|
opportunityIds?: string[] | undefined;
|
|
1130
1446
|
} | undefined;
|
|
1131
1447
|
pushRequestedAt?: string | undefined;
|
|
@@ -1133,7 +1449,7 @@ export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1133
1449
|
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
1134
1450
|
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
1135
1451
|
pushRequestSuppressedAt?: string | undefined;
|
|
1136
|
-
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | undefined;
|
|
1452
|
+
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | "negotiation_stale" | undefined;
|
|
1137
1453
|
pushedAt?: string | undefined;
|
|
1138
1454
|
}>;
|
|
1139
1455
|
export declare const QuestionActorSchema: z.ZodObject<{
|
|
@@ -1172,6 +1488,9 @@ export declare const QuestionAnswerSchema: z.ZodObject<{
|
|
|
1172
1488
|
answeredAt: string;
|
|
1173
1489
|
freeText?: string | undefined;
|
|
1174
1490
|
}>;
|
|
1491
|
+
export type NegotiationQuestionPurpose = z.infer<typeof NegotiationQuestionPurposeSchema>;
|
|
1492
|
+
export type NegotiationQuestionCandidate = z.infer<typeof NegotiationQuestionCandidateSchema>;
|
|
1493
|
+
export type NegotiationQuestionProvenance = z.infer<typeof NegotiationQuestionProvenanceSchema>;
|
|
1175
1494
|
export type QuestionPurpose = z.infer<typeof QuestionPurposeSchema>;
|
|
1176
1495
|
export type QuestionMode = z.infer<typeof QuestionModeSchema>;
|
|
1177
1496
|
export type QuestionDetection = z.infer<typeof QuestionDetectionSchema>;
|