@indexnetwork/protocol 22.0.0-rc.498.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 -132
- package/dist/index.js +41 -100
- 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,1018 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Seat-scoped negotiation protocol rules (v2 client-advocate protocol).
|
|
3
|
-
*
|
|
4
|
-
* v2 fixes exactly one initiating seat per match (`metadata.initiatorUserId`,
|
|
5
|
-
* stamped at discovery time — IND-396) and makes consent asymmetric:
|
|
6
|
-
* **accept can only come from the counterparty seat**, schema-enforced.
|
|
7
|
-
*
|
|
8
|
-
* Vocabulary per seat (v2):
|
|
9
|
-
* - initiator: `outreach | counter | question | withdraw` (no accept)
|
|
10
|
-
* - counterparty: `accept | decline | counter | question`
|
|
11
|
-
* - final turn: initiator `withdraw | counter`; counterparty `accept | decline`
|
|
12
|
-
*
|
|
13
|
-
* v1 tasks keep the legacy vocabulary (`propose | accept | reject | counter |
|
|
14
|
-
* question`) — the version is inherited per conversation, never re-stamped, so
|
|
15
|
-
* in-flight v1 negotiations are grandfathered untouched.
|
|
16
|
-
*
|
|
17
|
-
* Outcome mapping is version-independent: `accept` → opportunity `pending`,
|
|
18
|
-
* `reject`/`withdraw`/`decline` → `rejected`, turn-cap → `stalled`.
|
|
19
|
-
*/
|
|
20
|
-
import { z } from "zod";
|
|
21
|
-
import type { NegotiationAction, NegotiationSeat, NegotiationProtocolVersion } from "../shared/schemas/negotiation-state.schema.js";
|
|
22
|
-
/** Initiator seat, non-final turn: may reach out, push back, ask, or walk away — never accept. */
|
|
23
|
-
export declare const InitiatorTurnSchema: z.ZodObject<{
|
|
24
|
-
action: z.ZodEnum<["outreach", "counter", "question", "withdraw"]>;
|
|
25
|
-
assessment: z.ZodObject<{
|
|
26
|
-
reasoning: z.ZodString;
|
|
27
|
-
suggestedRoles: z.ZodObject<{
|
|
28
|
-
ownUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
29
|
-
otherUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
30
|
-
}, "strip", z.ZodTypeAny, {
|
|
31
|
-
ownUser: "agent" | "patient" | "peer";
|
|
32
|
-
otherUser: "agent" | "patient" | "peer";
|
|
33
|
-
}, {
|
|
34
|
-
ownUser: "agent" | "patient" | "peer";
|
|
35
|
-
otherUser: "agent" | "patient" | "peer";
|
|
36
|
-
}>;
|
|
37
|
-
}, "strip", z.ZodTypeAny, {
|
|
38
|
-
reasoning: string;
|
|
39
|
-
suggestedRoles: {
|
|
40
|
-
ownUser: "agent" | "patient" | "peer";
|
|
41
|
-
otherUser: "agent" | "patient" | "peer";
|
|
42
|
-
};
|
|
43
|
-
}, {
|
|
44
|
-
reasoning: string;
|
|
45
|
-
suggestedRoles: {
|
|
46
|
-
ownUser: "agent" | "patient" | "peer";
|
|
47
|
-
otherUser: "agent" | "patient" | "peer";
|
|
48
|
-
};
|
|
49
|
-
}>;
|
|
50
|
-
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
51
|
-
/** Present when action is `ask_user` (v2, P3.2). */
|
|
52
|
-
askUser: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
53
|
-
reason: z.ZodEnum<["unresolved_owner_constraint", "consequential_disclosure_permission", "repeated_non_convergence", "insufficient_commitment_authority"]>;
|
|
54
|
-
question: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
55
|
-
title: z.ZodString;
|
|
56
|
-
prompt: z.ZodString;
|
|
57
|
-
options: z.ZodArray<z.ZodObject<{
|
|
58
|
-
label: z.ZodString;
|
|
59
|
-
description: z.ZodString;
|
|
60
|
-
}, "strip", z.ZodTypeAny, {
|
|
61
|
-
label: string;
|
|
62
|
-
description: string;
|
|
63
|
-
}, {
|
|
64
|
-
label: string;
|
|
65
|
-
description: string;
|
|
66
|
-
}>, "many">;
|
|
67
|
-
multiSelect: z.ZodBoolean;
|
|
68
|
-
}, "strip", z.ZodTypeAny, {
|
|
69
|
-
prompt: string;
|
|
70
|
-
options: {
|
|
71
|
-
label: string;
|
|
72
|
-
description: string;
|
|
73
|
-
}[];
|
|
74
|
-
title: string;
|
|
75
|
-
multiSelect: boolean;
|
|
76
|
-
}, {
|
|
77
|
-
prompt: string;
|
|
78
|
-
options: {
|
|
79
|
-
label: string;
|
|
80
|
-
description: string;
|
|
81
|
-
}[];
|
|
82
|
-
title: string;
|
|
83
|
-
multiSelect: boolean;
|
|
84
|
-
}>>>, {
|
|
85
|
-
prompt: string;
|
|
86
|
-
options: {
|
|
87
|
-
label: string;
|
|
88
|
-
description: string;
|
|
89
|
-
}[];
|
|
90
|
-
title: string;
|
|
91
|
-
multiSelect: boolean;
|
|
92
|
-
} | undefined, {
|
|
93
|
-
prompt: string;
|
|
94
|
-
options: {
|
|
95
|
-
label: string;
|
|
96
|
-
description: string;
|
|
97
|
-
}[];
|
|
98
|
-
title: string;
|
|
99
|
-
multiSelect: boolean;
|
|
100
|
-
} | null | undefined>;
|
|
101
|
-
}, "strict", z.ZodTypeAny, {
|
|
102
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
103
|
-
question?: {
|
|
104
|
-
prompt: string;
|
|
105
|
-
options: {
|
|
106
|
-
label: string;
|
|
107
|
-
description: string;
|
|
108
|
-
}[];
|
|
109
|
-
title: string;
|
|
110
|
-
multiSelect: boolean;
|
|
111
|
-
} | undefined;
|
|
112
|
-
}, {
|
|
113
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
114
|
-
question?: {
|
|
115
|
-
prompt: string;
|
|
116
|
-
options: {
|
|
117
|
-
label: string;
|
|
118
|
-
description: string;
|
|
119
|
-
}[];
|
|
120
|
-
title: string;
|
|
121
|
-
multiSelect: boolean;
|
|
122
|
-
} | null | undefined;
|
|
123
|
-
}>>>;
|
|
124
|
-
}, "strip", z.ZodTypeAny, {
|
|
125
|
-
action: "counter" | "question" | "outreach" | "withdraw";
|
|
126
|
-
assessment: {
|
|
127
|
-
reasoning: string;
|
|
128
|
-
suggestedRoles: {
|
|
129
|
-
ownUser: "agent" | "patient" | "peer";
|
|
130
|
-
otherUser: "agent" | "patient" | "peer";
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
message?: string | null | undefined;
|
|
134
|
-
askUser?: {
|
|
135
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
136
|
-
question?: {
|
|
137
|
-
prompt: string;
|
|
138
|
-
options: {
|
|
139
|
-
label: string;
|
|
140
|
-
description: string;
|
|
141
|
-
}[];
|
|
142
|
-
title: string;
|
|
143
|
-
multiSelect: boolean;
|
|
144
|
-
} | undefined;
|
|
145
|
-
} | null | undefined;
|
|
146
|
-
}, {
|
|
147
|
-
action: "counter" | "question" | "outreach" | "withdraw";
|
|
148
|
-
assessment: {
|
|
149
|
-
reasoning: string;
|
|
150
|
-
suggestedRoles: {
|
|
151
|
-
ownUser: "agent" | "patient" | "peer";
|
|
152
|
-
otherUser: "agent" | "patient" | "peer";
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
message?: string | null | undefined;
|
|
156
|
-
askUser?: {
|
|
157
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
158
|
-
question?: {
|
|
159
|
-
prompt: string;
|
|
160
|
-
options: {
|
|
161
|
-
label: string;
|
|
162
|
-
description: string;
|
|
163
|
-
}[];
|
|
164
|
-
title: string;
|
|
165
|
-
multiSelect: boolean;
|
|
166
|
-
} | null | undefined;
|
|
167
|
-
} | null | undefined;
|
|
168
|
-
}>;
|
|
169
|
-
/** Counterparty seat, non-final turn: the only seat that can accept. */
|
|
170
|
-
export declare const CounterpartyTurnSchema: z.ZodObject<{
|
|
171
|
-
action: z.ZodEnum<["accept", "decline", "counter", "question"]>;
|
|
172
|
-
assessment: z.ZodObject<{
|
|
173
|
-
reasoning: z.ZodString;
|
|
174
|
-
suggestedRoles: z.ZodObject<{
|
|
175
|
-
ownUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
176
|
-
otherUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
177
|
-
}, "strip", z.ZodTypeAny, {
|
|
178
|
-
ownUser: "agent" | "patient" | "peer";
|
|
179
|
-
otherUser: "agent" | "patient" | "peer";
|
|
180
|
-
}, {
|
|
181
|
-
ownUser: "agent" | "patient" | "peer";
|
|
182
|
-
otherUser: "agent" | "patient" | "peer";
|
|
183
|
-
}>;
|
|
184
|
-
}, "strip", z.ZodTypeAny, {
|
|
185
|
-
reasoning: string;
|
|
186
|
-
suggestedRoles: {
|
|
187
|
-
ownUser: "agent" | "patient" | "peer";
|
|
188
|
-
otherUser: "agent" | "patient" | "peer";
|
|
189
|
-
};
|
|
190
|
-
}, {
|
|
191
|
-
reasoning: string;
|
|
192
|
-
suggestedRoles: {
|
|
193
|
-
ownUser: "agent" | "patient" | "peer";
|
|
194
|
-
otherUser: "agent" | "patient" | "peer";
|
|
195
|
-
};
|
|
196
|
-
}>;
|
|
197
|
-
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
198
|
-
/** Present when action is `ask_user` (v2, P3.2). */
|
|
199
|
-
askUser: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
200
|
-
reason: z.ZodEnum<["unresolved_owner_constraint", "consequential_disclosure_permission", "repeated_non_convergence", "insufficient_commitment_authority"]>;
|
|
201
|
-
question: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
202
|
-
title: z.ZodString;
|
|
203
|
-
prompt: z.ZodString;
|
|
204
|
-
options: z.ZodArray<z.ZodObject<{
|
|
205
|
-
label: z.ZodString;
|
|
206
|
-
description: z.ZodString;
|
|
207
|
-
}, "strip", z.ZodTypeAny, {
|
|
208
|
-
label: string;
|
|
209
|
-
description: string;
|
|
210
|
-
}, {
|
|
211
|
-
label: string;
|
|
212
|
-
description: string;
|
|
213
|
-
}>, "many">;
|
|
214
|
-
multiSelect: z.ZodBoolean;
|
|
215
|
-
}, "strip", z.ZodTypeAny, {
|
|
216
|
-
prompt: string;
|
|
217
|
-
options: {
|
|
218
|
-
label: string;
|
|
219
|
-
description: string;
|
|
220
|
-
}[];
|
|
221
|
-
title: string;
|
|
222
|
-
multiSelect: boolean;
|
|
223
|
-
}, {
|
|
224
|
-
prompt: string;
|
|
225
|
-
options: {
|
|
226
|
-
label: string;
|
|
227
|
-
description: string;
|
|
228
|
-
}[];
|
|
229
|
-
title: string;
|
|
230
|
-
multiSelect: boolean;
|
|
231
|
-
}>>>, {
|
|
232
|
-
prompt: string;
|
|
233
|
-
options: {
|
|
234
|
-
label: string;
|
|
235
|
-
description: string;
|
|
236
|
-
}[];
|
|
237
|
-
title: string;
|
|
238
|
-
multiSelect: boolean;
|
|
239
|
-
} | undefined, {
|
|
240
|
-
prompt: string;
|
|
241
|
-
options: {
|
|
242
|
-
label: string;
|
|
243
|
-
description: string;
|
|
244
|
-
}[];
|
|
245
|
-
title: string;
|
|
246
|
-
multiSelect: boolean;
|
|
247
|
-
} | null | undefined>;
|
|
248
|
-
}, "strict", z.ZodTypeAny, {
|
|
249
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
250
|
-
question?: {
|
|
251
|
-
prompt: string;
|
|
252
|
-
options: {
|
|
253
|
-
label: string;
|
|
254
|
-
description: string;
|
|
255
|
-
}[];
|
|
256
|
-
title: string;
|
|
257
|
-
multiSelect: boolean;
|
|
258
|
-
} | undefined;
|
|
259
|
-
}, {
|
|
260
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
261
|
-
question?: {
|
|
262
|
-
prompt: string;
|
|
263
|
-
options: {
|
|
264
|
-
label: string;
|
|
265
|
-
description: string;
|
|
266
|
-
}[];
|
|
267
|
-
title: string;
|
|
268
|
-
multiSelect: boolean;
|
|
269
|
-
} | null | undefined;
|
|
270
|
-
}>>>;
|
|
271
|
-
}, "strip", z.ZodTypeAny, {
|
|
272
|
-
action: "accept" | "counter" | "question" | "decline";
|
|
273
|
-
assessment: {
|
|
274
|
-
reasoning: string;
|
|
275
|
-
suggestedRoles: {
|
|
276
|
-
ownUser: "agent" | "patient" | "peer";
|
|
277
|
-
otherUser: "agent" | "patient" | "peer";
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
|
-
message?: string | null | undefined;
|
|
281
|
-
askUser?: {
|
|
282
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
283
|
-
question?: {
|
|
284
|
-
prompt: string;
|
|
285
|
-
options: {
|
|
286
|
-
label: string;
|
|
287
|
-
description: string;
|
|
288
|
-
}[];
|
|
289
|
-
title: string;
|
|
290
|
-
multiSelect: boolean;
|
|
291
|
-
} | undefined;
|
|
292
|
-
} | null | undefined;
|
|
293
|
-
}, {
|
|
294
|
-
action: "accept" | "counter" | "question" | "decline";
|
|
295
|
-
assessment: {
|
|
296
|
-
reasoning: string;
|
|
297
|
-
suggestedRoles: {
|
|
298
|
-
ownUser: "agent" | "patient" | "peer";
|
|
299
|
-
otherUser: "agent" | "patient" | "peer";
|
|
300
|
-
};
|
|
301
|
-
};
|
|
302
|
-
message?: string | null | undefined;
|
|
303
|
-
askUser?: {
|
|
304
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
305
|
-
question?: {
|
|
306
|
-
prompt: string;
|
|
307
|
-
options: {
|
|
308
|
-
label: string;
|
|
309
|
-
description: string;
|
|
310
|
-
}[];
|
|
311
|
-
title: string;
|
|
312
|
-
multiSelect: boolean;
|
|
313
|
-
} | null | undefined;
|
|
314
|
-
} | null | undefined;
|
|
315
|
-
}>;
|
|
316
|
-
/** Initiator seat, final allowed turn: commit to walking away or leave the door open. */
|
|
317
|
-
export declare const FinalInitiatorTurnSchema: z.ZodObject<{
|
|
318
|
-
action: z.ZodEnum<["withdraw", "counter"]>;
|
|
319
|
-
assessment: z.ZodObject<{
|
|
320
|
-
reasoning: z.ZodString;
|
|
321
|
-
suggestedRoles: z.ZodObject<{
|
|
322
|
-
ownUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
323
|
-
otherUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
324
|
-
}, "strip", z.ZodTypeAny, {
|
|
325
|
-
ownUser: "agent" | "patient" | "peer";
|
|
326
|
-
otherUser: "agent" | "patient" | "peer";
|
|
327
|
-
}, {
|
|
328
|
-
ownUser: "agent" | "patient" | "peer";
|
|
329
|
-
otherUser: "agent" | "patient" | "peer";
|
|
330
|
-
}>;
|
|
331
|
-
}, "strip", z.ZodTypeAny, {
|
|
332
|
-
reasoning: string;
|
|
333
|
-
suggestedRoles: {
|
|
334
|
-
ownUser: "agent" | "patient" | "peer";
|
|
335
|
-
otherUser: "agent" | "patient" | "peer";
|
|
336
|
-
};
|
|
337
|
-
}, {
|
|
338
|
-
reasoning: string;
|
|
339
|
-
suggestedRoles: {
|
|
340
|
-
ownUser: "agent" | "patient" | "peer";
|
|
341
|
-
otherUser: "agent" | "patient" | "peer";
|
|
342
|
-
};
|
|
343
|
-
}>;
|
|
344
|
-
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
345
|
-
/** Present when action is `ask_user` (v2, P3.2). */
|
|
346
|
-
askUser: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
347
|
-
reason: z.ZodEnum<["unresolved_owner_constraint", "consequential_disclosure_permission", "repeated_non_convergence", "insufficient_commitment_authority"]>;
|
|
348
|
-
question: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
349
|
-
title: z.ZodString;
|
|
350
|
-
prompt: z.ZodString;
|
|
351
|
-
options: z.ZodArray<z.ZodObject<{
|
|
352
|
-
label: z.ZodString;
|
|
353
|
-
description: z.ZodString;
|
|
354
|
-
}, "strip", z.ZodTypeAny, {
|
|
355
|
-
label: string;
|
|
356
|
-
description: string;
|
|
357
|
-
}, {
|
|
358
|
-
label: string;
|
|
359
|
-
description: string;
|
|
360
|
-
}>, "many">;
|
|
361
|
-
multiSelect: z.ZodBoolean;
|
|
362
|
-
}, "strip", z.ZodTypeAny, {
|
|
363
|
-
prompt: string;
|
|
364
|
-
options: {
|
|
365
|
-
label: string;
|
|
366
|
-
description: string;
|
|
367
|
-
}[];
|
|
368
|
-
title: string;
|
|
369
|
-
multiSelect: boolean;
|
|
370
|
-
}, {
|
|
371
|
-
prompt: string;
|
|
372
|
-
options: {
|
|
373
|
-
label: string;
|
|
374
|
-
description: string;
|
|
375
|
-
}[];
|
|
376
|
-
title: string;
|
|
377
|
-
multiSelect: boolean;
|
|
378
|
-
}>>>, {
|
|
379
|
-
prompt: string;
|
|
380
|
-
options: {
|
|
381
|
-
label: string;
|
|
382
|
-
description: string;
|
|
383
|
-
}[];
|
|
384
|
-
title: string;
|
|
385
|
-
multiSelect: boolean;
|
|
386
|
-
} | undefined, {
|
|
387
|
-
prompt: string;
|
|
388
|
-
options: {
|
|
389
|
-
label: string;
|
|
390
|
-
description: string;
|
|
391
|
-
}[];
|
|
392
|
-
title: string;
|
|
393
|
-
multiSelect: boolean;
|
|
394
|
-
} | null | undefined>;
|
|
395
|
-
}, "strict", z.ZodTypeAny, {
|
|
396
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
397
|
-
question?: {
|
|
398
|
-
prompt: string;
|
|
399
|
-
options: {
|
|
400
|
-
label: string;
|
|
401
|
-
description: string;
|
|
402
|
-
}[];
|
|
403
|
-
title: string;
|
|
404
|
-
multiSelect: boolean;
|
|
405
|
-
} | undefined;
|
|
406
|
-
}, {
|
|
407
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
408
|
-
question?: {
|
|
409
|
-
prompt: string;
|
|
410
|
-
options: {
|
|
411
|
-
label: string;
|
|
412
|
-
description: string;
|
|
413
|
-
}[];
|
|
414
|
-
title: string;
|
|
415
|
-
multiSelect: boolean;
|
|
416
|
-
} | null | undefined;
|
|
417
|
-
}>>>;
|
|
418
|
-
}, "strip", z.ZodTypeAny, {
|
|
419
|
-
action: "counter" | "withdraw";
|
|
420
|
-
assessment: {
|
|
421
|
-
reasoning: string;
|
|
422
|
-
suggestedRoles: {
|
|
423
|
-
ownUser: "agent" | "patient" | "peer";
|
|
424
|
-
otherUser: "agent" | "patient" | "peer";
|
|
425
|
-
};
|
|
426
|
-
};
|
|
427
|
-
message?: string | null | undefined;
|
|
428
|
-
askUser?: {
|
|
429
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
430
|
-
question?: {
|
|
431
|
-
prompt: string;
|
|
432
|
-
options: {
|
|
433
|
-
label: string;
|
|
434
|
-
description: string;
|
|
435
|
-
}[];
|
|
436
|
-
title: string;
|
|
437
|
-
multiSelect: boolean;
|
|
438
|
-
} | undefined;
|
|
439
|
-
} | null | undefined;
|
|
440
|
-
}, {
|
|
441
|
-
action: "counter" | "withdraw";
|
|
442
|
-
assessment: {
|
|
443
|
-
reasoning: string;
|
|
444
|
-
suggestedRoles: {
|
|
445
|
-
ownUser: "agent" | "patient" | "peer";
|
|
446
|
-
otherUser: "agent" | "patient" | "peer";
|
|
447
|
-
};
|
|
448
|
-
};
|
|
449
|
-
message?: string | null | undefined;
|
|
450
|
-
askUser?: {
|
|
451
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
452
|
-
question?: {
|
|
453
|
-
prompt: string;
|
|
454
|
-
options: {
|
|
455
|
-
label: string;
|
|
456
|
-
description: string;
|
|
457
|
-
}[];
|
|
458
|
-
title: string;
|
|
459
|
-
multiSelect: boolean;
|
|
460
|
-
} | null | undefined;
|
|
461
|
-
} | null | undefined;
|
|
462
|
-
}>;
|
|
463
|
-
/** Counterparty seat, final allowed turn: must decide. */
|
|
464
|
-
export declare const FinalCounterpartyTurnSchema: z.ZodObject<{
|
|
465
|
-
action: z.ZodEnum<["accept", "decline"]>;
|
|
466
|
-
assessment: z.ZodObject<{
|
|
467
|
-
reasoning: z.ZodString;
|
|
468
|
-
suggestedRoles: z.ZodObject<{
|
|
469
|
-
ownUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
470
|
-
otherUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
471
|
-
}, "strip", z.ZodTypeAny, {
|
|
472
|
-
ownUser: "agent" | "patient" | "peer";
|
|
473
|
-
otherUser: "agent" | "patient" | "peer";
|
|
474
|
-
}, {
|
|
475
|
-
ownUser: "agent" | "patient" | "peer";
|
|
476
|
-
otherUser: "agent" | "patient" | "peer";
|
|
477
|
-
}>;
|
|
478
|
-
}, "strip", z.ZodTypeAny, {
|
|
479
|
-
reasoning: string;
|
|
480
|
-
suggestedRoles: {
|
|
481
|
-
ownUser: "agent" | "patient" | "peer";
|
|
482
|
-
otherUser: "agent" | "patient" | "peer";
|
|
483
|
-
};
|
|
484
|
-
}, {
|
|
485
|
-
reasoning: string;
|
|
486
|
-
suggestedRoles: {
|
|
487
|
-
ownUser: "agent" | "patient" | "peer";
|
|
488
|
-
otherUser: "agent" | "patient" | "peer";
|
|
489
|
-
};
|
|
490
|
-
}>;
|
|
491
|
-
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
492
|
-
/** Present when action is `ask_user` (v2, P3.2). */
|
|
493
|
-
askUser: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
494
|
-
reason: z.ZodEnum<["unresolved_owner_constraint", "consequential_disclosure_permission", "repeated_non_convergence", "insufficient_commitment_authority"]>;
|
|
495
|
-
question: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
496
|
-
title: z.ZodString;
|
|
497
|
-
prompt: z.ZodString;
|
|
498
|
-
options: z.ZodArray<z.ZodObject<{
|
|
499
|
-
label: z.ZodString;
|
|
500
|
-
description: z.ZodString;
|
|
501
|
-
}, "strip", z.ZodTypeAny, {
|
|
502
|
-
label: string;
|
|
503
|
-
description: string;
|
|
504
|
-
}, {
|
|
505
|
-
label: string;
|
|
506
|
-
description: string;
|
|
507
|
-
}>, "many">;
|
|
508
|
-
multiSelect: z.ZodBoolean;
|
|
509
|
-
}, "strip", z.ZodTypeAny, {
|
|
510
|
-
prompt: string;
|
|
511
|
-
options: {
|
|
512
|
-
label: string;
|
|
513
|
-
description: string;
|
|
514
|
-
}[];
|
|
515
|
-
title: string;
|
|
516
|
-
multiSelect: boolean;
|
|
517
|
-
}, {
|
|
518
|
-
prompt: string;
|
|
519
|
-
options: {
|
|
520
|
-
label: string;
|
|
521
|
-
description: string;
|
|
522
|
-
}[];
|
|
523
|
-
title: string;
|
|
524
|
-
multiSelect: boolean;
|
|
525
|
-
}>>>, {
|
|
526
|
-
prompt: string;
|
|
527
|
-
options: {
|
|
528
|
-
label: string;
|
|
529
|
-
description: string;
|
|
530
|
-
}[];
|
|
531
|
-
title: string;
|
|
532
|
-
multiSelect: boolean;
|
|
533
|
-
} | undefined, {
|
|
534
|
-
prompt: string;
|
|
535
|
-
options: {
|
|
536
|
-
label: string;
|
|
537
|
-
description: string;
|
|
538
|
-
}[];
|
|
539
|
-
title: string;
|
|
540
|
-
multiSelect: boolean;
|
|
541
|
-
} | null | undefined>;
|
|
542
|
-
}, "strict", z.ZodTypeAny, {
|
|
543
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
544
|
-
question?: {
|
|
545
|
-
prompt: string;
|
|
546
|
-
options: {
|
|
547
|
-
label: string;
|
|
548
|
-
description: string;
|
|
549
|
-
}[];
|
|
550
|
-
title: string;
|
|
551
|
-
multiSelect: boolean;
|
|
552
|
-
} | undefined;
|
|
553
|
-
}, {
|
|
554
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
555
|
-
question?: {
|
|
556
|
-
prompt: string;
|
|
557
|
-
options: {
|
|
558
|
-
label: string;
|
|
559
|
-
description: string;
|
|
560
|
-
}[];
|
|
561
|
-
title: string;
|
|
562
|
-
multiSelect: boolean;
|
|
563
|
-
} | null | undefined;
|
|
564
|
-
}>>>;
|
|
565
|
-
}, "strip", z.ZodTypeAny, {
|
|
566
|
-
action: "accept" | "decline";
|
|
567
|
-
assessment: {
|
|
568
|
-
reasoning: string;
|
|
569
|
-
suggestedRoles: {
|
|
570
|
-
ownUser: "agent" | "patient" | "peer";
|
|
571
|
-
otherUser: "agent" | "patient" | "peer";
|
|
572
|
-
};
|
|
573
|
-
};
|
|
574
|
-
message?: string | null | undefined;
|
|
575
|
-
askUser?: {
|
|
576
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
577
|
-
question?: {
|
|
578
|
-
prompt: string;
|
|
579
|
-
options: {
|
|
580
|
-
label: string;
|
|
581
|
-
description: string;
|
|
582
|
-
}[];
|
|
583
|
-
title: string;
|
|
584
|
-
multiSelect: boolean;
|
|
585
|
-
} | undefined;
|
|
586
|
-
} | null | undefined;
|
|
587
|
-
}, {
|
|
588
|
-
action: "accept" | "decline";
|
|
589
|
-
assessment: {
|
|
590
|
-
reasoning: string;
|
|
591
|
-
suggestedRoles: {
|
|
592
|
-
ownUser: "agent" | "patient" | "peer";
|
|
593
|
-
otherUser: "agent" | "patient" | "peer";
|
|
594
|
-
};
|
|
595
|
-
};
|
|
596
|
-
message?: string | null | undefined;
|
|
597
|
-
askUser?: {
|
|
598
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
599
|
-
question?: {
|
|
600
|
-
prompt: string;
|
|
601
|
-
options: {
|
|
602
|
-
label: string;
|
|
603
|
-
description: string;
|
|
604
|
-
}[];
|
|
605
|
-
title: string;
|
|
606
|
-
multiSelect: boolean;
|
|
607
|
-
} | null | undefined;
|
|
608
|
-
} | null | undefined;
|
|
609
|
-
}>;
|
|
610
|
-
/** Initiator seat, non-final turn, with the client-consult pause available. */
|
|
611
|
-
export declare const InitiatorAskUserTurnSchema: z.ZodObject<{
|
|
612
|
-
action: z.ZodEnum<["outreach", "counter", "question", "withdraw", "ask_user"]>;
|
|
613
|
-
assessment: z.ZodObject<{
|
|
614
|
-
reasoning: z.ZodString;
|
|
615
|
-
suggestedRoles: z.ZodObject<{
|
|
616
|
-
ownUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
617
|
-
otherUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
618
|
-
}, "strip", z.ZodTypeAny, {
|
|
619
|
-
ownUser: "agent" | "patient" | "peer";
|
|
620
|
-
otherUser: "agent" | "patient" | "peer";
|
|
621
|
-
}, {
|
|
622
|
-
ownUser: "agent" | "patient" | "peer";
|
|
623
|
-
otherUser: "agent" | "patient" | "peer";
|
|
624
|
-
}>;
|
|
625
|
-
}, "strip", z.ZodTypeAny, {
|
|
626
|
-
reasoning: string;
|
|
627
|
-
suggestedRoles: {
|
|
628
|
-
ownUser: "agent" | "patient" | "peer";
|
|
629
|
-
otherUser: "agent" | "patient" | "peer";
|
|
630
|
-
};
|
|
631
|
-
}, {
|
|
632
|
-
reasoning: string;
|
|
633
|
-
suggestedRoles: {
|
|
634
|
-
ownUser: "agent" | "patient" | "peer";
|
|
635
|
-
otherUser: "agent" | "patient" | "peer";
|
|
636
|
-
};
|
|
637
|
-
}>;
|
|
638
|
-
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
639
|
-
/** Present when action is `ask_user` (v2, P3.2). */
|
|
640
|
-
askUser: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
641
|
-
reason: z.ZodEnum<["unresolved_owner_constraint", "consequential_disclosure_permission", "repeated_non_convergence", "insufficient_commitment_authority"]>;
|
|
642
|
-
question: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
643
|
-
title: z.ZodString;
|
|
644
|
-
prompt: z.ZodString;
|
|
645
|
-
options: z.ZodArray<z.ZodObject<{
|
|
646
|
-
label: z.ZodString;
|
|
647
|
-
description: z.ZodString;
|
|
648
|
-
}, "strip", z.ZodTypeAny, {
|
|
649
|
-
label: string;
|
|
650
|
-
description: string;
|
|
651
|
-
}, {
|
|
652
|
-
label: string;
|
|
653
|
-
description: string;
|
|
654
|
-
}>, "many">;
|
|
655
|
-
multiSelect: z.ZodBoolean;
|
|
656
|
-
}, "strip", z.ZodTypeAny, {
|
|
657
|
-
prompt: string;
|
|
658
|
-
options: {
|
|
659
|
-
label: string;
|
|
660
|
-
description: string;
|
|
661
|
-
}[];
|
|
662
|
-
title: string;
|
|
663
|
-
multiSelect: boolean;
|
|
664
|
-
}, {
|
|
665
|
-
prompt: string;
|
|
666
|
-
options: {
|
|
667
|
-
label: string;
|
|
668
|
-
description: string;
|
|
669
|
-
}[];
|
|
670
|
-
title: string;
|
|
671
|
-
multiSelect: boolean;
|
|
672
|
-
}>>>, {
|
|
673
|
-
prompt: string;
|
|
674
|
-
options: {
|
|
675
|
-
label: string;
|
|
676
|
-
description: string;
|
|
677
|
-
}[];
|
|
678
|
-
title: string;
|
|
679
|
-
multiSelect: boolean;
|
|
680
|
-
} | undefined, {
|
|
681
|
-
prompt: string;
|
|
682
|
-
options: {
|
|
683
|
-
label: string;
|
|
684
|
-
description: string;
|
|
685
|
-
}[];
|
|
686
|
-
title: string;
|
|
687
|
-
multiSelect: boolean;
|
|
688
|
-
} | null | undefined>;
|
|
689
|
-
}, "strict", z.ZodTypeAny, {
|
|
690
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
691
|
-
question?: {
|
|
692
|
-
prompt: string;
|
|
693
|
-
options: {
|
|
694
|
-
label: string;
|
|
695
|
-
description: string;
|
|
696
|
-
}[];
|
|
697
|
-
title: string;
|
|
698
|
-
multiSelect: boolean;
|
|
699
|
-
} | undefined;
|
|
700
|
-
}, {
|
|
701
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
702
|
-
question?: {
|
|
703
|
-
prompt: string;
|
|
704
|
-
options: {
|
|
705
|
-
label: string;
|
|
706
|
-
description: string;
|
|
707
|
-
}[];
|
|
708
|
-
title: string;
|
|
709
|
-
multiSelect: boolean;
|
|
710
|
-
} | null | undefined;
|
|
711
|
-
}>>>;
|
|
712
|
-
}, "strip", z.ZodTypeAny, {
|
|
713
|
-
action: "counter" | "question" | "outreach" | "withdraw" | "ask_user";
|
|
714
|
-
assessment: {
|
|
715
|
-
reasoning: string;
|
|
716
|
-
suggestedRoles: {
|
|
717
|
-
ownUser: "agent" | "patient" | "peer";
|
|
718
|
-
otherUser: "agent" | "patient" | "peer";
|
|
719
|
-
};
|
|
720
|
-
};
|
|
721
|
-
message?: string | null | undefined;
|
|
722
|
-
askUser?: {
|
|
723
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
724
|
-
question?: {
|
|
725
|
-
prompt: string;
|
|
726
|
-
options: {
|
|
727
|
-
label: string;
|
|
728
|
-
description: string;
|
|
729
|
-
}[];
|
|
730
|
-
title: string;
|
|
731
|
-
multiSelect: boolean;
|
|
732
|
-
} | undefined;
|
|
733
|
-
} | null | undefined;
|
|
734
|
-
}, {
|
|
735
|
-
action: "counter" | "question" | "outreach" | "withdraw" | "ask_user";
|
|
736
|
-
assessment: {
|
|
737
|
-
reasoning: string;
|
|
738
|
-
suggestedRoles: {
|
|
739
|
-
ownUser: "agent" | "patient" | "peer";
|
|
740
|
-
otherUser: "agent" | "patient" | "peer";
|
|
741
|
-
};
|
|
742
|
-
};
|
|
743
|
-
message?: string | null | undefined;
|
|
744
|
-
askUser?: {
|
|
745
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
746
|
-
question?: {
|
|
747
|
-
prompt: string;
|
|
748
|
-
options: {
|
|
749
|
-
label: string;
|
|
750
|
-
description: string;
|
|
751
|
-
}[];
|
|
752
|
-
title: string;
|
|
753
|
-
multiSelect: boolean;
|
|
754
|
-
} | null | undefined;
|
|
755
|
-
} | null | undefined;
|
|
756
|
-
}>;
|
|
757
|
-
/** Counterparty seat, non-final turn, with the client-consult pause available. */
|
|
758
|
-
export declare const CounterpartyAskUserTurnSchema: z.ZodObject<{
|
|
759
|
-
action: z.ZodEnum<["accept", "decline", "counter", "question", "ask_user"]>;
|
|
760
|
-
assessment: z.ZodObject<{
|
|
761
|
-
reasoning: z.ZodString;
|
|
762
|
-
suggestedRoles: z.ZodObject<{
|
|
763
|
-
ownUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
764
|
-
otherUser: z.ZodEnum<["agent", "patient", "peer"]>;
|
|
765
|
-
}, "strip", z.ZodTypeAny, {
|
|
766
|
-
ownUser: "agent" | "patient" | "peer";
|
|
767
|
-
otherUser: "agent" | "patient" | "peer";
|
|
768
|
-
}, {
|
|
769
|
-
ownUser: "agent" | "patient" | "peer";
|
|
770
|
-
otherUser: "agent" | "patient" | "peer";
|
|
771
|
-
}>;
|
|
772
|
-
}, "strip", z.ZodTypeAny, {
|
|
773
|
-
reasoning: string;
|
|
774
|
-
suggestedRoles: {
|
|
775
|
-
ownUser: "agent" | "patient" | "peer";
|
|
776
|
-
otherUser: "agent" | "patient" | "peer";
|
|
777
|
-
};
|
|
778
|
-
}, {
|
|
779
|
-
reasoning: string;
|
|
780
|
-
suggestedRoles: {
|
|
781
|
-
ownUser: "agent" | "patient" | "peer";
|
|
782
|
-
otherUser: "agent" | "patient" | "peer";
|
|
783
|
-
};
|
|
784
|
-
}>;
|
|
785
|
-
message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
786
|
-
/** Present when action is `ask_user` (v2, P3.2). */
|
|
787
|
-
askUser: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
788
|
-
reason: z.ZodEnum<["unresolved_owner_constraint", "consequential_disclosure_permission", "repeated_non_convergence", "insufficient_commitment_authority"]>;
|
|
789
|
-
question: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
790
|
-
title: z.ZodString;
|
|
791
|
-
prompt: z.ZodString;
|
|
792
|
-
options: z.ZodArray<z.ZodObject<{
|
|
793
|
-
label: z.ZodString;
|
|
794
|
-
description: z.ZodString;
|
|
795
|
-
}, "strip", z.ZodTypeAny, {
|
|
796
|
-
label: string;
|
|
797
|
-
description: string;
|
|
798
|
-
}, {
|
|
799
|
-
label: string;
|
|
800
|
-
description: string;
|
|
801
|
-
}>, "many">;
|
|
802
|
-
multiSelect: z.ZodBoolean;
|
|
803
|
-
}, "strip", z.ZodTypeAny, {
|
|
804
|
-
prompt: string;
|
|
805
|
-
options: {
|
|
806
|
-
label: string;
|
|
807
|
-
description: string;
|
|
808
|
-
}[];
|
|
809
|
-
title: string;
|
|
810
|
-
multiSelect: boolean;
|
|
811
|
-
}, {
|
|
812
|
-
prompt: string;
|
|
813
|
-
options: {
|
|
814
|
-
label: string;
|
|
815
|
-
description: string;
|
|
816
|
-
}[];
|
|
817
|
-
title: string;
|
|
818
|
-
multiSelect: boolean;
|
|
819
|
-
}>>>, {
|
|
820
|
-
prompt: string;
|
|
821
|
-
options: {
|
|
822
|
-
label: string;
|
|
823
|
-
description: string;
|
|
824
|
-
}[];
|
|
825
|
-
title: string;
|
|
826
|
-
multiSelect: boolean;
|
|
827
|
-
} | undefined, {
|
|
828
|
-
prompt: string;
|
|
829
|
-
options: {
|
|
830
|
-
label: string;
|
|
831
|
-
description: string;
|
|
832
|
-
}[];
|
|
833
|
-
title: string;
|
|
834
|
-
multiSelect: boolean;
|
|
835
|
-
} | null | undefined>;
|
|
836
|
-
}, "strict", z.ZodTypeAny, {
|
|
837
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
838
|
-
question?: {
|
|
839
|
-
prompt: string;
|
|
840
|
-
options: {
|
|
841
|
-
label: string;
|
|
842
|
-
description: string;
|
|
843
|
-
}[];
|
|
844
|
-
title: string;
|
|
845
|
-
multiSelect: boolean;
|
|
846
|
-
} | undefined;
|
|
847
|
-
}, {
|
|
848
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
849
|
-
question?: {
|
|
850
|
-
prompt: string;
|
|
851
|
-
options: {
|
|
852
|
-
label: string;
|
|
853
|
-
description: string;
|
|
854
|
-
}[];
|
|
855
|
-
title: string;
|
|
856
|
-
multiSelect: boolean;
|
|
857
|
-
} | null | undefined;
|
|
858
|
-
}>>>;
|
|
859
|
-
}, "strip", z.ZodTypeAny, {
|
|
860
|
-
action: "accept" | "counter" | "question" | "decline" | "ask_user";
|
|
861
|
-
assessment: {
|
|
862
|
-
reasoning: string;
|
|
863
|
-
suggestedRoles: {
|
|
864
|
-
ownUser: "agent" | "patient" | "peer";
|
|
865
|
-
otherUser: "agent" | "patient" | "peer";
|
|
866
|
-
};
|
|
867
|
-
};
|
|
868
|
-
message?: string | null | undefined;
|
|
869
|
-
askUser?: {
|
|
870
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
871
|
-
question?: {
|
|
872
|
-
prompt: string;
|
|
873
|
-
options: {
|
|
874
|
-
label: string;
|
|
875
|
-
description: string;
|
|
876
|
-
}[];
|
|
877
|
-
title: string;
|
|
878
|
-
multiSelect: boolean;
|
|
879
|
-
} | undefined;
|
|
880
|
-
} | null | undefined;
|
|
881
|
-
}, {
|
|
882
|
-
action: "accept" | "counter" | "question" | "decline" | "ask_user";
|
|
883
|
-
assessment: {
|
|
884
|
-
reasoning: string;
|
|
885
|
-
suggestedRoles: {
|
|
886
|
-
ownUser: "agent" | "patient" | "peer";
|
|
887
|
-
otherUser: "agent" | "patient" | "peer";
|
|
888
|
-
};
|
|
889
|
-
};
|
|
890
|
-
message?: string | null | undefined;
|
|
891
|
-
askUser?: {
|
|
892
|
-
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
893
|
-
question?: {
|
|
894
|
-
prompt: string;
|
|
895
|
-
options: {
|
|
896
|
-
label: string;
|
|
897
|
-
description: string;
|
|
898
|
-
}[];
|
|
899
|
-
title: string;
|
|
900
|
-
multiSelect: boolean;
|
|
901
|
-
} | null | undefined;
|
|
902
|
-
} | null | undefined;
|
|
903
|
-
}>;
|
|
904
|
-
/**
|
|
905
|
-
* The set of actions a given seat may submit under a given protocol version.
|
|
906
|
-
*
|
|
907
|
-
* v1 ignores the seat entirely (legacy symmetric vocabulary) so pre-v2
|
|
908
|
-
* negotiations behave exactly as before.
|
|
909
|
-
*/
|
|
910
|
-
export declare function allowedActionsFor(version: NegotiationProtocolVersion, seat: NegotiationSeat, isFinalTurn?: boolean, opts?: AskUserOpts): readonly NegotiationAction[];
|
|
911
|
-
/**
|
|
912
|
-
* Zod turn schema for a system-agent turn, selected by version + seat +
|
|
913
|
-
* final-turn flag. v1 returns the legacy schemas (seat-agnostic); v2 returns
|
|
914
|
-
* the seat-scoped schemas above, making an initiator `accept` structurally
|
|
915
|
-
* impossible rather than prompt-discouraged.
|
|
916
|
-
*
|
|
917
|
-
* The v1 legacy schemas are passed in by the caller (they live in
|
|
918
|
-
* `negotiation.state.ts`) to keep this module free of a state-module import.
|
|
919
|
-
*/
|
|
920
|
-
export declare function turnSchemaFor(version: NegotiationProtocolVersion, seat: NegotiationSeat, isFinalTurn: boolean, v1Schemas: {
|
|
921
|
-
system: z.ZodTypeAny;
|
|
922
|
-
final: z.ZodTypeAny;
|
|
923
|
-
}, opts?: AskUserOpts): z.ZodTypeAny;
|
|
924
|
-
/**
|
|
925
|
-
* Opt-in extension of the seat vocabulary with the `ask_user` client-consult
|
|
926
|
-
* pause (P3.2). Never granted on final-cap turns (the final turn must decide)
|
|
927
|
-
* and never under v1. Callers pass `{ askUser: true }` only when the full
|
|
928
|
-
* pause loop is available on their surface: the ask-user feature flag is on,
|
|
929
|
-
* a questioner enqueue and an answer-window timer are wired, the negotiation
|
|
930
|
-
* has an opportunity to resume against, and the acting side has not already
|
|
931
|
-
* consumed its one client question for this negotiation (rationing).
|
|
932
|
-
*/
|
|
933
|
-
export interface AskUserOpts {
|
|
934
|
-
askUser?: boolean;
|
|
935
|
-
}
|
|
936
|
-
/** Terminal actions end the negotiation immediately. */
|
|
937
|
-
export declare function isTerminalAction(action: string | undefined | null): boolean;
|
|
938
|
-
/** Reject-like actions map the opportunity to `rejected` (v1 reject, v2 withdraw/decline). */
|
|
939
|
-
export declare function isRejectLikeAction(action: string | undefined | null): boolean;
|
|
940
|
-
/**
|
|
941
|
-
* Conservative action when an agent produced schema-invalid output (after the
|
|
942
|
-
* retry) or an internal error needs a seat-valid terminal placeholder.
|
|
943
|
-
*
|
|
944
|
-
* Non-final turns fall back to `counter` (keeps the dialogue open — the AC's
|
|
945
|
-
* "conservative counter"). Final turns must decide: v1 → `reject`, v2
|
|
946
|
-
* counterparty → `decline`, v2 initiator → `counter` is still legal on the
|
|
947
|
-
* final turn so it stays `counter` (finalizes as turn-cap/stalled).
|
|
948
|
-
*/
|
|
949
|
-
export declare function fallbackActionFor(version: NegotiationProtocolVersion, seat: NegotiationSeat, isFinalTurn: boolean): NegotiationAction;
|
|
950
|
-
/** Seat-appropriate reject-like action for error paths. */
|
|
951
|
-
export declare function rejectActionFor(version: NegotiationProtocolVersion, seat: NegotiationSeat): NegotiationAction;
|
|
952
|
-
/**
|
|
953
|
-
* Read the protocol version off task metadata. Returns null when the task
|
|
954
|
-
* predates version stamping (treat as v1 at the call site when the task is a
|
|
955
|
-
* genuine prior; fresh tasks stamp from {@link configuredProtocolVersion}).
|
|
956
|
-
*/
|
|
957
|
-
export declare function readProtocolVersion(metadata: {
|
|
958
|
-
protocolVersion?: unknown;
|
|
959
|
-
} | null | undefined): NegotiationProtocolVersion | null;
|
|
960
|
-
/**
|
|
961
|
-
* Protocol version for negotiations without a prior task for the same
|
|
962
|
-
* opportunity, from the `NEGOTIATION_PROTOCOL_VERSION` env switch. Defaults
|
|
963
|
-
* to `v1` when unset — v2 is opt-in per environment, and rolling back is the
|
|
964
|
-
* same single switch (only in-flight negotiations stay pinned to their
|
|
965
|
-
* stamped version).
|
|
966
|
-
*/
|
|
967
|
-
export declare function configuredProtocolVersion(): NegotiationProtocolVersion;
|
|
968
|
-
/**
|
|
969
|
-
* Whether the `ask_user` client-consult pause (P3.2) is enabled, from the
|
|
970
|
-
* `NEGOTIATION_ASK_USER_ENABLED` env switch. Defaults to off — the deployment
|
|
971
|
-
* is byte-for-byte unchanged until the flag is flipped, and rolling back is
|
|
972
|
-
* the same single switch.
|
|
973
|
-
*/
|
|
974
|
-
export declare function configuredAskUserEnabled(): boolean;
|
|
975
|
-
/**
|
|
976
|
-
* Default per-negotiation ask cap: total client-consultation rounds (mid-flight
|
|
977
|
-
* `ask_user` pauses and post-stall parks, both sides combined) before the
|
|
978
|
-
* negotiation stalls terminally instead of parking again. Three admits one
|
|
979
|
-
* post-stall park even after each side has spent its one mid-flight consult.
|
|
980
|
-
*/
|
|
981
|
-
export declare const DEFAULT_NEGOTIATION_ASK_ROUNDS_CAP = 3;
|
|
982
|
-
/**
|
|
983
|
-
* Per-negotiation ask cap, overridable via `NEGOTIATION_ASK_ROUNDS_CAP`.
|
|
984
|
-
* Invalid or non-positive values fall back to the default — zero is not an
|
|
985
|
-
* off switch here; the cap exists so two agents cannot ping-pong their humans
|
|
986
|
-
* indefinitely. It tunes the bound, it does not gate the behaviour.
|
|
987
|
-
*/
|
|
988
|
-
export declare function negotiationAskRoundsCap(): number;
|
|
989
|
-
/** Default answer window for a paused `ask_user` negotiation: 24 hours. */
|
|
990
|
-
export declare const DEFAULT_ASK_USER_WINDOW_MS: number;
|
|
991
|
-
/**
|
|
992
|
-
* Answer window for a paused `ask_user` negotiation, in ms. Overridable via
|
|
993
|
-
* `NEGOTIATION_ASK_USER_WINDOW_MS` (dev/e2e use shorter windows to exercise
|
|
994
|
-
* the expiry path); invalid or non-positive values fall back to 24 h.
|
|
995
|
-
*/
|
|
996
|
-
export declare function askUserAnswerWindowMs(): number;
|
|
997
|
-
/**
|
|
998
|
-
* Slack added on top of the answer window when deciding whether a paused
|
|
999
|
-
* (`input_required`) task still holds the conversation lock. Covers expiry
|
|
1000
|
-
* worker delay: the lock must outlive the timer slightly, so ambient
|
|
1001
|
-
* rediscovery cannot slip in between window expiry and the worker's resume.
|
|
1002
|
-
*/
|
|
1003
|
-
export declare const ASK_USER_LOCK_SLACK_MS: number;
|
|
1004
|
-
/**
|
|
1005
|
-
* Resolve the seat of `userId` on a negotiation task.
|
|
1006
|
-
*
|
|
1007
|
-
* Keys on `metadata.initiatorUserId` (the rigid v2 stamp), **never on turn
|
|
1008
|
-
* parity** — continuations can start with either side speaking first, so
|
|
1009
|
-
* parity misattributes seats across sessions. Pre-stamp tasks fall back to
|
|
1010
|
-
* `sourceUserId` (the discovery-session opener), which is what the stamp
|
|
1011
|
-
* defaults to anyway.
|
|
1012
|
-
*/
|
|
1013
|
-
export declare function resolveSeat(userId: string, metadata: {
|
|
1014
|
-
initiatorUserId?: unknown;
|
|
1015
|
-
sourceUserId?: unknown;
|
|
1016
|
-
} | null | undefined): NegotiationSeat;
|
|
1017
|
-
/** Human-readable seat-violation message shared by respond surfaces. */
|
|
1018
|
-
export declare function seatViolationMessage(action: string, seat: NegotiationSeat, version: NegotiationProtocolVersion): string;
|