@indexnetwork/protocol 6.6.5-rc.391.1 → 6.7.1-rc.393.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.
Files changed (40) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/IMPLEMENTATION.md +4 -0
  3. package/dist/chat/chat-streaming.types.d.ts +1 -7
  4. package/dist/chat/chat-streaming.types.d.ts.map +1 -1
  5. package/dist/chat/chat-streaming.types.js.map +1 -1
  6. package/dist/chat/chat.agent.d.ts +0 -7
  7. package/dist/chat/chat.agent.d.ts.map +1 -1
  8. package/dist/chat/chat.agent.js.map +1 -1
  9. package/dist/chat/onboarding.persona.d.ts +30 -0
  10. package/dist/chat/onboarding.persona.d.ts.map +1 -0
  11. package/dist/chat/onboarding.persona.js +102 -0
  12. package/dist/chat/onboarding.persona.js.map +1 -0
  13. package/dist/chat/onboarding.prompt.d.ts +7 -0
  14. package/dist/chat/onboarding.prompt.d.ts.map +1 -0
  15. package/dist/chat/onboarding.prompt.js +74 -0
  16. package/dist/chat/onboarding.prompt.js.map +1 -0
  17. package/dist/chat/signal.persona.d.ts +1 -1
  18. package/dist/chat/signal.persona.d.ts.map +1 -1
  19. package/dist/chat/signal.persona.js.map +1 -1
  20. package/dist/chat/signal.prompt.d.ts +2 -2
  21. package/dist/chat/signal.prompt.d.ts.map +1 -1
  22. package/dist/chat/signal.prompt.js +2 -2
  23. package/dist/chat/signal.prompt.js.map +1 -1
  24. package/dist/enrichment/enrichment.tools.d.ts.map +1 -1
  25. package/dist/enrichment/enrichment.tools.js +63 -17
  26. package/dist/enrichment/enrichment.tools.js.map +1 -1
  27. package/dist/index.d.ts +1 -0
  28. package/dist/index.d.ts.map +1 -1
  29. package/dist/index.js +1 -0
  30. package/dist/index.js.map +1 -1
  31. package/dist/questioner/questioner.ask.tool.d.ts.map +1 -1
  32. package/dist/questioner/questioner.ask.tool.js +3 -7
  33. package/dist/questioner/questioner.ask.tool.js.map +1 -1
  34. package/dist/shared/interfaces/database.interface.d.ts +3 -1
  35. package/dist/shared/interfaces/database.interface.d.ts.map +1 -1
  36. package/dist/shared/interfaces/database.interface.js.map +1 -1
  37. package/dist/shared/observability/request-context.d.ts +0 -7
  38. package/dist/shared/observability/request-context.d.ts.map +1 -1
  39. package/dist/shared/observability/request-context.js.map +1 -1
  40. package/package.json +1 -1
@@ -23,13 +23,6 @@ export type TraceEmitter = (event: {
23
23
  type: "user_question";
24
24
  questions: Array<{
25
25
  id: string;
26
- title: string;
27
- prompt: string;
28
- options: Array<{
29
- label: string;
30
- description: string;
31
- }>;
32
- multiSelect: boolean;
33
26
  }>;
34
27
  } | {
35
28
  type: "status";
@@ -1 +1 @@
1
- {"version":3,"file":"request-context.d.ts","sourceRoot":"/","sources":["shared/observability/request-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,KAAK,EACD;IACE,IAAI,EAAE,aAAa,GAAG,WAAW,GAAG,aAAa,GAAG,WAAW,CAAC;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GACD;IAKE,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,EAAE,KAAK,CAAC;QACf,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,EAAE,KAAK,CAAC;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,WAAW,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;QACvD,WAAW,EAAE,OAAO,CAAC;KACtB,CAAC,CAAC;CACJ,GACD;IAGE,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,yBAAyB,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;OAMG;IACH,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,KACF,IAAI,CAAC;AAEV,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,mCAA0C,CAAC"}
1
+ {"version":3,"file":"request-context.d.ts","sourceRoot":"/","sources":["shared/observability/request-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,KAAK,EACD;IACE,IAAI,EAAE,aAAa,GAAG,WAAW,GAAG,aAAa,GAAG,WAAW,CAAC;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GACD;IAKE,IAAI,EAAE,eAAe,CAAC;IACtB,SAAS,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAClC,GACD;IAGE,IAAI,EAAE,QAAQ,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,yBAAyB,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,WAAW,CAAC;IACzB,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;OAMG;IACH,YAAY,EAAE;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,KACF,IAAI,CAAC;AAEV,UAAU,cAAc;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,mCAA0C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"request-context.js","sourceRoot":"/","sources":["shared/observability/request-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAgFhD;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,iBAAiB,EAAkB,CAAC","sourcesContent":["import type { Opportunity } from \"../interfaces/database.interface.js\";\nimport { AsyncLocalStorage } from \"async_hooks\";\n\n/**\n * Callback for streaming trace / domain events from deep inside graph nodes\n * back to the caller (typically chat.agent's stream pipeline).\n *\n * Carries two flavors of event:\n * - Trace events (`graph_start | graph_end | agent_start | agent_end`) — used\n * by the chat TRACE panel to visualize what the agent is doing.\n * - Domain events (`opportunity_draft_ready`) — emitted by the orchestrator\n * branch of OpportunityGraph.negotiateNode so the frontend can render each\n * accepted draft card progressively as its negotiation resolves.\n *\n * Kept as a single emitter rather than splitting into two to minimize plumbing\n * through AsyncLocalStorage; the chat.agent relay branches on event.type.\n */\nexport type TraceEmitter = (\n event:\n | {\n type: \"graph_start\" | \"graph_end\" | \"agent_start\" | \"agent_end\";\n name: string;\n durationMs?: number;\n summary?: string;\n }\n | {\n // Emitted by the ask_user_question tool: structured questions were\n // persisted and the turn is now blocked awaiting the user's answer.\n // Carries persisted question ids so the frontend can answer them\n // through the questions REST endpoints while the stream is live.\n type: \"user_question\";\n questions: Array<{\n id: string;\n title: string;\n prompt: string;\n options: Array<{ label: string; description: string }>;\n multiSelect: boolean;\n }>;\n }\n | {\n // Lightweight keep-alive/status line. Used by long-blocking tools\n // (ask_user_question wait loop) so SSE transports do not idle out.\n type: \"status\";\n message: string;\n }\n | {\n type: \"opportunity_draft_ready\";\n opportunityId: string;\n opportunity: Opportunity;\n /** Viewer-centric summary derived from interpretation.reasoning. */\n personalizedSummary?: string;\n /**\n * Minimal counterparty data for rendering the inline card without a\n * second-round-trip user lookup. Populated from the negotiation\n * candidate's profile; avatar is intentionally omitted (the card\n * falls back to initials) since UserNegotiationContext doesn't\n * carry avatars.\n */\n counterparty: {\n userId: string;\n name?: string;\n };\n },\n) => void;\n\ninterface RequestContext {\n originUrl?: string;\n traceEmitter?: TraceEmitter;\n /**\n * Signal for cooperative cancellation — propagates the caller's AbortSignal\n * into long-running graph nodes (e.g. orchestrator negotiation fan-out) so\n * they can stop emitting events when the chat session closes.\n *\n * The orchestrator branch checks this before persisting status flips or\n * pushing `opportunity_draft_ready` events. In-flight negotiations are not\n * forcibly cancelled — they finish or time out naturally via their park\n * window — but their results are suppressed once the signal trips.\n */\n abortSignal?: AbortSignal;\n}\n\n/**\n * AsyncLocalStorage for propagating request-scoped context through the protocol layer.\n * The host application is responsible for calling `requestContext.run()` to set the context.\n */\nexport const requestContext = new AsyncLocalStorage<RequestContext>();\n"]}
1
+ {"version":3,"file":"request-context.js","sourceRoot":"/","sources":["shared/observability/request-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AA0EhD;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,iBAAiB,EAAkB,CAAC","sourcesContent":["import type { Opportunity } from \"../interfaces/database.interface.js\";\nimport { AsyncLocalStorage } from \"async_hooks\";\n\n/**\n * Callback for streaming trace / domain events from deep inside graph nodes\n * back to the caller (typically chat.agent's stream pipeline).\n *\n * Carries two flavors of event:\n * - Trace events (`graph_start | graph_end | agent_start | agent_end`) — used\n * by the chat TRACE panel to visualize what the agent is doing.\n * - Domain events (`opportunity_draft_ready`) — emitted by the orchestrator\n * branch of OpportunityGraph.negotiateNode so the frontend can render each\n * accepted draft card progressively as its negotiation resolves.\n *\n * Kept as a single emitter rather than splitting into two to minimize plumbing\n * through AsyncLocalStorage; the chat.agent relay branches on event.type.\n */\nexport type TraceEmitter = (\n event:\n | {\n type: \"graph_start\" | \"graph_end\" | \"agent_start\" | \"agent_end\";\n name: string;\n durationMs?: number;\n summary?: string;\n }\n | {\n // Emitted by the ask_user_question tool: structured questions were\n // persisted and the turn is now blocked awaiting the user's answer.\n // Carries persisted question ids so the frontend can answer them\n // through the questions REST endpoints while the stream is live.\n type: \"user_question\";\n questions: Array<{ id: string }>;\n }\n | {\n // Lightweight keep-alive/status line. Used by long-blocking tools\n // (ask_user_question wait loop) so SSE transports do not idle out.\n type: \"status\";\n message: string;\n }\n | {\n type: \"opportunity_draft_ready\";\n opportunityId: string;\n opportunity: Opportunity;\n /** Viewer-centric summary derived from interpretation.reasoning. */\n personalizedSummary?: string;\n /**\n * Minimal counterparty data for rendering the inline card without a\n * second-round-trip user lookup. Populated from the negotiation\n * candidate's profile; avatar is intentionally omitted (the card\n * falls back to initials) since UserNegotiationContext doesn't\n * carry avatars.\n */\n counterparty: {\n userId: string;\n name?: string;\n };\n },\n) => void;\n\ninterface RequestContext {\n originUrl?: string;\n traceEmitter?: TraceEmitter;\n /**\n * Signal for cooperative cancellation — propagates the caller's AbortSignal\n * into long-running graph nodes (e.g. orchestrator negotiation fan-out) so\n * they can stop emitting events when the chat session closes.\n *\n * The orchestrator branch checks this before persisting status flips or\n * pushing `opportunity_draft_ready` events. In-flight negotiations are not\n * forcibly cancelled — they finish or time out naturally via their park\n * window — but their results are suppressed once the signal trips.\n */\n abortSignal?: AbortSignal;\n}\n\n/**\n * AsyncLocalStorage for propagating request-scoped context through the protocol layer.\n * The host application is responsible for calling `requestContext.run()` to set the context.\n */\nexport const requestContext = new AsyncLocalStorage<RequestContext>();\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/protocol",
3
- "version": "6.6.5-rc.391.1",
3
+ "version": "6.7.1-rc.393.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",