@indexnetwork/protocol 4.5.0-rc.337.1 → 4.5.0-rc.339.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 (46) hide show
  1. package/dist/chat/negotiator.persona.d.ts.map +1 -1
  2. package/dist/chat/negotiator.persona.js +15 -1
  3. package/dist/chat/negotiator.persona.js.map +1 -1
  4. package/dist/chat/negotiator.prompt.d.ts +15 -0
  5. package/dist/chat/negotiator.prompt.d.ts.map +1 -1
  6. package/dist/chat/negotiator.prompt.js +22 -2
  7. package/dist/chat/negotiator.prompt.js.map +1 -1
  8. package/dist/chat/negotiator.tools.d.ts +45 -0
  9. package/dist/chat/negotiator.tools.d.ts.map +1 -0
  10. package/dist/chat/negotiator.tools.js +137 -0
  11. package/dist/chat/negotiator.tools.js.map +1 -0
  12. package/dist/index.d.ts +4 -0
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +2 -0
  15. package/dist/index.js.map +1 -1
  16. package/dist/negotiation/negotiation.agent.d.ts +7 -0
  17. package/dist/negotiation/negotiation.agent.d.ts.map +1 -1
  18. package/dist/negotiation/negotiation.agent.js +4 -2
  19. package/dist/negotiation/negotiation.agent.js.map +1 -1
  20. package/dist/negotiation/negotiation.graph.d.ts +21 -3
  21. package/dist/negotiation/negotiation.graph.d.ts.map +1 -1
  22. package/dist/negotiation/negotiation.graph.js +51 -3
  23. package/dist/negotiation/negotiation.graph.js.map +1 -1
  24. package/dist/negotiation/negotiation.memory.d.ts +58 -0
  25. package/dist/negotiation/negotiation.memory.d.ts.map +1 -0
  26. package/dist/negotiation/negotiation.memory.js +71 -0
  27. package/dist/negotiation/negotiation.memory.js.map +1 -0
  28. package/dist/negotiation/negotiation.screen.d.ts +8 -1
  29. package/dist/negotiation/negotiation.screen.d.ts.map +1 -1
  30. package/dist/negotiation/negotiation.screen.js +5 -3
  31. package/dist/negotiation/negotiation.screen.js.map +1 -1
  32. package/dist/negotiation/negotiation.state.d.ts +9 -0
  33. package/dist/negotiation/negotiation.state.d.ts.map +1 -1
  34. package/dist/negotiation/negotiation.state.js +11 -0
  35. package/dist/negotiation/negotiation.state.js.map +1 -1
  36. package/dist/shared/agent/tool.helpers.d.ts +9 -0
  37. package/dist/shared/agent/tool.helpers.d.ts.map +1 -1
  38. package/dist/shared/agent/tool.helpers.js.map +1 -1
  39. package/dist/shared/interfaces/agent-dispatcher.interface.d.ts +8 -0
  40. package/dist/shared/interfaces/agent-dispatcher.interface.d.ts.map +1 -1
  41. package/dist/shared/interfaces/agent-dispatcher.interface.js.map +1 -1
  42. package/dist/shared/interfaces/negotiator-memory.interface.d.ts +59 -0
  43. package/dist/shared/interfaces/negotiator-memory.interface.d.ts.map +1 -0
  44. package/dist/shared/interfaces/negotiator-memory.interface.js +12 -0
  45. package/dist/shared/interfaces/negotiator-memory.interface.js.map +1 -0
  46. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"negotiator.persona.d.ts","sourceRoot":"/","sources":["chat/negotiator.persona.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC9H,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAgC,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAYpG;;;GAGG;AACH,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qBAAqB,0uBAiDxB,CAAC;AAIX;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAEjF;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,WAAW,EACjB,kBAAkB,CAAC,EAAE,mBAAmB,GACvC,OAAO,CAAC,SAAS,CAAC,CAGpB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,uBAAuB,GAAG,iBAAiB,CAUxF"}
1
+ {"version":3,"file":"negotiator.persona.d.ts","sourceRoot":"/","sources":["chat/negotiator.persona.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,KAAK,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC9H,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAgC,KAAK,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAapG;;;GAGG;AACH,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,qBAAqB,0uBAiDxB,CAAC;AAIX;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAEjF;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,WAAW,EACjB,kBAAkB,CAAC,EAAE,mBAAmB,GACvC,OAAO,CAAC,SAAS,CAAC,CAgBpB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,uBAAuB,GAAG,iBAAiB,CAUxF"}
@@ -1,5 +1,6 @@
1
1
  import { createChatTools } from "../shared/agent/tool.factory.js";
2
2
  import { buildNegotiatorSystemContent } from "./negotiator.prompt.js";
3
+ import { createNegotiatorMemoryTools } from "./negotiator.tools.js";
3
4
  // ═══════════════════════════════════════════════════════════════════════════════
4
5
  // NEGOTIATOR PERSONA (P4.1)
5
6
  // ═══════════════════════════════════════════════════════════════════════════════
@@ -103,7 +104,20 @@ export function filterNegotiatorTools(tools) {
103
104
  */
104
105
  export async function createNegotiatorTools(deps, preResolvedContext) {
105
106
  const tools = await createChatTools(deps, preResolvedContext);
106
- return filterNegotiatorTools(tools);
107
+ const filtered = filterNegotiatorTools(tools);
108
+ // P5.4 (IND-408): `remember`/`forget` are negotiator-exclusive — appended
109
+ // AFTER the allowlist filter, and only when the composition root injected
110
+ // the host bridge (i.e. negotiator memory writes are enabled). They never
111
+ // enter the shared registry, so the orchestrator cannot see them.
112
+ if (deps.negotiatorMemoryTools) {
113
+ const memoryTools = createNegotiatorMemoryTools({
114
+ host: deps.negotiatorMemoryTools,
115
+ userId: deps.userId,
116
+ ...(deps.sessionId ? { sessionId: deps.sessionId } : {}),
117
+ });
118
+ return [...filtered, ...memoryTools];
119
+ }
120
+ return filtered;
107
121
  }
108
122
  /**
109
123
  * Creates a negotiator `ChatPersonaConfig` bound to the client's personal
@@ -1 +1 @@
1
- {"version":3,"file":"negotiator.persona.js","sourceRoot":"/","sources":["chat/negotiator.persona.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAA8D,MAAM,iCAAiC,CAAC;AAE9H,OAAO,EAAE,4BAA4B,EAAgC,MAAM,wBAAwB,CAAC;AAEpG,kFAAkF;AAClF,4BAA4B;AAC5B,kFAAkF;AAClF,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,0EAA0E;AAC1E,iEAAiE;AACjE,kDAAkD;AAElD;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAElD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,gDAAgD;IAChD,mBAAmB;IACnB,iBAAiB;IACjB,wBAAwB;IACxB,oBAAoB;IACpB,oBAAoB;IACpB,4EAA4E;IAC5E,uEAAuE;IACvE,+EAA+E;IAC/E,sEAAsE;IACtE,sBAAsB;IACtB,wBAAwB;IACxB,yBAAyB;IACzB,+DAA+D;IAC/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AAC,qBAAqB,CAAC,IAAI,EAAE,kBAAkB,CAAC;QAC1F,aAAa,EAAE;YACb,oBAAoB,EAAE,KAAK;YAC3B,qBAAqB,EAAE,IAAI;SAC5B;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { createChatTools, type ChatTools, type ToolContext, type ResolvedToolContext } from \"../shared/agent/tool.factory.js\";\nimport type { ChatPersonaConfig } from \"./chat.persona.js\";\nimport { buildNegotiatorSystemContent, type NegotiatorPromptOptions } from \"./negotiator.prompt.js\";\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// NEGOTIATOR PERSONA (P4.1)\n// ═══════════════════════════════════════════════════════════════════════════════\n//\n// A pure persona addition on the P4.0 persona-neutral chat runtime: advocate\n// prompt, client-scoped toolset, and all orchestrator loop behaviors OFF.\n// Unlike the orchestrator (a static singleton), the negotiator persona is\n// created per session because its identity comes from the user's\n// `type='personal'` agent row (name/description).\n\n/**\n * Persona id for the user's personal negotiator. Matches the\n * `conversations.persona` column value for negotiator DM sessions.\n */\nexport const NEGOTIATOR_PERSONA_ID = \"negotiator\";\n\n/**\n * Client-scoped tool allowlist for the negotiator persona.\n *\n * P4.5 (IND-413) expanded this from the read-mostly P4.1 set: with direct\n * opportunity discovery retiring alongside the orchestrator, discovery is\n * purely signal-based — so the negotiator (the surviving personal-agent chat\n * surface) manages the client's signals, profile knowledge, memberships, and\n * contacts.\n *\n * Still deliberately excluded:\n * - discovery runs (`discover_opportunities`, `get/cancel_discovery_run`) —\n * retired capability; matching happens in the background from signals,\n * - whole-network administration (`create/update/delete_network`) — a\n * human/UI act for now (joins/leaves are allowed),\n * - onboarding plumbing (`complete_onboarding`,\n * `record_onboarding_privacy_consent`),\n * - agent management (`register/update/delete_agent`, permission grants),\n * - `confirm_opportunity_delivery` (OpenClaw ledger write, never chat).\n */\nexport const NEGOTIATOR_TOOL_NAMES = [\n // Negotiation record — the advocate core (P4.1)\n \"list_negotiations\",\n \"get_negotiation\",\n \"respond_to_negotiation\",\n \"list_opportunities\",\n \"update_opportunity\",\n // Pending questions — the system's open questions for the client. Added for\n // intent-pinned sessions (P4.2/IND-403); the tool clamps itself to the\n // focused intent scope when one is set. answer_pending_question (P4.3/IND-404)\n // records the client's explicit answers through the same pipeline the\n // question cards use.\n \"read_pending_questions\",\n \"answer_pending_question\",\n // Signals — the input surface of signal-based discovery (P4.5)\n \"read_intents\",\n \"create_intent\",\n \"update_intent\",\n \"delete_intent\",\n \"search_intents\",\n \"read_intent_indexes\",\n \"create_intent_index\",\n \"delete_intent_index\",\n // Profile knowledge (P4.5)\n \"read_user_contexts\",\n \"create_user_context\",\n \"update_user_context\",\n \"confirm_user_context\",\n \"preview_user_context\",\n // Premises (P4.5; read was already in P4.1)\n \"read_premises\",\n \"create_premise\",\n \"update_premise\",\n \"retract_premise\",\n // Networks — joins/leaves only, no network administration (P4.5)\n \"read_networks\",\n \"read_network_memberships\",\n \"create_network_membership\",\n \"delete_network_membership\",\n // Contacts — dormant while CONTACTS_ENABLED=false (P4.5)\n \"list_contacts\",\n \"search_contacts\",\n \"add_contact\",\n \"remove_contact\",\n \"import_contacts\",\n \"import_gmail_contacts\",\n // Utility — create_intent's own contract instructs scraping pasted URLs\n // before synthesizing a signal description (P4.5)\n \"scrape_url\",\n] as const;\n\nconst NEGOTIATOR_TOOL_ALLOWLIST: ReadonlySet<string> = new Set(NEGOTIATOR_TOOL_NAMES);\n\n/**\n * Filters a full chat-tool registry down to the negotiator allowlist.\n * Exported separately so the scoping rule is unit-testable without\n * constructing the full tool factory dependency graph.\n */\nexport function filterNegotiatorTools<T extends { name: string }>(tools: T[]): T[] {\n return tools.filter((t) => NEGOTIATOR_TOOL_ALLOWLIST.has(t.name));\n}\n\n/**\n * Creates the negotiator persona's client-scoped toolset.\n *\n * Reuses the standard chat tool factory (so context resolution, scope\n * derivation, logging, and error handling stay identical) and filters the\n * registry to the allowlist. The negotiation tools are already context-bound\n * to `context.userId`, so every tool in this set can only read or act on the\n * calling client's own data.\n */\nexport async function createNegotiatorTools(\n deps: ToolContext,\n preResolvedContext?: ResolvedToolContext,\n): Promise<ChatTools> {\n const tools = await createChatTools(deps, preResolvedContext);\n return filterNegotiatorTools(tools);\n}\n\n/**\n * Creates a negotiator `ChatPersonaConfig` bound to the client's personal\n * negotiator agent row identity.\n *\n * Loop behaviors (P4.5):\n * - `hallucinationRecovery: true` — with `create_intent` in the toolset the\n * model can legitimately produce ```intent_proposal blocks, so unbacked\n * blocks must be detected/auto-invoked/stripped. The auto-invoke path is\n * confirm-safe: `create_intent` returns a proposal card that persists\n * nothing until the client approves it in the UI. A hallucinated\n * ```opportunity block maps to `discover_opportunities`, which is absent\n * from this toolset — the loop falls back to a correction message and the\n * final-response strip still removes the unbacked block.\n * - `createIntentCallback: false` — discovery-coupled (fires only off\n * `discover_opportunities` results); retired along with direct discovery.\n *\n * @param opts - Identity from the user's `type='personal'` agent row\n */\nexport function createNegotiatorPersona(opts: NegotiatorPromptOptions): ChatPersonaConfig {\n return {\n id: NEGOTIATOR_PERSONA_ID,\n buildSystemContent: (ctx, iterCtx) => buildNegotiatorSystemContent(ctx, opts, iterCtx),\n createTools: (deps, preResolvedContext) => createNegotiatorTools(deps, preResolvedContext),\n loopBehaviors: {\n createIntentCallback: false,\n hallucinationRecovery: true,\n },\n };\n}\n"]}
1
+ {"version":3,"file":"negotiator.persona.js","sourceRoot":"/","sources":["chat/negotiator.persona.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAA8D,MAAM,iCAAiC,CAAC;AAE9H,OAAO,EAAE,4BAA4B,EAAgC,MAAM,wBAAwB,CAAC;AACpG,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE,kFAAkF;AAClF,4BAA4B;AAC5B,kFAAkF;AAClF,EAAE;AACF,6EAA6E;AAC7E,0EAA0E;AAC1E,0EAA0E;AAC1E,iEAAiE;AACjE,kDAAkD;AAElD;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,YAAY,CAAC;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AC;IAC9C,0EAA0E;IAC1E,0EAA0E;IAC1E,0EAA0E;IAC1E,kEAAkE;IAClE,IAAI,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC/B,MAAM,WAAW,GAAG,2BAA2B,CAAC;YAC9C,IAAI,EAAE,IAAI,CAAC,qBAAqB;YAChC,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACzD,CAAC,CAAC;QACH,OAAO,CAAC,GAAG,QAAQ,EAAE,GAAG,WAAW,CAAc,CAAC;IACpD,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAA6B;IACnE,OAAO;QACL,EAAE,EAAE,qBAAqB;QACzB,kBAAkB,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE,CAAC,4BAA4B,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC;QACtF,WAAW,EAAE,CAAC,IAAI,EAAE,kBAAkB,EAAE,EAAE,CAAC,qBAAqB,CAAC,IAAI,EAAE,kBAAkB,CAAC;QAC1F,aAAa,EAAE;YACb,oBAAoB,EAAE,KAAK;YAC3B,qBAAqB,EAAE,IAAI;SAC5B;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { createChatTools, type ChatTools, type ToolContext, type ResolvedToolContext } from \"../shared/agent/tool.factory.js\";\nimport type { ChatPersonaConfig } from \"./chat.persona.js\";\nimport { buildNegotiatorSystemContent, type NegotiatorPromptOptions } from \"./negotiator.prompt.js\";\nimport { createNegotiatorMemoryTools } from \"./negotiator.tools.js\";\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// NEGOTIATOR PERSONA (P4.1)\n// ═══════════════════════════════════════════════════════════════════════════════\n//\n// A pure persona addition on the P4.0 persona-neutral chat runtime: advocate\n// prompt, client-scoped toolset, and all orchestrator loop behaviors OFF.\n// Unlike the orchestrator (a static singleton), the negotiator persona is\n// created per session because its identity comes from the user's\n// `type='personal'` agent row (name/description).\n\n/**\n * Persona id for the user's personal negotiator. Matches the\n * `conversations.persona` column value for negotiator DM sessions.\n */\nexport const NEGOTIATOR_PERSONA_ID = \"negotiator\";\n\n/**\n * Client-scoped tool allowlist for the negotiator persona.\n *\n * P4.5 (IND-413) expanded this from the read-mostly P4.1 set: with direct\n * opportunity discovery retiring alongside the orchestrator, discovery is\n * purely signal-based — so the negotiator (the surviving personal-agent chat\n * surface) manages the client's signals, profile knowledge, memberships, and\n * contacts.\n *\n * Still deliberately excluded:\n * - discovery runs (`discover_opportunities`, `get/cancel_discovery_run`) —\n * retired capability; matching happens in the background from signals,\n * - whole-network administration (`create/update/delete_network`) — a\n * human/UI act for now (joins/leaves are allowed),\n * - onboarding plumbing (`complete_onboarding`,\n * `record_onboarding_privacy_consent`),\n * - agent management (`register/update/delete_agent`, permission grants),\n * - `confirm_opportunity_delivery` (OpenClaw ledger write, never chat).\n */\nexport const NEGOTIATOR_TOOL_NAMES = [\n // Negotiation record — the advocate core (P4.1)\n \"list_negotiations\",\n \"get_negotiation\",\n \"respond_to_negotiation\",\n \"list_opportunities\",\n \"update_opportunity\",\n // Pending questions — the system's open questions for the client. Added for\n // intent-pinned sessions (P4.2/IND-403); the tool clamps itself to the\n // focused intent scope when one is set. answer_pending_question (P4.3/IND-404)\n // records the client's explicit answers through the same pipeline the\n // question cards use.\n \"read_pending_questions\",\n \"answer_pending_question\",\n // Signals — the input surface of signal-based discovery (P4.5)\n \"read_intents\",\n \"create_intent\",\n \"update_intent\",\n \"delete_intent\",\n \"search_intents\",\n \"read_intent_indexes\",\n \"create_intent_index\",\n \"delete_intent_index\",\n // Profile knowledge (P4.5)\n \"read_user_contexts\",\n \"create_user_context\",\n \"update_user_context\",\n \"confirm_user_context\",\n \"preview_user_context\",\n // Premises (P4.5; read was already in P4.1)\n \"read_premises\",\n \"create_premise\",\n \"update_premise\",\n \"retract_premise\",\n // Networks — joins/leaves only, no network administration (P4.5)\n \"read_networks\",\n \"read_network_memberships\",\n \"create_network_membership\",\n \"delete_network_membership\",\n // Contacts — dormant while CONTACTS_ENABLED=false (P4.5)\n \"list_contacts\",\n \"search_contacts\",\n \"add_contact\",\n \"remove_contact\",\n \"import_contacts\",\n \"import_gmail_contacts\",\n // Utility — create_intent's own contract instructs scraping pasted URLs\n // before synthesizing a signal description (P4.5)\n \"scrape_url\",\n] as const;\n\nconst NEGOTIATOR_TOOL_ALLOWLIST: ReadonlySet<string> = new Set(NEGOTIATOR_TOOL_NAMES);\n\n/**\n * Filters a full chat-tool registry down to the negotiator allowlist.\n * Exported separately so the scoping rule is unit-testable without\n * constructing the full tool factory dependency graph.\n */\nexport function filterNegotiatorTools<T extends { name: string }>(tools: T[]): T[] {\n return tools.filter((t) => NEGOTIATOR_TOOL_ALLOWLIST.has(t.name));\n}\n\n/**\n * Creates the negotiator persona's client-scoped toolset.\n *\n * Reuses the standard chat tool factory (so context resolution, scope\n * derivation, logging, and error handling stay identical) and filters the\n * registry to the allowlist. The negotiation tools are already context-bound\n * to `context.userId`, so every tool in this set can only read or act on the\n * calling client's own data.\n */\nexport async function createNegotiatorTools(\n deps: ToolContext,\n preResolvedContext?: ResolvedToolContext,\n): Promise<ChatTools> {\n const tools = await createChatTools(deps, preResolvedContext);\n const filtered = filterNegotiatorTools(tools);\n // P5.4 (IND-408): `remember`/`forget` are negotiator-exclusive — appended\n // AFTER the allowlist filter, and only when the composition root injected\n // the host bridge (i.e. negotiator memory writes are enabled). They never\n // enter the shared registry, so the orchestrator cannot see them.\n if (deps.negotiatorMemoryTools) {\n const memoryTools = createNegotiatorMemoryTools({\n host: deps.negotiatorMemoryTools,\n userId: deps.userId,\n ...(deps.sessionId ? { sessionId: deps.sessionId } : {}),\n });\n return [...filtered, ...memoryTools] as ChatTools;\n }\n return filtered;\n}\n\n/**\n * Creates a negotiator `ChatPersonaConfig` bound to the client's personal\n * negotiator agent row identity.\n *\n * Loop behaviors (P4.5):\n * - `hallucinationRecovery: true` — with `create_intent` in the toolset the\n * model can legitimately produce ```intent_proposal blocks, so unbacked\n * blocks must be detected/auto-invoked/stripped. The auto-invoke path is\n * confirm-safe: `create_intent` returns a proposal card that persists\n * nothing until the client approves it in the UI. A hallucinated\n * ```opportunity block maps to `discover_opportunities`, which is absent\n * from this toolset — the loop falls back to a correction message and the\n * final-response strip still removes the unbacked block.\n * - `createIntentCallback: false` — discovery-coupled (fires only off\n * `discover_opportunities` results); retired along with direct discovery.\n *\n * @param opts - Identity from the user's `type='personal'` agent row\n */\nexport function createNegotiatorPersona(opts: NegotiatorPromptOptions): ChatPersonaConfig {\n return {\n id: NEGOTIATOR_PERSONA_ID,\n buildSystemContent: (ctx, iterCtx) => buildNegotiatorSystemContent(ctx, opts, iterCtx),\n createTools: (deps, preResolvedContext) => createNegotiatorTools(deps, preResolvedContext),\n loopBehaviors: {\n createIntentCallback: false,\n hallucinationRecovery: true,\n },\n };\n}\n"]}
@@ -1,4 +1,5 @@
1
1
  import type { ResolvedToolContext } from "../shared/agent/tool.factory.js";
2
+ import { type NegotiatorMemoryEntry } from "../negotiation/negotiation.memory.js";
2
3
  import type { IterationContext } from "./chat.prompt.modules.js";
3
4
  /** Identity options resolved from the user's personal negotiator agent row. */
4
5
  export interface NegotiatorPromptOptions {
@@ -13,6 +14,20 @@ export interface NegotiatorPromptOptions {
13
14
  * naming it. Ignored when the session has no intent scope.
14
15
  */
15
16
  pinnedIntentLabel?: string;
17
+ /**
18
+ * The client's negotiator memories (P5.3 read path) — accumulated notes
19
+ * from negotiations and prior chats, rendered as a prompt section. The
20
+ * audience is the client themself, so entries are shared context, not
21
+ * secrets. Absent/empty → the prompt is byte-identical to before.
22
+ */
23
+ memory?: NegotiatorMemoryEntry[];
24
+ /**
25
+ * True when the `remember`/`forget` memory tools are registered for this
26
+ * session (P5.4 — the composition root injects them only while negotiator
27
+ * memory writes are enabled). Adds the memory-tool guidance section and
28
+ * tool-reference rows; false/absent → prompt unchanged.
29
+ */
30
+ memoryToolsEnabled?: boolean;
16
31
  }
17
32
  /**
18
33
  * Builds the system prompt for the negotiator chat persona.
@@ -1 +1 @@
1
- {"version":3,"file":"negotiator.prompt.d.ts","sourceRoot":"/","sources":["chat/negotiator.prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAkBjE,+EAA+E;AAC/E,MAAM,WAAW,uBAAuB;IACtC,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAkCD;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,mBAAmB,EACxB,IAAI,EAAE,uBAAuB,EAC7B,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,MAAM,CAgFR"}
1
+ {"version":3,"file":"negotiator.prompt.d.ts","sourceRoot":"/","sources":["chat/negotiator.prompt.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,OAAO,EAAqC,KAAK,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AACrH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAkBjE,+EAA+E;AAC/E,MAAM,WAAW,uBAAuB;IACtC,qEAAqE;IACrE,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACjC;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAiDD;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,mBAAmB,EACxB,IAAI,EAAE,uBAAuB,EAC7B,QAAQ,CAAC,EAAE,gBAAgB,GAC1B,MAAM,CAqFR"}
@@ -1,4 +1,5 @@
1
1
  import { focusedIntentId } from "../shared/agent/tool.scope.js";
2
+ import { renderNegotiatorChatMemorySection } from "../negotiation/negotiation.memory.js";
2
3
  /**
3
4
  * Renders the pinned-signal section for intent-scoped sessions (P4.2).
4
5
  * Awareness, not a sandbox: the conversation orbits this signal, but the
@@ -29,6 +30,20 @@ The system collects open questions for your client (signal refinements, negotiat
29
30
  - When the client answers a question conversationally, record it with answer_pending_question — pass exactly what they said (their chosen options and/or their own words), never an answer you inferred. If the tool reports the question was already answered or dismissed, tell them instead of retrying.
30
31
  - Never pressure the client to answer; the questions keep for later and remain available in the app's Questions page.`;
31
32
  }
33
+ /**
34
+ * Renders the remember/forget guidance section (P5.4). Only rendered when the
35
+ * memory tools are actually registered, so the model is never told about
36
+ * capabilities it does not have.
37
+ */
38
+ function buildMemoryToolsSection() {
39
+ return `
40
+ ## Remembering and forgetting
41
+ You keep a private working memory for negotiations: standing disclosure rules, thresholds, and playbook notes. The client can inspect, edit, and delete everything you remember on their agent page (Memory tab).
42
+ - When the client states a standing rule that should outlive this conversation — especially about what to disclose or protect ("never share my budget", "don't reveal who my current clients are") — save it with remember. Pick the kind honestly: disclosure_rule for sharing constraints, threshold for hard limits, playbook for tactics. Confirm in one short sentence what you saved and that they can review it on your agent page.
43
+ - Only remember what the client actually said. Never speculate a rule into memory, and don't save one-off instructions that only apply to the current request.
44
+ - When the client asks you to forget or retract something, use forget with their description of it. If several memories match, lay out the candidates in plain language and ask which one they mean.
45
+ - Disclosure rules are standing consent: treat a remembered disclosure rule as binding in every future negotiation until the client changes or deletes it.`;
46
+ }
32
47
  /**
33
48
  * Builds the system prompt for the negotiator chat persona.
34
49
  *
@@ -56,6 +71,11 @@ export function buildNegotiatorSystemContent(ctx, opts, _iterCtx) {
56
71
  const pinnedSignalSection = pinnedIntentId
57
72
  ? buildPinnedSignalSection(pinnedIntentId, opts.pinnedIntentLabel)
58
73
  : buildQuestionInboxSection();
74
+ const memorySection = renderNegotiatorChatMemorySection(opts.memory ?? []);
75
+ const memoryToolsSection = opts.memoryToolsEnabled ? buildMemoryToolsSection() : "";
76
+ const memoryToolsRows = opts.memoryToolsEnabled
77
+ ? `\n| **remember** | kind, content | Save a standing rule the client just stated into your private negotiator memory — ONLY what they actually said |\n| **forget** | memoryId? / description? | Delete a remembered rule when the client asks you to forget it |`
78
+ : "";
59
79
  return `You are ${opts.agentName}, the personal negotiator agent working for ${ctx.userName}.
60
80
  ${descriptionLine}
61
81
  You work for exactly one client: ${ctx.userName}. You represent them in negotiations with other members' agents across the network, and this chat is your direct line to them. Your job here is to keep your client informed about what you have been doing on their behalf, explain your reasoning honestly, and act only on their explicit instructions.
@@ -69,7 +89,7 @@ You work for exactly one client: ${ctx.userName}. You represent them in negotiat
69
89
  - **Handle memberships**: list the communities they belong to and join or leave communities when they ask.
70
90
  - **Manage their contacts**: look up, add, remove, or import contacts when they ask (when contact features are enabled).
71
91
  - **Act on instruction**: every write — a negotiation response, an opportunity decision, a signal, a profile or premise change, a membership change, a contact change — happens only when the client explicitly asks for it in this conversation. Never write anything the client did not just ask for.
72
- ${pinnedSignalSection}
92
+ ${pinnedSignalSection}${memorySection}${memoryToolsSection}
73
93
  ## What you cannot do here
74
94
  - **No direct discovery.** You cannot run matching or search for people yourself. Matching happens automatically in the background from the client's signals — shaping the signals is how you steer it. New matches appear on the client's home page and in this chat as opportunities.
75
95
  - **No community administration.** You can join or leave communities for the client, but you cannot create, rename, or delete communities — point them to the app for that.
@@ -110,7 +130,7 @@ ${profileContext}
110
130
  | **create_network_membership** / **delete_network_membership** | networkId | Join/leave a community on instruction |
111
131
  | **list_contacts** / **search_contacts** / **add_contact** / **remove_contact** | ... | The client's contacts |
112
132
  | **import_contacts** / **import_gmail_contacts** | ... | Bulk contact import on instruction |
113
- | **scrape_url** | url, objective | Read a link the client pasted (e.g. before drafting a signal from it) |
133
+ | **scrape_url** | url, objective | Read a link the client pasted (e.g. before drafting a signal from it) |${memoryToolsRows}
114
134
 
115
135
  ## Grounding rules
116
136
  - **Never fabricate.** Every claim about a negotiation, opportunity, signal, or premise must come from a tool result in this conversation. If you have not looked it up this turn, look it up before answering. Only the client's identity and profile above are preloaded.
@@ -1 +1 @@
1
- {"version":3,"file":"negotiator.prompt.js","sourceRoot":"/","sources":["chat/negotiator.prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAkChE;;;;GAIG;AACH,SAAS,wBAAwB,CAAC,QAAgB,EAAE,KAAc;IAChE,MAAM,SAAS,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9D,OAAO;;4EAEmE,QAAQ,GAAG,SAAS;;;;qNAIqH,CAAC;AACtN,CAAC;AAED;;;;;GAKG;AACH,SAAS,yBAAyB;IAChC,OAAO;;;;;;sHAM6G,CAAC;AACvH,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,4BAA4B,CAC1C,GAAwB,EACxB,IAA6B,EAC7B,QAA2B;IAE3B,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACtD,MAAM,cAAc,GAAG,GAAG,CAAC,WAAW;QACpC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE;QACnD,CAAC,CAAC,KAAK,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI;QACvC,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,cAAc,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IAC5C,6EAA6E;IAC7E,kEAAkE;IAClE,MAAM,mBAAmB,GAAG,cAAc;QACxC,CAAC,CAAC,wBAAwB,CAAC,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC;QAClE,CAAC,CAAC,yBAAyB,EAAE,CAAC;IAEhC,OAAO,WAAW,IAAI,CAAC,SAAS,+CAA+C,GAAG,CAAC,QAAQ;EAC3F,eAAe;mCACkB,GAAG,CAAC,QAAQ;;;;;;;;;;;EAW7C,mBAAmB;;;;;;;YAOT,GAAG,CAAC,QAAQ,KAAK,GAAG,CAAC,SAAS,UAAU,GAAG,CAAC,MAAM;;;;EAI5D,WAAW;;;;;EAKX,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8MAmC8L,CAAC;AAC/M,CAAC","sourcesContent":["import type { ResolvedToolContext } from \"../shared/agent/tool.factory.js\";\nimport { focusedIntentId } from \"../shared/agent/tool.scope.js\";\nimport type { IterationContext } from \"./chat.prompt.modules.js\";\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// NEGOTIATOR PERSONA SYSTEM PROMPT (P4.1)\n// ═══════════════════════════════════════════════════════════════════════════════\n//\n// The direct chat line between a user and their personal negotiator agent\n// (the `type='personal'` agent row). Unlike the orchestrator prompt, this\n// persona works for exactly one client: it reports on the client's\n// negotiations and opportunities, explains decisions from the negotiation\n// record, and acts only on explicit client instruction.\n//\n// P4.5 (IND-413): the negotiator also manages the client's signals, profile\n// knowledge, premises, community memberships, and contacts — discovery is\n// purely signal-based, so shaping signals here IS how the client steers\n// matching. It still has no direct discovery capability: matching runs in\n// the background from the signals.\n\n/** Identity options resolved from the user's personal negotiator agent row. */\nexport interface NegotiatorPromptOptions {\n /** The negotiator agent's display name (e.g. \"Ada's Negotiator\"). */\n agentName: string;\n /** The negotiator agent's description, when set on the agent row. */\n agentDescription?: string;\n /**\n * Human-readable label for the pinned signal when the session is\n * intent-scoped (P4.2/IND-403). The pin itself comes from the resolved\n * context's scope envelope; this label just saves a tool round-trip for\n * naming it. Ignored when the session has no intent scope.\n */\n pinnedIntentLabel?: string;\n}\n\n/**\n * Renders the pinned-signal section for intent-scoped sessions (P4.2).\n * Awareness, not a sandbox: the conversation orbits this signal, but the\n * negotiator may still reference the client's other knowledge.\n */\nfunction buildPinnedSignalSection(intentId: string, label?: string): string {\n const labelLine = label?.trim() ? ` — “${label.trim()}”` : \"\";\n return `\n## Pinned signal\nThis conversation was opened from one of the client's signals (intent id: ${intentId}${labelLine}). Treat it as the working focus of this chat:\n- Open questions listed by read_pending_questions here are this signal's open questions — surface them early and work through them conversationally. The client answers them via the question cards shown in this chat, or conversationally: when they give you an explicit answer, record it with answer_pending_question.\n- list_opportunities and read_pending_questions are automatically restricted to this signal in this session; use them to report matches, negotiations, and follow-ups that grew out of it.\n- When the client restates or sharpens what they want here, propose an update to this signal (update_intent) or a new premise — on their confirmation — so background matching reflects it.\n- This is a focus, not a wall: you may still read the client's profile, premises, and other signals when the conversation needs the fuller picture, and general questions about their negotiations remain fair game.`;\n}\n\n/**\n * Renders the question-inbox section for the unscoped DM (P4.3/IND-404).\n * The DM is the client's primary surface for the system's open questions:\n * signal refinements, negotiation follow-ups, profile gaps. Cards render in\n * the chat; conversational answers are recorded via answer_pending_question.\n */\nfunction buildQuestionInboxSection(): string {\n return `\n## Client question inbox\nThe system collects open questions for your client (signal refinements, negotiation follow-ups, profile gaps), and this chat is the primary place they get handled. Question cards also render directly in this chat.\n- Early in a conversation — or whenever the client asks what needs their attention — call read_pending_questions and surface what is open, briefly and in plain language.\n- When the client asks why something is being asked, explain the question's context from the record it came from (the negotiation, opportunity, or signal behind it) — look it up, don't guess.\n- When the client answers a question conversationally, record it with answer_pending_question — pass exactly what they said (their chosen options and/or their own words), never an answer you inferred. If the tool reports the question was already answered or dismissed, tell them instead of retrying.\n- Never pressure the client to answer; the questions keep for later and remain available in the app's Questions page.`;\n}\n\n/**\n * Builds the system prompt for the negotiator chat persona.\n *\n * Grounded in the client's preloaded user/profile context; everything else\n * (negotiations, opportunities, signals, premises) must be fetched through\n * the client-scoped toolset each turn.\n *\n * @param ctx - Resolved tool context for the current session\n * @param opts - Identity from the client's personal negotiator agent row\n * @param _iterCtx - Iteration context (unused — the negotiator prompt has no\n * dynamic modules; the nudge is injected by the agent loop)\n * @returns The complete system prompt string\n */\nexport function buildNegotiatorSystemContent(\n ctx: ResolvedToolContext,\n opts: NegotiatorPromptOptions,\n _iterCtx?: IterationContext,\n): string {\n const userContext = JSON.stringify(ctx.user, null, 2);\n const profileContext = ctx.userProfile\n ? JSON.stringify(ctx.userProfile, null, 2)\n : \"null\";\n const descriptionLine = opts.agentDescription?.trim()\n ? `\\n${opts.agentDescription.trim()}\\n`\n : \"\";\n const pinnedIntentId = focusedIntentId(ctx);\n // Pinned sessions clamp the question tools to the signal and carry their own\n // question guidance; the unscoped DM gets the full inbox instead.\n const pinnedSignalSection = pinnedIntentId\n ? buildPinnedSignalSection(pinnedIntentId, opts.pinnedIntentLabel)\n : buildQuestionInboxSection();\n\n return `You are ${opts.agentName}, the personal negotiator agent working for ${ctx.userName}.\n${descriptionLine}\nYou work for exactly one client: ${ctx.userName}. You represent them in negotiations with other members' agents across the network, and this chat is your direct line to them. Your job here is to keep your client informed about what you have been doing on their behalf, explain your reasoning honestly, and act only on their explicit instructions.\n\n## What you do in this chat\n- **Report on negotiations**: when the client asks what is happening, look up their negotiations and summarize status, counterparties, and where things stand.\n- **Explain decisions**: when the client asks why something was pursued, declined, or stalled (\"why did you pass on X?\"), find the relevant negotiation and answer from the actual record — the messages, outcomes, and reasoning stored there. Never reconstruct a rationale from memory.\n- **Review and act on opportunities**: show the client the opportunities currently waiting on them and what accepting or passing would mean; accept or pass on one only when they explicitly say so.\n- **Manage their signals**: their active intents (signals) define what you negotiate for — and matching is driven entirely by them. When the client tells you what they are looking for, draft a clear, specific signal and create it; refine or retire signals when they ask. If a signal request is vague, read their profile and existing signals first, then propose a sharper wording before creating it. If they paste a link describing what they want, read it first and synthesize the signal from its content.\n- **Keep their knowledge current**: when the client shares a new fact about themselves (\"I moved to Berlin\", \"I stopped consulting\"), update their profile context or premises so future negotiations reflect reality. Read before you write — update the existing entry instead of duplicating it.\n- **Handle memberships**: list the communities they belong to and join or leave communities when they ask.\n- **Manage their contacts**: look up, add, remove, or import contacts when they ask (when contact features are enabled).\n- **Act on instruction**: every write — a negotiation response, an opportunity decision, a signal, a profile or premise change, a membership change, a contact change — happens only when the client explicitly asks for it in this conversation. Never write anything the client did not just ask for.\n${pinnedSignalSection}\n## What you cannot do here\n- **No direct discovery.** You cannot run matching or search for people yourself. Matching happens automatically in the background from the client's signals — shaping the signals is how you steer it. New matches appear on the client's home page and in this chat as opportunities.\n- **No community administration.** You can join or leave communities for the client, but you cannot create, rename, or delete communities — point them to the app for that.\n- You cannot push updates after this conversation ends. You only report when asked.\n\n## Session\n- Client: ${ctx.userName} (${ctx.userEmail}), id: ${ctx.userId}\n\n### Client (preloaded context)\n\\`\\`\\`json\n${userContext}\n\\`\\`\\`\n\n### Client Context (preloaded context)\n\\`\\`\\`json\n${profileContext}\n\\`\\`\\`\n\n## Tools Reference\n\n| Tool | Params | What it does |\n|------|--------|-------------|\n| **list_negotiations** | status?, limit? | List the client's negotiations |\n| **get_negotiation** | negotiationId | Full negotiation record: messages, outcome, reasoning |\n| **respond_to_negotiation** | negotiationId, ... | Act on a negotiation — ONLY on explicit client instruction |\n| **list_opportunities** | — | List the client's actionable opportunities |\n| **read_pending_questions** | limit? | The system's open questions for the client (clamped to the pinned signal when one is set) |\n| **answer_pending_question** | questionId, selectedOptions?, freeText? | Record the client's explicit answer to a pending question — ONLY with an answer they actually gave |\n| **update_opportunity** | opportunityId, status | Accept/pass an opportunity — ONLY on explicit client instruction |\n| **read_intents** / **search_intents** | — / query | The client's active signals (what they're looking for) |\n| **create_intent** | description, networkId? | Draft a new signal — returns a proposal card the client approves in the UI |\n| **update_intent** / **delete_intent** | intentId, ... | Refine or retire a signal on instruction |\n| **read_intent_indexes** / **create_intent_index** / **delete_intent_index** | intentId, networkId | Where a signal is placed across communities |\n| **read_user_contexts** / **create_user_context** / **update_user_context** | ... | The client's profile knowledge — read before writing |\n| **preview_user_context** / **confirm_user_context** | ... | Preview/confirm profile updates from sources |\n| **read_premises** / **create_premise** / **update_premise** / **retract_premise** | ... | The client's premises (facts they've established) |\n| **read_networks** / **read_network_memberships** | — | The client's communities and memberships |\n| **create_network_membership** / **delete_network_membership** | networkId | Join/leave a community on instruction |\n| **list_contacts** / **search_contacts** / **add_contact** / **remove_contact** | ... | The client's contacts |\n| **import_contacts** / **import_gmail_contacts** | ... | Bulk contact import on instruction |\n| **scrape_url** | url, objective | Read a link the client pasted (e.g. before drafting a signal from it) |\n\n## Grounding rules\n- **Never fabricate.** Every claim about a negotiation, opportunity, signal, or premise must come from a tool result in this conversation. If you have not looked it up this turn, look it up before answering. Only the client's identity and profile above are preloaded.\n- **Check tool results before confirming.** Never claim an action succeeded without a successful tool result for it.\n- **Be honest about your own actions.** If the record shows you made a judgment call the client disagrees with, explain the reasoning from the record — do not get defensive, and do not invent justifications the record does not support.\n- **Pass proposal cards through verbatim.** When a tool result contains a fenced code block meant for the app (e.g. \\`\\`\\`intent_proposal from create_intent), include that block verbatim in your reply — the app renders it as an interactive card the client approves or skips. Never write such a block yourself without a backing tool result.\n- **Never expose IDs, UUIDs, tool names, or raw JSON** to the client. Translate everything into natural language; refer to people and opportunities by name. (Fenced proposal blocks from tool results are the one exception — they are rendered as cards, not shown as JSON.)\n- **Respond in the language of the client's latest message.**\n- **Voice**: first person, loyal but candid, calm and concise. No hype, no networking clichés, no exaggeration. You are their agent, not a salesperson.\n- When calling tools, first write a short natural sentence plus a \\`>\\` blockquote describing what you are checking (e.g. \"> Checking the record with Alice\"), then leave an empty line after the blockquote.`;\n}\n"]}
1
+ {"version":3,"file":"negotiator.prompt.js","sourceRoot":"/","sources":["chat/negotiator.prompt.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,iCAAiC,EAA8B,MAAM,sCAAsC,CAAC;AAgDrH;;;;GAIG;AACH,SAAS,wBAAwB,CAAC,QAAgB,EAAE,KAAc;IAChE,MAAM,SAAS,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9D,OAAO;;4EAEmE,QAAQ,GAAG,SAAS;;;;qNAIqH,CAAC;AACtN,CAAC;AAED;;;;;GAKG;AACH,SAAS,yBAAyB;IAChC,OAAO;;;;;;sHAM6G,CAAC;AACvH,CAAC;AAED;;;;GAIG;AACH,SAAS,uBAAuB;IAC9B,OAAO;;;;;;2JAMkJ,CAAC;AAC5J,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,4BAA4B,CAC1C,GAAwB,EACxB,IAA6B,EAC7B,QAA2B;IAE3B,MAAM,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACtD,MAAM,cAAc,GAAG,GAAG,CAAC,WAAW;QACpC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1C,CAAC,CAAC,MAAM,CAAC;IACX,MAAM,eAAe,GAAG,IAAI,CAAC,gBAAgB,EAAE,IAAI,EAAE;QACnD,CAAC,CAAC,KAAK,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI;QACvC,CAAC,CAAC,EAAE,CAAC;IACP,MAAM,cAAc,GAAG,eAAe,CAAC,GAAG,CAAC,CAAC;IAC5C,6EAA6E;IAC7E,kEAAkE;IAClE,MAAM,mBAAmB,GAAG,cAAc;QACxC,CAAC,CAAC,wBAAwB,CAAC,cAAc,EAAE,IAAI,CAAC,iBAAiB,CAAC;QAClE,CAAC,CAAC,yBAAyB,EAAE,CAAC;IAChC,MAAM,aAAa,GAAG,iCAAiC,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;IAC3E,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,CAAC,CAAC,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACpF,MAAM,eAAe,GAAG,IAAI,CAAC,kBAAkB;QAC7C,CAAC,CAAC,iQAAiQ;QACnQ,CAAC,CAAC,EAAE,CAAC;IAEP,OAAO,WAAW,IAAI,CAAC,SAAS,+CAA+C,GAAG,CAAC,QAAQ;EAC3F,eAAe;mCACkB,GAAG,CAAC,QAAQ;;;;;;;;;;;EAW7C,mBAAmB,GAAG,aAAa,GAAG,kBAAkB;;;;;;;YAO9C,GAAG,CAAC,QAAQ,KAAK,GAAG,CAAC,SAAS,UAAU,GAAG,CAAC,MAAM;;;;EAI5D,WAAW;;;;;EAKX,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;6GAyB6F,eAAe;;;;;;;;;;8MAUkF,CAAC;AAC/M,CAAC","sourcesContent":["import type { ResolvedToolContext } from \"../shared/agent/tool.factory.js\";\nimport { focusedIntentId } from \"../shared/agent/tool.scope.js\";\nimport { renderNegotiatorChatMemorySection, type NegotiatorMemoryEntry } from \"../negotiation/negotiation.memory.js\";\nimport type { IterationContext } from \"./chat.prompt.modules.js\";\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// NEGOTIATOR PERSONA SYSTEM PROMPT (P4.1)\n// ═══════════════════════════════════════════════════════════════════════════════\n//\n// The direct chat line between a user and their personal negotiator agent\n// (the `type='personal'` agent row). Unlike the orchestrator prompt, this\n// persona works for exactly one client: it reports on the client's\n// negotiations and opportunities, explains decisions from the negotiation\n// record, and acts only on explicit client instruction.\n//\n// P4.5 (IND-413): the negotiator also manages the client's signals, profile\n// knowledge, premises, community memberships, and contacts — discovery is\n// purely signal-based, so shaping signals here IS how the client steers\n// matching. It still has no direct discovery capability: matching runs in\n// the background from the signals.\n\n/** Identity options resolved from the user's personal negotiator agent row. */\nexport interface NegotiatorPromptOptions {\n /** The negotiator agent's display name (e.g. \"Ada's Negotiator\"). */\n agentName: string;\n /** The negotiator agent's description, when set on the agent row. */\n agentDescription?: string;\n /**\n * Human-readable label for the pinned signal when the session is\n * intent-scoped (P4.2/IND-403). The pin itself comes from the resolved\n * context's scope envelope; this label just saves a tool round-trip for\n * naming it. Ignored when the session has no intent scope.\n */\n pinnedIntentLabel?: string;\n /**\n * The client's negotiator memories (P5.3 read path) — accumulated notes\n * from negotiations and prior chats, rendered as a prompt section. The\n * audience is the client themself, so entries are shared context, not\n * secrets. Absent/empty → the prompt is byte-identical to before.\n */\n memory?: NegotiatorMemoryEntry[];\n /**\n * True when the `remember`/`forget` memory tools are registered for this\n * session (P5.4 — the composition root injects them only while negotiator\n * memory writes are enabled). Adds the memory-tool guidance section and\n * tool-reference rows; false/absent → prompt unchanged.\n */\n memoryToolsEnabled?: boolean;\n}\n\n/**\n * Renders the pinned-signal section for intent-scoped sessions (P4.2).\n * Awareness, not a sandbox: the conversation orbits this signal, but the\n * negotiator may still reference the client's other knowledge.\n */\nfunction buildPinnedSignalSection(intentId: string, label?: string): string {\n const labelLine = label?.trim() ? ` — “${label.trim()}”` : \"\";\n return `\n## Pinned signal\nThis conversation was opened from one of the client's signals (intent id: ${intentId}${labelLine}). Treat it as the working focus of this chat:\n- Open questions listed by read_pending_questions here are this signal's open questions — surface them early and work through them conversationally. The client answers them via the question cards shown in this chat, or conversationally: when they give you an explicit answer, record it with answer_pending_question.\n- list_opportunities and read_pending_questions are automatically restricted to this signal in this session; use them to report matches, negotiations, and follow-ups that grew out of it.\n- When the client restates or sharpens what they want here, propose an update to this signal (update_intent) or a new premise — on their confirmation — so background matching reflects it.\n- This is a focus, not a wall: you may still read the client's profile, premises, and other signals when the conversation needs the fuller picture, and general questions about their negotiations remain fair game.`;\n}\n\n/**\n * Renders the question-inbox section for the unscoped DM (P4.3/IND-404).\n * The DM is the client's primary surface for the system's open questions:\n * signal refinements, negotiation follow-ups, profile gaps. Cards render in\n * the chat; conversational answers are recorded via answer_pending_question.\n */\nfunction buildQuestionInboxSection(): string {\n return `\n## Client question inbox\nThe system collects open questions for your client (signal refinements, negotiation follow-ups, profile gaps), and this chat is the primary place they get handled. Question cards also render directly in this chat.\n- Early in a conversation — or whenever the client asks what needs their attention — call read_pending_questions and surface what is open, briefly and in plain language.\n- When the client asks why something is being asked, explain the question's context from the record it came from (the negotiation, opportunity, or signal behind it) — look it up, don't guess.\n- When the client answers a question conversationally, record it with answer_pending_question — pass exactly what they said (their chosen options and/or their own words), never an answer you inferred. If the tool reports the question was already answered or dismissed, tell them instead of retrying.\n- Never pressure the client to answer; the questions keep for later and remain available in the app's Questions page.`;\n}\n\n/**\n * Renders the remember/forget guidance section (P5.4). Only rendered when the\n * memory tools are actually registered, so the model is never told about\n * capabilities it does not have.\n */\nfunction buildMemoryToolsSection(): string {\n return `\n## Remembering and forgetting\nYou keep a private working memory for negotiations: standing disclosure rules, thresholds, and playbook notes. The client can inspect, edit, and delete everything you remember on their agent page (Memory tab).\n- When the client states a standing rule that should outlive this conversation — especially about what to disclose or protect (\"never share my budget\", \"don't reveal who my current clients are\") — save it with remember. Pick the kind honestly: disclosure_rule for sharing constraints, threshold for hard limits, playbook for tactics. Confirm in one short sentence what you saved and that they can review it on your agent page.\n- Only remember what the client actually said. Never speculate a rule into memory, and don't save one-off instructions that only apply to the current request.\n- When the client asks you to forget or retract something, use forget with their description of it. If several memories match, lay out the candidates in plain language and ask which one they mean.\n- Disclosure rules are standing consent: treat a remembered disclosure rule as binding in every future negotiation until the client changes or deletes it.`;\n}\n\n/**\n * Builds the system prompt for the negotiator chat persona.\n *\n * Grounded in the client's preloaded user/profile context; everything else\n * (negotiations, opportunities, signals, premises) must be fetched through\n * the client-scoped toolset each turn.\n *\n * @param ctx - Resolved tool context for the current session\n * @param opts - Identity from the client's personal negotiator agent row\n * @param _iterCtx - Iteration context (unused — the negotiator prompt has no\n * dynamic modules; the nudge is injected by the agent loop)\n * @returns The complete system prompt string\n */\nexport function buildNegotiatorSystemContent(\n ctx: ResolvedToolContext,\n opts: NegotiatorPromptOptions,\n _iterCtx?: IterationContext,\n): string {\n const userContext = JSON.stringify(ctx.user, null, 2);\n const profileContext = ctx.userProfile\n ? JSON.stringify(ctx.userProfile, null, 2)\n : \"null\";\n const descriptionLine = opts.agentDescription?.trim()\n ? `\\n${opts.agentDescription.trim()}\\n`\n : \"\";\n const pinnedIntentId = focusedIntentId(ctx);\n // Pinned sessions clamp the question tools to the signal and carry their own\n // question guidance; the unscoped DM gets the full inbox instead.\n const pinnedSignalSection = pinnedIntentId\n ? buildPinnedSignalSection(pinnedIntentId, opts.pinnedIntentLabel)\n : buildQuestionInboxSection();\n const memorySection = renderNegotiatorChatMemorySection(opts.memory ?? []);\n const memoryToolsSection = opts.memoryToolsEnabled ? buildMemoryToolsSection() : \"\";\n const memoryToolsRows = opts.memoryToolsEnabled\n ? `\\n| **remember** | kind, content | Save a standing rule the client just stated into your private negotiator memory — ONLY what they actually said |\\n| **forget** | memoryId? / description? | Delete a remembered rule when the client asks you to forget it |`\n : \"\";\n\n return `You are ${opts.agentName}, the personal negotiator agent working for ${ctx.userName}.\n${descriptionLine}\nYou work for exactly one client: ${ctx.userName}. You represent them in negotiations with other members' agents across the network, and this chat is your direct line to them. Your job here is to keep your client informed about what you have been doing on their behalf, explain your reasoning honestly, and act only on their explicit instructions.\n\n## What you do in this chat\n- **Report on negotiations**: when the client asks what is happening, look up their negotiations and summarize status, counterparties, and where things stand.\n- **Explain decisions**: when the client asks why something was pursued, declined, or stalled (\"why did you pass on X?\"), find the relevant negotiation and answer from the actual record — the messages, outcomes, and reasoning stored there. Never reconstruct a rationale from memory.\n- **Review and act on opportunities**: show the client the opportunities currently waiting on them and what accepting or passing would mean; accept or pass on one only when they explicitly say so.\n- **Manage their signals**: their active intents (signals) define what you negotiate for — and matching is driven entirely by them. When the client tells you what they are looking for, draft a clear, specific signal and create it; refine or retire signals when they ask. If a signal request is vague, read their profile and existing signals first, then propose a sharper wording before creating it. If they paste a link describing what they want, read it first and synthesize the signal from its content.\n- **Keep their knowledge current**: when the client shares a new fact about themselves (\"I moved to Berlin\", \"I stopped consulting\"), update their profile context or premises so future negotiations reflect reality. Read before you write — update the existing entry instead of duplicating it.\n- **Handle memberships**: list the communities they belong to and join or leave communities when they ask.\n- **Manage their contacts**: look up, add, remove, or import contacts when they ask (when contact features are enabled).\n- **Act on instruction**: every write — a negotiation response, an opportunity decision, a signal, a profile or premise change, a membership change, a contact change — happens only when the client explicitly asks for it in this conversation. Never write anything the client did not just ask for.\n${pinnedSignalSection}${memorySection}${memoryToolsSection}\n## What you cannot do here\n- **No direct discovery.** You cannot run matching or search for people yourself. Matching happens automatically in the background from the client's signals — shaping the signals is how you steer it. New matches appear on the client's home page and in this chat as opportunities.\n- **No community administration.** You can join or leave communities for the client, but you cannot create, rename, or delete communities — point them to the app for that.\n- You cannot push updates after this conversation ends. You only report when asked.\n\n## Session\n- Client: ${ctx.userName} (${ctx.userEmail}), id: ${ctx.userId}\n\n### Client (preloaded context)\n\\`\\`\\`json\n${userContext}\n\\`\\`\\`\n\n### Client Context (preloaded context)\n\\`\\`\\`json\n${profileContext}\n\\`\\`\\`\n\n## Tools Reference\n\n| Tool | Params | What it does |\n|------|--------|-------------|\n| **list_negotiations** | status?, limit? | List the client's negotiations |\n| **get_negotiation** | negotiationId | Full negotiation record: messages, outcome, reasoning |\n| **respond_to_negotiation** | negotiationId, ... | Act on a negotiation — ONLY on explicit client instruction |\n| **list_opportunities** | — | List the client's actionable opportunities |\n| **read_pending_questions** | limit? | The system's open questions for the client (clamped to the pinned signal when one is set) |\n| **answer_pending_question** | questionId, selectedOptions?, freeText? | Record the client's explicit answer to a pending question — ONLY with an answer they actually gave |\n| **update_opportunity** | opportunityId, status | Accept/pass an opportunity — ONLY on explicit client instruction |\n| **read_intents** / **search_intents** | — / query | The client's active signals (what they're looking for) |\n| **create_intent** | description, networkId? | Draft a new signal — returns a proposal card the client approves in the UI |\n| **update_intent** / **delete_intent** | intentId, ... | Refine or retire a signal on instruction |\n| **read_intent_indexes** / **create_intent_index** / **delete_intent_index** | intentId, networkId | Where a signal is placed across communities |\n| **read_user_contexts** / **create_user_context** / **update_user_context** | ... | The client's profile knowledge — read before writing |\n| **preview_user_context** / **confirm_user_context** | ... | Preview/confirm profile updates from sources |\n| **read_premises** / **create_premise** / **update_premise** / **retract_premise** | ... | The client's premises (facts they've established) |\n| **read_networks** / **read_network_memberships** | — | The client's communities and memberships |\n| **create_network_membership** / **delete_network_membership** | networkId | Join/leave a community on instruction |\n| **list_contacts** / **search_contacts** / **add_contact** / **remove_contact** | ... | The client's contacts |\n| **import_contacts** / **import_gmail_contacts** | ... | Bulk contact import on instruction |\n| **scrape_url** | url, objective | Read a link the client pasted (e.g. before drafting a signal from it) |${memoryToolsRows}\n\n## Grounding rules\n- **Never fabricate.** Every claim about a negotiation, opportunity, signal, or premise must come from a tool result in this conversation. If you have not looked it up this turn, look it up before answering. Only the client's identity and profile above are preloaded.\n- **Check tool results before confirming.** Never claim an action succeeded without a successful tool result for it.\n- **Be honest about your own actions.** If the record shows you made a judgment call the client disagrees with, explain the reasoning from the record — do not get defensive, and do not invent justifications the record does not support.\n- **Pass proposal cards through verbatim.** When a tool result contains a fenced code block meant for the app (e.g. \\`\\`\\`intent_proposal from create_intent), include that block verbatim in your reply — the app renders it as an interactive card the client approves or skips. Never write such a block yourself without a backing tool result.\n- **Never expose IDs, UUIDs, tool names, or raw JSON** to the client. Translate everything into natural language; refer to people and opportunities by name. (Fenced proposal blocks from tool results are the one exception — they are rendered as cards, not shown as JSON.)\n- **Respond in the language of the client's latest message.**\n- **Voice**: first person, loyal but candid, calm and concise. No hype, no networking clichés, no exaggeration. You are their agent, not a salesperson.\n- When calling tools, first write a short natural sentence plus a \\`>\\` blockquote describing what you are checking (e.g. \"> Checking the record with Alice\"), then leave an empty line after the blockquote.`;\n}\n"]}
@@ -0,0 +1,45 @@
1
+ import { z } from "zod";
2
+ import type { NegotiatorMemoryToolsHost } from "../shared/interfaces/negotiator-memory.interface.js";
3
+ /** Tool names appended to the negotiator persona toolset when the host bridge is present. */
4
+ export declare const NEGOTIATOR_MEMORY_TOOL_NAMES: readonly ["remember", "forget"];
5
+ /**
6
+ * Creates the negotiator persona's `remember`/`forget` memory tools bound to
7
+ * the acting client. Both tools operate exclusively on the client's own
8
+ * negotiator memory store — the host bridge is keyed on `userId`.
9
+ */
10
+ export declare function createNegotiatorMemoryTools(opts: {
11
+ host: NegotiatorMemoryToolsHost;
12
+ userId: string;
13
+ sessionId?: string;
14
+ }): (import("@langchain/core/tools").DynamicStructuredTool<z.ZodObject<{
15
+ kind: z.ZodEnum<["disclosure_rule", "playbook", "threshold"]>;
16
+ content: z.ZodString;
17
+ }, "strip", z.ZodTypeAny, {
18
+ kind: "threshold" | "playbook" | "disclosure_rule";
19
+ content: string;
20
+ }, {
21
+ kind: "threshold" | "playbook" | "disclosure_rule";
22
+ content: string;
23
+ }>, {
24
+ kind: "threshold" | "playbook" | "disclosure_rule";
25
+ content: string;
26
+ }, {
27
+ kind: "threshold" | "playbook" | "disclosure_rule";
28
+ content: string;
29
+ }, string, unknown, "remember"> | import("@langchain/core/tools").DynamicStructuredTool<z.ZodObject<{
30
+ memoryId: z.ZodOptional<z.ZodString>;
31
+ description: z.ZodOptional<z.ZodString>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ description?: string | undefined;
34
+ memoryId?: string | undefined;
35
+ }, {
36
+ description?: string | undefined;
37
+ memoryId?: string | undefined;
38
+ }>, {
39
+ description?: string | undefined;
40
+ memoryId?: string | undefined;
41
+ }, {
42
+ description?: string | undefined;
43
+ memoryId?: string | undefined;
44
+ }, string, unknown, "forget">)[];
45
+ //# sourceMappingURL=negotiator.tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"negotiator.tools.d.ts","sourceRoot":"/","sources":["chat/negotiator.tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,yBAAyB,EAA4B,MAAM,qDAAqD,CAAC;AAoB/H,6FAA6F;AAC7F,eAAO,MAAM,4BAA4B,iCAAkC,CAAC;AAuC5E;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE;IAChD,IAAI,EAAE,yBAAyB,CAAC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA4FA"}
@@ -0,0 +1,137 @@
1
+ import { tool } from "@langchain/core/tools";
2
+ import { z } from "zod";
3
+ import { protocolLogger } from "../shared/observability/protocol.logger.js";
4
+ // ═══════════════════════════════════════════════════════════════════════════════
5
+ // NEGOTIATOR MEMORY TOOLS (P5.4)
6
+ // ═══════════════════════════════════════════════════════════════════════════════
7
+ //
8
+ // `remember` and `forget` exist ONLY in the negotiator persona's toolset —
9
+ // they are appended by `createNegotiatorTools` after the allowlist filter and
10
+ // never enter the shared chat-tool registry, so the orchestrator (and the MCP
11
+ // tool listing built from the registry) cannot see them.
12
+ //
13
+ // Registration is host-gated: the tools are created only when the composition
14
+ // root injects a `NegotiatorMemoryToolsHost` (which it does only while
15
+ // negotiator memory writes are enabled). The host owns every policy decision
16
+ // (flag, caps, embedding, matching); these wrappers only translate between
17
+ // the model and the host bridge.
18
+ const logger = protocolLogger("NegotiatorMemoryTools");
19
+ /** Tool names appended to the negotiator persona toolset when the host bridge is present. */
20
+ export const NEGOTIATOR_MEMORY_TOOL_NAMES = ["remember", "forget"];
21
+ const RememberSchema = z.object({
22
+ kind: z
23
+ .enum(["disclosure_rule", "playbook", "threshold"])
24
+ .describe("disclosure_rule: what may or may not be shared, and with whom. " +
25
+ "threshold: a hard limit or reservation point (minimum rate, maximum scope). " +
26
+ "playbook: a tactic or approach the client wants used."),
27
+ content: z
28
+ .string()
29
+ .min(1)
30
+ .max(2000)
31
+ .describe("The standing rule as ONE self-contained sentence, faithful to what the client actually said. No IDs, no meta-commentary."),
32
+ });
33
+ const ForgetSchema = z.object({
34
+ memoryId: z
35
+ .string()
36
+ .uuid()
37
+ .optional()
38
+ .describe("Exact memory id, when known (e.g. from an ambiguous forget result)."),
39
+ description: z
40
+ .string()
41
+ .min(1)
42
+ .max(500)
43
+ .optional()
44
+ .describe("The client's description of the memory to forget, used for matching."),
45
+ });
46
+ const describeMemory = (m) => ({
47
+ memoryId: m.id,
48
+ kind: m.kind,
49
+ content: m.content,
50
+ });
51
+ /**
52
+ * Creates the negotiator persona's `remember`/`forget` memory tools bound to
53
+ * the acting client. Both tools operate exclusively on the client's own
54
+ * negotiator memory store — the host bridge is keyed on `userId`.
55
+ */
56
+ export function createNegotiatorMemoryTools(opts) {
57
+ const { host, userId, sessionId } = opts;
58
+ const remember = tool(async (query) => {
59
+ logger.info("Tool invoked", { toolName: "remember", userId, kind: query.kind });
60
+ try {
61
+ const saved = await host.remember(userId, {
62
+ kind: query.kind,
63
+ content: query.content,
64
+ ...(sessionId ? { sessionId } : {}),
65
+ });
66
+ if (!saved) {
67
+ return JSON.stringify({
68
+ status: "disabled",
69
+ message: "Negotiator memory is currently disabled, so this rule was not saved. Tell the client and suggest trying again later.",
70
+ });
71
+ }
72
+ return JSON.stringify({
73
+ status: "remembered",
74
+ memory: describeMemory(saved),
75
+ message: "Saved. Confirm to the client in one short sentence and mention they can review or edit everything you remember on their agent page.",
76
+ });
77
+ }
78
+ catch (err) {
79
+ logger.error("Tool failed", {
80
+ toolName: "remember",
81
+ error: err instanceof Error ? err.message : String(err),
82
+ });
83
+ return JSON.stringify({ status: "error", message: "Failed to save the memory. Tell the client honestly." });
84
+ }
85
+ }, {
86
+ name: "remember",
87
+ description: "Save a standing rule the client just stated, into your private negotiator memory: a disclosure rule (what to protect or share), a threshold (hard limit), or a playbook note (preferred tactic). Use ONLY for durable guidance the client explicitly gave — never for one-off instructions or your own inferences.",
88
+ schema: RememberSchema,
89
+ });
90
+ const forget = tool(async (query) => {
91
+ logger.info("Tool invoked", { toolName: "forget", userId, byId: !!query.memoryId });
92
+ if (!query.memoryId && !query.description?.trim()) {
93
+ return JSON.stringify({
94
+ status: "error",
95
+ message: "Provide either memoryId or a description of the memory to forget.",
96
+ });
97
+ }
98
+ try {
99
+ const result = await host.forget(userId, {
100
+ ...(query.memoryId ? { memoryId: query.memoryId } : {}),
101
+ ...(query.description ? { description: query.description } : {}),
102
+ });
103
+ switch (result.status) {
104
+ case "deleted":
105
+ return JSON.stringify({
106
+ status: "forgotten",
107
+ memory: describeMemory(result.memory),
108
+ message: "Deleted. Confirm to the client what exactly was forgotten (quote the deleted rule).",
109
+ });
110
+ case "ambiguous":
111
+ return JSON.stringify({
112
+ status: "ambiguous",
113
+ candidates: result.candidates.map(describeMemory),
114
+ message: "Several memories match. Describe the candidates to the client in plain language and ask which one to forget; then call forget again with that memoryId.",
115
+ });
116
+ case "not_found":
117
+ return JSON.stringify({
118
+ status: "not_found",
119
+ message: "No stored memory matches that. Tell the client nothing was found to forget.",
120
+ });
121
+ }
122
+ }
123
+ catch (err) {
124
+ logger.error("Tool failed", {
125
+ toolName: "forget",
126
+ error: err instanceof Error ? err.message : String(err),
127
+ });
128
+ return JSON.stringify({ status: "error", message: "Failed to delete the memory. Tell the client honestly." });
129
+ }
130
+ }, {
131
+ name: "forget",
132
+ description: "Delete an entry from your private negotiator memory when the client asks you to forget or retract it. Pass the client's description of it (or an exact memoryId after an ambiguous result). If several match, you'll get candidates to clarify with the client.",
133
+ schema: ForgetSchema,
134
+ });
135
+ return [remember, forget];
136
+ }
137
+ //# sourceMappingURL=negotiator.tools.js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AAO,IAAI,CAAC,SAAS,CAAC;wBACpB,MAAM,EAAE,WAAW;wBACnB,MAAM,EAAE,cAAc,CAAC,MAAM,CAAC,MAAM,CAAC;wBACrC,OAAO,EAAE,qFAAqF;qBAC/F,CAAC,CAAC;gBACL,KAAK,WAAW;oBACd,OAAO,IAAI,CAAC,SAAS,CAAC;wBACpB,MAAM,EAAE,WAAW;wBACnB,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,cAAc,CAAC;wBACjD,OAAO,EACL,yJAAyJ;qBAC5J,CAAC,CAAC;gBACL,KAAK,WAAW;oBACd,OAAO,IAAI,CAAC,SAAS,CAAC;wBACpB,MAAM,EAAE,WAAW;wBACnB,OAAO,EAAE,6EAA6E;qBACvF,CAAC,CAAC;YACP,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,KAAK,CAAC,aAAa,EAAE;gBAC1B,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;aACxD,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,wDAAwD,EAAE,CAAC,CAAC;QAChH,CAAC;IACH,CAAC,EACD;QACE,IAAI,EAAE,QAAQ;QACd,WAAW,EACT,iQAAiQ;QACnQ,MAAM,EAAE,YAAY;KACrB,CACF,CAAC;IAEF,OAAO,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAC5B,CAAC","sourcesContent":["import { tool } from \"@langchain/core/tools\";\nimport { z } from \"zod\";\nimport type { NegotiatorMemoryToolsHost, NegotiatorMemoryToolView } from \"../shared/interfaces/negotiator-memory.interface.js\";\nimport { protocolLogger } from \"../shared/observability/protocol.logger.js\";\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// NEGOTIATOR MEMORY TOOLS (P5.4)\n// ═══════════════════════════════════════════════════════════════════════════════\n//\n// `remember` and `forget` exist ONLY in the negotiator persona's toolset —\n// they are appended by `createNegotiatorTools` after the allowlist filter and\n// never enter the shared chat-tool registry, so the orchestrator (and the MCP\n// tool listing built from the registry) cannot see them.\n//\n// Registration is host-gated: the tools are created only when the composition\n// root injects a `NegotiatorMemoryToolsHost` (which it does only while\n// negotiator memory writes are enabled). The host owns every policy decision\n// (flag, caps, embedding, matching); these wrappers only translate between\n// the model and the host bridge.\n\nconst logger = protocolLogger(\"NegotiatorMemoryTools\");\n\n/** Tool names appended to the negotiator persona toolset when the host bridge is present. */\nexport const NEGOTIATOR_MEMORY_TOOL_NAMES = [\"remember\", \"forget\"] as const;\n\nconst RememberSchema = z.object({\n kind: z\n .enum([\"disclosure_rule\", \"playbook\", \"threshold\"])\n .describe(\n \"disclosure_rule: what may or may not be shared, and with whom. \" +\n \"threshold: a hard limit or reservation point (minimum rate, maximum scope). \" +\n \"playbook: a tactic or approach the client wants used.\",\n ),\n content: z\n .string()\n .min(1)\n .max(2000)\n .describe(\n \"The standing rule as ONE self-contained sentence, faithful to what the client actually said. No IDs, no meta-commentary.\",\n ),\n});\n\nconst ForgetSchema = z.object({\n memoryId: z\n .string()\n .uuid()\n .optional()\n .describe(\"Exact memory id, when known (e.g. from an ambiguous forget result).\"),\n description: z\n .string()\n .min(1)\n .max(500)\n .optional()\n .describe(\"The client's description of the memory to forget, used for matching.\"),\n});\n\nconst describeMemory = (m: NegotiatorMemoryToolView) => ({\n memoryId: m.id,\n kind: m.kind,\n content: m.content,\n});\n\n/**\n * Creates the negotiator persona's `remember`/`forget` memory tools bound to\n * the acting client. Both tools operate exclusively on the client's own\n * negotiator memory store — the host bridge is keyed on `userId`.\n */\nexport function createNegotiatorMemoryTools(opts: {\n host: NegotiatorMemoryToolsHost;\n userId: string;\n sessionId?: string;\n}) {\n const { host, userId, sessionId } = opts;\n\n const remember = tool(\n async (query: z.infer<typeof RememberSchema>) => {\n logger.info(\"Tool invoked\", { toolName: \"remember\", userId, kind: query.kind });\n try {\n const saved = await host.remember(userId, {\n kind: query.kind,\n content: query.content,\n ...(sessionId ? { sessionId } : {}),\n });\n if (!saved) {\n return JSON.stringify({\n status: \"disabled\",\n message:\n \"Negotiator memory is currently disabled, so this rule was not saved. Tell the client and suggest trying again later.\",\n });\n }\n return JSON.stringify({\n status: \"remembered\",\n memory: describeMemory(saved),\n message:\n \"Saved. Confirm to the client in one short sentence and mention they can review or edit everything you remember on their agent page.\",\n });\n } catch (err) {\n logger.error(\"Tool failed\", {\n toolName: \"remember\",\n error: err instanceof Error ? err.message : String(err),\n });\n return JSON.stringify({ status: \"error\", message: \"Failed to save the memory. Tell the client honestly.\" });\n }\n },\n {\n name: \"remember\",\n description:\n \"Save a standing rule the client just stated, into your private negotiator memory: a disclosure rule (what to protect or share), a threshold (hard limit), or a playbook note (preferred tactic). Use ONLY for durable guidance the client explicitly gave — never for one-off instructions or your own inferences.\",\n schema: RememberSchema,\n },\n );\n\n const forget = tool(\n async (query: z.infer<typeof ForgetSchema>) => {\n logger.info(\"Tool invoked\", { toolName: \"forget\", userId, byId: !!query.memoryId });\n if (!query.memoryId && !query.description?.trim()) {\n return JSON.stringify({\n status: \"error\",\n message: \"Provide either memoryId or a description of the memory to forget.\",\n });\n }\n try {\n const result = await host.forget(userId, {\n ...(query.memoryId ? { memoryId: query.memoryId } : {}),\n ...(query.description ? { description: query.description } : {}),\n });\n switch (result.status) {\n case \"deleted\":\n return JSON.stringify({\n status: \"forgotten\",\n memory: describeMemory(result.memory),\n message: \"Deleted. Confirm to the client what exactly was forgotten (quote the deleted rule).\",\n });\n case \"ambiguous\":\n return JSON.stringify({\n status: \"ambiguous\",\n candidates: result.candidates.map(describeMemory),\n message:\n \"Several memories match. Describe the candidates to the client in plain language and ask which one to forget; then call forget again with that memoryId.\",\n });\n case \"not_found\":\n return JSON.stringify({\n status: \"not_found\",\n message: \"No stored memory matches that. Tell the client nothing was found to forget.\",\n });\n }\n } catch (err) {\n logger.error(\"Tool failed\", {\n toolName: \"forget\",\n error: err instanceof Error ? err.message : String(err),\n });\n return JSON.stringify({ status: \"error\", message: \"Failed to delete the memory. Tell the client honestly.\" });\n }\n },\n {\n name: \"forget\",\n description:\n \"Delete an entry from your private negotiator memory when the client asks you to forget or retract it. Pass the client's description of it (or an exact memoryId after an ambiguous result). If several match, you'll get candidates to clarify with the client.\",\n schema: ForgetSchema,\n },\n );\n\n return [remember, forget];\n}\n"]}
package/dist/index.d.ts CHANGED
@@ -54,6 +54,8 @@ export { ChatGraphFactory } from "./chat/chat.graph.js";
54
54
  export { ORCHESTRATOR_PERSONA, ORCHESTRATOR_PERSONA_ID, type ChatPersonaConfig, type ChatPersonaLoopBehaviors, } from "./chat/chat.persona.js";
55
55
  export { NEGOTIATOR_PERSONA_ID, NEGOTIATOR_TOOL_NAMES, createNegotiatorPersona, createNegotiatorTools, filterNegotiatorTools, } from "./chat/negotiator.persona.js";
56
56
  export { buildNegotiatorSystemContent, type NegotiatorPromptOptions } from "./chat/negotiator.prompt.js";
57
+ export { NEGOTIATOR_MEMORY_TOOL_NAMES, createNegotiatorMemoryTools, } from "./chat/negotiator.tools.js";
58
+ export type { NegotiatorMemoryToolsHost, NegotiatorMemoryRememberInput, NegotiatorMemoryToolView, NegotiatorMemoryForgetResult, RememberableMemoryKind, } from "./shared/interfaces/negotiator-memory.interface.js";
57
59
  export { HomeGraphFactory } from "./opportunity/feed/feed.graph.js";
58
60
  export { HydeGraphFactory } from "./shared/hyde/hyde.graph.js";
59
61
  export { NetworkGraphFactory } from "./network/network.graph.js";
@@ -94,6 +96,8 @@ export { NegotiationScreener, configuredScreenMode, ScreenDecisionSchema, NEGOTI
94
96
  export type { ScreenDecision, ScreenDecisionRecord, NegotiationScreenMode, NegotiationScreenerInput } from "./negotiation/negotiation.screen.js";
95
97
  export { NegotiationReflector, DistilledMemorySchema, ReflectionResultSchema, MAX_DISTILLED_MEMORIES, NEGOTIATOR_MEMORY_KINDS } from "./negotiation/negotiation.reflect.js";
96
98
  export type { DistilledMemory, DistilledMemoryKind, ReflectionResult, ReflectionTranscriptEntry, NegotiationReflectionInput, ChatReflectionInput, NegotiationReflectJobData, ReflectEnqueueFn } from "./negotiation/negotiation.reflect.js";
99
+ export { renderNegotiatorMemorySection, renderNegotiatorChatMemorySection } from "./negotiation/negotiation.memory.js";
100
+ export type { NegotiatorMemoryEntry, NegotiatorMemoryQuery, NegotiatorMemoryScope, NegotiatorMemoryRetrieveFn } from "./negotiation/negotiation.memory.js";
97
101
  export type { NegotiationAgentInput } from "./negotiation/negotiation.agent.js";
98
102
  export { QuestionerAgent } from "./questioner/questioner.agent.js";
99
103
  export type { QuestionerAgentConfig } from "./questioner/questioner.agent.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAC9D,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACjF,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACjJ,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,EACL,uBAAuB,EACvB,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAC/H,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EA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E,MAAM,qBAAqB,CAAC;AACpI,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAKnH,YAAY,EAAE,sBAAsB,EAAE,eAAe,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AAChJ,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AACzG,YAAY,EAAE,iBAAiB,EAAE,eAAe,EAAE,0BAA0B,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;AACnJ,YAAY,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAI/E,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,wBAAwB,EACxB,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,WAAW,EACX,oBAAoB,GACrB,MAAM,uCAAuC,CAAC;AAI/C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC"}
package/dist/index.js CHANGED
@@ -35,6 +35,7 @@ export { ChatGraphFactory } from "./chat/chat.graph.js";
35
35
  export { ORCHESTRATOR_PERSONA, ORCHESTRATOR_PERSONA_ID, } from "./chat/chat.persona.js";
36
36
  export { NEGOTIATOR_PERSONA_ID, NEGOTIATOR_TOOL_NAMES, createNegotiatorPersona, createNegotiatorTools, filterNegotiatorTools, } from "./chat/negotiator.persona.js";
37
37
  export { buildNegotiatorSystemContent } from "./chat/negotiator.prompt.js";
38
+ export { NEGOTIATOR_MEMORY_TOOL_NAMES, createNegotiatorMemoryTools, } from "./chat/negotiator.tools.js";
38
39
  export { HomeGraphFactory } from "./opportunity/feed/feed.graph.js";
39
40
  export { HydeGraphFactory } from "./shared/hyde/hyde.graph.js";
40
41
  export { NetworkGraphFactory } from "./network/network.graph.js";
@@ -63,6 +64,7 @@ export { NegotiationInsightsGenerator } from "./negotiation/insight.generator.js
63
64
  export { IndexNegotiator } from "./negotiation/negotiation.agent.js";
64
65
  export { NegotiationScreener, configuredScreenMode, ScreenDecisionSchema, NEGOTIATION_SCREEN_MODES } from "./negotiation/negotiation.screen.js";
65
66
  export { NegotiationReflector, DistilledMemorySchema, ReflectionResultSchema, MAX_DISTILLED_MEMORIES, NEGOTIATOR_MEMORY_KINDS } from "./negotiation/negotiation.reflect.js";
67
+ export { renderNegotiatorMemorySection, renderNegotiatorChatMemorySection } from "./negotiation/negotiation.memory.js";
66
68
  export { QuestionerAgent } from "./questioner/questioner.agent.js";
67
69
  export { getPreset } from "./questioner/questioner.presets.js";
68
70
  export { isQuestionerEnabled, isDiscoveryQuestionsEnabled, discoveryQuestionsInputMode, discoveryQuestionsTimeoutMs, chatQuestionWaitTimeoutMs } from "./questioner/questioner.env.js";