@indexnetwork/protocol 12.1.0-rc.463.1 → 13.0.0-rc.464.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist/capabilities/questions.facade.d.ts +2 -2
- package/dist/capabilities/questions.facade.js +1 -1
- package/dist/capabilities/questions.runtime.facade.d.ts +1 -1
- package/dist/capabilities/questions.runtime.facade.js +1 -1
- package/dist/chat/reporter.persona.js +1 -1
- package/dist/enrichment/enrichment.graph.d.ts +1 -3
- package/dist/enrichment/enrichment.graph.js +1 -2
- package/dist/index.d.ts +2 -2
- package/dist/negotiation/application/negotiation.graph.d.ts +5 -5
- package/dist/negotiation/domain/negotiation.state.d.ts +1 -1
- package/dist/opportunity/application/opportunity.graph.d.ts +23 -23
- package/dist/opportunity/domain/opportunity.state.d.ts +6 -6
- package/dist/opportunity/ports/opportunity.tools.port.d.ts +1 -1
- package/dist/questions/application/index.d.ts +2 -2
- package/dist/questions/application/index.js +1 -1
- package/dist/questions/application/question.env.d.ts +0 -30
- package/dist/questions/application/question.env.js +0 -38
- package/dist/questions/application/question.input.d.ts +2 -16
- package/dist/questions/application/question.presets.js +0 -66
- package/dist/questions/application/question.tools.js +3 -3
- package/dist/questions/domain/question.schema.d.ts +58 -58
- package/dist/questions/domain/question.schema.js +0 -2
- package/dist/questions/ports/index.d.ts +0 -2
- package/dist/questions/ports/index.js +0 -1
- package/dist/questions/public/index.d.ts +2 -2
- package/dist/questions/public/index.js +1 -1
- package/dist/runtime/foreground/composition/tool.factory.js +1 -2
- package/dist/shared/agent/activity-projection.d.ts +4 -4
- package/dist/shared/agent/activity-projection.js +6 -0
- package/dist/shared/agent/tool.helpers.d.ts +2 -8
- package/dist/shared/schemas/discovery-question.schema.d.ts +10 -28
- package/dist/shared/schemas/discovery-question.schema.js +2 -4
- package/dist/shared/schemas/negotiation-digest.schema.d.ts +5 -5
- package/package.json +1 -1
- package/dist/questions/application/question.discovery.prompt.d.ts +0 -8
- package/dist/questions/application/question.discovery.prompt.js +0 -181
- package/dist/questions/ports/question.generator.port.d.ts +0 -33
- package/dist/questions/ports/question.generator.port.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -20,6 +20,37 @@ went 6.7.1 → 8.0.2 with no 7.x in between because the whole 7.x line shipped a
|
|
|
20
20
|
prereleases between the two promotions. To track every change, read `rc`; to
|
|
21
21
|
pin a supported release, use `latest`.
|
|
22
22
|
|
|
23
|
+
## 13.0.0 - 2026-08-13
|
|
24
|
+
|
|
25
|
+
### Removed
|
|
26
|
+
|
|
27
|
+
- **BREAKING**: removed the `discovery` and `enrichment` question modes from
|
|
28
|
+
`QuestionModeSchema`. Neither had a reachable producer — the inline
|
|
29
|
+
`questionGenerator.generate()` call site did not exist anywhere in the
|
|
30
|
+
repository, and `EnrichmentGraphFactory` accepted a `questionerEnqueue`
|
|
31
|
+
dependency it never invoked. Production confirms both stopped emitting
|
|
32
|
+
(newest `discovery` row 2026-07-09, newest `enrichment` row 2026-06-15).
|
|
33
|
+
- **BREAKING**: removed the `QuestionGeneratorReader` port,
|
|
34
|
+
`question.generator.port.ts`, `question.discovery.prompt.ts`, the
|
|
35
|
+
`DiscoveryQuestionInput` composite type, and the `DiscoveryContext` /
|
|
36
|
+
`ProfileContext` questioner contexts.
|
|
37
|
+
- **BREAKING**: removed the `questionGenerator` dependency from
|
|
38
|
+
`ToolRegistryCompositionDeps` and `OpportunityToolDeps`.
|
|
39
|
+
- Removed the `QUESTIONER_DISCOVERY_ENABLED`, `QUESTIONER_DISCOVERY_INPUT_MODE`,
|
|
40
|
+
and `QUESTIONER_DISCOVERY_TIMEOUT_MS` env accessors.
|
|
41
|
+
- Dropped the unused `questionerEnqueue` constructor parameter from
|
|
42
|
+
`EnrichmentGraphFactory` (positional — callers passing it must drop the arg).
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- `SELF_OWNED_MODES` narrows from `["enrichment", "intent", "discovery"]` to
|
|
47
|
+
`["intent"]`, which also narrows the reporter persona's
|
|
48
|
+
`read_pending_questions` mode filter.
|
|
49
|
+
- `QUESTION_MODE_TO_DOMAIN` deliberately **retains** its `enrichment` and
|
|
50
|
+
`discovery` entries. Rows created before this release remain readable and
|
|
51
|
+
answerable, and dropping the mapping would fall back to the `chat` domain and
|
|
52
|
+
change which permission an agent needs to answer a pre-existing row.
|
|
53
|
+
|
|
23
54
|
## 11.2.1 - 2026-08-11
|
|
24
55
|
|
|
25
56
|
### Added
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* IND-547: updated to re-export from questions/public/index.js.
|
|
5
5
|
* Legacy consumers importing from this path continue to work unchanged.
|
|
6
6
|
*/
|
|
7
|
-
export { QuestionerAgent, isValidQuestionerInputContract, isQuestionerEnabled, isUptakeGuardEnabled, uptakeAuthorityThreshold,
|
|
8
|
-
export type { QuestionerInput, RecoveryQuestionerInput, UptakeQuestionerInput, PostStallQuestionerInput, InflightQuestionerInput, QuestionerEnqueuePayload, QuestionerEnqueueFn, PoolDiscoveryContext, QuestionerToolDeps, AskUserQuestionToolDeps, ChatQuestionsHost, NegotiationQuestionCandidate, NegotiationQuestionProvenance, NegotiationQuestionPurpose, PersistableQuestion, PersistedQuestion, Question, QuestionFilters, QuestionGenerationResult,
|
|
7
|
+
export { QuestionerAgent, isValidQuestionerInputContract, isQuestionerEnabled, isUptakeGuardEnabled, uptakeAuthorityThreshold, createQuestionerTools, createAskUserQuestionTools, NegotiationQuestionCandidateSchema, NegotiationQuestionProvenanceSchema, } from "../questions/public/index.js";
|
|
8
|
+
export type { QuestionerInput, RecoveryQuestionerInput, UptakeQuestionerInput, PostStallQuestionerInput, InflightQuestionerInput, QuestionerEnqueuePayload, QuestionerEnqueueFn, PoolDiscoveryContext, QuestionerToolDeps, AskUserQuestionToolDeps, ChatQuestionsHost, NegotiationQuestionCandidate, NegotiationQuestionProvenance, NegotiationQuestionPurpose, PersistableQuestion, PersistedQuestion, Question, QuestionFilters, QuestionGenerationResult, QuestionPoolDiscriminator, QuestionPoolPush, QuestionPoolPushRequestReason, QuestionPoolPushRequestStatus, QuestionPoolSnapshot, QuestionPurpose, QuestionRecoverySnapshot, QuestionStrategy, QuestionVoidedReason, QuestionerDatabase, UnderspecificationType, } from "../questions/public/index.js";
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
* IND-547: updated to re-export from questions/public/index.js.
|
|
5
5
|
* Legacy consumers importing from this path continue to work unchanged.
|
|
6
6
|
*/
|
|
7
|
-
export { QuestionerAgent, isValidQuestionerInputContract, isQuestionerEnabled, isUptakeGuardEnabled, uptakeAuthorityThreshold,
|
|
7
|
+
export { QuestionerAgent, isValidQuestionerInputContract, isQuestionerEnabled, isUptakeGuardEnabled, uptakeAuthorityThreshold, createQuestionerTools, createAskUserQuestionTools, NegotiationQuestionCandidateSchema, NegotiationQuestionProvenanceSchema, } from "../questions/public/index.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Narrow questions configuration port for opportunity discovery and actions.
|
|
3
3
|
* IND-547: points to canonical questions/application/question.env.
|
|
4
4
|
*/
|
|
5
|
-
export {
|
|
5
|
+
export { isUptakeGuardEnabled } from "../questions/application/question.env.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Narrow questions configuration port for opportunity discovery and actions.
|
|
3
3
|
* IND-547: points to canonical questions/application/question.env.
|
|
4
4
|
*/
|
|
5
|
-
export {
|
|
5
|
+
export { isUptakeGuardEnabled } from "../questions/application/question.env.js";
|
|
@@ -110,7 +110,7 @@ export function narrowReporterTools(allowed, boundary) {
|
|
|
110
110
|
if (!boundary.findPendingQuestions)
|
|
111
111
|
return error("Question lookup is not available.");
|
|
112
112
|
const questions = await boundary.findPendingQuestions(context.userId, {
|
|
113
|
-
modes: ["
|
|
113
|
+
modes: ["intent"],
|
|
114
114
|
limit: query.limit ?? 10,
|
|
115
115
|
});
|
|
116
116
|
return success({ questions: questions.slice(0, query.limit ?? 10) });
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { EnrichmentGraphDatabase, PremiseProvenance } from "../shared/interfaces/database.interface.js";
|
|
2
2
|
import { Scraper } from "../shared/interfaces/scraper.interface.js";
|
|
3
3
|
import type { ProfileEnricher } from "../shared/interfaces/enrichment.interface.js";
|
|
4
|
-
import type { QuestionerEnqueueFn } from "../capabilities/questions.enqueue.facade.js";
|
|
5
4
|
import type { DebugMetaAgent } from "../capabilities/participant-agents.debug.facade.js";
|
|
6
5
|
/**
|
|
7
6
|
* Compiled premise graph interface. Matches the invoke signature of a compiled LangGraph.
|
|
@@ -51,9 +50,8 @@ export declare class EnrichmentGraphFactory {
|
|
|
51
50
|
private database;
|
|
52
51
|
private scraper;
|
|
53
52
|
private enricher?;
|
|
54
|
-
private questionerEnqueue?;
|
|
55
53
|
private premiseGraph?;
|
|
56
|
-
constructor(database: EnrichmentGraphDatabase, scraper: Scraper, enricher?: ProfileEnricher | undefined,
|
|
54
|
+
constructor(database: EnrichmentGraphDatabase, scraper: Scraper, enricher?: ProfileEnricher | undefined, premiseGraph?: CompiledPremiseGraph | undefined);
|
|
57
55
|
createGraph(): import("@langchain/langgraph").CompiledStateGraph<{
|
|
58
56
|
userId: string;
|
|
59
57
|
operationMode: "query" | "write" | "generate";
|
|
@@ -51,11 +51,10 @@ function isMeaningfulProfileInput(input) {
|
|
|
51
51
|
* - Conditional generation (skip generation if profile already exists)
|
|
52
52
|
*/
|
|
53
53
|
export class EnrichmentGraphFactory {
|
|
54
|
-
constructor(database, scraper, enricher,
|
|
54
|
+
constructor(database, scraper, enricher, premiseGraph) {
|
|
55
55
|
this.database = database;
|
|
56
56
|
this.scraper = scraper;
|
|
57
57
|
this.enricher = enricher;
|
|
58
|
-
this.questionerEnqueue = questionerEnqueue;
|
|
59
58
|
this.premiseGraph = premiseGraph;
|
|
60
59
|
}
|
|
61
60
|
createGraph() {
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export { getToolTimeoutPolicy, invokeToolRuntime, toolRuntimeErrorToResult } fro
|
|
|
10
10
|
export type { McpAuthResolver } from "./shared/interfaces/auth.interface.js";
|
|
11
11
|
export type { Cache, CacheOptions, HydeCache, OpportunityCache } from "./shared/interfaces/cache.interface.js";
|
|
12
12
|
export type { ChatSummaryReader } from "./shared/interfaces/chat-summary.interface.js";
|
|
13
|
-
export type {
|
|
13
|
+
export type { QuestionerDatabase, PersistableQuestion, PersistedQuestion, QuestionFilters, ChatQuestionsHost } from "./capabilities/questions.facade.js";
|
|
14
14
|
export type { NegotiationSummaryReader } from "./shared/interfaces/negotiation-summary.interface.js";
|
|
15
15
|
export type { DiscoveryNegotiationDigest } from "./shared/schemas/negotiation-digest.schema.js";
|
|
16
16
|
export { NegotiationSummarizer } from "./capabilities/negotiation.facade.js";
|
|
@@ -29,7 +29,7 @@ export { type Question, type UnderspecificationType, type QuestionStrategy, type
|
|
|
29
29
|
export type { PendingQuestionSummary } from "./shared/schemas/pending-question.schema.js";
|
|
30
30
|
export { McpAuthInputSchema, McpApiKeyMetadataSchema, McpResolvedIdentitySchema, } from "./shared/schemas/mcp-auth.schema.js";
|
|
31
31
|
export type { McpAuthInput, McpApiKeyMetadata, McpResolvedIdentity, } from "./shared/schemas/mcp-auth.schema.js";
|
|
32
|
-
export type { DiscoverySummary, DiscoveryNegotiation, DiscoveryTurn, DiscoveryOutcome,
|
|
32
|
+
export type { DiscoverySummary, DiscoveryNegotiation, DiscoveryTurn, DiscoveryOutcome, NegotiationRole } from "./shared/schemas/discovery-question.schema.js";
|
|
33
33
|
export type { NetworkAssignmentMetadata } from "./shared/schemas/network-assignment.schema.js";
|
|
34
34
|
export { DEFAULT_NETWORK_ASSIGNMENT_THRESHOLD, resolveAssignmentNetworkScope, buildNetworkAssignmentDecision } from "./shared/assignment/network-assignment.policy.js";
|
|
35
35
|
export { buildCandidateEvidence } from "./capabilities/opportunities.facade.js";
|
|
@@ -72,7 +72,7 @@ export declare class NegotiationGraphFactory {
|
|
|
72
72
|
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
73
73
|
} | null | undefined;
|
|
74
74
|
} | null;
|
|
75
|
-
status: "waiting_for_agent" | "input_required" | "
|
|
75
|
+
status: "waiting_for_agent" | "input_required" | "active" | "completed";
|
|
76
76
|
priorTurnCount: number;
|
|
77
77
|
userAnswers: import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[];
|
|
78
78
|
outcome: {
|
|
@@ -152,7 +152,7 @@ export declare class NegotiationGraphFactory {
|
|
|
152
152
|
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
153
153
|
} | null | undefined;
|
|
154
154
|
} | null> | null | undefined;
|
|
155
|
-
status?: "waiting_for_agent" | "input_required" | "
|
|
155
|
+
status?: "waiting_for_agent" | "input_required" | "active" | "completed" | import("@langchain/langgraph").OverwriteValue<"waiting_for_agent" | "input_required" | "active" | "completed"> | undefined;
|
|
156
156
|
priorTurnCount?: number | import("@langchain/langgraph").OverwriteValue<number> | undefined;
|
|
157
157
|
userAnswers?: import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[]> | undefined;
|
|
158
158
|
outcome?: {
|
|
@@ -257,7 +257,7 @@ export declare class NegotiationGraphFactory {
|
|
|
257
257
|
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
258
258
|
} | null | undefined;
|
|
259
259
|
} | null> | null, unknown>;
|
|
260
|
-
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "
|
|
260
|
+
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "active" | "completed", "waiting_for_agent" | "input_required" | "active" | "completed" | import("@langchain/langgraph").OverwriteValue<"waiting_for_agent" | "input_required" | "active" | "completed">, unknown>;
|
|
261
261
|
priorTurnCount: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
|
|
262
262
|
userAnswers: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[], import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[]>, unknown>;
|
|
263
263
|
outcome: import("@langchain/langgraph").BaseChannel<{
|
|
@@ -371,7 +371,7 @@ export declare class NegotiationGraphFactory {
|
|
|
371
371
|
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
372
372
|
} | null | undefined;
|
|
373
373
|
} | null> | null, unknown>;
|
|
374
|
-
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "
|
|
374
|
+
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "active" | "completed", "waiting_for_agent" | "input_required" | "active" | "completed" | import("@langchain/langgraph").OverwriteValue<"waiting_for_agent" | "input_required" | "active" | "completed">, unknown>;
|
|
375
375
|
priorTurnCount: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
|
|
376
376
|
userAnswers: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[], import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[]>, unknown>;
|
|
377
377
|
outcome: import("@langchain/langgraph").BaseChannel<{
|
|
@@ -540,7 +540,7 @@ export declare class NegotiationGraphFactory {
|
|
|
540
540
|
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
541
541
|
} | null | undefined;
|
|
542
542
|
} | null> | null, unknown>;
|
|
543
|
-
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "
|
|
543
|
+
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "active" | "completed", "waiting_for_agent" | "input_required" | "active" | "completed" | import("@langchain/langgraph").OverwriteValue<"waiting_for_agent" | "input_required" | "active" | "completed">, unknown>;
|
|
544
544
|
priorTurnCount: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
|
|
545
545
|
userAnswers: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[], import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.interface.js").NegotiationUserAnswer[]>, unknown>;
|
|
546
546
|
outcome: import("@langchain/langgraph").BaseChannel<{
|
|
@@ -450,7 +450,7 @@ export declare const NegotiationGraphState: import("@langchain/langgraph").Annot
|
|
|
450
450
|
* negotiator's own client (answer or 24 h window expiry resumes it)
|
|
451
451
|
* - `completed` — negotiation finalized (accept/reject/turn-cap/timeout)
|
|
452
452
|
*/
|
|
453
|
-
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "
|
|
453
|
+
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "active" | "completed", "waiting_for_agent" | "input_required" | "active" | "completed" | import("@langchain/langgraph").OverwriteValue<"waiting_for_agent" | "input_required" | "active" | "completed">, unknown>;
|
|
454
454
|
/** Number of turns present in the conversation before this session started. */
|
|
455
455
|
priorTurnCount: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
|
|
456
456
|
/** User answers collected by the questioner between negotiation sessions. */
|
|
@@ -218,16 +218,16 @@ export declare class OpportunityGraphFactory {
|
|
|
218
218
|
}[];
|
|
219
219
|
agentTimings: DebugMetaAgent[];
|
|
220
220
|
discoveryNegotiations: {
|
|
221
|
+
counterpartyId: string;
|
|
221
222
|
counterpartyHint: string;
|
|
222
223
|
indexContext: string;
|
|
223
|
-
counterpartyId: string;
|
|
224
224
|
turns: {
|
|
225
225
|
reasoning: string;
|
|
226
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
226
227
|
suggestedRoles: {
|
|
227
228
|
ownUser: "agent" | "patient" | "peer";
|
|
228
229
|
otherUser: "agent" | "patient" | "peer";
|
|
229
230
|
};
|
|
230
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
231
231
|
}[];
|
|
232
232
|
outcome: {
|
|
233
233
|
reasoning: string;
|
|
@@ -369,16 +369,16 @@ export declare class OpportunityGraphFactory {
|
|
|
369
369
|
}[]> | undefined;
|
|
370
370
|
agentTimings?: DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<DebugMetaAgent[]> | undefined;
|
|
371
371
|
discoveryNegotiations?: {
|
|
372
|
+
counterpartyId: string;
|
|
372
373
|
counterpartyHint: string;
|
|
373
374
|
indexContext: string;
|
|
374
|
-
counterpartyId: string;
|
|
375
375
|
turns: {
|
|
376
376
|
reasoning: string;
|
|
377
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
377
378
|
suggestedRoles: {
|
|
378
379
|
ownUser: "agent" | "patient" | "peer";
|
|
379
380
|
otherUser: "agent" | "patient" | "peer";
|
|
380
381
|
};
|
|
381
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
382
382
|
}[];
|
|
383
383
|
outcome: {
|
|
384
384
|
reasoning: string;
|
|
@@ -391,16 +391,16 @@ export declare class OpportunityGraphFactory {
|
|
|
391
391
|
};
|
|
392
392
|
seedAssessmentScore?: number | undefined;
|
|
393
393
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
394
|
+
counterpartyId: string;
|
|
394
395
|
counterpartyHint: string;
|
|
395
396
|
indexContext: string;
|
|
396
|
-
counterpartyId: string;
|
|
397
397
|
turns: {
|
|
398
398
|
reasoning: string;
|
|
399
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
399
400
|
suggestedRoles: {
|
|
400
401
|
ownUser: "agent" | "patient" | "peer";
|
|
401
402
|
otherUser: "agent" | "patient" | "peer";
|
|
402
403
|
};
|
|
403
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
404
404
|
}[];
|
|
405
405
|
outcome: {
|
|
406
406
|
reasoning: string;
|
|
@@ -414,7 +414,7 @@ export declare class OpportunityGraphFactory {
|
|
|
414
414
|
seedAssessmentScore?: number | undefined;
|
|
415
415
|
}[]> | undefined;
|
|
416
416
|
discoverySummary?: import("../../index.js").DiscoverySummary | import("@langchain/langgraph").OverwriteValue<import("../../index.js").DiscoverySummary | null> | null | undefined;
|
|
417
|
-
}, "scope" | "
|
|
417
|
+
}, "scope" | "send" | "update" | "__start__" | "discovery" | "read" | "prep" | "negotiate_existing" | "approve_introduction" | "persist" | "resolve" | "evaluation" | "ranking" | "intro_validation" | "intro_evaluation" | "delete_opp" | "negotiate", {
|
|
418
418
|
userId: import("@langchain/langgraph").BaseChannel<Id<"users">, Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users">>, unknown>;
|
|
419
419
|
searchQuery: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
420
420
|
networkId: import("@langchain/langgraph").BaseChannel<Id<"networks"> | undefined, Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined, unknown>;
|
|
@@ -584,16 +584,16 @@ export declare class OpportunityGraphFactory {
|
|
|
584
584
|
}[]>, unknown>;
|
|
585
585
|
agentTimings: import("@langchain/langgraph").BaseChannel<DebugMetaAgent[], DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<DebugMetaAgent[]>, unknown>;
|
|
586
586
|
discoveryNegotiations: import("@langchain/langgraph").BaseChannel<{
|
|
587
|
+
counterpartyId: string;
|
|
587
588
|
counterpartyHint: string;
|
|
588
589
|
indexContext: string;
|
|
589
|
-
counterpartyId: string;
|
|
590
590
|
turns: {
|
|
591
591
|
reasoning: string;
|
|
592
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
592
593
|
suggestedRoles: {
|
|
593
594
|
ownUser: "agent" | "patient" | "peer";
|
|
594
595
|
otherUser: "agent" | "patient" | "peer";
|
|
595
596
|
};
|
|
596
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
597
597
|
}[];
|
|
598
598
|
outcome: {
|
|
599
599
|
reasoning: string;
|
|
@@ -606,16 +606,16 @@ export declare class OpportunityGraphFactory {
|
|
|
606
606
|
};
|
|
607
607
|
seedAssessmentScore?: number | undefined;
|
|
608
608
|
}[], {
|
|
609
|
+
counterpartyId: string;
|
|
609
610
|
counterpartyHint: string;
|
|
610
611
|
indexContext: string;
|
|
611
|
-
counterpartyId: string;
|
|
612
612
|
turns: {
|
|
613
613
|
reasoning: string;
|
|
614
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
614
615
|
suggestedRoles: {
|
|
615
616
|
ownUser: "agent" | "patient" | "peer";
|
|
616
617
|
otherUser: "agent" | "patient" | "peer";
|
|
617
618
|
};
|
|
618
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
619
619
|
}[];
|
|
620
620
|
outcome: {
|
|
621
621
|
reasoning: string;
|
|
@@ -628,16 +628,16 @@ export declare class OpportunityGraphFactory {
|
|
|
628
628
|
};
|
|
629
629
|
seedAssessmentScore?: number | undefined;
|
|
630
630
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
631
|
+
counterpartyId: string;
|
|
631
632
|
counterpartyHint: string;
|
|
632
633
|
indexContext: string;
|
|
633
|
-
counterpartyId: string;
|
|
634
634
|
turns: {
|
|
635
635
|
reasoning: string;
|
|
636
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
636
637
|
suggestedRoles: {
|
|
637
638
|
ownUser: "agent" | "patient" | "peer";
|
|
638
639
|
otherUser: "agent" | "patient" | "peer";
|
|
639
640
|
};
|
|
640
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
641
641
|
}[];
|
|
642
642
|
outcome: {
|
|
643
643
|
reasoning: string;
|
|
@@ -821,16 +821,16 @@ export declare class OpportunityGraphFactory {
|
|
|
821
821
|
}[]>, unknown>;
|
|
822
822
|
agentTimings: import("@langchain/langgraph").BaseChannel<DebugMetaAgent[], DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<DebugMetaAgent[]>, unknown>;
|
|
823
823
|
discoveryNegotiations: import("@langchain/langgraph").BaseChannel<{
|
|
824
|
+
counterpartyId: string;
|
|
824
825
|
counterpartyHint: string;
|
|
825
826
|
indexContext: string;
|
|
826
|
-
counterpartyId: string;
|
|
827
827
|
turns: {
|
|
828
828
|
reasoning: string;
|
|
829
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
829
830
|
suggestedRoles: {
|
|
830
831
|
ownUser: "agent" | "patient" | "peer";
|
|
831
832
|
otherUser: "agent" | "patient" | "peer";
|
|
832
833
|
};
|
|
833
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
834
834
|
}[];
|
|
835
835
|
outcome: {
|
|
836
836
|
reasoning: string;
|
|
@@ -843,16 +843,16 @@ export declare class OpportunityGraphFactory {
|
|
|
843
843
|
};
|
|
844
844
|
seedAssessmentScore?: number | undefined;
|
|
845
845
|
}[], {
|
|
846
|
+
counterpartyId: string;
|
|
846
847
|
counterpartyHint: string;
|
|
847
848
|
indexContext: string;
|
|
848
|
-
counterpartyId: string;
|
|
849
849
|
turns: {
|
|
850
850
|
reasoning: string;
|
|
851
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
851
852
|
suggestedRoles: {
|
|
852
853
|
ownUser: "agent" | "patient" | "peer";
|
|
853
854
|
otherUser: "agent" | "patient" | "peer";
|
|
854
855
|
};
|
|
855
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
856
856
|
}[];
|
|
857
857
|
outcome: {
|
|
858
858
|
reasoning: string;
|
|
@@ -865,16 +865,16 @@ export declare class OpportunityGraphFactory {
|
|
|
865
865
|
};
|
|
866
866
|
seedAssessmentScore?: number | undefined;
|
|
867
867
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
868
|
+
counterpartyId: string;
|
|
868
869
|
counterpartyHint: string;
|
|
869
870
|
indexContext: string;
|
|
870
|
-
counterpartyId: string;
|
|
871
871
|
turns: {
|
|
872
872
|
reasoning: string;
|
|
873
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
873
874
|
suggestedRoles: {
|
|
874
875
|
ownUser: "agent" | "patient" | "peer";
|
|
875
876
|
otherUser: "agent" | "patient" | "peer";
|
|
876
877
|
};
|
|
877
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
878
878
|
}[];
|
|
879
879
|
outcome: {
|
|
880
880
|
reasoning: string;
|
|
@@ -1314,16 +1314,16 @@ export declare class OpportunityGraphFactory {
|
|
|
1314
1314
|
};
|
|
1315
1315
|
}[];
|
|
1316
1316
|
discoveryNegotiations: {
|
|
1317
|
+
counterpartyId: string;
|
|
1317
1318
|
counterpartyHint: string;
|
|
1318
1319
|
indexContext: string;
|
|
1319
|
-
counterpartyId: string;
|
|
1320
1320
|
turns: {
|
|
1321
1321
|
reasoning: string;
|
|
1322
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
1322
1323
|
suggestedRoles: {
|
|
1323
1324
|
ownUser: "agent" | "patient" | "peer";
|
|
1324
1325
|
otherUser: "agent" | "patient" | "peer";
|
|
1325
1326
|
};
|
|
1326
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
1327
1327
|
}[];
|
|
1328
1328
|
outcome: {
|
|
1329
1329
|
reasoning: string;
|
|
@@ -1359,16 +1359,16 @@ export declare class OpportunityGraphFactory {
|
|
|
1359
1359
|
};
|
|
1360
1360
|
})[];
|
|
1361
1361
|
discoveryNegotiations: {
|
|
1362
|
+
counterpartyId: string;
|
|
1362
1363
|
counterpartyHint: string;
|
|
1363
1364
|
indexContext: string;
|
|
1364
|
-
counterpartyId: string;
|
|
1365
1365
|
turns: {
|
|
1366
1366
|
reasoning: string;
|
|
1367
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
1367
1368
|
suggestedRoles: {
|
|
1368
1369
|
ownUser: "agent" | "patient" | "peer";
|
|
1369
1370
|
otherUser: "agent" | "patient" | "peer";
|
|
1370
1371
|
};
|
|
1371
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
1372
1372
|
}[];
|
|
1373
1373
|
outcome: {
|
|
1374
1374
|
reasoning: string;
|
|
@@ -380,16 +380,16 @@ export declare const OpportunityGraphState: import("@langchain/langgraph").Annot
|
|
|
380
380
|
* negotiate).
|
|
381
381
|
*/
|
|
382
382
|
discoveryNegotiations: import("@langchain/langgraph").BaseChannel<{
|
|
383
|
+
counterpartyId: string;
|
|
383
384
|
counterpartyHint: string;
|
|
384
385
|
indexContext: string;
|
|
385
|
-
counterpartyId: string;
|
|
386
386
|
turns: {
|
|
387
387
|
reasoning: string;
|
|
388
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
388
389
|
suggestedRoles: {
|
|
389
390
|
ownUser: "agent" | "patient" | "peer";
|
|
390
391
|
otherUser: "agent" | "patient" | "peer";
|
|
391
392
|
};
|
|
392
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
393
393
|
}[];
|
|
394
394
|
outcome: {
|
|
395
395
|
reasoning: string;
|
|
@@ -402,16 +402,16 @@ export declare const OpportunityGraphState: import("@langchain/langgraph").Annot
|
|
|
402
402
|
};
|
|
403
403
|
seedAssessmentScore?: number | undefined;
|
|
404
404
|
}[], {
|
|
405
|
+
counterpartyId: string;
|
|
405
406
|
counterpartyHint: string;
|
|
406
407
|
indexContext: string;
|
|
407
|
-
counterpartyId: string;
|
|
408
408
|
turns: {
|
|
409
409
|
reasoning: string;
|
|
410
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
410
411
|
suggestedRoles: {
|
|
411
412
|
ownUser: "agent" | "patient" | "peer";
|
|
412
413
|
otherUser: "agent" | "patient" | "peer";
|
|
413
414
|
};
|
|
414
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
415
415
|
}[];
|
|
416
416
|
outcome: {
|
|
417
417
|
reasoning: string;
|
|
@@ -424,16 +424,16 @@ export declare const OpportunityGraphState: import("@langchain/langgraph").Annot
|
|
|
424
424
|
};
|
|
425
425
|
seedAssessmentScore?: number | undefined;
|
|
426
426
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
427
|
+
counterpartyId: string;
|
|
427
428
|
counterpartyHint: string;
|
|
428
429
|
indexContext: string;
|
|
429
|
-
counterpartyId: string;
|
|
430
430
|
turns: {
|
|
431
431
|
reasoning: string;
|
|
432
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
432
433
|
suggestedRoles: {
|
|
433
434
|
ownUser: "agent" | "patient" | "peer";
|
|
434
435
|
otherUser: "agent" | "patient" | "peer";
|
|
435
436
|
};
|
|
436
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
437
437
|
}[];
|
|
438
438
|
outcome: {
|
|
439
439
|
reasoning: string;
|
|
@@ -11,6 +11,6 @@ export interface OpportunityOwnerApprovalDeps {
|
|
|
11
11
|
opportunityOwnerApproval?: OpportunityOwnerApprovalAuthority;
|
|
12
12
|
}
|
|
13
13
|
/** Host capabilities consumed by opportunity discovery, delivery, and presentation tools. */
|
|
14
|
-
export type OpportunityToolDeps = Pick<ToolRegistryCompositionDeps, "database" | "userDb" | "systemDb" | "cache" | "chatSummary" | "opportunityPresentation" | "
|
|
14
|
+
export type OpportunityToolDeps = Pick<ToolRegistryCompositionDeps, "database" | "userDb" | "systemDb" | "cache" | "chatSummary" | "opportunityPresentation" | "questionerEnqueue" | "findPendingQuestions" | "negotiationSummary" | "negotiationDatabase" | "deliveryLedger" | "frontendUrl" | "stampNewbornOpportunities" | "reportToolError"> & OpportunityOwnerApprovalDeps & {
|
|
15
15
|
graphs: Pick<ToolRegistryCompositionDeps["graphs"], "index" | "networkMembership" | "opportunity">;
|
|
16
16
|
};
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
* IND-547: canonical application layer for the questions capability.
|
|
30
30
|
*/
|
|
31
31
|
export { isValidQuestionerInputContract, } from "./question.input.js";
|
|
32
|
-
export type { QuestionerInput, QuestionerContext, QuestionerEnqueuePayload, QuestionerEnqueueFn,
|
|
32
|
+
export type { QuestionerInput, QuestionerContext, QuestionerEnqueuePayload, QuestionerEnqueueFn, IntentContext, RecoveryIntentContext, NegotiationContext, PostStallNegotiationContext, UptakeNegotiationContext, NegotiationInflightContext, ChatContext, PoolDiscoveryContext, PostStallQuestionerInput, InflightQuestionerInput, UptakeQuestionerInput, RecoveryQuestionerInput, } from "./question.input.js";
|
|
33
33
|
export { QuestionerAgent } from "./question.agent.js";
|
|
34
34
|
export type { QuestionerAgentConfig } from "./question.agent.js";
|
|
35
|
-
export { isQuestionerEnabled,
|
|
35
|
+
export { isQuestionerEnabled, isUptakeGuardEnabled, uptakeAuthorityThreshold, chatQuestionWaitTimeoutMs, CHAT_QUESTION_WAIT_TIMEOUT_MS_DEFAULT, UPTAKE_AUTHORITY_THRESHOLD_DEFAULT, } from "./question.env.js";
|
|
36
36
|
export { getPreset } from "./question.presets.js";
|
|
37
37
|
export type { QuestionerPreset } from "./question.presets.js";
|
|
38
38
|
export { createQuestionerTools } from "./question.tools.js";
|
|
@@ -33,7 +33,7 @@ export { isValidQuestionerInputContract, } from "./question.input.js";
|
|
|
33
33
|
// ── Agent ─────────────────────────────────────────────────────────────────────
|
|
34
34
|
export { QuestionerAgent } from "./question.agent.js";
|
|
35
35
|
// ── Env ───────────────────────────────────────────────────────────────────────
|
|
36
|
-
export { isQuestionerEnabled,
|
|
36
|
+
export { isQuestionerEnabled, isUptakeGuardEnabled, uptakeAuthorityThreshold, chatQuestionWaitTimeoutMs, CHAT_QUESTION_WAIT_TIMEOUT_MS_DEFAULT, UPTAKE_AUTHORITY_THRESHOLD_DEFAULT, } from "./question.env.js";
|
|
37
37
|
// ── Presets ───────────────────────────────────────────────────────────────────
|
|
38
38
|
export { getPreset } from "./question.presets.js";
|
|
39
39
|
// ── Foreground adapter tools ──────────────────────────────────────────────────
|
|
@@ -9,14 +9,6 @@
|
|
|
9
9
|
* interlock. Requires the master switch.
|
|
10
10
|
* QUESTIONER_UPTAKE_AUTHORITY_THRESHOLD
|
|
11
11
|
* authority threshold (0-100, default 70).
|
|
12
|
-
* QUESTIONER_DISCOVERY_ENABLED per-surface switch — decision questions during
|
|
13
|
-
* chat/MCP opportunity discovery. Only effective
|
|
14
|
-
* when the master switch is on (the discovery
|
|
15
|
-
* question step adds inline summarizer latency,
|
|
16
|
-
* so operators can turn it off independently).
|
|
17
|
-
* QUESTIONER_DISCOVERY_INPUT_MODE 'transcripts' | 'insights' generator input.
|
|
18
|
-
* QUESTIONER_DISCOVERY_TIMEOUT_MS per-call deadline for the discovery-questions
|
|
19
|
-
* LLM step (default 12s).
|
|
20
12
|
* QUESTIONER_CHAT_WAIT_TIMEOUT_MS how long the blocking ask_user_question chat
|
|
21
13
|
* tool waits for an inline answer (default 4 min).
|
|
22
14
|
*
|
|
@@ -27,35 +19,13 @@
|
|
|
27
19
|
* IND-547: canonical home — previously questioner/questioner.env.ts.
|
|
28
20
|
* Legacy path is a thin compatibility shim pointing here.
|
|
29
21
|
*/
|
|
30
|
-
/**
|
|
31
|
-
* Question-generator budget. Sized against Railway's ~60 s edge timeout:
|
|
32
|
-
* the discovery + evaluation + negotiate phases consume ~50 s on the slow
|
|
33
|
-
* path, leaving ~10 s of headroom for the tail. 12 s is the larger end of
|
|
34
|
-
* "fits"; the question step usually completes in 4-8 s, so most legitimate
|
|
35
|
-
* calls finish well inside. Aborted calls return `null` (no questions);
|
|
36
|
-
* the rest of the discovery payload still ships.
|
|
37
|
-
*/
|
|
38
|
-
export declare const DISCOVERY_QUESTIONS_TIMEOUT_MS_DEFAULT = 12000;
|
|
39
22
|
export declare const CHAT_QUESTION_WAIT_TIMEOUT_MS_DEFAULT = 240000;
|
|
40
23
|
export declare const UPTAKE_AUTHORITY_THRESHOLD_DEFAULT = 70;
|
|
41
24
|
/** Master switch: is any background question generation enabled? */
|
|
42
25
|
export declare function isQuestionerEnabled(): boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Per-surface switch: should chat/MCP opportunity discovery produce decision
|
|
45
|
-
* questions? Hierarchical — always false when the master switch is off.
|
|
46
|
-
*/
|
|
47
|
-
export declare function isDiscoveryQuestionsEnabled(): boolean;
|
|
48
26
|
/** Advisory uptake interlock. Flag-off by default and subordinate to the master switch. */
|
|
49
27
|
export declare function isUptakeGuardEnabled(): boolean;
|
|
50
28
|
/** Authority threshold below which hosts may generate uptake questions. */
|
|
51
29
|
export declare function uptakeAuthorityThreshold(): number;
|
|
52
|
-
/**
|
|
53
|
-
* Input mode for the discovery question generator. Only `transcripts` is
|
|
54
|
-
* implemented; any other value falls back to `transcripts` (startup.env.ts
|
|
55
|
-
* warns on invalid values).
|
|
56
|
-
*/
|
|
57
|
-
export declare function discoveryQuestionsInputMode(): "transcripts" | "insights";
|
|
58
|
-
/** Per-call deadline for the discovery-questions LLM step. */
|
|
59
|
-
export declare function discoveryQuestionsTimeoutMs(): number;
|
|
60
30
|
/** Wait budget for the blocking ask_user_question chat tool. */
|
|
61
31
|
export declare function chatQuestionWaitTimeoutMs(): number;
|