@indexnetwork/protocol 22.0.0-rc.499.1 → 64.0.0-rc.604.2
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 +1841 -0
- package/IMPLEMENTATION.md +140 -181
- package/README.md +16 -20
- package/STABILITY.md +16 -11
- package/dist/{intents/intent.module.d.ts → capabilities/intents.d.ts} +182 -192
- package/dist/capabilities/intents.js +88 -0
- package/dist/capabilities/negotiations.d.ts +17 -0
- package/dist/capabilities/negotiations.js +16 -0
- package/dist/{networks/network.module.d.ts → capabilities/networks.d.ts} +33 -169
- package/dist/{networks/network.module.js → capabilities/networks.js} +6 -17
- package/dist/index.d.ts +57 -134
- package/dist/index.js +41 -105
- package/dist/internal/agents/agent.repository.port.d.ts +59 -0
- package/dist/internal/agents/agent.repository.port.js +7 -0
- package/dist/internal/agents/agent.types.d.ts +35 -0
- package/dist/{agents → internal/agents}/agent.types.js +1 -6
- package/dist/{intents → internal/intents}/graph/intent.graph.d.ts +142 -151
- package/dist/{intents → internal/intents}/graph/intent.graph.execute.d.ts +5 -1
- package/dist/{intents → internal/intents}/graph/intent.graph.execute.js +165 -46
- package/dist/internal/intents/graph/intent.graph.infer.d.ts +78 -0
- package/dist/internal/intents/graph/intent.graph.infer.js +122 -0
- package/dist/internal/intents/graph/intent.graph.js +108 -0
- package/dist/{intents → internal/intents}/graph/intent.graph.reconcile.d.ts +18 -9
- package/dist/internal/intents/graph/intent.graph.reconcile.js +173 -0
- package/dist/internal/intents/graph/intent.graph.shared.d.ts +55 -0
- package/dist/{intents → internal/intents}/graph/intent.graph.shared.js +25 -70
- package/dist/{intents → internal/intents}/graph/intent.graph.state.d.ts +96 -32
- package/dist/{intents → internal/intents}/graph/intent.graph.state.js +42 -31
- package/dist/internal/intents/intent.admission.d.ts +16 -0
- package/dist/internal/intents/intent.admission.js +30 -0
- package/dist/{intents → internal/intents}/intent.inferrer.d.ts +1 -40
- package/dist/{intents → internal/intents}/intent.inferrer.js +13 -49
- package/dist/internal/intents/intent.preparer.d.ts +52 -0
- package/dist/internal/intents/intent.preparer.js +87 -0
- package/dist/{intents → internal/intents}/intent.verifier.d.ts +3 -36
- package/dist/{intents → internal/intents}/intent.verifier.js +0 -17
- package/dist/{networks → internal/networks}/indexer.graph.d.ts +15 -200
- package/dist/{networks → internal/networks}/indexer.graph.js +19 -128
- package/dist/{networks → internal/networks}/indexer.state.d.ts +8 -63
- package/dist/internal/networks/indexer.state.js +70 -0
- package/dist/{networks → internal/networks}/membership.graph.d.ts +6 -6
- package/dist/{networks → internal/networks}/membership.graph.js +3 -3
- package/dist/{networks → internal/networks}/membership.state.d.ts +2 -2
- package/dist/{networks → internal/networks}/membership.state.js +2 -2
- package/dist/{networks → internal/networks}/network.graph.d.ts +9 -22
- package/dist/{networks → internal/networks}/network.graph.js +13 -27
- package/dist/{networks → internal/networks}/network.recommender.d.ts +2 -2
- package/dist/{networks → internal/networks}/network.recommender.js +2 -2
- package/dist/{networks → internal/networks}/network.state.d.ts +4 -7
- package/dist/{networks → internal/networks}/network.state.js +4 -4
- package/dist/internal/opportunities/negotiation-context.loader.d.ts +26 -0
- package/dist/internal/opportunities/negotiation-context.loader.js +36 -0
- package/dist/{opportunities → internal/opportunities}/opportunity.actor.d.ts +1 -1
- package/dist/{opportunities → internal/opportunities}/opportunity.actor.js +7 -1
- package/dist/internal/opportunities/opportunity.counterparties.d.ts +17 -0
- package/dist/internal/opportunities/opportunity.counterparties.js +19 -0
- package/dist/internal/opportunities/opportunity.events.d.ts +38 -0
- package/dist/internal/opportunities/opportunity.events.js +94 -0
- package/dist/{opportunities → internal/opportunities}/opportunity.feed-selection.d.ts +3 -9
- package/dist/internal/opportunities/opportunity.feed-selection.js +40 -0
- package/dist/internal/opportunities/opportunity.graph.modes.d.ts +39 -0
- package/dist/internal/opportunities/opportunity.graph.modes.js +138 -0
- package/dist/{opportunities → internal/opportunities}/opportunity.labels.d.ts +2 -3
- package/dist/internal/opportunities/opportunity.labels.js +9 -0
- package/dist/{opportunities → internal/opportunities}/opportunity.presentation.d.ts +17 -86
- package/dist/{opportunities → internal/opportunities}/opportunity.presentation.js +54 -447
- package/dist/{opportunities → internal/opportunities}/opportunity.update-admission.d.ts +2 -2
- package/dist/internal/opportunities/opportunity.utils.d.ts +105 -0
- package/dist/internal/opportunities/opportunity.utils.js +165 -0
- package/dist/{opportunities → internal/opportunities}/radar/radar.graph.d.ts +17 -17
- package/dist/{opportunities → internal/opportunities}/radar/radar.graph.js +41 -161
- package/dist/{opportunities → internal/opportunities}/radar/radar.state.d.ts +4 -11
- package/dist/{shared → internal/shared}/agent/model-signal.d.ts +1 -1
- package/dist/{shared → internal/shared}/agent/model-signal.js +1 -1
- package/dist/{shared → internal/shared}/agent/model.config.d.ts +28 -86
- package/dist/{shared → internal/shared}/agent/model.config.js +58 -69
- package/dist/internal/shared/agent/model.resolver.d.ts +33 -0
- package/dist/{shared → internal/shared}/agent/model.resolver.js +18 -33
- package/dist/internal/shared/agent/scope.d.ts +20 -0
- package/dist/internal/shared/agent/scope.js +24 -0
- package/dist/internal/shared/assignment/network-assignment.policy.d.ts +23 -0
- package/dist/internal/shared/assignment/network-assignment.policy.js +28 -0
- package/dist/{shared → internal/shared}/observability/log.d.ts +3 -6
- package/dist/{shared → internal/shared}/observability/log.js +9 -18
- package/dist/{shared → internal/shared}/observability/protocol.logger.d.ts +1 -1
- package/dist/{shared → internal/shared}/observability/protocol.logger.js +1 -1
- package/dist/internal/shared/observability/request-context.d.ts +29 -0
- package/dist/internal/shared/observability/request-context.js +17 -0
- package/dist/{shared → internal/shared}/utils/social-label.d.ts +2 -2
- package/dist/{shared → internal/shared}/utils/social-label.js +1 -1
- package/dist/platform/database/capabilities.d.ts +59 -0
- package/dist/{shared/interfaces/database.entities.d.ts → platform/database/entities.d.ts} +81 -121
- package/dist/{shared/interfaces/database.identity-queries.d.ts → platform/database/identity-queries.d.ts} +55 -20
- package/dist/platform/database/member-queries.d.ts +55 -0
- package/dist/platform/database/member-queries.js +4 -0
- package/dist/platform/database/negotiation.d.ts +38 -0
- package/dist/{shared/interfaces/database.network-queries.d.ts → platform/database/network-queries.d.ts} +66 -67
- package/dist/platform/database/network-queries.js +4 -0
- package/dist/{shared/interfaces/database.opportunity-queries.d.ts → platform/database/opportunity-queries.d.ts} +25 -109
- package/dist/{shared/interfaces/database.port.d.ts → platform/database/port.d.ts} +52 -117
- package/dist/{shared/interfaces/database.port.js → platform/database/port.js} +3 -5
- package/dist/platform/database.d.ts +23 -0
- package/dist/{shared/interfaces/database.interface.js → platform/database.js} +1 -1
- package/dist/{shared/interfaces/cache.interface.d.ts → platform/discovery/cache.d.ts} +2 -4
- package/dist/{shared/interfaces/cache.interface.js → platform/discovery/cache.js} +1 -1
- package/dist/platform/discovery/embedder.d.ts +31 -0
- package/dist/platform/runtime/errors.d.ts +6 -0
- package/dist/platform/runtime/errors.js +9 -0
- package/dist/platform/runtime/follow-up.d.ts +36 -0
- package/dist/platform/runtime/follow-up.js +4 -0
- package/dist/platform/runtime/observability.d.ts +34 -0
- package/dist/protocol/core.d.ts +11 -0
- package/dist/protocol/discovery.rules.d.ts +21 -0
- package/dist/protocol/discovery.rules.js +29 -0
- package/dist/protocol/negotiation.constants.d.ts +3 -0
- package/dist/protocol/negotiation.constants.js +3 -0
- package/dist/protocol/negotiation.rules.d.ts +73 -0
- package/dist/protocol/negotiation.rules.js +68 -0
- package/dist/protocol/protocol.prompt.d.ts +13 -0
- package/dist/protocol/protocol.prompt.js +190 -0
- package/dist/{shared → protocol}/schemas/discovery-question.schema.d.ts +13 -13
- package/dist/{shared → protocol}/schemas/discovery-question.schema.js +2 -2
- package/dist/{shared → protocol}/schemas/identity.schema.d.ts +4 -4
- package/dist/{shared → protocol}/schemas/identity.schema.js +4 -4
- package/dist/{shared → protocol}/schemas/network-assignment.schema.d.ts +11 -20
- package/dist/{shared → protocol}/schemas/network-assignment.schema.js +2 -9
- package/dist/protocol/schemas/underspecification.schema.d.ts +9 -0
- package/dist/protocol/schemas/underspecification.schema.js +12 -0
- package/package.json +7 -15
- package/dist/agents/agent.dispatcher.port.d.ts +0 -25
- package/dist/agents/agent.module.d.ts +0 -19
- package/dist/agents/agent.module.js +0 -11
- package/dist/agents/agent.repository.port.d.ts +0 -118
- package/dist/agents/agent.repository.port.js +0 -10
- package/dist/agents/agent.tools.d.ts +0 -16
- package/dist/agents/agent.tools.js +0 -351
- package/dist/agents/agent.tools.port.d.ts +0 -22
- package/dist/agents/agent.tools.port.js +0 -18
- package/dist/agents/agent.types.d.ts +0 -76
- package/dist/chat/chat-streaming.types.d.ts +0 -618
- package/dist/chat/chat-streaming.types.js +0 -297
- package/dist/chat/chat.agent.d.ts +0 -292
- package/dist/chat/chat.agent.js +0 -1010
- package/dist/chat/chat.graph.d.ts +0 -424
- package/dist/chat/chat.graph.js +0 -257
- package/dist/chat/chat.interrupt.classifier.d.ts +0 -25
- package/dist/chat/chat.interrupt.classifier.js +0 -64
- package/dist/chat/chat.persona.d.ts +0 -39
- package/dist/chat/chat.prompt.d.ts +0 -4
- package/dist/chat/chat.prompt.js +0 -12
- package/dist/chat/chat.prompt.modules.d.ts +0 -30
- package/dist/chat/chat.prompt.modules.js +0 -40
- package/dist/chat/chat.question-dedup.d.ts +0 -14
- package/dist/chat/chat.question-dedup.js +0 -17
- package/dist/chat/chat.state.d.ts +0 -135
- package/dist/chat/chat.state.js +0 -120
- package/dist/chat/chat.streamer.d.ts +0 -64
- package/dist/chat/chat.streamer.js +0 -217
- package/dist/chat/chat.suggester.d.ts +0 -23
- package/dist/chat/chat.suggester.js +0 -95
- package/dist/chat/chat.summarizer.d.ts +0 -20
- package/dist/chat/chat.summarizer.js +0 -97
- package/dist/chat/chat.title.generator.d.ts +0 -19
- package/dist/chat/chat.title.generator.js +0 -66
- package/dist/chat/chat.tools.d.ts +0 -5
- package/dist/chat/chat.tools.js +0 -62
- package/dist/chat/chat.utils.d.ts +0 -41
- package/dist/chat/chat.utils.js +0 -88
- package/dist/chat/negotiator.persona.d.ts +0 -74
- package/dist/chat/negotiator.persona.js +0 -154
- package/dist/chat/negotiator.prompt.d.ts +0 -45
- package/dist/chat/negotiator.prompt.js +0 -160
- package/dist/chat/negotiator.tools.d.ts +0 -42
- package/dist/chat/negotiator.tools.js +0 -134
- package/dist/chat/onboarding.persona.d.ts +0 -28
- package/dist/chat/onboarding.persona.js +0 -86
- package/dist/chat/onboarding.prompt.d.ts +0 -6
- package/dist/chat/onboarding.prompt.js +0 -63
- package/dist/chat/signal.persona.d.ts +0 -47
- package/dist/chat/signal.persona.js +0 -319
- package/dist/chat/signal.prompt.d.ts +0 -39
- package/dist/chat/signal.prompt.js +0 -136
- package/dist/contacts/contact.module.d.ts +0 -8
- package/dist/contacts/contact.module.js +0 -6
- package/dist/contacts/contact.repository.port.d.ts +0 -21
- package/dist/contacts/contact.repository.port.js +0 -12
- package/dist/contacts/contact.tools.d.ts +0 -17
- package/dist/contacts/contact.tools.js +0 -108
- package/dist/contacts/contact.tools.port.d.ts +0 -20
- package/dist/contacts/contact.tools.port.js +0 -16
- package/dist/contacts/contact.types.d.ts +0 -24
- package/dist/contacts/contact.types.js +0 -8
- package/dist/contexts/context.generator.d.ts +0 -95
- package/dist/contexts/context.generator.js +0 -127
- package/dist/contexts/context.module.d.ts +0 -13
- package/dist/contexts/context.module.js +0 -12
- package/dist/contexts/context.tools.port.d.ts +0 -9
- package/dist/discovery/hyde.documents.d.ts +0 -9
- package/dist/discovery/hyde.documents.js +0 -49
- package/dist/discovery/hyde.env.d.ts +0 -8
- package/dist/discovery/hyde.env.js +0 -9
- package/dist/discovery/hyde.frame.d.ts +0 -150
- package/dist/discovery/hyde.frame.js +0 -107
- package/dist/discovery/hyde.generator.d.ts +0 -38
- package/dist/discovery/hyde.generator.js +0 -103
- package/dist/discovery/hyde.graph.d.ts +0 -209
- package/dist/discovery/hyde.graph.js +0 -482
- package/dist/discovery/hyde.state.d.ts +0 -70
- package/dist/discovery/hyde.state.js +0 -85
- package/dist/discovery/hyde.strategies.d.ts +0 -17
- package/dist/discovery/hyde.strategies.js +0 -34
- package/dist/discovery/hyde.validator.d.ts +0 -78
- package/dist/discovery/hyde.validator.js +0 -48
- package/dist/discovery/index.d.ts +0 -26
- package/dist/discovery/index.js +0 -19
- package/dist/discovery/lens.inferrer.d.ts +0 -214
- package/dist/discovery/lens.inferrer.js +0 -152
- package/dist/enrichment/enrichment.generator.d.ts +0 -68
- package/dist/enrichment/enrichment.generator.js +0 -95
- package/dist/enrichment/enrichment.graph.d.ts +0 -544
- package/dist/enrichment/enrichment.graph.js +0 -695
- package/dist/enrichment/enrichment.state.d.ts +0 -141
- package/dist/enrichment/enrichment.state.js +0 -115
- package/dist/enrichment/enrichment.tools.context-read.d.ts +0 -10
- package/dist/enrichment/enrichment.tools.context-read.js +0 -353
- package/dist/enrichment/enrichment.tools.context-write.d.ts +0 -9
- package/dist/enrichment/enrichment.tools.context-write.js +0 -417
- package/dist/enrichment/enrichment.tools.d.ts +0 -13
- package/dist/enrichment/enrichment.tools.helpers.d.ts +0 -139
- package/dist/enrichment/enrichment.tools.helpers.js +0 -234
- package/dist/enrichment/enrichment.tools.js +0 -153
- package/dist/intents/graph/intent.graph.infer.d.ts +0 -44
- package/dist/intents/graph/intent.graph.infer.js +0 -97
- package/dist/intents/graph/intent.graph.js +0 -134
- package/dist/intents/graph/intent.graph.reconcile.js +0 -274
- package/dist/intents/graph/intent.graph.shared.d.ts +0 -68
- package/dist/intents/intake/intake.orchestrator.d.ts +0 -203
- package/dist/intents/intake/intake.orchestrator.js +0 -255
- package/dist/intents/intake/intake.pack.generator.d.ts +0 -57
- package/dist/intents/intake/intake.pack.generator.js +0 -90
- package/dist/intents/intent.clarifier.d.ts +0 -51
- package/dist/intents/intent.clarifier.js +0 -201
- package/dist/intents/intent.indexer.d.ts +0 -82
- package/dist/intents/intent.indexer.js +0 -170
- package/dist/intents/intent.module.js +0 -103
- package/dist/intents/intent.proposal.d.ts +0 -37
- package/dist/intents/intent.proposal.js +0 -14
- package/dist/intents/intent.reconciler.d.ts +0 -105
- package/dist/intents/intent.reconciler.js +0 -186
- package/dist/intents/intent.tools.d.ts +0 -27
- package/dist/intents/intent.tools.js +0 -808
- package/dist/maintenance/maintenance.graph.d.ts +0 -239
- package/dist/maintenance/maintenance.graph.js +0 -199
- package/dist/maintenance/maintenance.state.d.ts +0 -35
- package/dist/maintenance/maintenance.state.js +0 -55
- package/dist/mcp/elicitation.builder.d.ts +0 -53
- package/dist/mcp/elicitation.builder.js +0 -74
- package/dist/mcp/elicitation.dispatcher.d.ts +0 -36
- package/dist/mcp/elicitation.dispatcher.js +0 -86
- package/dist/mcp/mcp.authorization-policy.d.ts +0 -252
- package/dist/mcp/mcp.authorization-policy.js +0 -535
- package/dist/mcp/mcp.server.d.ts +0 -90
- package/dist/mcp/mcp.server.js +0 -631
- package/dist/negotiations/insight.generator.d.ts +0 -31
- package/dist/negotiations/insight.generator.js +0 -105
- package/dist/negotiations/negotiation.agent.d.ts +0 -130
- package/dist/negotiations/negotiation.agent.js +0 -396
- package/dist/negotiations/negotiation.answer-consumption.d.ts +0 -223
- package/dist/negotiations/negotiation.answer-consumption.js +0 -275
- package/dist/negotiations/negotiation.attribution.d.ts +0 -91
- package/dist/negotiations/negotiation.attribution.js +0 -109
- package/dist/negotiations/negotiation.candidates.d.ts +0 -83
- package/dist/negotiations/negotiation.candidates.js +0 -162
- package/dist/negotiations/negotiation.client-dm.d.ts +0 -50
- package/dist/negotiations/negotiation.client-dm.js +0 -66
- package/dist/negotiations/negotiation.consultation-policy.d.ts +0 -95
- package/dist/negotiations/negotiation.consultation-policy.js +0 -159
- package/dist/negotiations/negotiation.deadlock.contracts.d.ts +0 -10
- package/dist/negotiations/negotiation.deadlock.d.ts +0 -87
- package/dist/negotiations/negotiation.deadlock.js +0 -150
- package/dist/negotiations/negotiation.detail-reader.d.ts +0 -94
- package/dist/negotiations/negotiation.detail-reader.js +0 -91
- package/dist/negotiations/negotiation.expected-speaker.d.ts +0 -33
- package/dist/negotiations/negotiation.expected-speaker.js +0 -59
- package/dist/negotiations/negotiation.graph.d.ts +0 -694
- package/dist/negotiations/negotiation.graph.finalize.d.ts +0 -5
- package/dist/negotiations/negotiation.graph.finalize.js +0 -403
- package/dist/negotiations/negotiation.graph.init.d.ts +0 -54
- package/dist/negotiations/negotiation.graph.init.js +0 -256
- package/dist/negotiations/negotiation.graph.js +0 -94
- package/dist/negotiations/negotiation.graph.screen.d.ts +0 -23
- package/dist/negotiations/negotiation.graph.screen.js +0 -108
- package/dist/negotiations/negotiation.graph.shared.d.ts +0 -111
- package/dist/negotiations/negotiation.graph.shared.js +0 -168
- package/dist/negotiations/negotiation.graph.turn.d.ts +0 -134
- package/dist/negotiations/negotiation.graph.turn.js +0 -662
- package/dist/negotiations/negotiation.hermes-contract.d.ts +0 -31
- package/dist/negotiations/negotiation.hermes-contract.js +0 -72
- package/dist/negotiations/negotiation.intent-snapshot-provenance.d.ts +0 -21
- package/dist/negotiations/negotiation.intent-snapshot-provenance.js +0 -28
- package/dist/negotiations/negotiation.lifecycle-narration.d.ts +0 -18
- package/dist/negotiations/negotiation.lifecycle-narration.js +0 -87
- package/dist/negotiations/negotiation.memory.d.ts +0 -65
- package/dist/negotiations/negotiation.memory.js +0 -83
- package/dist/negotiations/negotiation.module.d.ts +0 -36
- package/dist/negotiations/negotiation.module.js +0 -23
- package/dist/negotiations/negotiation.protocol.d.ts +0 -1018
- package/dist/negotiations/negotiation.protocol.js +0 -224
- package/dist/negotiations/negotiation.question-safety.d.ts +0 -52
- package/dist/negotiations/negotiation.question-safety.js +0 -119
- package/dist/negotiations/negotiation.reflect.d.ts +0 -194
- package/dist/negotiations/negotiation.reflect.js +0 -145
- package/dist/negotiations/negotiation.scope.d.ts +0 -41
- package/dist/negotiations/negotiation.scope.js +0 -39
- package/dist/negotiations/negotiation.screen.contracts.d.ts +0 -88
- package/dist/negotiations/negotiation.screen.contracts.js +0 -58
- package/dist/negotiations/negotiation.screen.d.ts +0 -78
- package/dist/negotiations/negotiation.screen.js +0 -112
- package/dist/negotiations/negotiation.stall-gap.d.ts +0 -83
- package/dist/negotiations/negotiation.stall-gap.js +0 -152
- package/dist/negotiations/negotiation.stance.contracts.d.ts +0 -123
- package/dist/negotiations/negotiation.stance.contracts.js +0 -317
- package/dist/negotiations/negotiation.state.d.ts +0 -597
- package/dist/negotiations/negotiation.state.js +0 -286
- package/dist/negotiations/negotiation.summarizer.d.ts +0 -25
- package/dist/negotiations/negotiation.summarizer.js +0 -101
- package/dist/negotiations/negotiation.task-lock-policy.d.ts +0 -10
- package/dist/negotiations/negotiation.task-lock-policy.js +0 -22
- package/dist/negotiations/negotiation.tools.d.ts +0 -18
- package/dist/negotiations/negotiation.tools.js +0 -842
- package/dist/negotiations/negotiation.tools.port.d.ts +0 -17
- package/dist/negotiations/negotiation.turn-cap.d.ts +0 -9
- package/dist/negotiations/negotiation.turn-cap.js +0 -12
- package/dist/networks/indexer.state.js +0 -112
- package/dist/networks/network.tools.d.ts +0 -36
- package/dist/networks/network.tools.js +0 -594
- package/dist/opportunities/delivery-card.cache.d.ts +0 -25
- package/dist/opportunities/delivery-card.cache.js +0 -43
- package/dist/opportunities/discovery.env.d.ts +0 -20
- package/dist/opportunities/discovery.env.js +0 -109
- package/dist/opportunities/discriminator/discriminator.adjustments.d.ts +0 -90
- package/dist/opportunities/discriminator/discriminator.adjustments.js +0 -141
- package/dist/opportunities/discriminator/discriminator.assigner.d.ts +0 -78
- package/dist/opportunities/discriminator/discriminator.assigner.js +0 -153
- package/dist/opportunities/discriminator/discriminator.env.d.ts +0 -103
- package/dist/opportunities/discriminator/discriminator.env.js +0 -103
- package/dist/opportunities/discriminator/discriminator.miner.d.ts +0 -114
- package/dist/opportunities/discriminator/discriminator.miner.js +0 -228
- package/dist/opportunities/discriminator/discriminator.push.d.ts +0 -13
- package/dist/opportunities/discriminator/discriminator.push.js +0 -19
- package/dist/opportunities/discriminator/discriminator.question.d.ts +0 -58
- package/dist/opportunities/discriminator/discriminator.question.js +0 -155
- package/dist/opportunities/discriminator/discriminator.scorer.d.ts +0 -32
- package/dist/opportunities/discriminator/discriminator.scorer.js +0 -105
- package/dist/opportunities/discriminator/discriminator.shadow.d.ts +0 -32
- package/dist/opportunities/discriminator/discriminator.shadow.js +0 -90
- package/dist/opportunities/discriminator/discriminator.types.d.ts +0 -93
- package/dist/opportunities/discriminator/discriminator.types.js +0 -18
- package/dist/opportunities/negotiation-context.loader.d.ts +0 -59
- package/dist/opportunities/negotiation-context.loader.js +0 -90
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.env.d.ts +0 -43
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.env.js +0 -44
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.extractor.d.ts +0 -24
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.extractor.js +0 -188
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.miner.d.ts +0 -26
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.miner.js +0 -112
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.shadow.d.ts +0 -19
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.shadow.js +0 -61
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.types.d.ts +0 -191
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.types.js +0 -18
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.verifier.d.ts +0 -34
- package/dist/opportunities/negotiation-evidence/negotiation-evidence.verifier.js +0 -91
- package/dist/opportunities/negotiation-summary.builder.d.ts +0 -37
- package/dist/opportunities/negotiation-summary.builder.js +0 -66
- package/dist/opportunities/opportunity.discovery-negotiation-summary.d.ts +0 -14
- package/dist/opportunities/opportunity.discovery-negotiation-summary.js +0 -46
- package/dist/opportunities/opportunity.enricher.d.ts +0 -71
- package/dist/opportunities/opportunity.enricher.js +0 -280
- package/dist/opportunities/opportunity.evaluator.d.ts +0 -289
- package/dist/opportunities/opportunity.evaluator.js +0 -516
- package/dist/opportunities/opportunity.evidence.d.ts +0 -22
- package/dist/opportunities/opportunity.evidence.js +0 -87
- package/dist/opportunities/opportunity.existing-negotiation.d.ts +0 -79
- package/dist/opportunities/opportunity.existing-negotiation.js +0 -118
- package/dist/opportunities/opportunity.feed-selection.js +0 -96
- package/dist/opportunities/opportunity.graph.d.ts +0 -1611
- package/dist/opportunities/opportunity.graph.discovery-strategies.d.ts +0 -109
- package/dist/opportunities/opportunity.graph.discovery-strategies.js +0 -451
- package/dist/opportunities/opportunity.graph.discovery.d.ts +0 -69
- package/dist/opportunities/opportunity.graph.discovery.js +0 -397
- package/dist/opportunities/opportunity.graph.evaluation.d.ts +0 -82
- package/dist/opportunities/opportunity.graph.evaluation.js +0 -608
- package/dist/opportunities/opportunity.graph.js +0 -193
- package/dist/opportunities/opportunity.graph.modes.d.ts +0 -538
- package/dist/opportunities/opportunity.graph.modes.js +0 -538
- package/dist/opportunities/opportunity.graph.negotiate.d.ts +0 -109
- package/dist/opportunities/opportunity.graph.negotiate.js +0 -392
- package/dist/opportunities/opportunity.graph.persist-node.d.ts +0 -93
- package/dist/opportunities/opportunity.graph.persist-node.js +0 -765
- package/dist/opportunities/opportunity.graph.prep.d.ts +0 -150
- package/dist/opportunities/opportunity.graph.prep.js +0 -381
- package/dist/opportunities/opportunity.graph.shared.d.ts +0 -173
- package/dist/opportunities/opportunity.graph.shared.js +0 -199
- package/dist/opportunities/opportunity.introducer-feature.d.ts +0 -2
- package/dist/opportunities/opportunity.introducer-feature.js +0 -4
- package/dist/opportunities/opportunity.introducer.d.ts +0 -77
- package/dist/opportunities/opportunity.introducer.js +0 -99
- package/dist/opportunities/opportunity.labels.js +0 -10
- package/dist/opportunities/opportunity.lifecycle.d.ts +0 -63
- package/dist/opportunities/opportunity.lifecycle.js +0 -181
- package/dist/opportunities/opportunity.module.d.ts +0 -54
- package/dist/opportunities/opportunity.module.js +0 -39
- package/dist/opportunities/opportunity.newborn-stamping.d.ts +0 -41
- package/dist/opportunities/opportunity.newborn-stamping.js +0 -81
- package/dist/opportunities/opportunity.owner-approval.d.ts +0 -118
- package/dist/opportunities/opportunity.owner-approval.js +0 -34
- package/dist/opportunities/opportunity.owner-provenance.d.ts +0 -6
- package/dist/opportunities/opportunity.owner-provenance.js +0 -28
- package/dist/opportunities/opportunity.persist.d.ts +0 -58
- package/dist/opportunities/opportunity.persist.js +0 -145
- package/dist/opportunities/opportunity.persistence-admission.d.ts +0 -39
- package/dist/opportunities/opportunity.persistence-admission.js +0 -59
- package/dist/opportunities/opportunity.state.d.ts +0 -451
- package/dist/opportunities/opportunity.state.js +0 -256
- package/dist/opportunities/opportunity.tools.cards.d.ts +0 -138
- package/dist/opportunities/opportunity.tools.cards.js +0 -212
- package/dist/opportunities/opportunity.tools.d.ts +0 -12
- package/dist/opportunities/opportunity.tools.js +0 -236
- package/dist/opportunities/opportunity.tools.list.d.ts +0 -10
- package/dist/opportunities/opportunity.tools.list.js +0 -489
- package/dist/opportunities/opportunity.tools.port.d.ts +0 -16
- package/dist/opportunities/opportunity.utils.d.ts +0 -217
- package/dist/opportunities/opportunity.utils.js +0 -395
- package/dist/opportunities/outcome/outcome.env.d.ts +0 -60
- package/dist/opportunities/outcome/outcome.env.js +0 -63
- package/dist/opportunities/outcome/outcome.hypotheses.d.ts +0 -29
- package/dist/opportunities/outcome/outcome.hypotheses.js +0 -117
- package/dist/opportunities/outcome/outcome.shadow.d.ts +0 -56
- package/dist/opportunities/outcome/outcome.shadow.js +0 -87
- package/dist/opportunities/outcome/outcome.types.d.ts +0 -110
- package/dist/opportunities/outcome/outcome.types.js +0 -26
- package/dist/opportunities/radar/radar.health.d.ts +0 -31
- package/dist/opportunities/radar/radar.health.js +0 -75
- package/dist/premises/premise.analyzer.d.ts +0 -35
- package/dist/premises/premise.analyzer.js +0 -115
- package/dist/premises/premise.decomposer.d.ts +0 -69
- package/dist/premises/premise.decomposer.js +0 -213
- package/dist/premises/premise.graph.d.ts +0 -345
- package/dist/premises/premise.graph.js +0 -278
- package/dist/premises/premise.indexer.d.ts +0 -35
- package/dist/premises/premise.indexer.js +0 -86
- package/dist/premises/premise.state.d.ts +0 -67
- package/dist/premises/premise.state.js +0 -94
- package/dist/premises/premise.tools.d.ts +0 -3
- package/dist/premises/premise.tools.js +0 -248
- package/dist/questions/question.env.d.ts +0 -27
- package/dist/questions/question.env.js +0 -27
- package/dist/questions/question.input.d.ts +0 -107
- package/dist/questions/question.module.d.ts +0 -30
- package/dist/questions/question.module.js +0 -28
- package/dist/questions/question.schema.d.ts +0 -1529
- package/dist/questions/question.schema.js +0 -420
- package/dist/shared/agent/activity-projection.d.ts +0 -271
- package/dist/shared/agent/activity-projection.js +0 -254
- package/dist/shared/agent/canonical-guidance.d.ts +0 -30
- package/dist/shared/agent/canonical-guidance.js +0 -246
- package/dist/shared/agent/model.resolver.d.ts +0 -48
- package/dist/shared/agent/tool.factory.d.ts +0 -17
- package/dist/shared/agent/tool.factory.js +0 -221
- package/dist/shared/agent/tool.helpers.d.ts +0 -482
- package/dist/shared/agent/tool.helpers.js +0 -232
- package/dist/shared/agent/tool.registry.d.ts +0 -25
- package/dist/shared/agent/tool.registry.js +0 -76
- package/dist/shared/agent/tool.runtime.d.ts +0 -28
- package/dist/shared/agent/tool.runtime.js +0 -194
- package/dist/shared/agent/tool.scope.d.ts +0 -44
- package/dist/shared/agent/tool.scope.js +0 -50
- package/dist/shared/agent/utility.tools.d.ts +0 -15
- package/dist/shared/agent/utility.tools.js +0 -322
- package/dist/shared/assignment/network-assignment.policy.d.ts +0 -61
- package/dist/shared/assignment/network-assignment.policy.js +0 -105
- package/dist/shared/interfaces/agent-dispatcher.interface.d.ts +0 -100
- package/dist/shared/interfaces/agent-dispatcher.interface.js +0 -12
- package/dist/shared/interfaces/auth.interface.d.ts +0 -37
- package/dist/shared/interfaces/auth.interface.js +0 -1
- package/dist/shared/interfaces/chat-message-writer.interface.d.ts +0 -18
- package/dist/shared/interfaces/chat-message-writer.interface.js +0 -1
- package/dist/shared/interfaces/chat-session.interface.d.ts +0 -23
- package/dist/shared/interfaces/chat-session.interface.js +0 -18
- package/dist/shared/interfaces/chat-summary.interface.d.ts +0 -16
- package/dist/shared/interfaces/chat-summary.interface.js +0 -1
- package/dist/shared/interfaces/database.capabilities.d.ts +0 -100
- package/dist/shared/interfaces/database.interface.d.ts +0 -16
- package/dist/shared/interfaces/database.member-queries.d.ts +0 -219
- package/dist/shared/interfaces/database.member-queries.js +0 -4
- package/dist/shared/interfaces/database.negotiation.d.ts +0 -329
- package/dist/shared/interfaces/database.negotiation.js +0 -26
- package/dist/shared/interfaces/database.network-queries.js +0 -4
- package/dist/shared/interfaces/database.opportunity-queries.js +0 -4
- package/dist/shared/interfaces/delivery-ledger.interface.d.ts +0 -40
- package/dist/shared/interfaces/delivery-ledger.interface.js +0 -5
- package/dist/shared/interfaces/embedder.interface.d.ts +0 -92
- package/dist/shared/interfaces/embedder.interface.js +0 -4
- package/dist/shared/interfaces/enrichment-run.interface.d.ts +0 -62
- package/dist/shared/interfaces/enrichment-run.interface.js +0 -1
- package/dist/shared/interfaces/enrichment.interface.js +0 -1
- package/dist/shared/interfaces/negotiation-events.interface.d.ts +0 -77
- package/dist/shared/interfaces/negotiation-events.interface.js +0 -6
- package/dist/shared/interfaces/negotiation-summary.interface.d.ts +0 -25
- package/dist/shared/interfaces/negotiation-summary.interface.js +0 -1
- package/dist/shared/interfaces/negotiator-memory.interface.d.ts +0 -58
- package/dist/shared/interfaces/negotiator-memory.interface.js +0 -11
- package/dist/shared/interfaces/queue.interface.d.ts +0 -23
- package/dist/shared/interfaces/queue.interface.js +0 -4
- package/dist/shared/interfaces/scraper.interface.js +0 -1
- package/dist/shared/interfaces/tool-request-context.interface.d.ts +0 -11
- package/dist/shared/interfaces/tool-request-context.interface.js +0 -1
- package/dist/shared/observability/request-context.d.ts +0 -27
- package/dist/shared/observability/request-context.js +0 -6
- package/dist/shared/schemas/mcp-auth.schema.d.ts +0 -87
- package/dist/shared/schemas/mcp-auth.schema.js +0 -56
- package/dist/shared/schemas/negotiation-digest.schema.d.ts +0 -58
- package/dist/shared/schemas/negotiation-digest.schema.js +0 -38
- package/dist/shared/schemas/negotiation-state.schema.d.ts +0 -343
- package/dist/shared/schemas/negotiation-state.schema.js +0 -81
- package/dist/shared/schemas/question-block.fixture.d.ts +0 -12
- package/dist/shared/schemas/question-block.fixture.js +0 -39
- package/dist/shared/schemas/question-block.schema.d.ts +0 -111
- package/dist/shared/schemas/question-block.schema.js +0 -124
- package/dist/shared/schemas/structured-question.schema.d.ts +0 -66
- package/dist/shared/schemas/structured-question.schema.js +0 -31
- package/dist/shared/schemas/underspecification.schema.d.ts +0 -13
- package/dist/shared/schemas/underspecification.schema.js +0 -16
- /package/dist/{opportunities → internal/opportunities}/opportunity.update-admission.js +0 -0
- /package/dist/{opportunities → internal/opportunities}/radar/radar.state.js +0 -0
- /package/dist/{shared → internal/shared}/network/metadata.renderer.d.ts +0 -0
- /package/dist/{shared → internal/shared}/network/metadata.renderer.js +0 -0
- /package/dist/{shared → internal/shared}/observability/debug-meta.sanitizer.d.ts +0 -0
- /package/dist/{shared → internal/shared}/observability/debug-meta.sanitizer.js +0 -0
- /package/dist/{shared → internal/shared}/observability/performance.d.ts +0 -0
- /package/dist/{shared → internal/shared}/observability/performance.js +0 -0
- /package/dist/{shared → internal/shared}/observability/trace.d.ts +0 -0
- /package/dist/{shared → internal/shared}/observability/trace.js +0 -0
- /package/dist/{shared → internal/shared}/utils/claim-safety.d.ts +0 -0
- /package/dist/{shared → internal/shared}/utils/claim-safety.js +0 -0
- /package/dist/{shared → internal/shared}/utils/telegram-handle.d.ts +0 -0
- /package/dist/{shared → internal/shared}/utils/telegram-handle.js +0 -0
- /package/dist/{shared/interfaces/database.capabilities.js → platform/database/capabilities.js} +0 -0
- /package/dist/{shared/interfaces/database.entities.js → platform/database/entities.js} +0 -0
- /package/dist/{shared/interfaces/database.identity-queries.js → platform/database/identity-queries.js} +0 -0
- /package/dist/{agents/agent.dispatcher.port.js → platform/database/negotiation.js} +0 -0
- /package/dist/{chat/chat.persona.js → platform/database/opportunity-queries.js} +0 -0
- /package/dist/{contexts/context.tools.port.js → platform/discovery/embedder.js} +0 -0
- /package/dist/{shared/interfaces/scraper.interface.d.ts → platform/discovery/scraper.d.ts} +0 -0
- /package/dist/{negotiations/negotiation.deadlock.contracts.js → platform/discovery/scraper.js} +0 -0
- /package/dist/{shared/interfaces/enrichment.interface.d.ts → platform/enrichment/ports.d.ts} +0 -0
- /package/dist/{negotiations/negotiation.tools.port.js → platform/enrichment/ports.js} +0 -0
- /package/dist/{opportunities/opportunity.tools.port.js → platform/runtime/observability.js} +0 -0
- /package/dist/{questions/question.input.js → protocol/core.js} +0 -0
- /package/dist/{shared → protocol}/schemas/chat-context.schema.d.ts +0 -0
- /package/dist/{shared → protocol}/schemas/chat-context.schema.js +0 -0
|
@@ -1,1529 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* questions/question.schema — canonical home for question value types and schemas.
|
|
3
|
-
*
|
|
4
|
-
* Defines the public structured shape consumed by frontend renderers and MCP
|
|
5
|
-
* elicitation dispatch, plus internal generator, persistence, and delivery
|
|
6
|
-
* envelopes used across the questions capability.
|
|
7
|
-
*/
|
|
8
|
-
import { z } from "zod";
|
|
9
|
-
import { UnderspecificationTypeSchema, type UnderspecificationType } from "../shared/schemas/underspecification.schema.js";
|
|
10
|
-
import { QuestionOptionSchema, StructuredQuestionSchema, type QuestionOption } from "../shared/schemas/structured-question.schema.js";
|
|
11
|
-
export { UnderspecificationTypeSchema };
|
|
12
|
-
/**
|
|
13
|
-
* The renderer-facing quartet (title/prompt/options/multiSelect) lives in
|
|
14
|
-
* `shared/schemas/structured-question.schema.ts` so the negotiator can author a
|
|
15
|
-
* question without `shared/` importing this capability. Re-exported here so
|
|
16
|
-
* `questions/question.schema.js` stays the import site every caller already uses.
|
|
17
|
-
*/
|
|
18
|
-
export { QuestionOptionSchema, StructuredQuestionSchema };
|
|
19
|
-
export type { StructuredQuestion } from "../shared/schemas/structured-question.schema.js";
|
|
20
|
-
export declare const QuestionSchema: z.ZodObject<{
|
|
21
|
-
title: z.ZodString;
|
|
22
|
-
prompt: z.ZodString;
|
|
23
|
-
options: z.ZodArray<z.ZodObject<{
|
|
24
|
-
label: z.ZodString;
|
|
25
|
-
description: z.ZodString;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
label: string;
|
|
28
|
-
description: string;
|
|
29
|
-
}, {
|
|
30
|
-
label: string;
|
|
31
|
-
description: string;
|
|
32
|
-
}>, "many">;
|
|
33
|
-
multiSelect: z.ZodBoolean;
|
|
34
|
-
} & {
|
|
35
|
-
/**
|
|
36
|
-
* Optional provenance line rendered as a muted chip above the prompt
|
|
37
|
-
* (e.g. "based on 18 people matching this intent"). Aggregate counts only —
|
|
38
|
-
* never individual identities (pool_discovery k-anonymity invariant).
|
|
39
|
-
*
|
|
40
|
-
* Declared `.nullable().optional()` (not bare `.optional()`) so the schema
|
|
41
|
-
* survives OpenAI/OpenRouter strict structured-output conversion, which
|
|
42
|
-
* rejects optional-without-nullable fields (see createStructuredModel in the
|
|
43
|
-
* questioner agent). The `.transform()` normalizes an LLM-returned `null`
|
|
44
|
-
* back to `undefined` so a null is NEVER persisted or treated as
|
|
45
|
-
* "evidence present": real string evidence flows through unchanged, while
|
|
46
|
-
* both `null` and omitted read as absent everywhere downstream
|
|
47
|
-
* (e.g. the intent-recovery `!question.evidence` selection filter and the
|
|
48
|
-
* pool_discovery provenance chip).
|
|
49
|
-
*/
|
|
50
|
-
evidence: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
51
|
-
}, "strip", z.ZodTypeAny, {
|
|
52
|
-
prompt: string;
|
|
53
|
-
options: {
|
|
54
|
-
label: string;
|
|
55
|
-
description: string;
|
|
56
|
-
}[];
|
|
57
|
-
title: string;
|
|
58
|
-
multiSelect: boolean;
|
|
59
|
-
evidence?: string | undefined;
|
|
60
|
-
}, {
|
|
61
|
-
prompt: string;
|
|
62
|
-
options: {
|
|
63
|
-
label: string;
|
|
64
|
-
description: string;
|
|
65
|
-
}[];
|
|
66
|
-
title: string;
|
|
67
|
-
multiSelect: boolean;
|
|
68
|
-
evidence?: string | null | undefined;
|
|
69
|
-
}>;
|
|
70
|
-
export declare const QuestionStrategySchema: z.ZodEnum<["refine_intent", "surface_missing_detail", "open_adjacent_thread", "reflective_summary", "surface_emergent_knowledge"]>;
|
|
71
|
-
export declare const QuestionWithStrategySchema: z.ZodObject<{
|
|
72
|
-
title: z.ZodString;
|
|
73
|
-
prompt: z.ZodString;
|
|
74
|
-
options: z.ZodArray<z.ZodObject<{
|
|
75
|
-
label: z.ZodString;
|
|
76
|
-
description: z.ZodString;
|
|
77
|
-
}, "strip", z.ZodTypeAny, {
|
|
78
|
-
label: string;
|
|
79
|
-
description: string;
|
|
80
|
-
}, {
|
|
81
|
-
label: string;
|
|
82
|
-
description: string;
|
|
83
|
-
}>, "many">;
|
|
84
|
-
multiSelect: z.ZodBoolean;
|
|
85
|
-
} & {
|
|
86
|
-
/**
|
|
87
|
-
* Optional provenance line rendered as a muted chip above the prompt
|
|
88
|
-
* (e.g. "based on 18 people matching this intent"). Aggregate counts only —
|
|
89
|
-
* never individual identities (pool_discovery k-anonymity invariant).
|
|
90
|
-
*
|
|
91
|
-
* Declared `.nullable().optional()` (not bare `.optional()`) so the schema
|
|
92
|
-
* survives OpenAI/OpenRouter strict structured-output conversion, which
|
|
93
|
-
* rejects optional-without-nullable fields (see createStructuredModel in the
|
|
94
|
-
* questioner agent). The `.transform()` normalizes an LLM-returned `null`
|
|
95
|
-
* back to `undefined` so a null is NEVER persisted or treated as
|
|
96
|
-
* "evidence present": real string evidence flows through unchanged, while
|
|
97
|
-
* both `null` and omitted read as absent everywhere downstream
|
|
98
|
-
* (e.g. the intent-recovery `!question.evidence` selection filter and the
|
|
99
|
-
* pool_discovery provenance chip).
|
|
100
|
-
*/
|
|
101
|
-
evidence: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
102
|
-
} & {
|
|
103
|
-
strategy: z.ZodEnum<["refine_intent", "surface_missing_detail", "open_adjacent_thread", "reflective_summary", "surface_emergent_knowledge"]>;
|
|
104
|
-
/** QUD repair category, or null when the question is not an underspecification repair. */
|
|
105
|
-
underspecificationType: z.ZodNullable<z.ZodEnum<["missing_constituent", "missing_constraint", "open_alternative_set"]>>;
|
|
106
|
-
}, "strip", z.ZodTypeAny, {
|
|
107
|
-
prompt: string;
|
|
108
|
-
options: {
|
|
109
|
-
label: string;
|
|
110
|
-
description: string;
|
|
111
|
-
}[];
|
|
112
|
-
title: string;
|
|
113
|
-
multiSelect: boolean;
|
|
114
|
-
strategy: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge";
|
|
115
|
-
underspecificationType: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null;
|
|
116
|
-
evidence?: string | undefined;
|
|
117
|
-
}, {
|
|
118
|
-
prompt: string;
|
|
119
|
-
options: {
|
|
120
|
-
label: string;
|
|
121
|
-
description: string;
|
|
122
|
-
}[];
|
|
123
|
-
title: string;
|
|
124
|
-
multiSelect: boolean;
|
|
125
|
-
strategy: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge";
|
|
126
|
-
underspecificationType: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null;
|
|
127
|
-
evidence?: string | null | undefined;
|
|
128
|
-
}>;
|
|
129
|
-
export declare const QuestionGeneratorResponseSchema: z.ZodObject<{
|
|
130
|
-
questions: z.ZodArray<z.ZodObject<{
|
|
131
|
-
title: z.ZodString;
|
|
132
|
-
prompt: z.ZodString;
|
|
133
|
-
options: z.ZodArray<z.ZodObject<{
|
|
134
|
-
label: z.ZodString;
|
|
135
|
-
description: z.ZodString;
|
|
136
|
-
}, "strip", z.ZodTypeAny, {
|
|
137
|
-
label: string;
|
|
138
|
-
description: string;
|
|
139
|
-
}, {
|
|
140
|
-
label: string;
|
|
141
|
-
description: string;
|
|
142
|
-
}>, "many">;
|
|
143
|
-
multiSelect: z.ZodBoolean;
|
|
144
|
-
} & {
|
|
145
|
-
/**
|
|
146
|
-
* Optional provenance line rendered as a muted chip above the prompt
|
|
147
|
-
* (e.g. "based on 18 people matching this intent"). Aggregate counts only —
|
|
148
|
-
* never individual identities (pool_discovery k-anonymity invariant).
|
|
149
|
-
*
|
|
150
|
-
* Declared `.nullable().optional()` (not bare `.optional()`) so the schema
|
|
151
|
-
* survives OpenAI/OpenRouter strict structured-output conversion, which
|
|
152
|
-
* rejects optional-without-nullable fields (see createStructuredModel in the
|
|
153
|
-
* questioner agent). The `.transform()` normalizes an LLM-returned `null`
|
|
154
|
-
* back to `undefined` so a null is NEVER persisted or treated as
|
|
155
|
-
* "evidence present": real string evidence flows through unchanged, while
|
|
156
|
-
* both `null` and omitted read as absent everywhere downstream
|
|
157
|
-
* (e.g. the intent-recovery `!question.evidence` selection filter and the
|
|
158
|
-
* pool_discovery provenance chip).
|
|
159
|
-
*/
|
|
160
|
-
evidence: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
161
|
-
} & {
|
|
162
|
-
strategy: z.ZodEnum<["refine_intent", "surface_missing_detail", "open_adjacent_thread", "reflective_summary", "surface_emergent_knowledge"]>;
|
|
163
|
-
/** QUD repair category, or null when the question is not an underspecification repair. */
|
|
164
|
-
underspecificationType: z.ZodNullable<z.ZodEnum<["missing_constituent", "missing_constraint", "open_alternative_set"]>>;
|
|
165
|
-
}, "strip", z.ZodTypeAny, {
|
|
166
|
-
prompt: string;
|
|
167
|
-
options: {
|
|
168
|
-
label: string;
|
|
169
|
-
description: string;
|
|
170
|
-
}[];
|
|
171
|
-
title: string;
|
|
172
|
-
multiSelect: boolean;
|
|
173
|
-
strategy: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge";
|
|
174
|
-
underspecificationType: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null;
|
|
175
|
-
evidence?: string | undefined;
|
|
176
|
-
}, {
|
|
177
|
-
prompt: string;
|
|
178
|
-
options: {
|
|
179
|
-
label: string;
|
|
180
|
-
description: string;
|
|
181
|
-
}[];
|
|
182
|
-
title: string;
|
|
183
|
-
multiSelect: boolean;
|
|
184
|
-
strategy: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge";
|
|
185
|
-
underspecificationType: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null;
|
|
186
|
-
evidence?: string | null | undefined;
|
|
187
|
-
}>, "many">;
|
|
188
|
-
}, "strip", z.ZodTypeAny, {
|
|
189
|
-
questions: {
|
|
190
|
-
prompt: string;
|
|
191
|
-
options: {
|
|
192
|
-
label: string;
|
|
193
|
-
description: string;
|
|
194
|
-
}[];
|
|
195
|
-
title: string;
|
|
196
|
-
multiSelect: boolean;
|
|
197
|
-
strategy: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge";
|
|
198
|
-
underspecificationType: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null;
|
|
199
|
-
evidence?: string | undefined;
|
|
200
|
-
}[];
|
|
201
|
-
}, {
|
|
202
|
-
questions: {
|
|
203
|
-
prompt: string;
|
|
204
|
-
options: {
|
|
205
|
-
label: string;
|
|
206
|
-
description: string;
|
|
207
|
-
}[];
|
|
208
|
-
title: string;
|
|
209
|
-
multiSelect: boolean;
|
|
210
|
-
strategy: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge";
|
|
211
|
-
underspecificationType: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null;
|
|
212
|
-
evidence?: string | null | undefined;
|
|
213
|
-
}[];
|
|
214
|
-
}>;
|
|
215
|
-
export type { QuestionOption };
|
|
216
|
-
export type Question = z.infer<typeof QuestionSchema>;
|
|
217
|
-
export type { UnderspecificationType };
|
|
218
|
-
export type QuestionStrategy = z.infer<typeof QuestionStrategySchema>;
|
|
219
|
-
export type QuestionWithStrategy = z.infer<typeof QuestionWithStrategySchema>;
|
|
220
|
-
export type QuestionGeneratorResponse = z.infer<typeof QuestionGeneratorResponseSchema>;
|
|
221
|
-
/**
|
|
222
|
-
* Internal generator output: public questions plus parallel strategy and QUD
|
|
223
|
-
* taxonomy arrays for metadata-only consumption. The generator emits this;
|
|
224
|
-
* callers forward only `questions` to renderers.
|
|
225
|
-
*/
|
|
226
|
-
export interface QuestionGenerationResult {
|
|
227
|
-
questions: Question[];
|
|
228
|
-
strategies: QuestionStrategy[];
|
|
229
|
-
underspecificationTypes: Array<UnderspecificationType | null>;
|
|
230
|
-
}
|
|
231
|
-
/** Internal reason a question was generated, orthogonal to mode and QUD metadata. */
|
|
232
|
-
export declare const NegotiationQuestionPurposeSchema: z.ZodEnum<["uptake", "stalled_followup", "inflight_consultation"]>;
|
|
233
|
-
export declare const QuestionPurposeSchema: z.ZodEnum<["uptake", "recovery", "stalled_followup", "inflight_consultation"]>;
|
|
234
|
-
/**
|
|
235
|
-
* Producer-supplied candidate binding. The API re-resolves every field from
|
|
236
|
-
* authoritative rows before generation; callers cannot mint provenance.
|
|
237
|
-
*/
|
|
238
|
-
export declare const NegotiationQuestionCandidateSchema: z.ZodEffects<z.ZodObject<{
|
|
239
|
-
readonly purpose: z.ZodEnum<["uptake", "stalled_followup", "inflight_consultation"]>;
|
|
240
|
-
readonly recipientUserId: z.ZodString;
|
|
241
|
-
readonly recipientIntentId: z.ZodString;
|
|
242
|
-
readonly opportunityId: z.ZodString;
|
|
243
|
-
readonly taskId: z.ZodOptional<z.ZodString>;
|
|
244
|
-
readonly networkId: z.ZodString;
|
|
245
|
-
/** Uptake only: exact low-authority counterparty eligibility binding. */
|
|
246
|
-
readonly counterpartyUserId: z.ZodOptional<z.ZodString>;
|
|
247
|
-
readonly counterpartyIntentId: z.ZodOptional<z.ZodString>;
|
|
248
|
-
readonly counterpartyFelicityAuthority: z.ZodOptional<z.ZodNumber>;
|
|
249
|
-
}, "strip", z.ZodTypeAny, {
|
|
250
|
-
networkId: string;
|
|
251
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
252
|
-
recipientUserId: string;
|
|
253
|
-
recipientIntentId: string;
|
|
254
|
-
opportunityId: string;
|
|
255
|
-
counterpartyUserId?: string | undefined;
|
|
256
|
-
taskId?: string | undefined;
|
|
257
|
-
counterpartyIntentId?: string | undefined;
|
|
258
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
259
|
-
}, {
|
|
260
|
-
networkId: string;
|
|
261
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
262
|
-
recipientUserId: string;
|
|
263
|
-
recipientIntentId: string;
|
|
264
|
-
opportunityId: string;
|
|
265
|
-
counterpartyUserId?: string | undefined;
|
|
266
|
-
taskId?: string | undefined;
|
|
267
|
-
counterpartyIntentId?: string | undefined;
|
|
268
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
269
|
-
}>, {
|
|
270
|
-
networkId: string;
|
|
271
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
272
|
-
recipientUserId: string;
|
|
273
|
-
recipientIntentId: string;
|
|
274
|
-
opportunityId: string;
|
|
275
|
-
counterpartyUserId?: string | undefined;
|
|
276
|
-
taskId?: string | undefined;
|
|
277
|
-
counterpartyIntentId?: string | undefined;
|
|
278
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
279
|
-
}, {
|
|
280
|
-
networkId: string;
|
|
281
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
282
|
-
recipientUserId: string;
|
|
283
|
-
recipientIntentId: string;
|
|
284
|
-
opportunityId: string;
|
|
285
|
-
counterpartyUserId?: string | undefined;
|
|
286
|
-
taskId?: string | undefined;
|
|
287
|
-
counterpartyIntentId?: string | undefined;
|
|
288
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
289
|
-
}>;
|
|
290
|
-
/**
|
|
291
|
-
* Durable server-only routing and freshness envelope for negotiation-family
|
|
292
|
-
* questions. This object is stripped from every REST/MCP projection.
|
|
293
|
-
*/
|
|
294
|
-
export declare const NegotiationQuestionProvenanceSchema: z.ZodEffects<z.ZodObject<{
|
|
295
|
-
intentFingerprint: z.ZodString;
|
|
296
|
-
opportunityStatus: z.ZodEnum<["latent", "draft", "negotiating", "pending", "stalled", "accepted", "rejected", "expired"]>;
|
|
297
|
-
opportunityUpdatedAt: z.ZodString;
|
|
298
|
-
taskState: z.ZodOptional<z.ZodEnum<["submitted", "working", "input_required", "completed", "canceled", "failed", "rejected", "auth_required", "waiting_for_agent", "claimed"]>>;
|
|
299
|
-
taskUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
300
|
-
/** Stable per-generation position so retries dedupe without reducing cardinality. */
|
|
301
|
-
questionOrdinal: z.ZodNumber;
|
|
302
|
-
purpose: z.ZodEnum<["uptake", "stalled_followup", "inflight_consultation"]>;
|
|
303
|
-
recipientUserId: z.ZodString;
|
|
304
|
-
recipientIntentId: z.ZodString;
|
|
305
|
-
opportunityId: z.ZodString;
|
|
306
|
-
taskId: z.ZodOptional<z.ZodString>;
|
|
307
|
-
networkId: z.ZodString;
|
|
308
|
-
counterpartyUserId: z.ZodOptional<z.ZodString>;
|
|
309
|
-
counterpartyIntentId: z.ZodOptional<z.ZodString>;
|
|
310
|
-
counterpartyFelicityAuthority: z.ZodOptional<z.ZodNumber>;
|
|
311
|
-
version: z.ZodLiteral<1>;
|
|
312
|
-
}, "strip", z.ZodTypeAny, {
|
|
313
|
-
networkId: string;
|
|
314
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
315
|
-
recipientUserId: string;
|
|
316
|
-
recipientIntentId: string;
|
|
317
|
-
opportunityId: string;
|
|
318
|
-
version: 1;
|
|
319
|
-
intentFingerprint: string;
|
|
320
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
321
|
-
opportunityUpdatedAt: string;
|
|
322
|
-
questionOrdinal: number;
|
|
323
|
-
counterpartyUserId?: string | undefined;
|
|
324
|
-
taskId?: string | undefined;
|
|
325
|
-
counterpartyIntentId?: string | undefined;
|
|
326
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
327
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
328
|
-
taskUpdatedAt?: string | undefined;
|
|
329
|
-
}, {
|
|
330
|
-
networkId: string;
|
|
331
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
332
|
-
recipientUserId: string;
|
|
333
|
-
recipientIntentId: string;
|
|
334
|
-
opportunityId: string;
|
|
335
|
-
version: 1;
|
|
336
|
-
intentFingerprint: string;
|
|
337
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
338
|
-
opportunityUpdatedAt: string;
|
|
339
|
-
questionOrdinal: number;
|
|
340
|
-
counterpartyUserId?: string | undefined;
|
|
341
|
-
taskId?: string | undefined;
|
|
342
|
-
counterpartyIntentId?: string | undefined;
|
|
343
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
344
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
345
|
-
taskUpdatedAt?: string | undefined;
|
|
346
|
-
}>, {
|
|
347
|
-
networkId: string;
|
|
348
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
349
|
-
recipientUserId: string;
|
|
350
|
-
recipientIntentId: string;
|
|
351
|
-
opportunityId: string;
|
|
352
|
-
version: 1;
|
|
353
|
-
intentFingerprint: string;
|
|
354
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
355
|
-
opportunityUpdatedAt: string;
|
|
356
|
-
questionOrdinal: number;
|
|
357
|
-
counterpartyUserId?: string | undefined;
|
|
358
|
-
taskId?: string | undefined;
|
|
359
|
-
counterpartyIntentId?: string | undefined;
|
|
360
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
361
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
362
|
-
taskUpdatedAt?: string | undefined;
|
|
363
|
-
}, {
|
|
364
|
-
networkId: string;
|
|
365
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
366
|
-
recipientUserId: string;
|
|
367
|
-
recipientIntentId: string;
|
|
368
|
-
opportunityId: string;
|
|
369
|
-
version: 1;
|
|
370
|
-
intentFingerprint: string;
|
|
371
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
372
|
-
opportunityUpdatedAt: string;
|
|
373
|
-
questionOrdinal: number;
|
|
374
|
-
counterpartyUserId?: string | undefined;
|
|
375
|
-
taskId?: string | undefined;
|
|
376
|
-
counterpartyIntentId?: string | undefined;
|
|
377
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
378
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
379
|
-
taskUpdatedAt?: string | undefined;
|
|
380
|
-
}>;
|
|
381
|
-
export declare const QuestionModeSchema: z.ZodEnum<["intent", "negotiation", "negotiation_inflight", "chat", "pool_discovery"]>;
|
|
382
|
-
/** One server-side candidate→side assignment (never serialized to clients). */
|
|
383
|
-
export declare const QuestionPoolAssignmentSchema: z.ZodObject<{
|
|
384
|
-
opportunityId: z.ZodString;
|
|
385
|
-
side: z.ZodString;
|
|
386
|
-
}, "strip", z.ZodTypeAny, {
|
|
387
|
-
opportunityId: string;
|
|
388
|
-
side: string;
|
|
389
|
-
}, {
|
|
390
|
-
opportunityId: string;
|
|
391
|
-
side: string;
|
|
392
|
-
}>;
|
|
393
|
-
/**
|
|
394
|
-
* One mined discriminator carried inside a pool_discovery question's
|
|
395
|
-
* detection (the asked one plus ranked alternates for interview-mode
|
|
396
|
-
* chaining). INTERNAL — the read path strips `detection.pool` before any
|
|
397
|
-
* payload leaves the server.
|
|
398
|
-
*/
|
|
399
|
-
export declare const QuestionPoolDiscriminatorSchema: z.ZodObject<{
|
|
400
|
-
label: z.ZodString;
|
|
401
|
-
questionSeed: z.ZodString;
|
|
402
|
-
sides: z.ZodArray<z.ZodString, "many">;
|
|
403
|
-
/** Verified-assignment count per side label. */
|
|
404
|
-
sideCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
405
|
-
voi: z.ZodNumber;
|
|
406
|
-
evidenceRate: z.ZodNumber;
|
|
407
|
-
/** Discriminator embedding retained for durable semantic novelty checks. */
|
|
408
|
-
embedding: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
409
|
-
/** Model that generated `embedding`; mismatches must fall back to text. */
|
|
410
|
-
embeddingModel: z.ZodOptional<z.ZodString>;
|
|
411
|
-
/** Verified assignments only — the P3 re-rank input. */
|
|
412
|
-
assignments: z.ZodArray<z.ZodObject<{
|
|
413
|
-
opportunityId: z.ZodString;
|
|
414
|
-
side: z.ZodString;
|
|
415
|
-
}, "strip", z.ZodTypeAny, {
|
|
416
|
-
opportunityId: string;
|
|
417
|
-
side: string;
|
|
418
|
-
}, {
|
|
419
|
-
opportunityId: string;
|
|
420
|
-
side: string;
|
|
421
|
-
}>, "many">;
|
|
422
|
-
}, "strip", z.ZodTypeAny, {
|
|
423
|
-
label: string;
|
|
424
|
-
questionSeed: string;
|
|
425
|
-
sides: string[];
|
|
426
|
-
sideCounts: Record<string, number>;
|
|
427
|
-
voi: number;
|
|
428
|
-
evidenceRate: number;
|
|
429
|
-
assignments: {
|
|
430
|
-
opportunityId: string;
|
|
431
|
-
side: string;
|
|
432
|
-
}[];
|
|
433
|
-
embedding?: number[] | undefined;
|
|
434
|
-
embeddingModel?: string | undefined;
|
|
435
|
-
}, {
|
|
436
|
-
label: string;
|
|
437
|
-
questionSeed: string;
|
|
438
|
-
sides: string[];
|
|
439
|
-
sideCounts: Record<string, number>;
|
|
440
|
-
voi: number;
|
|
441
|
-
evidenceRate: number;
|
|
442
|
-
assignments: {
|
|
443
|
-
opportunityId: string;
|
|
444
|
-
side: string;
|
|
445
|
-
}[];
|
|
446
|
-
embedding?: number[] | undefined;
|
|
447
|
-
embeddingModel?: string | undefined;
|
|
448
|
-
}>;
|
|
449
|
-
/** Pool snapshot stored on pool_discovery questions (server-side only). */
|
|
450
|
-
export declare const QuestionPoolSnapshotSchema: z.ZodObject<{
|
|
451
|
-
poolSize: z.ZodNumber;
|
|
452
|
-
/** ISO-8601 timestamp of the mining pass. */
|
|
453
|
-
minedAt: z.ZodString;
|
|
454
|
-
/** Discovery run that produced the pool, when known. */
|
|
455
|
-
runId: z.ZodOptional<z.ZodString>;
|
|
456
|
-
/** Intent payload snippet (≤160 chars) — reused by chained questions' evidence chips. */
|
|
457
|
-
intentText: z.ZodOptional<z.ZodString>;
|
|
458
|
-
/** Stable hash of the full normalized payload + summary used for freshness. */
|
|
459
|
-
intentFingerprint: z.ZodOptional<z.ZodString>;
|
|
460
|
-
/** Exact bounded candidate pool. Optional for legacy rows/jobs created before IND-422. */
|
|
461
|
-
opportunityIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
462
|
-
/** The discriminator this question asks about. */
|
|
463
|
-
discriminator: z.ZodObject<{
|
|
464
|
-
label: z.ZodString;
|
|
465
|
-
questionSeed: z.ZodString;
|
|
466
|
-
sides: z.ZodArray<z.ZodString, "many">;
|
|
467
|
-
/** Verified-assignment count per side label. */
|
|
468
|
-
sideCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
469
|
-
voi: z.ZodNumber;
|
|
470
|
-
evidenceRate: z.ZodNumber;
|
|
471
|
-
/** Discriminator embedding retained for durable semantic novelty checks. */
|
|
472
|
-
embedding: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
473
|
-
/** Model that generated `embedding`; mismatches must fall back to text. */
|
|
474
|
-
embeddingModel: z.ZodOptional<z.ZodString>;
|
|
475
|
-
/** Verified assignments only — the P3 re-rank input. */
|
|
476
|
-
assignments: z.ZodArray<z.ZodObject<{
|
|
477
|
-
opportunityId: z.ZodString;
|
|
478
|
-
side: z.ZodString;
|
|
479
|
-
}, "strip", z.ZodTypeAny, {
|
|
480
|
-
opportunityId: string;
|
|
481
|
-
side: string;
|
|
482
|
-
}, {
|
|
483
|
-
opportunityId: string;
|
|
484
|
-
side: string;
|
|
485
|
-
}>, "many">;
|
|
486
|
-
}, "strip", z.ZodTypeAny, {
|
|
487
|
-
label: string;
|
|
488
|
-
questionSeed: string;
|
|
489
|
-
sides: string[];
|
|
490
|
-
sideCounts: Record<string, number>;
|
|
491
|
-
voi: number;
|
|
492
|
-
evidenceRate: number;
|
|
493
|
-
assignments: {
|
|
494
|
-
opportunityId: string;
|
|
495
|
-
side: string;
|
|
496
|
-
}[];
|
|
497
|
-
embedding?: number[] | undefined;
|
|
498
|
-
embeddingModel?: string | undefined;
|
|
499
|
-
}, {
|
|
500
|
-
label: string;
|
|
501
|
-
questionSeed: string;
|
|
502
|
-
sides: string[];
|
|
503
|
-
sideCounts: Record<string, number>;
|
|
504
|
-
voi: number;
|
|
505
|
-
evidenceRate: number;
|
|
506
|
-
assignments: {
|
|
507
|
-
opportunityId: string;
|
|
508
|
-
side: string;
|
|
509
|
-
}[];
|
|
510
|
-
embedding?: number[] | undefined;
|
|
511
|
-
embeddingModel?: string | undefined;
|
|
512
|
-
}>;
|
|
513
|
-
/** Remaining ranked discriminators for interview-mode chaining. */
|
|
514
|
-
alternates: z.ZodArray<z.ZodObject<{
|
|
515
|
-
label: z.ZodString;
|
|
516
|
-
questionSeed: z.ZodString;
|
|
517
|
-
sides: z.ZodArray<z.ZodString, "many">;
|
|
518
|
-
/** Verified-assignment count per side label. */
|
|
519
|
-
sideCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
520
|
-
voi: z.ZodNumber;
|
|
521
|
-
evidenceRate: z.ZodNumber;
|
|
522
|
-
/** Discriminator embedding retained for durable semantic novelty checks. */
|
|
523
|
-
embedding: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
524
|
-
/** Model that generated `embedding`; mismatches must fall back to text. */
|
|
525
|
-
embeddingModel: z.ZodOptional<z.ZodString>;
|
|
526
|
-
/** Verified assignments only — the P3 re-rank input. */
|
|
527
|
-
assignments: z.ZodArray<z.ZodObject<{
|
|
528
|
-
opportunityId: z.ZodString;
|
|
529
|
-
side: z.ZodString;
|
|
530
|
-
}, "strip", z.ZodTypeAny, {
|
|
531
|
-
opportunityId: string;
|
|
532
|
-
side: string;
|
|
533
|
-
}, {
|
|
534
|
-
opportunityId: string;
|
|
535
|
-
side: string;
|
|
536
|
-
}>, "many">;
|
|
537
|
-
}, "strip", z.ZodTypeAny, {
|
|
538
|
-
label: string;
|
|
539
|
-
questionSeed: string;
|
|
540
|
-
sides: string[];
|
|
541
|
-
sideCounts: Record<string, number>;
|
|
542
|
-
voi: number;
|
|
543
|
-
evidenceRate: number;
|
|
544
|
-
assignments: {
|
|
545
|
-
opportunityId: string;
|
|
546
|
-
side: string;
|
|
547
|
-
}[];
|
|
548
|
-
embedding?: number[] | undefined;
|
|
549
|
-
embeddingModel?: string | undefined;
|
|
550
|
-
}, {
|
|
551
|
-
label: string;
|
|
552
|
-
questionSeed: string;
|
|
553
|
-
sides: string[];
|
|
554
|
-
sideCounts: Record<string, number>;
|
|
555
|
-
voi: number;
|
|
556
|
-
evidenceRate: number;
|
|
557
|
-
assignments: {
|
|
558
|
-
opportunityId: string;
|
|
559
|
-
side: string;
|
|
560
|
-
}[];
|
|
561
|
-
embedding?: number[] | undefined;
|
|
562
|
-
embeddingModel?: string | undefined;
|
|
563
|
-
}>, "many">;
|
|
564
|
-
}, "strip", z.ZodTypeAny, {
|
|
565
|
-
poolSize: number;
|
|
566
|
-
minedAt: string;
|
|
567
|
-
discriminator: {
|
|
568
|
-
label: string;
|
|
569
|
-
questionSeed: string;
|
|
570
|
-
sides: string[];
|
|
571
|
-
sideCounts: Record<string, number>;
|
|
572
|
-
voi: number;
|
|
573
|
-
evidenceRate: number;
|
|
574
|
-
assignments: {
|
|
575
|
-
opportunityId: string;
|
|
576
|
-
side: string;
|
|
577
|
-
}[];
|
|
578
|
-
embedding?: number[] | undefined;
|
|
579
|
-
embeddingModel?: string | undefined;
|
|
580
|
-
};
|
|
581
|
-
alternates: {
|
|
582
|
-
label: string;
|
|
583
|
-
questionSeed: string;
|
|
584
|
-
sides: string[];
|
|
585
|
-
sideCounts: Record<string, number>;
|
|
586
|
-
voi: number;
|
|
587
|
-
evidenceRate: number;
|
|
588
|
-
assignments: {
|
|
589
|
-
opportunityId: string;
|
|
590
|
-
side: string;
|
|
591
|
-
}[];
|
|
592
|
-
embedding?: number[] | undefined;
|
|
593
|
-
embeddingModel?: string | undefined;
|
|
594
|
-
}[];
|
|
595
|
-
runId?: string | undefined;
|
|
596
|
-
intentFingerprint?: string | undefined;
|
|
597
|
-
intentText?: string | undefined;
|
|
598
|
-
opportunityIds?: string[] | undefined;
|
|
599
|
-
}, {
|
|
600
|
-
poolSize: number;
|
|
601
|
-
minedAt: string;
|
|
602
|
-
discriminator: {
|
|
603
|
-
label: string;
|
|
604
|
-
questionSeed: string;
|
|
605
|
-
sides: string[];
|
|
606
|
-
sideCounts: Record<string, number>;
|
|
607
|
-
voi: number;
|
|
608
|
-
evidenceRate: number;
|
|
609
|
-
assignments: {
|
|
610
|
-
opportunityId: string;
|
|
611
|
-
side: string;
|
|
612
|
-
}[];
|
|
613
|
-
embedding?: number[] | undefined;
|
|
614
|
-
embeddingModel?: string | undefined;
|
|
615
|
-
};
|
|
616
|
-
alternates: {
|
|
617
|
-
label: string;
|
|
618
|
-
questionSeed: string;
|
|
619
|
-
sides: string[];
|
|
620
|
-
sideCounts: Record<string, number>;
|
|
621
|
-
voi: number;
|
|
622
|
-
evidenceRate: number;
|
|
623
|
-
assignments: {
|
|
624
|
-
opportunityId: string;
|
|
625
|
-
side: string;
|
|
626
|
-
}[];
|
|
627
|
-
embedding?: number[] | undefined;
|
|
628
|
-
embeddingModel?: string | undefined;
|
|
629
|
-
}[];
|
|
630
|
-
runId?: string | undefined;
|
|
631
|
-
intentFingerprint?: string | undefined;
|
|
632
|
-
intentText?: string | undefined;
|
|
633
|
-
opportunityIds?: string[] | undefined;
|
|
634
|
-
}>;
|
|
635
|
-
/** Internal delivery ledger for proactive pool-question pushes (IND-421). */
|
|
636
|
-
export declare const QuestionPoolPushSchema: z.ZodObject<{
|
|
637
|
-
version: z.ZodLiteral<1>;
|
|
638
|
-
source: z.ZodLiteral<"pool_discovery">;
|
|
639
|
-
recipientId: z.ZodString;
|
|
640
|
-
intentId: z.ZodString;
|
|
641
|
-
cycleKey: z.ZodString;
|
|
642
|
-
messageId: z.ZodString;
|
|
643
|
-
/**
|
|
644
|
-
* Where a claimed push is delivered. The second slot names the negotiator
|
|
645
|
-
* surface: new claims write `negotiator_intent_chat` (the intent-pinned
|
|
646
|
-
* session). `negotiator_dm` is the legacy literal for rows persisted before
|
|
647
|
-
* the unscoped DM was removed — this schema is validated on read, so the
|
|
648
|
-
* union keeps those rows parsing instead of rejecting them. Read-compat
|
|
649
|
-
* only; nothing writes it.
|
|
650
|
-
*/
|
|
651
|
-
surfaces: z.ZodTuple<[z.ZodLiteral<"personal_agent_badge">, z.ZodUnion<[z.ZodLiteral<"negotiator_intent_chat">, z.ZodLiteral<"negotiator_dm">]>], null>;
|
|
652
|
-
claimedAt: z.ZodString;
|
|
653
|
-
deliveryStatus: z.ZodEnum<["claimed", "delivered", "suppressed", "failed"]>;
|
|
654
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
655
|
-
deliveredAt: z.ZodOptional<z.ZodString>;
|
|
656
|
-
suppressedAt: z.ZodOptional<z.ZodString>;
|
|
657
|
-
failure: z.ZodOptional<z.ZodString>;
|
|
658
|
-
}, "strip", z.ZodTypeAny, {
|
|
659
|
-
source: "pool_discovery";
|
|
660
|
-
version: 1;
|
|
661
|
-
recipientId: string;
|
|
662
|
-
intentId: string;
|
|
663
|
-
cycleKey: string;
|
|
664
|
-
messageId: string;
|
|
665
|
-
surfaces: ["personal_agent_badge", "negotiator_intent_chat" | "negotiator_dm"];
|
|
666
|
-
claimedAt: string;
|
|
667
|
-
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
668
|
-
conversationId?: string | undefined;
|
|
669
|
-
deliveredAt?: string | undefined;
|
|
670
|
-
suppressedAt?: string | undefined;
|
|
671
|
-
failure?: string | undefined;
|
|
672
|
-
}, {
|
|
673
|
-
source: "pool_discovery";
|
|
674
|
-
version: 1;
|
|
675
|
-
recipientId: string;
|
|
676
|
-
intentId: string;
|
|
677
|
-
cycleKey: string;
|
|
678
|
-
messageId: string;
|
|
679
|
-
surfaces: ["personal_agent_badge", "negotiator_intent_chat" | "negotiator_dm"];
|
|
680
|
-
claimedAt: string;
|
|
681
|
-
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
682
|
-
conversationId?: string | undefined;
|
|
683
|
-
deliveredAt?: string | undefined;
|
|
684
|
-
suppressedAt?: string | undefined;
|
|
685
|
-
failure?: string | undefined;
|
|
686
|
-
}>;
|
|
687
|
-
/** Durable request state for proactive pool-question delivery. */
|
|
688
|
-
export declare const QuestionPoolPushRequestStatusSchema: z.ZodEnum<["requested", "suppressed"]>;
|
|
689
|
-
/** Private snapshot for a post-discovery recovery refinement question. */
|
|
690
|
-
export declare const QuestionRecoverySnapshotSchema: z.ZodObject<{
|
|
691
|
-
version: z.ZodLiteral<1>;
|
|
692
|
-
intentFingerprint: z.ZodString;
|
|
693
|
-
completionSource: z.ZodEnum<["intent_creation", "from_intent", "discovery_run"]>;
|
|
694
|
-
/** Privacy-safe aggregate only; raw negotiation evidence is never persisted. */
|
|
695
|
-
rejectedNegotiationCount: z.ZodOptional<z.ZodNumber>;
|
|
696
|
-
/** Bounded internal correlation id for an asynchronous discovery run. */
|
|
697
|
-
runId: z.ZodOptional<z.ZodString>;
|
|
698
|
-
}, "strip", z.ZodTypeAny, {
|
|
699
|
-
version: 1;
|
|
700
|
-
intentFingerprint: string;
|
|
701
|
-
completionSource: "intent_creation" | "from_intent" | "discovery_run";
|
|
702
|
-
runId?: string | undefined;
|
|
703
|
-
rejectedNegotiationCount?: number | undefined;
|
|
704
|
-
}, {
|
|
705
|
-
version: 1;
|
|
706
|
-
intentFingerprint: string;
|
|
707
|
-
completionSource: "intent_creation" | "from_intent" | "discovery_run";
|
|
708
|
-
runId?: string | undefined;
|
|
709
|
-
rejectedNegotiationCount?: number | undefined;
|
|
710
|
-
}>;
|
|
711
|
-
/** Internal reason a pending question was voided. */
|
|
712
|
-
export declare const QuestionVoidedReasonSchema: z.ZodEnum<["pool_drift", "intent_edit", "recovery_drift", "negotiation_stale", "retired_mode"]>;
|
|
713
|
-
/** Permanent reasons that terminalize an unclaimed proactive push request. */
|
|
714
|
-
export declare const QuestionPoolPushRequestReasonSchema: z.ZodEnum<["question_lifecycle", "intent_lifecycle", "malformed_source", "malformed_actor", "malformed_pool", "malformed_cycle", "visited", "pool_size", "voi", "cycle_budget"]>;
|
|
715
|
-
export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
716
|
-
/** Which preset mode generated this question. */
|
|
717
|
-
mode: z.ZodEnum<["intent", "negotiation", "negotiation_inflight", "chat", "pool_discovery"]>;
|
|
718
|
-
/** Internal reason for generation; independent of mode and QUD repair metadata. */
|
|
719
|
-
purpose: z.ZodOptional<z.ZodEnum<["uptake", "recovery", "stalled_followup", "inflight_consultation"]>>;
|
|
720
|
-
/** Exact negotiation recipient/intent/task routing provenance. Internal only. */
|
|
721
|
-
negotiation: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
722
|
-
intentFingerprint: z.ZodString;
|
|
723
|
-
opportunityStatus: z.ZodEnum<["latent", "draft", "negotiating", "pending", "stalled", "accepted", "rejected", "expired"]>;
|
|
724
|
-
opportunityUpdatedAt: z.ZodString;
|
|
725
|
-
taskState: z.ZodOptional<z.ZodEnum<["submitted", "working", "input_required", "completed", "canceled", "failed", "rejected", "auth_required", "waiting_for_agent", "claimed"]>>;
|
|
726
|
-
taskUpdatedAt: z.ZodOptional<z.ZodString>;
|
|
727
|
-
/** Stable per-generation position so retries dedupe without reducing cardinality. */
|
|
728
|
-
questionOrdinal: z.ZodNumber;
|
|
729
|
-
purpose: z.ZodEnum<["uptake", "stalled_followup", "inflight_consultation"]>;
|
|
730
|
-
recipientUserId: z.ZodString;
|
|
731
|
-
recipientIntentId: z.ZodString;
|
|
732
|
-
opportunityId: z.ZodString;
|
|
733
|
-
taskId: z.ZodOptional<z.ZodString>;
|
|
734
|
-
networkId: z.ZodString;
|
|
735
|
-
counterpartyUserId: z.ZodOptional<z.ZodString>;
|
|
736
|
-
counterpartyIntentId: z.ZodOptional<z.ZodString>;
|
|
737
|
-
counterpartyFelicityAuthority: z.ZodOptional<z.ZodNumber>;
|
|
738
|
-
version: z.ZodLiteral<1>;
|
|
739
|
-
}, "strip", z.ZodTypeAny, {
|
|
740
|
-
networkId: string;
|
|
741
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
742
|
-
recipientUserId: string;
|
|
743
|
-
recipientIntentId: string;
|
|
744
|
-
opportunityId: string;
|
|
745
|
-
version: 1;
|
|
746
|
-
intentFingerprint: string;
|
|
747
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
748
|
-
opportunityUpdatedAt: string;
|
|
749
|
-
questionOrdinal: number;
|
|
750
|
-
counterpartyUserId?: string | undefined;
|
|
751
|
-
taskId?: string | undefined;
|
|
752
|
-
counterpartyIntentId?: string | undefined;
|
|
753
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
754
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
755
|
-
taskUpdatedAt?: string | undefined;
|
|
756
|
-
}, {
|
|
757
|
-
networkId: string;
|
|
758
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
759
|
-
recipientUserId: string;
|
|
760
|
-
recipientIntentId: string;
|
|
761
|
-
opportunityId: string;
|
|
762
|
-
version: 1;
|
|
763
|
-
intentFingerprint: string;
|
|
764
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
765
|
-
opportunityUpdatedAt: string;
|
|
766
|
-
questionOrdinal: number;
|
|
767
|
-
counterpartyUserId?: string | undefined;
|
|
768
|
-
taskId?: string | undefined;
|
|
769
|
-
counterpartyIntentId?: string | undefined;
|
|
770
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
771
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
772
|
-
taskUpdatedAt?: string | undefined;
|
|
773
|
-
}>, {
|
|
774
|
-
networkId: string;
|
|
775
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
776
|
-
recipientUserId: string;
|
|
777
|
-
recipientIntentId: string;
|
|
778
|
-
opportunityId: string;
|
|
779
|
-
version: 1;
|
|
780
|
-
intentFingerprint: string;
|
|
781
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
782
|
-
opportunityUpdatedAt: string;
|
|
783
|
-
questionOrdinal: number;
|
|
784
|
-
counterpartyUserId?: string | undefined;
|
|
785
|
-
taskId?: string | undefined;
|
|
786
|
-
counterpartyIntentId?: string | undefined;
|
|
787
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
788
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
789
|
-
taskUpdatedAt?: string | undefined;
|
|
790
|
-
}, {
|
|
791
|
-
networkId: string;
|
|
792
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
793
|
-
recipientUserId: string;
|
|
794
|
-
recipientIntentId: string;
|
|
795
|
-
opportunityId: string;
|
|
796
|
-
version: 1;
|
|
797
|
-
intentFingerprint: string;
|
|
798
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
799
|
-
opportunityUpdatedAt: string;
|
|
800
|
-
questionOrdinal: number;
|
|
801
|
-
counterpartyUserId?: string | undefined;
|
|
802
|
-
taskId?: string | undefined;
|
|
803
|
-
counterpartyIntentId?: string | undefined;
|
|
804
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
805
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
806
|
-
taskUpdatedAt?: string | undefined;
|
|
807
|
-
}>>;
|
|
808
|
-
/** Entity type that triggered generation (e.g. "opportunity", "intent", "profile"). */
|
|
809
|
-
sourceType: z.ZodString;
|
|
810
|
-
/** ID of the triggering entity. */
|
|
811
|
-
sourceId: z.ZodString;
|
|
812
|
-
/** Optional intent ID that was the root cause. */
|
|
813
|
-
triggeredBy: z.ZodOptional<z.ZodString>;
|
|
814
|
-
/** ISO-8601 timestamp of generation. */
|
|
815
|
-
timestamp: z.ZodString;
|
|
816
|
-
/** Generation strategy persisted as internal metadata. */
|
|
817
|
-
strategy: z.ZodOptional<z.ZodEnum<["refine_intent", "surface_missing_detail", "open_adjacent_thread", "reflective_summary", "surface_emergent_knowledge"]>>;
|
|
818
|
-
/** QUD repair category persisted as internal metadata. */
|
|
819
|
-
underspecificationType: z.ZodOptional<z.ZodNullable<z.ZodEnum<["missing_constituent", "missing_constraint", "open_alternative_set"]>>>;
|
|
820
|
-
/** ID of the assistant message that triggered this question. Used by the frontend to anchor the question card inline. */
|
|
821
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
822
|
-
/** Durable server-only conversation session binding used to validate messageId. */
|
|
823
|
-
sessionId: z.ZodOptional<z.ZodString>;
|
|
824
|
-
/**
|
|
825
|
-
* pool_discovery only: the mined pool snapshot (assignments + alternates).
|
|
826
|
-
* INTERNAL — stripped from every client-facing read (web + MCP).
|
|
827
|
-
*/
|
|
828
|
-
pool: z.ZodOptional<z.ZodObject<{
|
|
829
|
-
poolSize: z.ZodNumber;
|
|
830
|
-
/** ISO-8601 timestamp of the mining pass. */
|
|
831
|
-
minedAt: z.ZodString;
|
|
832
|
-
/** Discovery run that produced the pool, when known. */
|
|
833
|
-
runId: z.ZodOptional<z.ZodString>;
|
|
834
|
-
/** Intent payload snippet (≤160 chars) — reused by chained questions' evidence chips. */
|
|
835
|
-
intentText: z.ZodOptional<z.ZodString>;
|
|
836
|
-
/** Stable hash of the full normalized payload + summary used for freshness. */
|
|
837
|
-
intentFingerprint: z.ZodOptional<z.ZodString>;
|
|
838
|
-
/** Exact bounded candidate pool. Optional for legacy rows/jobs created before IND-422. */
|
|
839
|
-
opportunityIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
840
|
-
/** The discriminator this question asks about. */
|
|
841
|
-
discriminator: z.ZodObject<{
|
|
842
|
-
label: z.ZodString;
|
|
843
|
-
questionSeed: z.ZodString;
|
|
844
|
-
sides: z.ZodArray<z.ZodString, "many">;
|
|
845
|
-
/** Verified-assignment count per side label. */
|
|
846
|
-
sideCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
847
|
-
voi: z.ZodNumber;
|
|
848
|
-
evidenceRate: z.ZodNumber;
|
|
849
|
-
/** Discriminator embedding retained for durable semantic novelty checks. */
|
|
850
|
-
embedding: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
851
|
-
/** Model that generated `embedding`; mismatches must fall back to text. */
|
|
852
|
-
embeddingModel: z.ZodOptional<z.ZodString>;
|
|
853
|
-
/** Verified assignments only — the P3 re-rank input. */
|
|
854
|
-
assignments: z.ZodArray<z.ZodObject<{
|
|
855
|
-
opportunityId: z.ZodString;
|
|
856
|
-
side: z.ZodString;
|
|
857
|
-
}, "strip", z.ZodTypeAny, {
|
|
858
|
-
opportunityId: string;
|
|
859
|
-
side: string;
|
|
860
|
-
}, {
|
|
861
|
-
opportunityId: string;
|
|
862
|
-
side: string;
|
|
863
|
-
}>, "many">;
|
|
864
|
-
}, "strip", z.ZodTypeAny, {
|
|
865
|
-
label: string;
|
|
866
|
-
questionSeed: string;
|
|
867
|
-
sides: string[];
|
|
868
|
-
sideCounts: Record<string, number>;
|
|
869
|
-
voi: number;
|
|
870
|
-
evidenceRate: number;
|
|
871
|
-
assignments: {
|
|
872
|
-
opportunityId: string;
|
|
873
|
-
side: string;
|
|
874
|
-
}[];
|
|
875
|
-
embedding?: number[] | undefined;
|
|
876
|
-
embeddingModel?: string | undefined;
|
|
877
|
-
}, {
|
|
878
|
-
label: string;
|
|
879
|
-
questionSeed: string;
|
|
880
|
-
sides: string[];
|
|
881
|
-
sideCounts: Record<string, number>;
|
|
882
|
-
voi: number;
|
|
883
|
-
evidenceRate: number;
|
|
884
|
-
assignments: {
|
|
885
|
-
opportunityId: string;
|
|
886
|
-
side: string;
|
|
887
|
-
}[];
|
|
888
|
-
embedding?: number[] | undefined;
|
|
889
|
-
embeddingModel?: string | undefined;
|
|
890
|
-
}>;
|
|
891
|
-
/** Remaining ranked discriminators for interview-mode chaining. */
|
|
892
|
-
alternates: z.ZodArray<z.ZodObject<{
|
|
893
|
-
label: z.ZodString;
|
|
894
|
-
questionSeed: z.ZodString;
|
|
895
|
-
sides: z.ZodArray<z.ZodString, "many">;
|
|
896
|
-
/** Verified-assignment count per side label. */
|
|
897
|
-
sideCounts: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
898
|
-
voi: z.ZodNumber;
|
|
899
|
-
evidenceRate: z.ZodNumber;
|
|
900
|
-
/** Discriminator embedding retained for durable semantic novelty checks. */
|
|
901
|
-
embedding: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
902
|
-
/** Model that generated `embedding`; mismatches must fall back to text. */
|
|
903
|
-
embeddingModel: z.ZodOptional<z.ZodString>;
|
|
904
|
-
/** Verified assignments only — the P3 re-rank input. */
|
|
905
|
-
assignments: z.ZodArray<z.ZodObject<{
|
|
906
|
-
opportunityId: z.ZodString;
|
|
907
|
-
side: z.ZodString;
|
|
908
|
-
}, "strip", z.ZodTypeAny, {
|
|
909
|
-
opportunityId: string;
|
|
910
|
-
side: string;
|
|
911
|
-
}, {
|
|
912
|
-
opportunityId: string;
|
|
913
|
-
side: string;
|
|
914
|
-
}>, "many">;
|
|
915
|
-
}, "strip", z.ZodTypeAny, {
|
|
916
|
-
label: string;
|
|
917
|
-
questionSeed: string;
|
|
918
|
-
sides: string[];
|
|
919
|
-
sideCounts: Record<string, number>;
|
|
920
|
-
voi: number;
|
|
921
|
-
evidenceRate: number;
|
|
922
|
-
assignments: {
|
|
923
|
-
opportunityId: string;
|
|
924
|
-
side: string;
|
|
925
|
-
}[];
|
|
926
|
-
embedding?: number[] | undefined;
|
|
927
|
-
embeddingModel?: string | undefined;
|
|
928
|
-
}, {
|
|
929
|
-
label: string;
|
|
930
|
-
questionSeed: string;
|
|
931
|
-
sides: string[];
|
|
932
|
-
sideCounts: Record<string, number>;
|
|
933
|
-
voi: number;
|
|
934
|
-
evidenceRate: number;
|
|
935
|
-
assignments: {
|
|
936
|
-
opportunityId: string;
|
|
937
|
-
side: string;
|
|
938
|
-
}[];
|
|
939
|
-
embedding?: number[] | undefined;
|
|
940
|
-
embeddingModel?: string | undefined;
|
|
941
|
-
}>, "many">;
|
|
942
|
-
}, "strip", z.ZodTypeAny, {
|
|
943
|
-
poolSize: number;
|
|
944
|
-
minedAt: string;
|
|
945
|
-
discriminator: {
|
|
946
|
-
label: string;
|
|
947
|
-
questionSeed: string;
|
|
948
|
-
sides: string[];
|
|
949
|
-
sideCounts: Record<string, number>;
|
|
950
|
-
voi: number;
|
|
951
|
-
evidenceRate: number;
|
|
952
|
-
assignments: {
|
|
953
|
-
opportunityId: string;
|
|
954
|
-
side: string;
|
|
955
|
-
}[];
|
|
956
|
-
embedding?: number[] | undefined;
|
|
957
|
-
embeddingModel?: string | undefined;
|
|
958
|
-
};
|
|
959
|
-
alternates: {
|
|
960
|
-
label: string;
|
|
961
|
-
questionSeed: string;
|
|
962
|
-
sides: string[];
|
|
963
|
-
sideCounts: Record<string, number>;
|
|
964
|
-
voi: number;
|
|
965
|
-
evidenceRate: number;
|
|
966
|
-
assignments: {
|
|
967
|
-
opportunityId: string;
|
|
968
|
-
side: string;
|
|
969
|
-
}[];
|
|
970
|
-
embedding?: number[] | undefined;
|
|
971
|
-
embeddingModel?: string | undefined;
|
|
972
|
-
}[];
|
|
973
|
-
runId?: string | undefined;
|
|
974
|
-
intentFingerprint?: string | undefined;
|
|
975
|
-
intentText?: string | undefined;
|
|
976
|
-
opportunityIds?: string[] | undefined;
|
|
977
|
-
}, {
|
|
978
|
-
poolSize: number;
|
|
979
|
-
minedAt: string;
|
|
980
|
-
discriminator: {
|
|
981
|
-
label: string;
|
|
982
|
-
questionSeed: string;
|
|
983
|
-
sides: string[];
|
|
984
|
-
sideCounts: Record<string, number>;
|
|
985
|
-
voi: number;
|
|
986
|
-
evidenceRate: number;
|
|
987
|
-
assignments: {
|
|
988
|
-
opportunityId: string;
|
|
989
|
-
side: string;
|
|
990
|
-
}[];
|
|
991
|
-
embedding?: number[] | undefined;
|
|
992
|
-
embeddingModel?: string | undefined;
|
|
993
|
-
};
|
|
994
|
-
alternates: {
|
|
995
|
-
label: string;
|
|
996
|
-
questionSeed: string;
|
|
997
|
-
sides: string[];
|
|
998
|
-
sideCounts: Record<string, number>;
|
|
999
|
-
voi: number;
|
|
1000
|
-
evidenceRate: number;
|
|
1001
|
-
assignments: {
|
|
1002
|
-
opportunityId: string;
|
|
1003
|
-
side: string;
|
|
1004
|
-
}[];
|
|
1005
|
-
embedding?: number[] | undefined;
|
|
1006
|
-
embeddingModel?: string | undefined;
|
|
1007
|
-
}[];
|
|
1008
|
-
runId?: string | undefined;
|
|
1009
|
-
intentFingerprint?: string | undefined;
|
|
1010
|
-
intentText?: string | undefined;
|
|
1011
|
-
opportunityIds?: string[] | undefined;
|
|
1012
|
-
}>>;
|
|
1013
|
-
/** Post-discovery intent recovery snapshot. Internal only. */
|
|
1014
|
-
recovery: z.ZodOptional<z.ZodObject<{
|
|
1015
|
-
version: z.ZodLiteral<1>;
|
|
1016
|
-
intentFingerprint: z.ZodString;
|
|
1017
|
-
completionSource: z.ZodEnum<["intent_creation", "from_intent", "discovery_run"]>;
|
|
1018
|
-
/** Privacy-safe aggregate only; raw negotiation evidence is never persisted. */
|
|
1019
|
-
rejectedNegotiationCount: z.ZodOptional<z.ZodNumber>;
|
|
1020
|
-
/** Bounded internal correlation id for an asynchronous discovery run. */
|
|
1021
|
-
runId: z.ZodOptional<z.ZodString>;
|
|
1022
|
-
}, "strip", z.ZodTypeAny, {
|
|
1023
|
-
version: 1;
|
|
1024
|
-
intentFingerprint: string;
|
|
1025
|
-
completionSource: "intent_creation" | "from_intent" | "discovery_run";
|
|
1026
|
-
runId?: string | undefined;
|
|
1027
|
-
rejectedNegotiationCount?: number | undefined;
|
|
1028
|
-
}, {
|
|
1029
|
-
version: 1;
|
|
1030
|
-
intentFingerprint: string;
|
|
1031
|
-
completionSource: "intent_creation" | "from_intent" | "discovery_run";
|
|
1032
|
-
runId?: string | undefined;
|
|
1033
|
-
rejectedNegotiationCount?: number | undefined;
|
|
1034
|
-
}>>;
|
|
1035
|
-
/** Durable request marker written before enqueueing proactive delivery. Internal only. */
|
|
1036
|
-
pushRequestedAt: z.ZodOptional<z.ZodString>;
|
|
1037
|
-
/** Last bounded recovery sweep that selected this request. Internal only. */
|
|
1038
|
-
pushRecoveryAttemptedAt: z.ZodOptional<z.ZodString>;
|
|
1039
|
-
/** Durable request outcome. Internal only. */
|
|
1040
|
-
pushRequestStatus: z.ZodOptional<z.ZodEnum<["requested", "suppressed"]>>;
|
|
1041
|
-
/** Permanent suppression reason for an unclaimed request. Internal only. */
|
|
1042
|
-
pushRequestReason: z.ZodOptional<z.ZodEnum<["question_lifecycle", "intent_lifecycle", "malformed_source", "malformed_actor", "malformed_pool", "malformed_cycle", "visited", "pool_size", "voi", "cycle_budget"]>>;
|
|
1043
|
-
/** ISO-8601 timestamp at which an unclaimed request was suppressed. Internal only. */
|
|
1044
|
-
pushRequestSuppressedAt: z.ZodOptional<z.ZodString>;
|
|
1045
|
-
/** Internal proactive delivery state. Never serialize to public clients. */
|
|
1046
|
-
push: z.ZodOptional<z.ZodObject<{
|
|
1047
|
-
version: z.ZodLiteral<1>;
|
|
1048
|
-
source: z.ZodLiteral<"pool_discovery">;
|
|
1049
|
-
recipientId: z.ZodString;
|
|
1050
|
-
intentId: z.ZodString;
|
|
1051
|
-
cycleKey: z.ZodString;
|
|
1052
|
-
messageId: z.ZodString;
|
|
1053
|
-
/**
|
|
1054
|
-
* Where a claimed push is delivered. The second slot names the negotiator
|
|
1055
|
-
* surface: new claims write `negotiator_intent_chat` (the intent-pinned
|
|
1056
|
-
* session). `negotiator_dm` is the legacy literal for rows persisted before
|
|
1057
|
-
* the unscoped DM was removed — this schema is validated on read, so the
|
|
1058
|
-
* union keeps those rows parsing instead of rejecting them. Read-compat
|
|
1059
|
-
* only; nothing writes it.
|
|
1060
|
-
*/
|
|
1061
|
-
surfaces: z.ZodTuple<[z.ZodLiteral<"personal_agent_badge">, z.ZodUnion<[z.ZodLiteral<"negotiator_intent_chat">, z.ZodLiteral<"negotiator_dm">]>], null>;
|
|
1062
|
-
claimedAt: z.ZodString;
|
|
1063
|
-
deliveryStatus: z.ZodEnum<["claimed", "delivered", "suppressed", "failed"]>;
|
|
1064
|
-
conversationId: z.ZodOptional<z.ZodString>;
|
|
1065
|
-
deliveredAt: z.ZodOptional<z.ZodString>;
|
|
1066
|
-
suppressedAt: z.ZodOptional<z.ZodString>;
|
|
1067
|
-
failure: z.ZodOptional<z.ZodString>;
|
|
1068
|
-
}, "strip", z.ZodTypeAny, {
|
|
1069
|
-
source: "pool_discovery";
|
|
1070
|
-
version: 1;
|
|
1071
|
-
recipientId: string;
|
|
1072
|
-
intentId: string;
|
|
1073
|
-
cycleKey: string;
|
|
1074
|
-
messageId: string;
|
|
1075
|
-
surfaces: ["personal_agent_badge", "negotiator_intent_chat" | "negotiator_dm"];
|
|
1076
|
-
claimedAt: string;
|
|
1077
|
-
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
1078
|
-
conversationId?: string | undefined;
|
|
1079
|
-
deliveredAt?: string | undefined;
|
|
1080
|
-
suppressedAt?: string | undefined;
|
|
1081
|
-
failure?: string | undefined;
|
|
1082
|
-
}, {
|
|
1083
|
-
source: "pool_discovery";
|
|
1084
|
-
version: 1;
|
|
1085
|
-
recipientId: string;
|
|
1086
|
-
intentId: string;
|
|
1087
|
-
cycleKey: string;
|
|
1088
|
-
messageId: string;
|
|
1089
|
-
surfaces: ["personal_agent_badge", "negotiator_intent_chat" | "negotiator_dm"];
|
|
1090
|
-
claimedAt: string;
|
|
1091
|
-
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
1092
|
-
conversationId?: string | undefined;
|
|
1093
|
-
deliveredAt?: string | undefined;
|
|
1094
|
-
suppressedAt?: string | undefined;
|
|
1095
|
-
failure?: string | undefined;
|
|
1096
|
-
}>>;
|
|
1097
|
-
/** Internal reason this question was voided after pool or intent drift. */
|
|
1098
|
-
voidedReason: z.ZodOptional<z.ZodEnum<["pool_drift", "intent_edit", "recovery_drift", "negotiation_stale", "retired_mode"]>>;
|
|
1099
|
-
/** Authoritative successful-delivery ledger timestamp. Internal only. */
|
|
1100
|
-
pushedAt: z.ZodOptional<z.ZodString>;
|
|
1101
|
-
}, "strip", z.ZodTypeAny, {
|
|
1102
|
-
mode: "chat" | "intent" | "negotiation" | "negotiation_inflight" | "pool_discovery";
|
|
1103
|
-
sourceType: string;
|
|
1104
|
-
sourceId: string;
|
|
1105
|
-
timestamp: string;
|
|
1106
|
-
push?: {
|
|
1107
|
-
source: "pool_discovery";
|
|
1108
|
-
version: 1;
|
|
1109
|
-
recipientId: string;
|
|
1110
|
-
intentId: string;
|
|
1111
|
-
cycleKey: string;
|
|
1112
|
-
messageId: string;
|
|
1113
|
-
surfaces: ["personal_agent_badge", "negotiator_intent_chat" | "negotiator_dm"];
|
|
1114
|
-
claimedAt: string;
|
|
1115
|
-
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
1116
|
-
conversationId?: string | undefined;
|
|
1117
|
-
deliveredAt?: string | undefined;
|
|
1118
|
-
suppressedAt?: string | undefined;
|
|
1119
|
-
failure?: string | undefined;
|
|
1120
|
-
} | undefined;
|
|
1121
|
-
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
1122
|
-
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
1123
|
-
recovery?: {
|
|
1124
|
-
version: 1;
|
|
1125
|
-
intentFingerprint: string;
|
|
1126
|
-
completionSource: "intent_creation" | "from_intent" | "discovery_run";
|
|
1127
|
-
runId?: string | undefined;
|
|
1128
|
-
rejectedNegotiationCount?: number | undefined;
|
|
1129
|
-
} | undefined;
|
|
1130
|
-
purpose?: "uptake" | "stalled_followup" | "inflight_consultation" | "recovery" | undefined;
|
|
1131
|
-
negotiation?: {
|
|
1132
|
-
networkId: string;
|
|
1133
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
1134
|
-
recipientUserId: string;
|
|
1135
|
-
recipientIntentId: string;
|
|
1136
|
-
opportunityId: string;
|
|
1137
|
-
version: 1;
|
|
1138
|
-
intentFingerprint: string;
|
|
1139
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
1140
|
-
opportunityUpdatedAt: string;
|
|
1141
|
-
questionOrdinal: number;
|
|
1142
|
-
counterpartyUserId?: string | undefined;
|
|
1143
|
-
taskId?: string | undefined;
|
|
1144
|
-
counterpartyIntentId?: string | undefined;
|
|
1145
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
1146
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
1147
|
-
taskUpdatedAt?: string | undefined;
|
|
1148
|
-
} | undefined;
|
|
1149
|
-
messageId?: string | undefined;
|
|
1150
|
-
triggeredBy?: string | undefined;
|
|
1151
|
-
sessionId?: string | undefined;
|
|
1152
|
-
pool?: {
|
|
1153
|
-
poolSize: number;
|
|
1154
|
-
minedAt: string;
|
|
1155
|
-
discriminator: {
|
|
1156
|
-
label: string;
|
|
1157
|
-
questionSeed: string;
|
|
1158
|
-
sides: string[];
|
|
1159
|
-
sideCounts: Record<string, number>;
|
|
1160
|
-
voi: number;
|
|
1161
|
-
evidenceRate: number;
|
|
1162
|
-
assignments: {
|
|
1163
|
-
opportunityId: string;
|
|
1164
|
-
side: string;
|
|
1165
|
-
}[];
|
|
1166
|
-
embedding?: number[] | undefined;
|
|
1167
|
-
embeddingModel?: string | undefined;
|
|
1168
|
-
};
|
|
1169
|
-
alternates: {
|
|
1170
|
-
label: string;
|
|
1171
|
-
questionSeed: string;
|
|
1172
|
-
sides: string[];
|
|
1173
|
-
sideCounts: Record<string, number>;
|
|
1174
|
-
voi: number;
|
|
1175
|
-
evidenceRate: number;
|
|
1176
|
-
assignments: {
|
|
1177
|
-
opportunityId: string;
|
|
1178
|
-
side: string;
|
|
1179
|
-
}[];
|
|
1180
|
-
embedding?: number[] | undefined;
|
|
1181
|
-
embeddingModel?: string | undefined;
|
|
1182
|
-
}[];
|
|
1183
|
-
runId?: string | undefined;
|
|
1184
|
-
intentFingerprint?: string | undefined;
|
|
1185
|
-
intentText?: string | undefined;
|
|
1186
|
-
opportunityIds?: string[] | undefined;
|
|
1187
|
-
} | undefined;
|
|
1188
|
-
pushRequestedAt?: string | undefined;
|
|
1189
|
-
pushRecoveryAttemptedAt?: string | undefined;
|
|
1190
|
-
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
1191
|
-
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
1192
|
-
pushRequestSuppressedAt?: string | undefined;
|
|
1193
|
-
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | "negotiation_stale" | "retired_mode" | undefined;
|
|
1194
|
-
pushedAt?: string | undefined;
|
|
1195
|
-
}, {
|
|
1196
|
-
mode: "chat" | "intent" | "negotiation" | "negotiation_inflight" | "pool_discovery";
|
|
1197
|
-
sourceType: string;
|
|
1198
|
-
sourceId: string;
|
|
1199
|
-
timestamp: string;
|
|
1200
|
-
push?: {
|
|
1201
|
-
source: "pool_discovery";
|
|
1202
|
-
version: 1;
|
|
1203
|
-
recipientId: string;
|
|
1204
|
-
intentId: string;
|
|
1205
|
-
cycleKey: string;
|
|
1206
|
-
messageId: string;
|
|
1207
|
-
surfaces: ["personal_agent_badge", "negotiator_intent_chat" | "negotiator_dm"];
|
|
1208
|
-
claimedAt: string;
|
|
1209
|
-
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
1210
|
-
conversationId?: string | undefined;
|
|
1211
|
-
deliveredAt?: string | undefined;
|
|
1212
|
-
suppressedAt?: string | undefined;
|
|
1213
|
-
failure?: string | undefined;
|
|
1214
|
-
} | undefined;
|
|
1215
|
-
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
1216
|
-
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
1217
|
-
recovery?: {
|
|
1218
|
-
version: 1;
|
|
1219
|
-
intentFingerprint: string;
|
|
1220
|
-
completionSource: "intent_creation" | "from_intent" | "discovery_run";
|
|
1221
|
-
runId?: string | undefined;
|
|
1222
|
-
rejectedNegotiationCount?: number | undefined;
|
|
1223
|
-
} | undefined;
|
|
1224
|
-
purpose?: "uptake" | "stalled_followup" | "inflight_consultation" | "recovery" | undefined;
|
|
1225
|
-
negotiation?: {
|
|
1226
|
-
networkId: string;
|
|
1227
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
1228
|
-
recipientUserId: string;
|
|
1229
|
-
recipientIntentId: string;
|
|
1230
|
-
opportunityId: string;
|
|
1231
|
-
version: 1;
|
|
1232
|
-
intentFingerprint: string;
|
|
1233
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
1234
|
-
opportunityUpdatedAt: string;
|
|
1235
|
-
questionOrdinal: number;
|
|
1236
|
-
counterpartyUserId?: string | undefined;
|
|
1237
|
-
taskId?: string | undefined;
|
|
1238
|
-
counterpartyIntentId?: string | undefined;
|
|
1239
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
1240
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
1241
|
-
taskUpdatedAt?: string | undefined;
|
|
1242
|
-
} | undefined;
|
|
1243
|
-
messageId?: string | undefined;
|
|
1244
|
-
triggeredBy?: string | undefined;
|
|
1245
|
-
sessionId?: string | undefined;
|
|
1246
|
-
pool?: {
|
|
1247
|
-
poolSize: number;
|
|
1248
|
-
minedAt: string;
|
|
1249
|
-
discriminator: {
|
|
1250
|
-
label: string;
|
|
1251
|
-
questionSeed: string;
|
|
1252
|
-
sides: string[];
|
|
1253
|
-
sideCounts: Record<string, number>;
|
|
1254
|
-
voi: number;
|
|
1255
|
-
evidenceRate: number;
|
|
1256
|
-
assignments: {
|
|
1257
|
-
opportunityId: string;
|
|
1258
|
-
side: string;
|
|
1259
|
-
}[];
|
|
1260
|
-
embedding?: number[] | undefined;
|
|
1261
|
-
embeddingModel?: string | undefined;
|
|
1262
|
-
};
|
|
1263
|
-
alternates: {
|
|
1264
|
-
label: string;
|
|
1265
|
-
questionSeed: string;
|
|
1266
|
-
sides: string[];
|
|
1267
|
-
sideCounts: Record<string, number>;
|
|
1268
|
-
voi: number;
|
|
1269
|
-
evidenceRate: number;
|
|
1270
|
-
assignments: {
|
|
1271
|
-
opportunityId: string;
|
|
1272
|
-
side: string;
|
|
1273
|
-
}[];
|
|
1274
|
-
embedding?: number[] | undefined;
|
|
1275
|
-
embeddingModel?: string | undefined;
|
|
1276
|
-
}[];
|
|
1277
|
-
runId?: string | undefined;
|
|
1278
|
-
intentFingerprint?: string | undefined;
|
|
1279
|
-
intentText?: string | undefined;
|
|
1280
|
-
opportunityIds?: string[] | undefined;
|
|
1281
|
-
} | undefined;
|
|
1282
|
-
pushRequestedAt?: string | undefined;
|
|
1283
|
-
pushRecoveryAttemptedAt?: string | undefined;
|
|
1284
|
-
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
1285
|
-
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
1286
|
-
pushRequestSuppressedAt?: string | undefined;
|
|
1287
|
-
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | "negotiation_stale" | "retired_mode" | undefined;
|
|
1288
|
-
pushedAt?: string | undefined;
|
|
1289
|
-
}>, {
|
|
1290
|
-
mode: "chat" | "intent" | "negotiation" | "negotiation_inflight" | "pool_discovery";
|
|
1291
|
-
sourceType: string;
|
|
1292
|
-
sourceId: string;
|
|
1293
|
-
timestamp: string;
|
|
1294
|
-
push?: {
|
|
1295
|
-
source: "pool_discovery";
|
|
1296
|
-
version: 1;
|
|
1297
|
-
recipientId: string;
|
|
1298
|
-
intentId: string;
|
|
1299
|
-
cycleKey: string;
|
|
1300
|
-
messageId: string;
|
|
1301
|
-
surfaces: ["personal_agent_badge", "negotiator_intent_chat" | "negotiator_dm"];
|
|
1302
|
-
claimedAt: string;
|
|
1303
|
-
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
1304
|
-
conversationId?: string | undefined;
|
|
1305
|
-
deliveredAt?: string | undefined;
|
|
1306
|
-
suppressedAt?: string | undefined;
|
|
1307
|
-
failure?: string | undefined;
|
|
1308
|
-
} | undefined;
|
|
1309
|
-
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
1310
|
-
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
1311
|
-
recovery?: {
|
|
1312
|
-
version: 1;
|
|
1313
|
-
intentFingerprint: string;
|
|
1314
|
-
completionSource: "intent_creation" | "from_intent" | "discovery_run";
|
|
1315
|
-
runId?: string | undefined;
|
|
1316
|
-
rejectedNegotiationCount?: number | undefined;
|
|
1317
|
-
} | undefined;
|
|
1318
|
-
purpose?: "uptake" | "stalled_followup" | "inflight_consultation" | "recovery" | undefined;
|
|
1319
|
-
negotiation?: {
|
|
1320
|
-
networkId: string;
|
|
1321
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
1322
|
-
recipientUserId: string;
|
|
1323
|
-
recipientIntentId: string;
|
|
1324
|
-
opportunityId: string;
|
|
1325
|
-
version: 1;
|
|
1326
|
-
intentFingerprint: string;
|
|
1327
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
1328
|
-
opportunityUpdatedAt: string;
|
|
1329
|
-
questionOrdinal: number;
|
|
1330
|
-
counterpartyUserId?: string | undefined;
|
|
1331
|
-
taskId?: string | undefined;
|
|
1332
|
-
counterpartyIntentId?: string | undefined;
|
|
1333
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
1334
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
1335
|
-
taskUpdatedAt?: string | undefined;
|
|
1336
|
-
} | undefined;
|
|
1337
|
-
messageId?: string | undefined;
|
|
1338
|
-
triggeredBy?: string | undefined;
|
|
1339
|
-
sessionId?: string | undefined;
|
|
1340
|
-
pool?: {
|
|
1341
|
-
poolSize: number;
|
|
1342
|
-
minedAt: string;
|
|
1343
|
-
discriminator: {
|
|
1344
|
-
label: string;
|
|
1345
|
-
questionSeed: string;
|
|
1346
|
-
sides: string[];
|
|
1347
|
-
sideCounts: Record<string, number>;
|
|
1348
|
-
voi: number;
|
|
1349
|
-
evidenceRate: number;
|
|
1350
|
-
assignments: {
|
|
1351
|
-
opportunityId: string;
|
|
1352
|
-
side: string;
|
|
1353
|
-
}[];
|
|
1354
|
-
embedding?: number[] | undefined;
|
|
1355
|
-
embeddingModel?: string | undefined;
|
|
1356
|
-
};
|
|
1357
|
-
alternates: {
|
|
1358
|
-
label: string;
|
|
1359
|
-
questionSeed: string;
|
|
1360
|
-
sides: string[];
|
|
1361
|
-
sideCounts: Record<string, number>;
|
|
1362
|
-
voi: number;
|
|
1363
|
-
evidenceRate: number;
|
|
1364
|
-
assignments: {
|
|
1365
|
-
opportunityId: string;
|
|
1366
|
-
side: string;
|
|
1367
|
-
}[];
|
|
1368
|
-
embedding?: number[] | undefined;
|
|
1369
|
-
embeddingModel?: string | undefined;
|
|
1370
|
-
}[];
|
|
1371
|
-
runId?: string | undefined;
|
|
1372
|
-
intentFingerprint?: string | undefined;
|
|
1373
|
-
intentText?: string | undefined;
|
|
1374
|
-
opportunityIds?: string[] | undefined;
|
|
1375
|
-
} | undefined;
|
|
1376
|
-
pushRequestedAt?: string | undefined;
|
|
1377
|
-
pushRecoveryAttemptedAt?: string | undefined;
|
|
1378
|
-
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
1379
|
-
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
1380
|
-
pushRequestSuppressedAt?: string | undefined;
|
|
1381
|
-
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | "negotiation_stale" | "retired_mode" | undefined;
|
|
1382
|
-
pushedAt?: string | undefined;
|
|
1383
|
-
}, {
|
|
1384
|
-
mode: "chat" | "intent" | "negotiation" | "negotiation_inflight" | "pool_discovery";
|
|
1385
|
-
sourceType: string;
|
|
1386
|
-
sourceId: string;
|
|
1387
|
-
timestamp: string;
|
|
1388
|
-
push?: {
|
|
1389
|
-
source: "pool_discovery";
|
|
1390
|
-
version: 1;
|
|
1391
|
-
recipientId: string;
|
|
1392
|
-
intentId: string;
|
|
1393
|
-
cycleKey: string;
|
|
1394
|
-
messageId: string;
|
|
1395
|
-
surfaces: ["personal_agent_badge", "negotiator_intent_chat" | "negotiator_dm"];
|
|
1396
|
-
claimedAt: string;
|
|
1397
|
-
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
1398
|
-
conversationId?: string | undefined;
|
|
1399
|
-
deliveredAt?: string | undefined;
|
|
1400
|
-
suppressedAt?: string | undefined;
|
|
1401
|
-
failure?: string | undefined;
|
|
1402
|
-
} | undefined;
|
|
1403
|
-
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
1404
|
-
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
1405
|
-
recovery?: {
|
|
1406
|
-
version: 1;
|
|
1407
|
-
intentFingerprint: string;
|
|
1408
|
-
completionSource: "intent_creation" | "from_intent" | "discovery_run";
|
|
1409
|
-
runId?: string | undefined;
|
|
1410
|
-
rejectedNegotiationCount?: number | undefined;
|
|
1411
|
-
} | undefined;
|
|
1412
|
-
purpose?: "uptake" | "stalled_followup" | "inflight_consultation" | "recovery" | undefined;
|
|
1413
|
-
negotiation?: {
|
|
1414
|
-
networkId: string;
|
|
1415
|
-
purpose: "uptake" | "stalled_followup" | "inflight_consultation";
|
|
1416
|
-
recipientUserId: string;
|
|
1417
|
-
recipientIntentId: string;
|
|
1418
|
-
opportunityId: string;
|
|
1419
|
-
version: 1;
|
|
1420
|
-
intentFingerprint: string;
|
|
1421
|
-
opportunityStatus: "latent" | "draft" | "negotiating" | "pending" | "stalled" | "accepted" | "rejected" | "expired";
|
|
1422
|
-
opportunityUpdatedAt: string;
|
|
1423
|
-
questionOrdinal: number;
|
|
1424
|
-
counterpartyUserId?: string | undefined;
|
|
1425
|
-
taskId?: string | undefined;
|
|
1426
|
-
counterpartyIntentId?: string | undefined;
|
|
1427
|
-
counterpartyFelicityAuthority?: number | undefined;
|
|
1428
|
-
taskState?: "rejected" | "waiting_for_agent" | "input_required" | "completed" | "failed" | "submitted" | "working" | "canceled" | "auth_required" | "claimed" | undefined;
|
|
1429
|
-
taskUpdatedAt?: string | undefined;
|
|
1430
|
-
} | undefined;
|
|
1431
|
-
messageId?: string | undefined;
|
|
1432
|
-
triggeredBy?: string | undefined;
|
|
1433
|
-
sessionId?: string | undefined;
|
|
1434
|
-
pool?: {
|
|
1435
|
-
poolSize: number;
|
|
1436
|
-
minedAt: string;
|
|
1437
|
-
discriminator: {
|
|
1438
|
-
label: string;
|
|
1439
|
-
questionSeed: string;
|
|
1440
|
-
sides: string[];
|
|
1441
|
-
sideCounts: Record<string, number>;
|
|
1442
|
-
voi: number;
|
|
1443
|
-
evidenceRate: number;
|
|
1444
|
-
assignments: {
|
|
1445
|
-
opportunityId: string;
|
|
1446
|
-
side: string;
|
|
1447
|
-
}[];
|
|
1448
|
-
embedding?: number[] | undefined;
|
|
1449
|
-
embeddingModel?: string | undefined;
|
|
1450
|
-
};
|
|
1451
|
-
alternates: {
|
|
1452
|
-
label: string;
|
|
1453
|
-
questionSeed: string;
|
|
1454
|
-
sides: string[];
|
|
1455
|
-
sideCounts: Record<string, number>;
|
|
1456
|
-
voi: number;
|
|
1457
|
-
evidenceRate: number;
|
|
1458
|
-
assignments: {
|
|
1459
|
-
opportunityId: string;
|
|
1460
|
-
side: string;
|
|
1461
|
-
}[];
|
|
1462
|
-
embedding?: number[] | undefined;
|
|
1463
|
-
embeddingModel?: string | undefined;
|
|
1464
|
-
}[];
|
|
1465
|
-
runId?: string | undefined;
|
|
1466
|
-
intentFingerprint?: string | undefined;
|
|
1467
|
-
intentText?: string | undefined;
|
|
1468
|
-
opportunityIds?: string[] | undefined;
|
|
1469
|
-
} | undefined;
|
|
1470
|
-
pushRequestedAt?: string | undefined;
|
|
1471
|
-
pushRecoveryAttemptedAt?: string | undefined;
|
|
1472
|
-
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
1473
|
-
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
1474
|
-
pushRequestSuppressedAt?: string | undefined;
|
|
1475
|
-
voidedReason?: "pool_drift" | "intent_edit" | "recovery_drift" | "negotiation_stale" | "retired_mode" | undefined;
|
|
1476
|
-
pushedAt?: string | undefined;
|
|
1477
|
-
}>;
|
|
1478
|
-
export declare const QuestionActorSchema: z.ZodObject<{
|
|
1479
|
-
/** The user this question is for. */
|
|
1480
|
-
userId: z.ZodString;
|
|
1481
|
-
/** Optional network context. */
|
|
1482
|
-
networkId: z.ZodOptional<z.ZodString>;
|
|
1483
|
-
/** Actor's role in the question — currently always "subject". */
|
|
1484
|
-
role: z.ZodLiteral<"subject">;
|
|
1485
|
-
}, "strip", z.ZodTypeAny, {
|
|
1486
|
-
userId: string;
|
|
1487
|
-
role: "subject";
|
|
1488
|
-
networkId?: string | undefined;
|
|
1489
|
-
}, {
|
|
1490
|
-
userId: string;
|
|
1491
|
-
role: "subject";
|
|
1492
|
-
networkId?: string | undefined;
|
|
1493
|
-
}>;
|
|
1494
|
-
export declare const QuestionAnswerSchema: z.ZodObject<{
|
|
1495
|
-
/** Option labels the user selected. */
|
|
1496
|
-
selectedOptions: z.ZodArray<z.ZodString, "many">;
|
|
1497
|
-
/** Free-text input when the user chose "Other" or elaborated. */
|
|
1498
|
-
freeText: z.ZodOptional<z.ZodString>;
|
|
1499
|
-
/** User ID of the answerer. */
|
|
1500
|
-
answeredBy: z.ZodString;
|
|
1501
|
-
/** ISO-8601 timestamp of when the answer was submitted. */
|
|
1502
|
-
answeredAt: z.ZodString;
|
|
1503
|
-
}, "strip", z.ZodTypeAny, {
|
|
1504
|
-
selectedOptions: string[];
|
|
1505
|
-
answeredBy: string;
|
|
1506
|
-
answeredAt: string;
|
|
1507
|
-
freeText?: string | undefined;
|
|
1508
|
-
}, {
|
|
1509
|
-
selectedOptions: string[];
|
|
1510
|
-
answeredBy: string;
|
|
1511
|
-
answeredAt: string;
|
|
1512
|
-
freeText?: string | undefined;
|
|
1513
|
-
}>;
|
|
1514
|
-
export type NegotiationQuestionPurpose = z.infer<typeof NegotiationQuestionPurposeSchema>;
|
|
1515
|
-
export type NegotiationQuestionCandidate = z.infer<typeof NegotiationQuestionCandidateSchema>;
|
|
1516
|
-
export type NegotiationQuestionProvenance = z.infer<typeof NegotiationQuestionProvenanceSchema>;
|
|
1517
|
-
export type QuestionPurpose = z.infer<typeof QuestionPurposeSchema>;
|
|
1518
|
-
export type QuestionMode = z.infer<typeof QuestionModeSchema>;
|
|
1519
|
-
export type QuestionDetection = z.infer<typeof QuestionDetectionSchema>;
|
|
1520
|
-
export type QuestionActor = z.infer<typeof QuestionActorSchema>;
|
|
1521
|
-
export type QuestionAnswer = z.infer<typeof QuestionAnswerSchema>;
|
|
1522
|
-
export type QuestionPoolAssignment = z.infer<typeof QuestionPoolAssignmentSchema>;
|
|
1523
|
-
export type QuestionPoolDiscriminator = z.infer<typeof QuestionPoolDiscriminatorSchema>;
|
|
1524
|
-
export type QuestionPoolSnapshot = z.infer<typeof QuestionPoolSnapshotSchema>;
|
|
1525
|
-
export type QuestionRecoverySnapshot = z.infer<typeof QuestionRecoverySnapshotSchema>;
|
|
1526
|
-
export type QuestionPoolPush = z.infer<typeof QuestionPoolPushSchema>;
|
|
1527
|
-
export type QuestionVoidedReason = z.infer<typeof QuestionVoidedReasonSchema>;
|
|
1528
|
-
export type QuestionPoolPushRequestStatus = z.infer<typeof QuestionPoolPushRequestStatusSchema>;
|
|
1529
|
-
export type QuestionPoolPushRequestReason = z.infer<typeof QuestionPoolPushRequestReasonSchema>;
|