@indexnetwork/protocol 1.25.2-rc.210.1 → 1.25.3-rc.212.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/agent.tools.d.ts.map +1 -1
- package/dist/agent/agent.tools.js.map +1 -1
- package/dist/agent/tests/fakes.d.ts.map +1 -1
- package/dist/agent/tests/fakes.js.map +1 -1
- package/dist/chat/chat-streaming.types.d.ts.map +1 -1
- package/dist/chat/chat-streaming.types.js.map +1 -1
- package/dist/chat/chat.agent.d.ts.map +1 -1
- package/dist/chat/chat.agent.js.map +1 -1
- package/dist/chat/chat.graph.d.ts.map +1 -1
- package/dist/chat/chat.graph.js.map +1 -1
- package/dist/chat/chat.prompt.d.ts.map +1 -1
- package/dist/chat/chat.prompt.js.map +1 -1
- package/dist/chat/chat.prompt.modules.d.ts.map +1 -1
- package/dist/chat/chat.prompt.modules.js.map +1 -1
- package/dist/chat/chat.question-dedup.d.ts.map +1 -1
- package/dist/chat/chat.question-dedup.js.map +1 -1
- package/dist/chat/chat.state.d.ts.map +1 -1
- package/dist/chat/chat.state.js.map +1 -1
- package/dist/chat/chat.streamer.d.ts.map +1 -1
- package/dist/chat/chat.streamer.js.map +1 -1
- package/dist/chat/chat.suggester.d.ts.map +1 -1
- package/dist/chat/chat.suggester.js.map +1 -1
- package/dist/chat/chat.summarizer.d.ts.map +1 -1
- package/dist/chat/chat.summarizer.js.map +1 -1
- package/dist/chat/chat.title.generator.d.ts.map +1 -1
- package/dist/chat/chat.title.generator.js.map +1 -1
- package/dist/chat/chat.tools.d.ts.map +1 -1
- package/dist/chat/chat.tools.js.map +1 -1
- package/dist/chat/chat.utils.d.ts.map +1 -1
- package/dist/chat/chat.utils.js.map +1 -1
- package/dist/chat/tests/chat.graph.mocks.d.ts.map +1 -1
- package/dist/chat/tests/chat.graph.mocks.js.map +1 -1
- package/dist/contact/contact.inviter.d.ts.map +1 -1
- package/dist/contact/contact.inviter.js.map +1 -1
- package/dist/contact/contact.tools.d.ts.map +1 -1
- package/dist/contact/contact.tools.js.map +1 -1
- package/dist/context/context.generator.d.ts.map +1 -1
- package/dist/context/context.generator.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/integration/integration.tools.d.ts.map +1 -1
- package/dist/integration/integration.tools.js.map +1 -1
- package/dist/intent/intent.clarifier.d.ts.map +1 -1
- package/dist/intent/intent.clarifier.js.map +1 -1
- package/dist/intent/intent.graph.d.ts.map +1 -1
- package/dist/intent/intent.graph.js.map +1 -1
- package/dist/intent/intent.indexer.d.ts.map +1 -1
- package/dist/intent/intent.indexer.js.map +1 -1
- package/dist/intent/intent.inferrer.d.ts.map +1 -1
- package/dist/intent/intent.inferrer.js.map +1 -1
- package/dist/intent/intent.reconciler.d.ts.map +1 -1
- package/dist/intent/intent.reconciler.js.map +1 -1
- package/dist/intent/intent.state.d.ts.map +1 -1
- package/dist/intent/intent.state.js.map +1 -1
- package/dist/intent/intent.tools.d.ts.map +1 -1
- package/dist/intent/intent.tools.js.map +1 -1
- package/dist/intent/intent.verifier.d.ts.map +1 -1
- package/dist/intent/intent.verifier.js.map +1 -1
- package/dist/maintenance/maintenance.graph.d.ts.map +1 -1
- package/dist/maintenance/maintenance.graph.js.map +1 -1
- package/dist/maintenance/maintenance.state.d.ts.map +1 -1
- package/dist/maintenance/maintenance.state.js.map +1 -1
- package/dist/mcp/elicitation.builder.d.ts.map +1 -1
- package/dist/mcp/elicitation.builder.js.map +1 -1
- package/dist/mcp/elicitation.dispatcher.d.ts.map +1 -1
- package/dist/mcp/elicitation.dispatcher.js.map +1 -1
- package/dist/mcp/mcp.server.d.ts.map +1 -1
- package/dist/mcp/mcp.server.js.map +1 -1
- package/dist/negotiation/insight.generator.d.ts.map +1 -1
- package/dist/negotiation/insight.generator.js.map +1 -1
- package/dist/negotiation/negotiation.agent.d.ts.map +1 -1
- package/dist/negotiation/negotiation.agent.js.map +1 -1
- package/dist/negotiation/negotiation.graph.d.ts.map +1 -1
- package/dist/negotiation/negotiation.graph.js.map +1 -1
- package/dist/negotiation/negotiation.state.d.ts.map +1 -1
- package/dist/negotiation/negotiation.state.js.map +1 -1
- package/dist/negotiation/negotiation.summarizer.d.ts.map +1 -1
- package/dist/negotiation/negotiation.summarizer.js.map +1 -1
- package/dist/negotiation/negotiation.tools.d.ts.map +1 -1
- package/dist/negotiation/negotiation.tools.js.map +1 -1
- package/dist/network/indexer/indexer.graph.d.ts.map +1 -1
- package/dist/network/indexer/indexer.graph.js.map +1 -1
- package/dist/network/indexer/indexer.state.d.ts.map +1 -1
- package/dist/network/indexer/indexer.state.js.map +1 -1
- package/dist/network/membership/membership.graph.d.ts.map +1 -1
- package/dist/network/membership/membership.graph.js.map +1 -1
- package/dist/network/membership/membership.state.d.ts.map +1 -1
- package/dist/network/membership/membership.state.js.map +1 -1
- package/dist/network/network.graph.d.ts.map +1 -1
- package/dist/network/network.graph.js.map +1 -1
- package/dist/network/network.state.d.ts.map +1 -1
- package/dist/network/network.state.js.map +1 -1
- package/dist/network/network.tools.d.ts.map +1 -1
- package/dist/network/network.tools.js.map +1 -1
- package/dist/opportunity/delivery-card.cache.d.ts.map +1 -1
- package/dist/opportunity/delivery-card.cache.js.map +1 -1
- package/dist/opportunity/discovery-question.helper.d.ts.map +1 -1
- package/dist/opportunity/discovery-question.helper.js.map +1 -1
- package/dist/opportunity/feed/feed.categorizer.d.ts.map +1 -1
- package/dist/opportunity/feed/feed.categorizer.js.map +1 -1
- package/dist/opportunity/feed/feed.graph.d.ts.map +1 -1
- package/dist/opportunity/feed/feed.graph.js.map +1 -1
- package/dist/opportunity/feed/feed.health.d.ts.map +1 -1
- package/dist/opportunity/feed/feed.health.js.map +1 -1
- package/dist/opportunity/feed/feed.state.d.ts.map +1 -1
- package/dist/opportunity/feed/feed.state.js.map +1 -1
- package/dist/opportunity/negotiation-context.loader.d.ts.map +1 -1
- package/dist/opportunity/negotiation-context.loader.js.map +1 -1
- package/dist/opportunity/negotiation-summary.builder.d.ts.map +1 -1
- package/dist/opportunity/negotiation-summary.builder.js.map +1 -1
- package/dist/opportunity/opportunity.discover.d.ts.map +1 -1
- package/dist/opportunity/opportunity.discover.js.map +1 -1
- package/dist/opportunity/opportunity.enricher.d.ts.map +1 -1
- package/dist/opportunity/opportunity.enricher.js.map +1 -1
- package/dist/opportunity/opportunity.evaluator.d.ts.map +1 -1
- package/dist/opportunity/opportunity.evaluator.js.map +1 -1
- package/dist/opportunity/opportunity.graph.d.ts.map +1 -1
- package/dist/opportunity/opportunity.graph.js.map +1 -1
- package/dist/opportunity/opportunity.introducer.d.ts.map +1 -1
- package/dist/opportunity/opportunity.introducer.js.map +1 -1
- package/dist/opportunity/opportunity.labels.d.ts.map +1 -1
- package/dist/opportunity/opportunity.labels.js.map +1 -1
- package/dist/opportunity/opportunity.pending-questions.d.ts.map +1 -1
- package/dist/opportunity/opportunity.pending-questions.js.map +1 -1
- package/dist/opportunity/opportunity.persist.d.ts.map +1 -1
- package/dist/opportunity/opportunity.persist.js.map +1 -1
- package/dist/opportunity/opportunity.presentation.d.ts.map +1 -1
- package/dist/opportunity/opportunity.presentation.js.map +1 -1
- package/dist/opportunity/opportunity.presenter.d.ts.map +1 -1
- package/dist/opportunity/opportunity.presenter.js.map +1 -1
- package/dist/opportunity/opportunity.state.d.ts.map +1 -1
- package/dist/opportunity/opportunity.state.js.map +1 -1
- package/dist/opportunity/opportunity.tools.d.ts.map +1 -1
- package/dist/opportunity/opportunity.tools.js.map +1 -1
- package/dist/opportunity/opportunity.utils.d.ts.map +1 -1
- package/dist/opportunity/opportunity.utils.js.map +1 -1
- package/dist/opportunity/question.generator.d.ts.map +1 -1
- package/dist/opportunity/question.generator.js.map +1 -1
- package/dist/opportunity/question.prompt.d.ts.map +1 -1
- package/dist/opportunity/question.prompt.js.map +1 -1
- package/dist/premise/premise.analyzer.d.ts.map +1 -1
- package/dist/premise/premise.analyzer.js.map +1 -1
- package/dist/premise/premise.decomposer.d.ts.map +1 -1
- package/dist/premise/premise.decomposer.js.map +1 -1
- package/dist/premise/premise.graph.d.ts.map +1 -1
- package/dist/premise/premise.graph.js.map +1 -1
- package/dist/premise/premise.indexer.d.ts.map +1 -1
- package/dist/premise/premise.indexer.js.map +1 -1
- package/dist/premise/premise.state.d.ts.map +1 -1
- package/dist/premise/premise.state.js.map +1 -1
- package/dist/premise/premise.tools.d.ts.map +1 -1
- package/dist/premise/premise.tools.js.map +1 -1
- package/dist/profile/profile.enricher.d.ts.map +1 -1
- package/dist/profile/profile.enricher.js.map +1 -1
- package/dist/profile/profile.generator.d.ts.map +1 -1
- package/dist/profile/profile.generator.js.map +1 -1
- package/dist/profile/profile.graph.d.ts.map +1 -1
- package/dist/profile/profile.graph.js.map +1 -1
- package/dist/profile/profile.state.d.ts.map +1 -1
- package/dist/profile/profile.state.js.map +1 -1
- package/dist/profile/profile.tools.d.ts.map +1 -1
- package/dist/profile/profile.tools.js.map +1 -1
- package/dist/questioner/questioner.agent.d.ts.map +1 -1
- package/dist/questioner/questioner.agent.js.map +1 -1
- package/dist/questioner/questioner.presets.d.ts.map +1 -1
- package/dist/questioner/questioner.presets.js.map +1 -1
- package/dist/questioner/questioner.types.d.ts.map +1 -1
- package/dist/questioner/questioner.types.js.map +1 -1
- package/dist/shared/agent/model-signal.d.ts.map +1 -1
- package/dist/shared/agent/model-signal.js.map +1 -1
- package/dist/shared/agent/model.config.d.ts.map +1 -1
- package/dist/shared/agent/model.config.js.map +1 -1
- package/dist/shared/agent/response.streamer.d.ts.map +1 -1
- package/dist/shared/agent/response.streamer.js.map +1 -1
- package/dist/shared/agent/tests/llm-assert.d.ts.map +1 -1
- package/dist/shared/agent/tests/llm-assert.js.map +1 -1
- package/dist/shared/agent/tool.factory.d.ts.map +1 -1
- package/dist/shared/agent/tool.factory.js.map +1 -1
- package/dist/shared/agent/tool.helpers.d.ts.map +1 -1
- package/dist/shared/agent/tool.helpers.js.map +1 -1
- package/dist/shared/agent/tool.registry.d.ts.map +1 -1
- package/dist/shared/agent/tool.registry.js.map +1 -1
- package/dist/shared/agent/tool.runtime.d.ts.map +1 -1
- package/dist/shared/agent/tool.runtime.js.map +1 -1
- package/dist/shared/agent/utility.tools.d.ts.map +1 -1
- package/dist/shared/agent/utility.tools.js.map +1 -1
- package/dist/shared/hyde/hyde.generator.d.ts.map +1 -1
- package/dist/shared/hyde/hyde.generator.js.map +1 -1
- package/dist/shared/hyde/hyde.graph.d.ts.map +1 -1
- package/dist/shared/hyde/hyde.graph.js.map +1 -1
- package/dist/shared/hyde/hyde.state.d.ts.map +1 -1
- package/dist/shared/hyde/hyde.state.js.map +1 -1
- package/dist/shared/hyde/hyde.strategies.d.ts.map +1 -1
- package/dist/shared/hyde/hyde.strategies.js.map +1 -1
- package/dist/shared/hyde/lens.inferrer.d.ts.map +1 -1
- package/dist/shared/hyde/lens.inferrer.js.map +1 -1
- package/dist/shared/interfaces/agent-dispatcher.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/agent-dispatcher.interface.js.map +1 -1
- package/dist/shared/interfaces/agent.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/agent.interface.js.map +1 -1
- package/dist/shared/interfaces/auth.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/auth.interface.js.map +1 -1
- package/dist/shared/interfaces/cache.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/cache.interface.js.map +1 -1
- package/dist/shared/interfaces/chat-message-writer.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/chat-message-writer.interface.js.map +1 -1
- package/dist/shared/interfaces/chat-session.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/chat-session.interface.js.map +1 -1
- package/dist/shared/interfaces/chat-summary.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/chat-summary.interface.js.map +1 -1
- package/dist/shared/interfaces/connect-link.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/connect-link.interface.js.map +1 -1
- package/dist/shared/interfaces/contact.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/contact.interface.js.map +1 -1
- package/dist/shared/interfaces/database.interface.d.ts +10 -1
- package/dist/shared/interfaces/database.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/database.interface.js.map +1 -1
- package/dist/shared/interfaces/delivery-ledger.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/delivery-ledger.interface.js.map +1 -1
- package/dist/shared/interfaces/discovery-run.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/discovery-run.interface.js.map +1 -1
- package/dist/shared/interfaces/embedder.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/embedder.interface.js.map +1 -1
- package/dist/shared/interfaces/enrichment.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/enrichment.interface.js.map +1 -1
- package/dist/shared/interfaces/integration.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/integration.interface.js.map +1 -1
- package/dist/shared/interfaces/negotiation-events.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/negotiation-events.interface.js.map +1 -1
- package/dist/shared/interfaces/negotiation-summary.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/negotiation-summary.interface.js.map +1 -1
- package/dist/shared/interfaces/question-generator.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/question-generator.interface.js.map +1 -1
- package/dist/shared/interfaces/questioner.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/questioner.interface.js.map +1 -1
- package/dist/shared/interfaces/queue.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/queue.interface.js.map +1 -1
- package/dist/shared/interfaces/scraper.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/scraper.interface.js.map +1 -1
- package/dist/shared/interfaces/storage.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/storage.interface.js.map +1 -1
- package/dist/shared/network/metadata.renderer.d.ts.map +1 -1
- package/dist/shared/network/metadata.renderer.js.map +1 -1
- package/dist/shared/observability/debug-meta.sanitizer.d.ts.map +1 -1
- package/dist/shared/observability/debug-meta.sanitizer.js.map +1 -1
- package/dist/shared/observability/log.d.ts.map +1 -1
- package/dist/shared/observability/log.js.map +1 -1
- package/dist/shared/observability/performance.d.ts.map +1 -1
- package/dist/shared/observability/performance.js.map +1 -1
- package/dist/shared/observability/protocol.logger.d.ts.map +1 -1
- package/dist/shared/observability/protocol.logger.js.map +1 -1
- package/dist/shared/observability/request-context.d.ts.map +1 -1
- package/dist/shared/observability/request-context.js.map +1 -1
- package/dist/shared/observability/trace.d.ts.map +1 -1
- package/dist/shared/observability/trace.js.map +1 -1
- package/dist/shared/schemas/chat-context.schema.d.ts.map +1 -1
- package/dist/shared/schemas/chat-context.schema.js.map +1 -1
- package/dist/shared/schemas/negotiation-digest.schema.d.ts.map +1 -1
- package/dist/shared/schemas/negotiation-digest.schema.js.map +1 -1
- package/dist/shared/schemas/pending-question.schema.d.ts.map +1 -1
- package/dist/shared/schemas/pending-question.schema.js.map +1 -1
- package/dist/shared/schemas/question.schema.d.ts.map +1 -1
- package/dist/shared/schemas/question.schema.js.map +1 -1
- package/dist/shared/ui/lucide.icon-catalog.d.ts.map +1 -1
- package/dist/shared/ui/lucide.icon-catalog.js.map +1 -1
- package/dist/shared/utils/social-label.d.ts.map +1 -1
- package/dist/shared/utils/social-label.js.map +1 -1
- package/dist/shared/utils/telegram-handle.d.ts.map +1 -1
- package/dist/shared/utils/telegram-handle.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile.tools.js","sourceRoot":"","sources":["../../src/profile/profile.tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAG5E,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAG5E,OAAO,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,MA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;QACtD,CAAC;KACF,CAAC,CAAC;IAEH,OAAO,CAAC,gBAAgB,EAAE,8BAA8B,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,kBAAkB,CAAU,CAAC;AACvK,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport { requestContext } from \"../shared/observability/request-context.js\";\n\nimport type { DefineTool, ToolDeps } from \"../shared/agent/tool.helpers.js\";\nimport { success, error, needsClarification, UUID_REGEX } from \"../shared/agent/tool.helpers.js\";\nimport { protocolLogger } from \"../shared/observability/protocol.logger.js\";\nimport type { EnrichmentResult, ProfileEnricher } from \"../shared/interfaces/enrichment.interface.js\";\nimport type { OnboardingPrivacyState, OnboardingProfileSeed, OnboardingState, PrivacyConsentSource, UserRecord } from \"../shared/interfaces/database.interface.js\";\nimport { socialsToEnrichmentRequest, detectSocialLabel } from \"../shared/utils/social-label.js\";\nimport { ProfileGenerator } from \"./profile.generator.js\";\nimport { invokeWithAbortSignal } from \"../shared/agent/model-signal.js\";\n\nconst logger = protocolLogger(\"ChatTools:Profile\");\n\nfunction isMeaningfulEnrichment(enrichment: EnrichmentResult | null): enrichment is EnrichmentResult {\n return !!enrichment &&\n enrichment.confidentMatch &&\n (\n enrichment.identity.bio.trim().length > 0 ||\n enrichment.narrative.context.trim().length > 0 ||\n enrichment.attributes.skills.length > 0 ||\n enrichment.attributes.interests.length > 0\n );\n}\n\nexport function createProfileTools(defineTool: DefineTool, deps: ToolDeps) {\n const { userDb, systemDb, database, graphs, enricher, grantDefaultSystemPermissions } = deps;\n\n function trimToUndefined(value: string | null | undefined): string | undefined {\n const trimmed = value?.trim();\n return trimmed && trimmed.length > 0 ? trimmed : undefined;\n }\n\n function isPlaceholderName(value: string): boolean {\n const normalized = value.trim().toLowerCase();\n return normalized === 'unknown' || normalized === 'user';\n }\n\n function resolveAuthenticatedLookupIdentity(user: UserRecord, context: { userName?: string; userEmail?: string }) {\n const userName = trimToUndefined(user.name);\n const contextName = trimToUndefined(context.userName);\n const name = [userName, contextName].find((candidate) => candidate !== undefined && !isPlaceholderName(candidate));\n const email = trimToUndefined(user.email) ?? trimToUndefined(context.userEmail);\n return { name, email };\n }\n\n async function enrichFromUserRecord(user: { name?: string | null; email?: string | null; socials: Array<{ id: string; userId: string; label: string; value: string }> }) {\n const enrichmentSocials = socialsToEnrichmentRequest(user.socials);\n return enricher.enrichUserProfile({\n name: trimToUndefined(user.name),\n email: trimToUndefined(user.email),\n linkedin: enrichmentSocials.linkedin || undefined,\n twitter: enrichmentSocials.twitter || undefined,\n github: enrichmentSocials.github || undefined,\n telegram: enrichmentSocials.telegram || undefined,\n websites: enrichmentSocials.websites?.length ? enrichmentSocials.websites : undefined,\n });\n }\n\n function hasPublicProfileLookupConsent(onboarding: OnboardingState | null | undefined): boolean {\n return onboarding?.privacy?.publicProfileLookup?.granted === true;\n }\n\n function hasEdgeosImportConsent(onboarding: OnboardingState | null | undefined): boolean {\n return onboarding?.privacy?.edgeosImport?.granted === true;\n }\n\n function normalizeConsentSource(source: unknown): PrivacyConsentSource {\n return source === 'agentvillage_onboarding' || source === 'hermes_setup' || source === 'web_onboarding' || source === 'api'\n ? source\n : 'api';\n }\n\n function consentDecision(granted: boolean, source: PrivacyConsentSource) {\n return { granted, decidedAt: new Date().toISOString(), source };\n }\n\n function selectProfileSeed(onboarding: OnboardingState | null | undefined, networkId?: string): OnboardingProfileSeed | undefined {\n const seeds = onboarding?.profileSeeds ?? [];\n if (seeds.length === 0) return undefined;\n const scoped = networkId ? seeds.filter((seed) => seed.networkId === networkId) : seeds;\n return scoped[scoped.length - 1] ?? seeds[seeds.length - 1];\n }\n\n async function persistApprovedProfileContext(profile: { identity: { name: string; bio: string; location: string } }, user: UserRecord | null, networkId?: string): Promise<void> {\n await userDb.updateUser({\n name: profile.identity.name,\n intro: profile.identity.bio,\n location: profile.identity.location,\n });\n\n const onboarding = user?.onboarding ?? undefined;\n if (!hasEdgeosImportConsent(onboarding)) return;\n const seed = selectProfileSeed(onboarding, networkId);\n if (!seed?.socials?.length) return;\n\n const existingSocials = await userDb.getUserSocials();\n const seededLabels = new Set(seed.socials.map((social) => social.label));\n const kept = existingSocials\n .filter((social) => !seededLabels.has(social.label) || social.label === 'custom')\n .map((social) => ({ label: social.label, value: social.value }));\n const merged = seededLabels.has('custom')\n ? [...kept.filter((social) => social.label !== 'custom'), ...seed.socials]\n : [...kept, ...seed.socials];\n await userDb.setUserSocials(merged);\n }\n\n function buildProfileInput(parts: {\n name?: string;\n location?: string;\n bioOrDescription?: string;\n edgeosProfileText?: string;\n enrichment?: EnrichmentResult | null;\n socials?: Array<{ label: string; value: string }>;\n }): string {\n const lines: string[] = [];\n if (parts.name) lines.push(`Name: ${parts.name}`);\n if (parts.location) lines.push(`Location: ${parts.location}`);\n if (parts.bioOrDescription) lines.push(parts.bioOrDescription);\n if (parts.edgeosProfileText) lines.push(`Event-provided profile information:\\n${parts.edgeosProfileText}`);\n if (parts.socials?.length) {\n lines.push(`User-provided public links:\\n${parts.socials.map((s) => `${s.label}: ${s.value}`).join('\\n')}`);\n }\n const enrichment = parts.enrichment ?? null;\n if (isMeaningfulEnrichment(enrichment)) {\n lines.push([\n enrichment.identity.name ? `Enriched name: ${enrichment.identity.name}` : '',\n enrichment.identity.location ? `Enriched location: ${enrichment.identity.location}` : '',\n enrichment.identity.bio ? `Enriched bio: ${enrichment.identity.bio}` : '',\n enrichment.narrative.context ? `Enriched context: ${enrichment.narrative.context}` : '',\n enrichment.attributes.skills.length ? `Skills: ${enrichment.attributes.skills.join(', ')}` : '',\n enrichment.attributes.interests.length ? `Interests: ${enrichment.attributes.interests.join(', ')}` : '',\n ].filter(Boolean).join('\\n'));\n }\n return lines.filter((line) => line.trim().length > 0).join('\\n\\n');\n }\n\n function toProfileSummary(profile: { identity: { name: string; bio: string; location: string }; attributes: { skills: string[]; interests: string[] } }) {\n return {\n name: profile.identity.name,\n bio: profile.identity.bio,\n location: profile.identity.location,\n skills: profile.attributes.skills,\n interests: profile.attributes.interests,\n };\n }\n\n const readUserProfiles = defineTool({\n name: \"read_user_profiles\",\n description:\n \"Retrieves user profiles containing identity info (name, bio, location), skills, and interests. Profiles are used for semantic matching \" +\n \"in opportunity discovery — richer profiles produce better matches.\\n\\n\" +\n \"**Usage modes:**\\n\" +\n \"- With `query` (name search): finds members by name (case-insensitive substring) across the user's indexes. \" +\n \"This is the primary way to look up a person by name. Add `networkId` to restrict search to one index.\\n\" +\n \"- With `userId`: returns that specific user's full profile (name, bio, skills, interests, location).\\n\" +\n \"- With `networkId` alone: returns profiles of ALL members in that index.\\n\" +\n \"- No parameters: returns the current user's own profile.\\n\\n\" +\n \"**When to use:** Before creating introductions (need profiles of both parties), when the user asks about a person, \" +\n \"or to check if a profile exists before suggesting create_user_profile. \" +\n \"MCP agents should call this with no arguments at session start to fetch the caller's profile AND onboarding status.\\n\\n\" +\n \"**Returns:** Profile objects with name, bio, location, skills[], interests[]. Use userId from results with other tools like read_intents(userId, networkId). \" +\n \"When called for the current user (no args, or userId=self), the response also includes `onboardingComplete: boolean` and `onboardingCompletedAt?: string` — \" +\n \"use these as the source of truth for whether the user still needs onboarding (do not rely on local file state).\",\n querySchema: z.object({\n userId: z.string().optional().describe(\"Fetch a specific user's profile by their user ID. Get user IDs from read_network_memberships or list_contacts.\"),\n networkId: z.string().optional().describe(\"Index UUID — fetch profiles of all members in this index, or narrow a name search to this index. Get from read_networks.\"),\n query: z.string().optional().describe(\"Name to search for (case-insensitive substring match). Searches across all the user's indexes unless networkId is also provided. Use this when the user asks to 'find' or 'look up' someone.\"),\n }),\n handler: async ({ context, query }) => {\n const effectiveIndexId = query.networkId?.trim() || undefined;\n const targetUserId = query.userId?.trim() || undefined;\n const nameQuery = query.query?.trim() || undefined;\n\n if (effectiveIndexId && !UUID_REGEX.test(effectiveIndexId)) {\n return error(\"Invalid network ID format. Use the exact UUID from read_networks.\");\n }\n\n // --- Name search mode: query provided → find members by name ---\n if (nameQuery) {\n const pattern = nameQuery.toLowerCase();\n const MAX_RESULTS = 20;\n // When chat is index-scoped, restrict name search to that index\n const searchIndexId = effectiveIndexId || context.networkId || undefined;\n\n let candidates: Array<{ userId: string; name: string; avatar: string | null }>;\n\n if (searchIndexId) {\n // Scoped to a specific index\n if (context.networkId && searchIndexId !== context.networkId) {\n return error(\n context.indexName\n ? `This chat is scoped to ${context.indexName}. You can only look up people in this community.`\n : `This chat is scoped to this index. You can only look up people in this community.`\n );\n }\n const callerIsMember = await systemDb.isNetworkMember(searchIndexId, context.userId);\n if (!callerIsMember) {\n return error(\"You can only look up people in indexes you are a member of.\");\n }\n const members = await systemDb.getNetworkMembers(searchIndexId);\n candidates = members.map((m) => ({ userId: m.userId, name: m.name, avatar: m.avatar ?? null }));\n } else {\n // Search across all user's indexes\n candidates = await systemDb.getMembersFromScope();\n }\n\n logger.verbose(\"Name search candidates\", {\n query: nameQuery,\n pattern,\n candidateCount: candidates.length,\n userId: context.userId,\n });\n\n // Filter by name (case-insensitive substring), exclude self\n const matched = candidates\n .filter((c) => c.userId !== context.userId && c.name.toLowerCase().includes(pattern))\n .slice(0, MAX_RESULTS);\n\n if (matched.length === 0) {\n return success({ query: nameQuery, matchCount: 0, profiles: [], message: \"No members found matching that name.\" });\n }\n\n // Fetch full profiles for matches\n const profiles = await Promise.all(\n matched.map(async (m) => {\n try {\n const profile = await systemDb.getProfile(m.userId);\n return {\n userId: m.userId,\n name: m.name,\n hasProfile: !!profile,\n profile: profile\n ? {\n name: profile.identity.name,\n bio: profile.identity.bio,\n location: profile.identity.location,\n skills: profile.attributes.skills,\n interests: profile.attributes.interests,\n }\n : undefined,\n };\n } catch (err) {\n logger.warn(\"read_user_profiles: getProfile failed; degrading to hasProfile=false\", {\n userId: m.userId,\n error: err instanceof Error ? err.message : String(err),\n });\n return { userId: m.userId, name: m.name, hasProfile: false };\n }\n })\n );\n\n return success({ query: nameQuery, matchCount: profiles.length, profiles });\n }\n\n // When no userId / networkId / query is provided, fall through to Mode 1 (self lookup).\n\n // --- Mode 3: networkId provided → fetch all member profiles ---\n if (effectiveIndexId) {\n // Strict scope enforcement: when chat is index-scoped, only allow querying that index\n if (context.networkId && effectiveIndexId !== context.networkId) {\n return error(\n context.indexName\n ? `This chat is scoped to ${context.indexName}. You can only read profiles from this community.`\n : `This chat is scoped to this index. You can only read profiles from this community.`\n );\n }\n\n // Verify the caller is a member of the index they're querying\n const callerIsMember = await systemDb.isNetworkMember(effectiveIndexId, context.userId);\n if (!callerIsMember) {\n return error(\n \"You can only read profiles from indexes you are a member of.\"\n );\n }\n\n // Use systemDb for cross-user access within shared indexes\n const members = await systemDb.getNetworkMembers(effectiveIndexId);\n const profiles = await Promise.all(\n members.map(async (member) => {\n const profile = await systemDb.getProfile(member.userId);\n return {\n userId: member.userId,\n name: member.name,\n hasProfile: !!profile,\n profile: profile\n ? {\n name: profile.identity.name,\n bio: profile.identity.bio,\n location: profile.identity.location,\n skills: profile.attributes.skills,\n interests: profile.attributes.interests,\n }\n : undefined,\n };\n })\n );\n return success({ networkId: effectiveIndexId, memberCount: members.length, profiles });\n }\n\n // --- Mode 2: userId provided (different user) → fetch single profile directly ---\n if (targetUserId && targetUserId !== context.userId) {\n // Strict scope enforcement: when chat is index-scoped, verify user is in that index\n if (context.networkId) {\n const isInScopedIndex = await systemDb.isNetworkMember(context.networkId, targetUserId);\n if (!isInScopedIndex) {\n return error(\n context.indexName\n ? `This chat is scoped to ${context.indexName}. You can only read profiles of members in this community.`\n : `This chat is scoped to this index. You can only read profiles of members in this community.`\n );\n }\n }\n\n // Use systemDb for cross-user profile access (requires shared index)\n const profile = await systemDb.getProfile(targetUserId);\n if (profile) {\n return success({\n hasProfile: true,\n profile: {\n name: profile.identity.name,\n bio: profile.identity.bio,\n location: profile.identity.location,\n skills: profile.attributes.skills,\n interests: profile.attributes.interests,\n },\n });\n }\n return success({ hasProfile: false, message: \"This user does not have a profile yet.\" });\n }\n\n // --- Mode 1: No args / self → use profileGraph query (returns id for updates) ---\n const _readProfileGraphStart = Date.now();\n const _readProfileTraceEmitter = requestContext.getStore()?.traceEmitter;\n _readProfileTraceEmitter?.({ type: \"graph_start\", name: \"profile\" });\n const result = await invokeWithAbortSignal(graphs.profile, {\n userId: context.userId,\n operationMode: 'query' as const,\n });\n const _readProfileGraphMs = Date.now() - _readProfileGraphStart;\n _readProfileTraceEmitter?.({ type: \"graph_end\", name: \"profile\", durationMs: _readProfileGraphMs });\n\n // Self-lookup includes onboarding status so MCP agents (e.g. Edge Claw)\n // can decide whether to run the onboarding flow without depending on\n // local-only state like a workspace BOOTSTRAP.md file.\n const onboardingCompletedAt = context.user.onboarding?.completedAt ?? null;\n const onboardingFields = {\n onboardingComplete: !!onboardingCompletedAt,\n ...(onboardingCompletedAt ? { onboardingCompletedAt } : {}),\n };\n\n if (result.readResult) {\n return success({ ...result.readResult, ...onboardingFields, _graphTimings: [{ name: 'profile', durationMs: _readProfileGraphMs, agents: result.agentTimings ?? [] }] });\n }\n if (result.profile) {\n return success({\n hasProfile: true,\n profile: {\n name: result.profile.identity.name,\n bio: result.profile.identity.bio,\n location: result.profile.identity.location,\n skills: result.profile.attributes.skills,\n interests: result.profile.attributes.interests,\n },\n ...onboardingFields,\n _graphTimings: [{ name: 'profile', durationMs: _readProfileGraphMs, agents: result.agentTimings ?? [] }],\n });\n }\n return success({\n hasProfile: false,\n ...onboardingFields,\n message: \"You don't have a profile yet. Would you like to create one? You can share your LinkedIn, GitHub, or X/Twitter profile, or just tell me about yourself.\",\n _graphTimings: [{ name: 'profile', durationMs: _readProfileGraphMs, agents: result.agentTimings ?? [] }],\n });\n },\n });\n\n const recordOnboardingPrivacyConsent = defineTool({\n name: \"record_onboarding_privacy_consent\",\n description:\n \"Records exactly one authenticated-user onboarding privacy choice. Use this during AgentVillage/Hermes onboarding only after the user explicitly answers the matching consent question in a prior message. \" +\n \"Do not call this in the same assistant turn as the consent question, and do not combine EdgeOS import and public lookup decisions in one call. \" +\n \"This only records consent; it does not mark onboarding complete and does not create or update a profile.\",\n querySchema: z.object({\n edgeosImportGranted: z.boolean().optional().describe(\"Whether the user grants permission to use EdgeOS/event-provided profile data for onboarding.\"),\n publicProfileLookupGranted: z.boolean().optional().describe(\"Whether the user grants permission for public internet/profile lookup during onboarding.\"),\n source: z.enum(['agentvillage_onboarding', 'hermes_setup', 'web_onboarding', 'api']).optional().default('api').describe(\"Where this consent decision was collected.\"),\n }),\n handler: async ({ context, query }) => {\n const user = await userDb.getUser();\n if (user?.isGhost) {\n return error(\"Ghost users cannot record onboarding consent. The user must authenticate as a real account first.\");\n }\n const hasEdgeosDecision = query.edgeosImportGranted !== undefined;\n const hasPublicLookupDecision = query.publicProfileLookupGranted !== undefined;\n if (!hasEdgeosDecision && !hasPublicLookupDecision) {\n return error(\"Provide exactly one consent decision to record.\");\n }\n if (hasEdgeosDecision && hasPublicLookupDecision) {\n return error(\"Record EdgeOS import consent and public-profile lookup consent separately, after each explicit user answer. Do not combine them in one call.\");\n }\n\n const currentOnboarding = user?.onboarding ?? context.user.onboarding ?? {};\n const currentPrivacy: OnboardingPrivacyState = currentOnboarding.privacy ?? {};\n const source = normalizeConsentSource(query.source);\n const privacy: OnboardingPrivacyState = {\n ...currentPrivacy,\n ...(query.edgeosImportGranted !== undefined && { edgeosImport: consentDecision(query.edgeosImportGranted, source) }),\n ...(query.publicProfileLookupGranted !== undefined && { publicProfileLookup: consentDecision(query.publicProfileLookupGranted, source) }),\n };\n\n await userDb.updateUser({\n onboarding: {\n ...currentOnboarding,\n privacy,\n },\n });\n\n return success({\n message: \"Privacy choices recorded.\",\n privacy,\n });\n },\n });\n\n const previewUserProfile = defineTool({\n name: \"preview_user_profile\",\n description:\n \"Builds a structured profile draft for onboarding without saving anything. Use this after recording privacy consent and before asking the user to approve the profile. \" +\n \"If allowPublicLookup is false, this tool uses only explicit text, EdgeOS/event data the user allowed, and user-provided social URLs. If allowPublicLookup is true, persisted public lookup consent is required.\",\n querySchema: z.object({\n name: z.string().optional().describe(\"Name explicitly provided by the user. For authenticated public lookup, the account identity is used first and this is only a fallback.\"),\n location: z.string().optional().describe(\"Location explicitly provided by the user or allowed event data.\"),\n bioOrDescription: z.string().optional().describe(\"Explicit self-description provided by the user.\"),\n edgeosProfileText: z.string().optional().describe(\"EdgeOS/event profile text, only if the user granted EdgeOS import consent.\"),\n allowPublicLookup: z.boolean().optional().default(false).describe(\"Whether to include public profile lookup. Requires previously recorded publicProfileLookup consent.\"),\n linkedinUrl: z.string().optional().describe(\"LinkedIn URL explicitly provided by the user.\"),\n githubUrl: z.string().optional().describe(\"GitHub URL explicitly provided by the user.\"),\n twitterUrl: z.string().optional().describe(\"X/Twitter URL explicitly provided by the user.\"),\n websites: z.array(z.string()).optional().describe(\"Personal/portfolio URLs explicitly provided by the user.\"),\n }),\n handler: async ({ context, query }) => {\n const user = await userDb.getUser();\n if (!user) return error(\"User not found.\");\n\n const onboarding = user.onboarding ?? context.user.onboarding;\n const hasEdgeosConsent = hasEdgeosImportConsent(onboarding);\n const seed = hasEdgeosConsent ? selectProfileSeed(onboarding, context.networkId) : undefined;\n const authenticatedIdentity = resolveAuthenticatedLookupIdentity(user, context);\n const name = seed?.name || authenticatedIdentity.name || query.name?.trim() || undefined;\n const location = query.location?.trim() || seed?.location || user.location || undefined;\n const bioOrDescription = query.bioOrDescription?.trim() || seed?.bio || user.intro || undefined;\n const edgeosProfileText = query.edgeosProfileText?.trim() || undefined;\n const linkedinUrl = query.linkedinUrl?.trim();\n const githubUrl = query.githubUrl?.trim();\n const twitterUrl = query.twitterUrl?.trim();\n const websites = query.websites?.map((url) => url.trim()).filter(Boolean) ?? [];\n const socials = [\n ...(seed?.socials ?? []),\n ...(linkedinUrl ? [{ label: 'linkedin', value: linkedinUrl }] : []),\n ...(githubUrl ? [{ label: 'github', value: githubUrl }] : []),\n ...(twitterUrl ? [{ label: 'twitter', value: twitterUrl }] : []),\n ...websites.map((value) => ({ label: detectSocialLabel(value), value })),\n ];\n\n if (edgeosProfileText && !hasEdgeosConsent) {\n return error(\"EdgeOS import consent has not been recorded. Ask the user first, then call record_onboarding_privacy_consent(edgeosImportGranted=true) before using event-provided profile data.\");\n }\n\n let enrichment: EnrichmentResult | null = null;\n if (query.allowPublicLookup) {\n if (!hasPublicProfileLookupConsent(user.onboarding ?? context.user.onboarding)) {\n return error(\"Public profile lookup consent has not been recorded. Ask the user first, then call record_onboarding_privacy_consent(publicProfileLookupGranted=true).\");\n }\n const hasAuthenticatedIdentity = authenticatedIdentity.name !== undefined || authenticatedIdentity.email !== undefined;\n enrichment = await enrichFromUserRecord({\n name: authenticatedIdentity.name ?? (hasAuthenticatedIdentity ? undefined : name),\n email: authenticatedIdentity.email,\n socials: socials.map((social, index) => ({ id: `preview-${index}`, userId: context.userId, ...social })),\n });\n }\n\n const input = buildProfileInput({ name, location, bioOrDescription, edgeosProfileText, enrichment, socials });\n if (!input.trim()) {\n return needsClarification({\n missingFields: ['profile_description'],\n message: \"Please share a short description, allowed EdgeOS profile text, or user-provided profile links so I can draft your profile.\",\n });\n }\n\n const generated = await new ProfileGenerator().invoke(input);\n const profile = { ...generated.output, userId: context.userId };\n return success({\n preview: true,\n persisted: false,\n message: \"Profile draft generated. Show this to the user and ask whether it looks right before calling confirm_user_profile.\",\n profile: toProfileSummary(profile),\n draft: profile,\n });\n },\n });\n\n const confirmUserProfile = defineTool({\n name: \"confirm_user_profile\",\n description:\n \"Saves an explicitly approved onboarding profile draft. Call this only after the user has seen the draft from preview_user_profile and approved it or provided corrections. \" +\n \"This path uses only the approved draft/explicit correction text and does not scrape or run public lookup.\",\n querySchema: z.object({\n draft: z.object({\n identity: z.object({ name: z.string(), bio: z.string(), location: z.string() }),\n narrative: z.object({ context: z.string() }),\n attributes: z.object({ interests: z.array(z.string()), skills: z.array(z.string()) }),\n }).optional().describe(\"The structured profile draft returned by preview_user_profile after user approval.\"),\n bioOrDescription: z.string().optional().describe(\"Approved correction or explicit profile text if not passing a structured draft.\"),\n name: z.string().optional().describe(\"Approved name correction.\"),\n location: z.string().optional().describe(\"Approved location correction.\"),\n }),\n handler: async ({ context, query }) => {\n const user = await userDb.getUser();\n if (query.draft) {\n const profile = { ...query.draft, userId: context.userId };\n await userDb.saveProfile(profile);\n await persistApprovedProfileContext(profile, user, context.networkId);\n return success({\n created: true,\n message: \"Profile saved from approved draft.\",\n profile: toProfileSummary(profile),\n });\n }\n\n const description = query.bioOrDescription?.trim();\n if (!description) {\n return error(\"Pass the approved structured draft or explicit approved profile text.\");\n }\n const approvedName = query.name?.trim();\n const approvedLocation = query.location?.trim();\n const input = buildProfileInput({\n name: approvedName,\n location: approvedLocation,\n bioOrDescription: description,\n });\n const rawProfile = {\n identity: {\n name: approvedName && approvedName.length > 0 ? approvedName : user?.name ?? '',\n bio: description,\n location: approvedLocation && approvedLocation.length > 0 ? approvedLocation : user?.location ?? '',\n },\n };\n await persistApprovedProfileContext(rawProfile, user, context.networkId);\n\n const _confirmTraceEmitter = requestContext.getStore()?.traceEmitter;\n const _confirmGraphStart = Date.now();\n _confirmTraceEmitter?.({ type: \"graph_start\", name: \"profile\" });\n graphs.profile.invoke({\n userId: context.userId,\n operationMode: 'write' as const,\n input,\n forceUpdate: true,\n }).then((result) => {\n if (result.error || !result.profile) {\n logger.error('Background profile generation failed', {\n userId: context.userId,\n error: result.error ?? 'No profile returned',\n });\n }\n }).catch((err: unknown) =>\n logger.error('Background profile generation failed', {\n userId: context.userId,\n error: err instanceof Error ? err.message : String(err),\n })\n ).finally(() => {\n const _confirmGraphMs = Date.now() - _confirmGraphStart;\n _confirmTraceEmitter?.({ type: \"graph_end\", name: \"profile\", durationMs: _confirmGraphMs });\n });\n\n return success({\n created: true,\n message: \"Profile text accepted. Your profile is being structured in the background.\",\n profile: toProfileSummary({\n identity: rawProfile.identity,\n attributes: { skills: [], interests: [] },\n }),\n });\n },\n });\n\n const createUserProfile = defineTool({\n name: \"create_user_profile\",\n description:\n \"Legacy/backward-compatible tool that creates or regenerates the authenticated user's profile. AgentVillage/Hermes onboarding must use \" +\n \"record_onboarding_privacy_consent → preview_user_profile → confirm_user_profile instead, so consent is recorded and the draft is shown before saving. \" +\n \"Profiles are essential for discovery — they provide the semantic context used to match users with complementary intents.\\n\\n\" +\n \"**How it works:** For generic clients, the system can enrich profile data from public web sources (LinkedIn, GitHub, Twitter) and/or explicit user input, \" +\n \"then generates a structured profile with bio, skills, interests, location, and narrative context. Do not call with no arguments in consent-required onboarding flows.\\n\\n\" +\n \"**Usage patterns:**\\n\" +\n \"- No args: attempts auto-generation from account data. If insufficient info, returns `missingFields` — ask the user for name/social URLs and retry.\\n\" +\n \"- With social URLs (linkedinUrl, githubUrl, etc.): enriches from those specific URLs.\\n\" +\n \"- With bioOrDescription: creates profile from explicit text only (no web scraping).\\n\" +\n \"- Legacy onboarding clients: first call returns a preview. AgentVillage/Hermes clients should not use this preview path; use preview_user_profile instead because it does not persist enrichment side effects.\\n\\n\" +\n \"**Returns:** The generated profile (name, bio, location, skills, interests) or a `needsClarification` response listing missing fields.\\n\\n\" +\n \"**Next steps:** After profile creation, the user can create intents (create_intent) and join indexes (create_network_membership) to start discovering opportunities.\",\n querySchema: z.object({\n name: z.string().optional().describe(\"User's full name (first and last). Pass when the user explicitly provides their name.\"),\n linkedinUrl: z.string().optional().describe(\"LinkedIn profile URL (e.g. 'https://linkedin.com/in/username'). Pass when user shares a LinkedIn link.\"),\n githubUrl: z.string().optional().describe(\"GitHub profile URL (e.g. 'https://github.com/username'). Pass when user shares a GitHub link.\"),\n twitterUrl: z.string().optional().describe(\"X/Twitter profile URL (e.g. 'https://x.com/username'). Pass when user shares a Twitter/X link.\"),\n websites: z.array(z.string()).optional().describe(\"Personal or portfolio website URLs. Pass when user shares website links.\"),\n location: z.string().optional().describe(\"User's location (e.g. 'Berlin, Germany' or 'SF Bay Area'). Pass when the user mentions where they are based.\"),\n bioOrDescription: z.string().optional().describe(\"Explicit profile text from the user (e.g. 'software engineer focused on AI/ML, based in SF'). When provided, creates/updates profile from this text only — no web scraping. Use when user describes themselves in chat.\"),\n confirm: z.boolean().optional().describe(\"Set to true to save a previously previewed profile. Only used during onboarding flow after the user approves the preview.\"),\n }),\n handler: async ({ context, query }) => {\n // Persist user-info fields (name, location, socials) to users table before any branching.\n // This ensures users.name is always updated regardless of which code path runs.\n // Trim all string fields to avoid persisting whitespace-only values.\n const name = query.name?.trim();\n const location = query.location?.trim();\n const linkedinUrl = query.linkedinUrl?.trim();\n const githubUrl = query.githubUrl?.trim();\n const twitterUrl = query.twitterUrl?.trim();\n const websites = query.websites?.map((url) => url.trim()).filter(Boolean);\n const hasSocialsFromQuery = Boolean(linkedinUrl || githubUrl || twitterUrl || websites?.length);\n if (name || location) {\n await userDb.updateUser({\n ...(name ? { name } : {}),\n ...(location ? { location } : {}),\n });\n }\n if (hasSocialsFromQuery) {\n const existingSocials = await userDb.getUserSocials();\n const newSocials: { label: string; value: string }[] = [];\n if (linkedinUrl) newSocials.push({ label: 'linkedin', value: linkedinUrl });\n if (githubUrl) newSocials.push({ label: 'github', value: githubUrl });\n if (twitterUrl) newSocials.push({ label: 'twitter', value: twitterUrl });\n if (websites?.length) {\n for (const w of websites) newSocials.push({ label: detectSocialLabel(w) === 'custom' ? 'custom' : detectSocialLabel(w), value: w });\n }\n const newLabels = new Set(newSocials.map(s => s.label));\n const kept = existingSocials\n .filter(s => !newLabels.has(s.label) || s.label === 'custom')\n .map(s => ({ label: s.label, value: s.value }));\n const merged = newLabels.has('custom')\n ? [...kept.filter(s => s.label !== 'custom'), ...newSocials]\n : [...kept, ...newSocials];\n await userDb.setUserSocials(merged);\n }\n logger.verbose(\"Persisted user-info fields to user record\", { userId: context.userId });\n\n const isOnboarding = !(context.user.onboarding?.completedAt);\n if (isOnboarding) {\n const existingProfile = await userDb.getProfile();\n if (existingProfile) {\n return success({\n alreadyExists: true,\n message: \"Profile already exists. If the user confirmed it, call complete_onboarding() to finish setup. If they want changes, use create_user_profile(bioOrDescription=\\\"...\\\", confirm=true).\",\n profile: {\n name: existingProfile.identity.name,\n bio: existingProfile.identity.bio,\n location: existingProfile.identity.location,\n skills: existingProfile.attributes.skills,\n interests: existingProfile.attributes.interests,\n },\n });\n }\n\n // Preview mode: enrich and persist enrichment results, but don't generate full profile\n if (!query.confirm) {\n try {\n const user = await userDb.getUser();\n const enrichment = user ? await enrichFromUserRecord(user) : null;\n\n if (isMeaningfulEnrichment(enrichment)) {\n // Persist enrichment data to user record so confirm path has it\n const updatePayload: {\n name?: string;\n intro?: string;\n location?: string;\n } = {};\n if (enrichment.identity.name?.trim()) {\n updatePayload.name = enrichment.identity.name.trim();\n }\n if (enrichment.identity.bio?.trim()) updatePayload.intro = enrichment.identity.bio.trim();\n if (enrichment.identity.location?.trim()) updatePayload.location = enrichment.identity.location.trim();\n if (Object.keys(updatePayload).length > 0) await userDb.updateUser(updatePayload);\n const enrichedSocials: { label: string; value: string }[] = [];\n if (enrichment.socials.twitter) enrichedSocials.push({ label: 'twitter', value: enrichment.socials.twitter });\n if (enrichment.socials.linkedin) enrichedSocials.push({ label: 'linkedin', value: enrichment.socials.linkedin });\n if (enrichment.socials.github) enrichedSocials.push({ label: 'github', value: enrichment.socials.github });\n if (enrichment.socials.telegram) enrichedSocials.push({ label: 'telegram', value: enrichment.socials.telegram });\n if (enrichment.socials.websites?.length) {\n for (const w of enrichment.socials.websites) enrichedSocials.push({ label: 'custom', value: w });\n }\n if (enrichedSocials.length > 0) {\n const existingSocials = await userDb.getUserSocials();\n const enrichedLabels = new Set(enrichedSocials.map(s => s.label));\n const kept = existingSocials\n .filter(s => !enrichedLabels.has(s.label) || s.label === 'custom')\n .map(s => ({ label: s.label, value: s.value }));\n const merged = enrichedLabels.has('custom')\n ? [...kept.filter(s => s.label !== 'custom'), ...enrichedSocials]\n : [...kept, ...enrichedSocials];\n await userDb.setUserSocials(merged);\n }\n\n return success({\n preview: true,\n message: \"Profile preview generated. Call create_user_profile(confirm=true) to save.\",\n profile: {\n name: enrichment.identity.name,\n bio: enrichment.identity.bio,\n location: enrichment.identity.location,\n skills: enrichment.attributes.skills,\n interests: enrichment.attributes.interests,\n },\n });\n }\n } catch (err) {\n logger.warn(\"Enrichment preview failed\", {\n error: err instanceof Error ? err.message : String(err),\n });\n }\n\n return needsClarification({\n missingFields: ['bio_or_social_urls'],\n message: \"I couldn't find enough public info. Could you share a short description of yourself, or a LinkedIn/GitHub/X profile link?\",\n });\n }\n\n // Confirm mode: invoke graph in generate mode (enrichment data already persisted during preview)\n // Do NOT re-run enrichFromUserRecord — the graph's autoGenerateNode handles enrichment\n // from the (now well-populated) user record, avoiding non-deterministic drift.\n try {\n const _confirmGraphStart = Date.now();\n const _confirmTraceEmitter = requestContext.getStore()?.traceEmitter;\n _confirmTraceEmitter?.({ type: \"graph_start\", name: \"profile\" });\n const result = await invokeWithAbortSignal(graphs.profile, {\n userId: context.userId,\n operationMode: 'generate' as const,\n });\n const _confirmGraphMs = Date.now() - _confirmGraphStart;\n _confirmTraceEmitter?.({ type: \"graph_end\", name: \"profile\", durationMs: _confirmGraphMs });\n\n if (result.error) return error(result.error);\n if (result.profile) {\n return success({\n created: true,\n message: \"Profile saved.\",\n profile: {\n name: result.profile.identity.name,\n bio: result.profile.identity.bio,\n location: result.profile.identity.location,\n skills: result.profile.attributes.skills,\n interests: result.profile.attributes.interests,\n },\n _graphTimings: [{ name: 'profile', durationMs: _confirmGraphMs, agents: result.agentTimings ?? [] }],\n });\n }\n } catch (err) {\n logger.warn(\"Profile generation on confirm failed, falling back to full graph\", {\n error: err instanceof Error ? err.message : String(err),\n });\n }\n // Fallback: graph invocation failed on confirm, fall through to full graph invocation\n }\n\n const hasBioOrDescription = !!query.bioOrDescription?.trim();\n\n if (hasBioOrDescription) {\n // Create/update profile from user's explicit text only; do not persist to user record\n // Include name and location in the input if provided so the ProfileGenerator can use them\n const inputParts: string[] = [];\n if (name) inputParts.push(`Name: ${name}`);\n if (location) inputParts.push(`Location: ${location}`);\n inputParts.push(query.bioOrDescription!.trim());\n const profileInput = inputParts.join('\\n');\n \n const _bioProfileGraphStart = Date.now();\n const _bioProfileTraceEmitter = requestContext.getStore()?.traceEmitter;\n _bioProfileTraceEmitter?.({ type: \"graph_start\", name: \"profile\" });\n const result = await invokeWithAbortSignal(graphs.profile, {\n userId: context.userId,\n operationMode: 'write' as const,\n input: profileInput,\n forceUpdate: true,\n });\n const _bioProfileGraphMs = Date.now() - _bioProfileGraphStart;\n _bioProfileTraceEmitter?.({ type: \"graph_end\", name: \"profile\", durationMs: _bioProfileGraphMs });\n if (result.error) {\n return error(result.error);\n }\n if (result.profile) {\n return success({\n created: true,\n message: \"Profile created/updated with the information you provided.\",\n profile: {\n name: result.profile.identity.name,\n bio: result.profile.identity.bio,\n location: result.profile.identity.location,\n skills: result.profile.attributes.skills,\n interests: result.profile.attributes.interests,\n },\n _graphTimings: [{ name: 'profile', durationMs: _bioProfileGraphMs, agents: result.agentTimings ?? [] }],\n });\n }\n return success({\n created: true,\n message: \"Profile created/updated with the information you provided.\",\n _graphTimings: [{ name: 'profile', durationMs: _bioProfileGraphMs, agents: result.agentTimings ?? [] }],\n });\n }\n\n // Invoke profile graph in generate mode (uses enrichUserProfile Chat API)\n const _generateProfileGraphStart = Date.now();\n const _generateProfileTraceEmitter = requestContext.getStore()?.traceEmitter;\n _generateProfileTraceEmitter?.({ type: \"graph_start\", name: \"profile\" });\n const result = await invokeWithAbortSignal(graphs.profile, {\n userId: context.userId,\n operationMode: 'generate' as const,\n forceUpdate: true,\n });\n const _generateProfileGraphMs = Date.now() - _generateProfileGraphStart;\n _generateProfileTraceEmitter?.({ type: \"graph_end\", name: \"profile\", durationMs: _generateProfileGraphMs });\n\n // If user info is insufficient, ask conversationally\n if (result.needsUserInfo) {\n return needsClarification({\n missingFields: result.missingUserInfo || ['social_urls', 'full_name'],\n message: \"I need a bit more information to create your profile. Could you share your full name and any social links (LinkedIn, GitHub, or X/Twitter)?\",\n });\n }\n\n if (result.error) {\n return error(result.error);\n }\n\n if (result.profile) {\n return success({\n created: true,\n message: \"Profile generated from your account data.\",\n profile: {\n name: result.profile.identity.name,\n bio: result.profile.identity.bio,\n location: result.profile.identity.location,\n skills: result.profile.attributes.skills,\n interests: result.profile.attributes.interests,\n },\n _graphTimings: [{ name: 'profile', durationMs: _generateProfileGraphMs, agents: result.agentTimings ?? [] }],\n });\n }\n\n return error(\"Failed to create profile. Please try again.\");\n },\n });\n\n const updateUserProfile = defineTool({\n name: \"update_user_profile\",\n description:\n \"Updates the authenticated user's existing profile using a verb-style instruction interface.\\n\\n\" +\n \"**How to use it:**\\n\" +\n \"- `action`: a natural-language instruction describing what to change (e.g. \\\"add interests\\\", \\\"update bio\\\", \\\"remove skill\\\", \\\"set location\\\").\\n\" +\n \"- `details`: the content to apply (e.g. \\\"procedural generation, roguelikes, narrative games\\\").\\n\\n\" +\n \"**Examples:**\\n\" +\n \"- `action=\\\"add interests\\\"`, `details=\\\"procedural generation, roguelikes\\\"`\\n\" +\n \"- `action=\\\"update bio\\\"`, `details=\\\"Product designer focused on desktop CRPG interfaces\\\"`\\n\" +\n \"- `action=\\\"set location\\\"`, `details=\\\"Berlin\\\"`\\n\\n\" +\n \"**When to use:** When the user wants to make specific changes without regenerating the whole profile. For full profile regeneration from social URLs, use create_user_profile instead.\\n\\n\" +\n \"**Important:** If the user provides a URL to update from, call scrape_url first, then pass the scraped content in `details`.\\n\\n\" +\n \"**Returns:** Confirmation that the profile was updated.\",\n querySchema: z.object({\n profileId: z.string().optional().describe(\"Profile UUID from read_user_profiles. Omit to update the current user's own profile (most common usage).\"),\n action: z.string().describe(\"Natural language description of ALL changes to make in a single call. Examples: 'update bio to focus on AI research', 'add Python and Rust to skills', 'change location to Berlin and add machine learning to interests'.\"),\n details: z.string().optional().describe(\"Additional context or content to incorporate. Use this to pass scraped URL content (from scrape_url) or longer text the user provided.\"),\n }),\n handler: async ({ context, query }) => {\n // Use profileGraph query mode to validate profile existence and get id\n const _updateQueryProfileGraphStart = Date.now();\n const _updateQueryProfileTraceEmitter = requestContext.getStore()?.traceEmitter;\n _updateQueryProfileTraceEmitter?.({ type: \"graph_start\", name: \"profile\" });\n const queryResult = await invokeWithAbortSignal(graphs.profile, { userId: context.userId, operationMode: 'query' as const });\n const _updateQueryProfileGraphMs = Date.now() - _updateQueryProfileGraphStart;\n _updateQueryProfileTraceEmitter?.({ type: \"graph_end\", name: \"profile\", durationMs: _updateQueryProfileGraphMs });\n if (!queryResult.readResult?.hasProfile && !queryResult.profile) {\n return error(\"You don't have a profile yet. Use create_user_profile first.\");\n }\n const existingProfileId = queryResult.readResult?.profile?.id;\n const providedProfileId = query.profileId?.trim();\n if (providedProfileId && existingProfileId && providedProfileId !== existingProfileId) {\n return error(\"Invalid profileId. Use the profile id from read_user_profiles.\");\n }\n\n const inputForProfile = [query.action, query.details].filter(Boolean).join(\"\\n\") || (query.details ?? query.action);\n if (!inputForProfile.trim()) {\n return error(\"Please specify what to update (e.g. action: 'update bio to X').\");\n }\n\n // Execute update directly\n const _updateWriteProfileGraphStart = Date.now();\n const _updateWriteProfileTraceEmitter = requestContext.getStore()?.traceEmitter;\n _updateWriteProfileTraceEmitter?.({ type: \"graph_start\", name: \"profile\" });\n const _writeResult = await invokeWithAbortSignal(graphs.profile, {\n userId: context.userId,\n operationMode: \"write\",\n input: inputForProfile,\n forceUpdate: true,\n });\n const _updateWriteProfileGraphMs = Date.now() - _updateWriteProfileGraphStart;\n _updateWriteProfileTraceEmitter?.({ type: \"graph_end\", name: \"profile\", durationMs: _updateWriteProfileGraphMs });\n if (_writeResult.error) {\n return error(_writeResult.error);\n }\n return success({\n message: \"Profile updated.\",\n _graphTimings: [\n { name: 'profile', durationMs: _updateQueryProfileGraphMs, agents: queryResult.agentTimings ?? [] },\n { name: 'profile', durationMs: _updateWriteProfileGraphMs, agents: _writeResult.agentTimings ?? [] },\n ],\n });\n },\n });\n\n const completeOnboarding = defineTool({\n name: \"complete_onboarding\",\n description:\n \"Marks the user's onboarding as complete, unlocking full platform access. This is the final step in the new-user setup flow.\\n\\n\" +\n \"**Prerequisites:** The user must have a profile (created via create_user_profile) AND must have explicitly confirmed it \" +\n \"(said 'yes', 'looks good', 'that's right', or similar). Do NOT call this until the user confirms.\\n\\n\" +\n \"**What happens:** Sets completedAt timestamp on the user's onboarding record. May also auto-join the user to preconfigured indexes \" +\n \"(communities) based on server configuration.\\n\\n\" +\n \"**Workflow:** create_user_profile() -> user confirms preview -> create_user_profile(confirm=true) -> user confirms saved profile -> complete_onboarding()\\n\\n\" +\n \"**Returns:** Confirmation that onboarding is complete. No parameters needed.\",\n querySchema: z.object({}),\n handler: async ({ context }) => {\n const currentOnboarding = context.user.onboarding ?? {};\n if (currentOnboarding.completedAt) {\n logger.verbose(\"Onboarding already completed, skipping\", { userId: context.userId });\n return success({ message: \"Onboarding already completed.\" });\n }\n await userDb.updateUser({\n onboarding: {\n ...currentOnboarding,\n completedAt: new Date().toISOString(),\n },\n });\n\n if (grantDefaultSystemPermissions) {\n try {\n await grantDefaultSystemPermissions(context.userId);\n } catch (err) {\n logger.warn('Default system agent permission grant failed (non-fatal)', {\n userId: context.userId,\n error: err instanceof Error ? err.message : String(err),\n });\n }\n }\n\n const autoJoinIds = (process.env.AUTO_JOIN_INDEX_IDS ?? '')\n .split(',')\n .map(id => id.trim())\n .filter(Boolean);\n for (const networkId of autoJoinIds) {\n try {\n await database.addMemberToNetwork(networkId, context.userId, 'member');\n } catch (err) {\n logger.warn('Auto-join network failed (non-fatal)', { networkId, userId: context.userId, error: err instanceof Error ? err.message : String(err) });\n }\n }\n\n logger.info(\"Onboarding completed\", { userId: context.userId, autoJoinedNetworks: autoJoinIds.length });\n return success({ message: \"Onboarding complete.\" });\n },\n });\n\n return [readUserProfiles, recordOnboardingPrivacyConsent, previewUserProfile, confirmUserProfile, createUserProfile, updateUserProfile, completeOnboarding] as const;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questioner.agent.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"questioner.agent.d.ts","sourceRoot":"/","sources":["questioner/questioner.agent.ts"],"names":[],"mappings":"AAYA,OAAO,EAGL,KAAK,wBAAwB,EAG9B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAK9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAO7D,MAAM,WAAW,qBAAqB;IACpC,sCAAsC;IACtC,WAAW,CAAC,EAAE,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;CACjD;AAED;;;;GAIG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,KAAK,CAAiD;gBAElD,MAAM,CAAC,EAAE,qBAAqB;IAO1C;;;;;;;;OAQG;IAEG,MAAM,CACV,KAAK,EAAE,eAAe,EACtB,OAAO,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GACjC,OAAO,CAAC,wBAAwB,GAAG,IAAI,CAAC;CA8C5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questioner.agent.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"questioner.agent.js","sourceRoot":"/","sources":["questioner/questioner.agent.ts"],"names":[],"mappings":";;;;;;;;;AAUA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,EACL,+BAA+B,GAKhC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,wCAAwC,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,MAAM,MAAM,GAAG,cAAc,CAAC,iBAAiB,CAAC,CAAC;AAEjD,oEAAoE;AACpE,MAAM,iBAAiB,GAAG,C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AAC;QAC1B,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC;YAAE,SAAS;QAChC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QAClB,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACd,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,wBAAwB,CAC/B,SAAiC;IAEjC,MAAM,MAAM,GAAG,IAAI,GAAG,EAA4B,CAAC;IACnD,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,KAAK,MAAM,CAAC,IAAI,SAAS,EAAE,CAAC;QAC1B,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,IAAI,iBAAiB;YAAE,SAAS;QACrC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;QAC9B,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACd,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,SAAS,aAAa,CAAC,CAAuB;IAC5C,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,WAAW,EAAE,GAAG,CAAC,CAAC;IAClD,OAAO,WAAW,CAAC;AACrB,CAAC","sourcesContent":["/**\n * QuestionerAgent — stateless, mode-driven agent that generates structured\n * decision questions from arbitrary protocol contexts.\n *\n * Follows the IndexNegotiator pattern: constructor takes optional config,\n * single public `invoke()` method receives the full context per call.\n * The LLM model is bound once at construction; the preset (system prompt +\n * builder) is selected per invocation based on `input.mode`.\n */\nimport type { ChatOpenAI } from \"@langchain/openai\";\nimport { HumanMessage, SystemMessage } from \"@langchain/core/messages\";\n\nimport {\n QuestionGeneratorResponseSchema,\n type Question,\n type QuestionGenerationResult,\n type QuestionStrategy,\n type QuestionWithStrategy,\n} from \"../shared/schemas/question.schema.js\";\nimport { createModel } from \"../shared/agent/model.config.js\";\nimport { invokeWithAbortSignal } from \"../shared/agent/model-signal.js\";\nimport { protocolLogger } from \"../shared/observability/protocol.logger.js\";\nimport { Timed } from \"../shared/observability/performance.js\";\nimport { getPreset } from \"./questioner.presets.js\";\nimport type { QuestionerInput } from \"./questioner.types.js\";\n\nconst logger = protocolLogger(\"QuestionerAgent\");\n\n/** Maximum same-strategy questions allowed in a single emission. */\nconst MAX_SAME_STRATEGY = 2;\n\nexport interface QuestionerAgentConfig {\n /** Optional model config override. */\n modelConfig?: Parameters<typeof createModel>[1];\n}\n\n/**\n * Stateless question-generation agent. Accepts a `QuestionerInput` envelope,\n * selects the preset for the given mode, invokes the LLM, and applies\n * guardrails (dedup + strategy diversity).\n */\nexport class QuestionerAgent {\n private model: ReturnType<ChatOpenAI[\"withStructuredOutput\"]>;\n\n constructor(config?: QuestionerAgentConfig) {\n const llm = createModel(\"questioner\", config?.modelConfig);\n this.model = llm.withStructuredOutput(QuestionGeneratorResponseSchema, {\n name: \"clarifying_questions\",\n });\n }\n\n /**\n * Generate up to 3 decision questions from the given input.\n *\n * @param input Envelope with mode, userId, source info, and mode-specific context.\n * @param options.signal Optional AbortSignal to cancel the in-flight LLM call.\n * @returns A result with parallel questions[] and strategies[] arrays,\n * or null when generation failed, guardrails dropped all candidates,\n * the LLM threw, or the call was aborted.\n */\n @Timed()\n async invoke(\n input: QuestionerInput,\n options?: { signal?: AbortSignal },\n ): Promise<QuestionGenerationResult | null> {\n const preset = getPreset(input.mode);\n const userMessage = preset.buildPrompt(input.context);\n\n let raw: unknown;\n try {\n raw = await invokeWithAbortSignal(\n this.model,\n [new SystemMessage(preset.systemPrompt), new HumanMessage(userMessage)],\n options?.signal,\n );\n } catch (err) {\n const aborted = options?.signal?.aborted ?? false;\n if (aborted) {\n logger.info(\"QuestionerAgent aborted by signal\", {\n mode: input.mode,\n reason: options?.signal?.reason instanceof Error\n ? options.signal.reason.message\n : String(options?.signal?.reason ?? \"unknown\"),\n });\n } else {\n logger.warn(\"QuestionerAgent LLM call failed\", {\n mode: input.mode,\n error: err instanceof Error ? err.message : String(err),\n });\n }\n return null;\n }\n\n const parsed = QuestionGeneratorResponseSchema.safeParse(raw);\n if (!parsed.success) {\n logger.warn(\"QuestionerAgent parse failed\", {\n mode: input.mode,\n error: parsed.error.message,\n });\n return null;\n }\n\n const filtered = applyGuardrails(parsed.data.questions);\n if (filtered.length === 0) return null;\n\n return {\n questions: filtered.map(stripStrategy),\n strategies: filtered.map((q) => q.strategy),\n };\n }\n}\n\n// --- Guardrails (migrated from question.generator.ts) -------------------------\n\nfunction applyGuardrails(questions: QuestionWithStrategy[]): QuestionWithStrategy[] {\n const dedupedByTitle = dedupByTitle(questions);\n return enforceStrategyDiversity(dedupedByTitle);\n}\n\nfunction dedupByTitle(questions: QuestionWithStrategy[]): QuestionWithStrategy[] {\n const seen = new Set<string>();\n const out: QuestionWithStrategy[] = [];\n for (const q of questions) {\n if (seen.has(q.title)) continue;\n seen.add(q.title);\n out.push(q);\n }\n return out;\n}\n\nfunction enforceStrategyDiversity(\n questions: QuestionWithStrategy[],\n): QuestionWithStrategy[] {\n const counts = new Map<QuestionStrategy, number>();\n const out: QuestionWithStrategy[] = [];\n for (const q of questions) {\n const n = counts.get(q.strategy) ?? 0;\n if (n >= MAX_SAME_STRATEGY) continue;\n counts.set(q.strategy, n + 1);\n out.push(q);\n }\n return out;\n}\n\nfunction stripStrategy(q: QuestionWithStrategy): Question {\n const { strategy: _strategy, ...publicShape } = q;\n return publicShape;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questioner.presets.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"questioner.presets.d.ts","sourceRoot":"/","sources":["questioner/questioner.presets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAQzE,MAAM,WAAW,gBAAgB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BAAiB,GAAG,CAAC,aAAa,EAAE;QACpC,EAAE;QACF,iBAAiB;QACjB,GAAG,CAAC,OAAO;QACX,EAAE;QACF,iBAAiB;QACjB,YAAY;QACZ,EAAE;QACF,cAAc;QACd,mGAAmG;QACnG,6DAA6D;QAC7D,6FAA6F;KAC9F,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,OAAO,GAA2C;IACtD,SAAS,EAAE;QACT,YAAY,EAAE,uBAAuB;QACrC,WAAW,EAAE,CAAC,OAAgB,EAAE,EAAE,CAChC,oBAAoB,CAAC,OAAqD,CAAC;KAC9E;IACD,MAAM,EAAE;QACN,YAAY,EAAE,oBAAoB;QAClC,WAAW,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,iBAAiB,CAAC,OAAwB,CAAC;KAC/E;IACD,OAAO,EAAE;QACP,YAAY,EAAE,qBAAqB;QACnC,WAAW,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,kBAAkB,CAAC,OAAyB,CAAC;KACjF;IACD,WAAW,EAAE;QACX,YAAY,EAAE,yBAAyB;QACvC,WAAW,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,sBAAsB,CAAC,OAA6B,CAAC;KACzF;CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,IAAkB;IAC1C,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,0BAA0B,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
1
|
+
{"version":3,"file":"questioner.presets.js","sourceRoot":"/","sources":["questioner/questioner.presets.ts"],"names":[],"mappings":"AAOA,OAAO,EACL,aAAa,IAAI,uBAAuB,EACxC,mBAAmB,IAAI,oBAAoB,GAC5C,MAAM,mCAAmC,CAAC;AAW3C,+EAA+E;AA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,WAAW,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,iBAAiB,CAAC,OAAwB,CAAC;KAC/E;IACD,OAAO,EAAE;QACP,YAAY,EAAE,qBAAqB;QACnC,WAAW,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,kBAAkB,CAAC,OAAyB,CAAC;KACjF;IACD,WAAW,EAAE;QACX,YAAY,EAAE,yBAAyB;QACvC,WAAW,EAAE,CAAC,OAAgB,EAAE,EAAE,CAAC,sBAAsB,CAAC,OAA6B,CAAC;KACzF;CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAC,IAAkB;IAC1C,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,0BAA0B,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["/**\n * Mode presets for the QuestionerAgent. Each preset provides a system prompt\n * and a buildPrompt function that assembles the user message from a typed\n * context object. Only the `discovery` preset ships in Slice 1; others throw\n * until their implementation slices land.\n */\nimport type { QuestionMode } from \"../shared/schemas/question.schema.js\";\nimport {\n SYSTEM_PROMPT as DISCOVERY_SYSTEM_PROMPT,\n buildQuestionPrompt as buildDiscoveryPrompt,\n} from \"../opportunity/question.prompt.js\";\n\nimport type { IntentContext, NegotiationContext, ProfileContext } from \"./questioner.types.js\";\n\nexport interface QuestionerPreset {\n /** The LLM system prompt for this mode. */\n systemPrompt: string;\n /** Builds the user-message string from the mode-specific context. */\n buildPrompt: (context: unknown) => string;\n}\n\n// ─── Intent preset ──────────────────────────────────────────────────────────\n\nconst INTENT_SYSTEM_PROMPT = `You sit between a human and a discovery protocol. The user has stated an intent — what they are looking for. Your job: surface the minimum set of structured questions that help the user sharpen that intent before the protocol runs discovery on their behalf.\n\nYou may pick from two strategies. Choose contextually; mix only when each question is genuinely distinct.\n- refine_intent: ask the user to sharpen or pivot the core signal (scope, scale, specificity, direction).\n- surface_missing_detail: ask for one concrete missing input that would change which candidates surface (stage, location, timing, budget, constraints, format, …).\n\nAsk a question only when ALL of these hold:\n1. The agent cannot infer the answer from the intent text or user profile already shown.\n2. The answer would materially change which candidates surface.\n3. The question targets a different decision domain from any other question in this batch.\n\nCardinality. Default one question. Add a second only when a DIFFERENT strategy genuinely complements the first and unblocks a clearly distinct decision. Never ask two questions of the same strategy unless their decision domains differ (different titles).\n\nOption construction. Each option must represent a meaningfully different outcome. Suffix the safest or most common path with \" (Recommended)\" and list it first. The description states the CONSEQUENCE of choosing the option, not its definition. 2–4 options. Never add an \"Other\" option — clients provide a free-text fallback automatically.\n\nTitle rules. ≤12 chars. Noun of the decision domain. Examples: \"Stage\", \"Timing\", \"Location\", \"Scope\", \"Budget\", \"Format\", \"Skills\", \"Collab\".\n\nAnti-patterns — never do these.\n- Don't ask procedural confirmations (\"Should I start searching?\").\n- Don't ask about hypothetical edge cases not implied by the intent.\n- Don't re-ask for facts already visible in the user profile.\n- Don't ask vague introspective questions (\"What do you really want?\").\n\nOutput. Return at most 2 entries in the \"questions\" array. Each entry must include a \"strategy\" field (one of the two values above). If the intent is already specific enough, return \"questions\": [].`;\n\n/**\n * Build the user message for the intent preset from an IntentContext.\n * @param ctx - The intent context.\n * @returns The assembled user message string.\n */\nfunction buildIntentPrompt(ctx: IntentContext): string {\n const profileLines: string[] = [];\n if (ctx.userProfile.name) profileLines.push(`Name: ${ctx.userProfile.name}`);\n if (ctx.userProfile.bio) profileLines.push(`Bio: ${ctx.userProfile.bio}`);\n if (ctx.userProfile.skills && ctx.userProfile.skills.length > 0) {\n profileLines.push(`Skills: ${ctx.userProfile.skills.join(\", \")}`);\n }\n if (ctx.userProfile.interests && ctx.userProfile.interests.length > 0) {\n profileLines.push(`Interests: ${ctx.userProfile.interests.join(\", \")}`);\n }\n const profileBlock = profileLines.length > 0 ? profileLines.join(\"\\n\") : \"(no profile data)\";\n\n const summaryBlock = ctx.summary ? ctx.summary : \"(no summary available)\";\n\n return [\n \"## Intent\",\n ctx.payload,\n \"\",\n \"## Summary\",\n summaryBlock,\n \"\",\n \"## User profile\",\n profileBlock,\n \"\",\n \"## Your task\",\n \"Identify the minimum set of questions the user must answer to sharpen this intent.\",\n \"Apply every rule from your system prompt before outputting.\",\n \"Return an empty `questions` array if the intent is already specific enough.\",\n ].join(\"\\n\");\n}\n\n// ─── Profile preset ─────────────────────────────────────────────────────────\n\nconst PROFILE_SYSTEM_PROMPT = `You sit between a human and a discovery protocol. The user has a profile that is incomplete. Your job: surface the minimum set of structured questions that fill the identified gaps — asking about location, skills, interests, current work, or goals — so the protocol can run better discovery on their behalf.\n\nThe user may already have premises — atomic self-descriptions they have stated. These cover specific profile domains. Do not ask about domains already addressed by existing premises. Focus only on gaps not covered by any premise.\n\nYou may pick from two strategies. Choose contextually; mix only when each question is genuinely distinct.\n- surface_missing_detail: ask for one concrete missing piece of profile data (location, current role, skills, interests, goals, availability, …).\n- refine_intent: ask the user to clarify or sharpen an existing profile signal so candidates can be ranked more accurately.\n\nAsk a question only when ALL of these hold:\n1. The answer is not already visible in the profile data shown.\n2. The answer is not already covered by an existing premise listed below the profile.\n3. The answer would meaningfully change which opportunities surface for this user.\n4. The question targets a different profile domain from any other question in this batch.\n\nCardinality. Default one question. Add a second only when a DIFFERENT strategy genuinely complements the first and unblocks a clearly distinct decision. Never ask two questions of the same strategy unless their decision domains differ.\n\nOption construction. Each option must represent a meaningfully different outcome. Suffix the safest or most common path with \" (Recommended)\" and list it first. The description states the CONSEQUENCE of choosing the option, not its definition. 2–4 options. Never add an \"Other\" option — clients provide a free-text fallback automatically.\n\nTitle rules. ≤12 chars. Noun of the profile domain. Examples: \"Location\", \"Role\", \"Skills\", \"Goals\", \"Interests\", \"Availability\", \"Stage\".\n\nAnti-patterns — never do these.\n- Don't ask about fields already filled in the profile.\n- Don't ask about information already captured in an existing premise.\n- Don't ask procedural confirmations (\"Should I update your profile?\").\n- Don't ask vague introspective questions (\"Who are you really?\").\n- Don't re-ask for facts visible anywhere in the profile data or premises shown.\n\nOutput. Return at most 2 entries in the \"questions\" array. Each entry must include a \"strategy\" field (one of the two values above). If the profile is already complete enough for discovery, return \"questions\": [].`;\n\n/**\n * Build the user message for the profile preset from a ProfileContext.\n * @param ctx - The profile context including current profile data and identified gaps.\n * @returns The assembled user message string.\n */\nfunction buildProfilePrompt(ctx: ProfileContext): string {\n const profileLines: string[] = [];\n if (ctx.userProfile.name) profileLines.push(`Name: ${ctx.userProfile.name}`);\n if (ctx.userProfile.bio) profileLines.push(`Bio: ${ctx.userProfile.bio}`);\n if (ctx.userProfile.location) profileLines.push(`Location: ${ctx.userProfile.location}`);\n if (ctx.userProfile.skills && ctx.userProfile.skills.length > 0) {\n profileLines.push(`Skills: ${ctx.userProfile.skills.join(\", \")}`);\n }\n if (ctx.userProfile.interests && ctx.userProfile.interests.length > 0) {\n profileLines.push(`Interests: ${ctx.userProfile.interests.join(\", \")}`);\n }\n const profileBlock = profileLines.length > 0 ? profileLines.join(\"\\n\") : \"(no profile data)\";\n\n const premisesBlock =\n ctx.existingPremises && ctx.existingPremises.length > 0\n ? ctx.existingPremises.map((p, i) => `${i + 1}. ${p}`).join(\"\\n\")\n : \"(none)\";\n\n const gapsBlock = ctx.gaps.length > 0 ? ctx.gaps.join(\", \") : \"(none identified)\";\n\n const parts: string[] = [\n \"## Current profile\",\n profileBlock,\n \"\",\n \"## Existing premises\",\n premisesBlock,\n \"\",\n \"## Identified gaps\",\n gapsBlock,\n \"\",\n ];\n\n parts.push(\n \"## Your task\",\n \"Generate the minimum set of questions needed to fill the identified gaps.\",\n \"Apply every rule from your system prompt before outputting.\",\n \"Return an empty `questions` array if the profile is already complete enough.\",\n );\n\n return parts.join(\"\\n\");\n}\n\n// ─── Negotiation preset ──────────────────────────────────────────────────────\n\nconst NEGOTIATION_SYSTEM_PROMPT = `You sit between a human and a discovery protocol. A negotiation between this user and a counterparty has ended without a clear outcome — either the turn budget was exhausted, the session timed out, or conversation stalled. Your job: surface the minimum set of structured questions that help the user provide the missing signal needed to unblock or refine the next discovery attempt on their behalf.\n\nYou may pick from three strategies. Choose contextually; mix only when each question is genuinely distinct.\n- refine_intent: help the user sharpen their underlying signal based on what the negotiation revealed (scope, scale, priority, direction).\n- surface_missing_detail: ask for one concrete piece of information that was absent and would have moved the negotiation forward (timeline, budget, format, constraints, decision criteria, …).\n- reflective_summary: mirror the key takeaway from the negotiation and ask the user to confirm, correct, or decide — useful when the conversation revealed partial signal worth locking in.\n\nAsk a question only when ALL of these hold:\n1. The answer is not already visible in the negotiation context or user profile shown.\n2. The answer would materially change how the next attempt surfaces or engages candidates.\n3. The question targets a different decision domain from any other question in this batch.\n\nCardinality. Default one question. Add a second only when a DIFFERENT strategy genuinely complements the first and unblocks a clearly distinct decision. Never ask two questions of the same strategy unless their decision domains differ.\n\nOption construction. Each option must represent a meaningfully different outcome. Suffix the safest or most common path with \" (Recommended)\" and list it first. The description states the CONSEQUENCE of choosing the option, not its definition. 2–4 options. Never add an \"Other\" option — clients provide a free-text fallback automatically.\n\nTitle rules. ≤12 chars. Noun of the decision domain. Examples: \"Scope\", \"Timeline\", \"Budget\", \"Priority\", \"Format\", \"Stance\", \"Criteria\".\n\nAnti-patterns — never do these.\n- Don't ask procedural confirmations (\"Should I try again?\").\n- Don't re-ask for facts already visible in the user profile.\n- Don't ask vague introspective questions (\"What do you really want?\").\n- Don't ask about hypothetical edge cases not implied by the negotiation context.\n\nOutput. Return at most 2 entries in the \"questions\" array. Each entry must include a \"strategy\" field (one of the three values above). If the context already contains enough signal to proceed, return \"questions\": [].`;\n\n/**\n * Build the user message for the negotiation preset from a NegotiationContext.\n * @param ctx - The negotiation context including counterparty hint, stall reason, and key takeaway.\n * @returns The assembled user message string.\n */\nfunction buildNegotiationPrompt(ctx: NegotiationContext): string {\n const profileLines: string[] = [];\n if (ctx.userProfile.name) profileLines.push(`Name: ${ctx.userProfile.name}`);\n if (ctx.userProfile.bio) profileLines.push(`Bio: ${ctx.userProfile.bio}`);\n if (ctx.userProfile.skills && ctx.userProfile.skills.length > 0) {\n profileLines.push(`Skills: ${ctx.userProfile.skills.join(\", \")}`);\n }\n if (ctx.userProfile.interests && ctx.userProfile.interests.length > 0) {\n profileLines.push(`Interests: ${ctx.userProfile.interests.join(\", \")}`);\n }\n const profileBlock = profileLines.length > 0 ? profileLines.join(\"\\n\") : \"(no profile data)\";\n\n return [\n \"## Negotiation context\",\n `Community: ${ctx.indexContext}`,\n `Counterparty: ${ctx.counterpartyHint}`,\n `Stall reason: ${ctx.outcomeReason}`,\n \"\",\n \"## Key takeaway\",\n ctx.keyTake,\n \"\",\n \"## User profile\",\n profileBlock,\n \"\",\n \"## Your task\",\n \"Identify the minimum set of questions the user must answer to unblock the next discovery attempt.\",\n \"Apply every rule from your system prompt before outputting.\",\n \"Return an empty `questions` array if the context already contains enough signal to proceed.\",\n ].join(\"\\n\");\n}\n\nconst presets: Record<QuestionMode, QuestionerPreset> = {\n discovery: {\n systemPrompt: DISCOVERY_SYSTEM_PROMPT,\n buildPrompt: (context: unknown) =>\n buildDiscoveryPrompt(context as Parameters<typeof buildDiscoveryPrompt>[0]),\n },\n intent: {\n systemPrompt: INTENT_SYSTEM_PROMPT,\n buildPrompt: (context: unknown) => buildIntentPrompt(context as IntentContext),\n },\n profile: {\n systemPrompt: PROFILE_SYSTEM_PROMPT,\n buildPrompt: (context: unknown) => buildProfilePrompt(context as ProfileContext),\n },\n negotiation: {\n systemPrompt: NEGOTIATION_SYSTEM_PROMPT,\n buildPrompt: (context: unknown) => buildNegotiationPrompt(context as NegotiationContext),\n },\n};\n\n/**\n * Retrieve the preset for the given mode.\n * @param mode - The question mode to look up.\n * @returns The matching preset with systemPrompt and buildPrompt.\n * @throws Error if the mode's preset is not yet implemented.\n */\nexport function getPreset(mode: QuestionMode): QuestionerPreset {\n const preset = presets[mode];\n if (!preset) {\n throw new Error(`QuestionerAgent preset \"${mode}\" is not implemented yet`);\n }\n return preset;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questioner.types.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"questioner.types.d.ts","sourceRoot":"/","sources":["questioner/questioner.types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAIzE;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,sBAAsB,CAAC;AAEtD,0EAA0E;AAC1E,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACvF;AAED,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC7B,WAAW,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACzG,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,oFAAoF;IACpF,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,uEAAuE;AACvE,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CACvF;AAED,2DAA2D;AAC3D,MAAM,MAAM,iBAAiB,GACzB,gBAAgB,GAChB,aAAa,GACb,cAAc,GACd,kBAAkB,CAAC;AAEvB;;;;GAIG;AACH,MAAM,MAAM,wBAAwB,GAAG,eAAe,CAAC;AAEvD,gEAAgE;AAChE,MAAM,MAAM,mBAAmB,GAAG,CAAC,KAAK,EAAE,wBAAwB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;AAErF,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC9B,oDAAoD;IACpD,IAAI,EAAE,YAAY,CAAC;IACnB,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,UAAU,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,OAAO,EAAE,iBAAiB,CAAC;IAC3B,oIAAoI;IACpI,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,wIAAwI;IACxI,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"questioner.types.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"questioner.types.js","sourceRoot":"/","sources":["questioner/questioner.types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * QuestionerAgent input types. The `QuestionerInput` envelope carries a `mode`\n * field that selects a preset, plus a polymorphic `context` that varies per mode.\n *\n * Slice 1 defines all four context shapes but only `DiscoveryContext` has a\n * working preset implementation. The others are type stubs for future slices.\n */\nimport type { DiscoveryQuestionInput } from \"../opportunity/question.prompt.js\";\nimport type { QuestionMode } from \"../shared/schemas/question.schema.js\";\n\n// ─── Per-mode context types ─────────────────────────────────────────────────\n\n/**\n * Discovery context — wraps the existing DiscoveryQuestionInput wholesale.\n * The discovery preset's buildPrompt delegates to the migrated builder.\n */\nexport type DiscoveryContext = DiscoveryQuestionInput;\n\n/** Intent context — data needed to generate questions about an intent. */\nexport interface IntentContext {\n intentId: string;\n payload: string;\n summary?: string;\n userProfile: { name?: string; bio?: string; skills?: string[]; interests?: string[] };\n}\n\n/** Profile context — data needed to generate questions to fill profile gaps. */\nexport interface ProfileContext {\n userProfile: { name?: string; bio?: string; location?: string; skills?: string[]; interests?: string[] };\n gaps: string[];\n /** Existing premise texts the user has already stated (e.g. \"I live in Berlin\"). */\n existingPremises?: string[];\n}\n\n/** Negotiation context — data from a stalled or capped negotiation. */\nexport interface NegotiationContext {\n negotiationId: string;\n counterpartyHint: string;\n indexContext: string;\n outcomeReason: \"turn_cap\" | \"timeout\" | \"stalled\";\n keyTake: string;\n userProfile: { name?: string; bio?: string; skills?: string[]; interests?: string[] };\n}\n\n/** Discriminated union: mode selects the context shape. */\nexport type QuestionerContext =\n | DiscoveryContext\n | IntentContext\n | ProfileContext\n | NegotiationContext;\n\n/**\n * Payload shape accepted by the questionerEnqueue callback. Covers all\n * question modes — the composition root bridges this to the concrete\n * QuestionerQueue.\n */\nexport type QuestionerEnqueuePayload = QuestionerInput;\n\n/** Callback signature for async question generation enqueue. */\nexport type QuestionerEnqueueFn = (input: QuestionerEnqueuePayload) => Promise<void>;\n\n/** Top-level input envelope for QuestionerAgent.invoke(). */\nexport interface QuestionerInput {\n /** Selects the preset (system prompt + builder). */\n mode: QuestionMode;\n /** User the questions are generated for. */\n userId: string;\n /** Entity type that triggered this (e.g. \"opportunity\", \"intent\", \"profile\"). */\n sourceType: string;\n /** ID of the triggering entity. */\n sourceId: string;\n /** Mode-specific context. Must align with the selected mode. */\n context: QuestionerContext;\n /** Conversation ID — set when the question originates from a chat session. Persisted on the question row for frontend filtering. */\n conversationId?: string;\n /** Assistant message ID — set when we know which message triggered the question. Stored in detection.messageId for inline anchoring. */\n messageId?: string;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-signal.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"model-signal.d.ts","sourceRoot":"/","sources":["shared/agent/model-signal.ts"],"names":[],"mappings":"AAyBA;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG;IAAE,MAAM,EAAE,WAAW,CAAA;CAAE,GAAG,SAAS,CAK9F;AAED,sFAAsF;AACtF,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,OAAO,EACzD,QAAQ,EAAE;IAAE,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,WAAW,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;CAAE,EACxF,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,OAAO,CAAC,CAGlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-signal.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"model-signal.js","sourceRoot":"/","sources":["shared/agent/model-signal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE;;;GAGG;AACH,SAAS,mBAAmB,CAAC,OAAsB;IACjD,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;IAC5C,IAAI,OAAO,WAAW,CAAC,GAAG,KAAK,UAAU,EAAE,CAAC;QAC1C,OAAO,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,MAAM,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACzC,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAChC,MAAM;QACR,CAAC;QACD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;YACpC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,OAAO;gBAAE,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAClE,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,UAAU,CAAC,MAAM,CAAC;AAC3B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,MAAoB;IACvD,MAAM,OAAO,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,EAAE,EAAE,WAAW,CAAC,CAAC,MAAM,CACrE,CAAC,IAAI,EAAuB,EAAE,CAAC,IAAI,YAAY,WAAW,CAC3D,CAAC;IACF,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACnF,CAAC;AAED,sFAAsF;AACtF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,QAAwF,EACxF,KAAa,EACb,MAAoB;IAEpB,MAAM,MAAM,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;IAC5C,OAAO,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC","sourcesContent":["import { requestContext } from \"../observability/request-context.js\";\n\n/**\n * Combines an explicit per-call AbortSignal with the current request signal.\n * Either signal aborting should cancel the downstream LangChain/OpenAI call.\n */\nfunction combineAbortSignals(signals: AbortSignal[]): AbortSignal {\n if (signals.length === 1) return signals[0];\n if (typeof AbortSignal.any === \"function\") {\n return AbortSignal.any(signals);\n }\n\n const controller = new AbortController();\n for (const signal of signals) {\n if (signal.aborted) {\n controller.abort(signal.reason);\n break;\n }\n signal.addEventListener(\"abort\", () => {\n if (!controller.signal.aborted) controller.abort(signal.reason);\n }, { once: true });\n }\n return controller.signal;\n}\n\n/**\n * Returns a LangChain RunnableConfig carrying the active AbortSignal(s),\n * when tool/runtime execution installed one in AsyncLocalStorage or a caller\n * supplied an explicit signal.\n */\nexport function getAbortSignalConfig(signal?: AbortSignal): { signal: AbortSignal } | undefined {\n const signals = [signal, requestContext.getStore()?.abortSignal].filter(\n (item): item is AbortSignal => item instanceof AbortSignal,\n );\n return signals.length > 0 ? { signal: combineAbortSignals(signals) } : undefined;\n}\n\n/** Invokes a LangChain runnable with the current request AbortSignal when present. */\nexport async function invokeWithAbortSignal<TInput, TOutput>(\n runnable: { invoke(input: TInput, config?: { signal?: AbortSignal }): Promise<TOutput> },\n input: TInput,\n signal?: AbortSignal,\n): Promise<TOutput> {\n const config = getAbortSignalConfig(signal);\n return config ? runnable.invoke(input, config) : runnable.invoke(input);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.config.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"model.config.d.ts","sourceRoot":"/","sources":["shared/agent/model.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CAC7F;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,mBAAmB,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;CACvE;AAKD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,IAAI,CAE3D;AAED,iBAAS,cAAc,CAAC,MAAM,CAAC,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BA+BkD,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;;;;EAK9I;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,UAAU,CAAC,OAAO,cAAc,CAAC,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,MAAM,CAEzG;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,UAAU,CAAC,OAAO,cAAc,CAAC,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,UAAU,CAgC5G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.config.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"model.config.js","sourceRoot":"/","sources":["shared/agent/model.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA0B/C,sFAAsF;AACtF,IAAI,aAAa,GAAgB,EAAE,CAAC;AAEpC;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CAAC,SAAS;QACxB,OAAO;QACP,UAAU;QACV,GAAG,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,WAAW,EAAE,EAAE,SAAS,EAAE,GAAG,CAAC,SAAS,EAAE,EAAE,CAAC;KACpE,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { ChatOpenAI } from \"@langchain/openai\";\n\n/** Settings that can be configured per agent. */\nexport interface ModelSettings {\n model: string;\n temperature?: number;\n maxTokens?: number;\n reasoning?: { effort?: 'minimal' | 'low' | 'medium' | 'high' | 'xhigh'; exclude?: boolean };\n}\n\n/**\n * Runtime configuration for the protocol package.\n * Set once via configureProtocol() at application startup.\n * All fields fall back to environment variables if not provided.\n */\nexport interface ModelConfig {\n /** OpenRouter API key. Falls back to OPENROUTER_API_KEY env var. */\n apiKey?: string;\n /** OpenRouter base URL. Falls back to OPENROUTER_BASE_URL env var. */\n baseURL?: string;\n /** Override the chat agent model. Falls back to CHAT_MODEL env var. */\n chatModel?: string;\n /** Override the chat reasoning effort. Falls back to CHAT_REASONING_EFFORT env var. */\n chatReasoningEffort?: 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';\n}\n\n/** Module-level config set by configureProtocol(). Merged with per-call overrides. */\nlet _activeConfig: ModelConfig = {};\n\n/**\n * Configure the protocol package with runtime credentials and settings.\n * Call once at application startup before any agents are used.\n * Falls back to environment variables for any field not provided.\n *\n * @param config - Runtime configuration overrides\n */\nexport function configureProtocol(config: ModelConfig): void {\n _activeConfig = config;\n}\n\nfunction getModelConfig(config?: ModelConfig) {\n const merged: ModelConfig = { ..._activeConfig, ...config };\n return {\n intentInferrer: { model: \"google/gemini-2.5-flash\" },\n intentIndexer: { model: \"google/gemini-2.5-flash\" },\n intentVerifier: { model: \"google/gemini-2.5-flash\" },\n intentReconciler: { model: \"google/gemini-2.5-flash\" },\n intentClarifier: { model: \"google/gemini-2.5-flash\" },\n profileGenerator: { model: \"google/gemini-2.5-flash\" },\n hydeGenerator: { model: \"google/gemini-2.5-flash\" },\n lensInferrer: { model: \"google/gemini-2.5-flash\" },\n opportunityEvaluator: { model: \"google/gemini-2.5-flash\" },\n opportunityPresenter: { model: \"google/gemini-2.5-flash\" },\n negotiator: { model: \"google/gemini-2.5-flash\" },\n homeCategorizer: { model: \"google/gemini-2.5-flash\" },\n suggestionGenerator: { model: \"google/gemini-2.5-flash\", temperature: 0.4, maxTokens: 512 },\n chatTitleGenerator: { model: \"google/gemini-2.5-flash\", temperature: 0.3, maxTokens: 32 },\n negotiationInsights: { model: \"google/gemini-2.5-flash\", temperature: 0.4, maxTokens: 512 },\n chatContextSummarizer: { model: \"google/gemini-2.5-flash\", temperature: 0.2, maxTokens: 512 },\n discoveryQuestionGenerator: { model: \"google/gemini-2.5-flash\", temperature: 0.5, maxTokens: 1024 },\n questioner: { model: \"google/gemini-2.5-flash\", temperature: 0.5, maxTokens: 1024 },\n negotiationSummarizer: { model: \"google/gemini-2.5-flash\", temperature: 0.2, maxTokens: 256 },\n inviteGenerator: { model: \"google/gemini-2.5-flash\", temperature: 0.3, maxTokens: 512 },\n premiseAnalyzer: { model: \"google/gemini-2.5-flash\" },\n premiseDecomposer: { model: \"google/gemini-2.5-flash\" },\n premiseIndexer: { model: \"google/gemini-2.5-flash\" },\n userContextGenerator: { model: \"google/gemini-2.5-flash\", temperature: 0.3, maxTokens: 512 },\n chat: {\n model: merged.chatModel ?? process.env.CHAT_MODEL ?? \"google/gemini-3-pro-preview\",\n maxTokens: 8192,\n reasoning: {\n effort: (merged.chatReasoningEffort ?? process.env.CHAT_REASONING_EFFORT ?? \"low\") as NonNullable<ModelSettings[\"reasoning\"]>[\"effort\"],\n exclude: true,\n },\n },\n } as const;\n}\n\n/**\n * Returns the model name string for the given agent key.\n * @param agent - Key from MODEL_CONFIG identifying which agent's settings to use.\n * @param config - Optional runtime config overrides (merged with module-level config).\n */\nexport function getModelName(agent: keyof ReturnType<typeof getModelConfig>, config?: ModelConfig): string {\n return getModelConfig(config)[agent].model;\n}\n\n/**\n * Creates a ChatOpenAI instance configured for OpenRouter.\n * @param agent - Key identifying which agent's model settings to use.\n * @param config - Optional runtime config overrides (merged with module-level config).\n */\nexport function createModel(agent: keyof ReturnType<typeof getModelConfig>, config?: ModelConfig): ChatOpenAI {\n const merged: ModelConfig = { ..._activeConfig, ...config };\n const apiKey = merged.apiKey ?? process.env.OPENROUTER_API_KEY;\n if (!apiKey?.trim()) {\n throw new Error(`createModel(${agent}): OPENROUTER_API_KEY is required. Pass via configureProtocol({ apiKey }) or set the OPENROUTER_API_KEY environment variable.`);\n }\n const cfg = getModelConfig(merged)[agent] as ModelSettings;\n // Hard upper bound on a single LLM call. Without this, langchain's HTTP\n // client waits until the upstream cuts the socket (~3 minutes via\n // OpenRouter), blocking the entire chat response. 60 s is generous enough\n // for slow providers but bounds the worst case.\n const timeoutEnv = Number.parseInt(process.env.OPENROUTER_REQUEST_TIMEOUT_MS ?? \"\", 10);\n const timeout = Number.isFinite(timeoutEnv) && timeoutEnv > 0 ? timeoutEnv : 60_000;\n // ChatOpenAI defaults to maxRetries=2. That means a single hung upstream\n // provider gets retried up to 2 more times, each waiting `timeout` before\n // failing — so worst-case latency becomes timeout * 3. Cap retries at 1\n // so the worst case stays bounded at ~2 * timeout. Configurable via\n // OPENROUTER_MAX_RETRIES.\n const retriesEnv = Number.parseInt(process.env.OPENROUTER_MAX_RETRIES ?? \"\", 10);\n const maxRetries = Number.isFinite(retriesEnv) && retriesEnv >= 0 ? retriesEnv : 1;\n return new ChatOpenAI({\n model: cfg.model,\n configuration: {\n baseURL: merged.baseURL ?? process.env.OPENROUTER_BASE_URL ?? \"https://openrouter.ai/api/v1\",\n apiKey,\n },\n temperature: cfg.temperature,\n maxTokens: cfg.maxTokens,\n timeout,\n maxRetries,\n ...(cfg.reasoning && { modelKwargs: { reasoning: cfg.reasoning } }),\n });\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.streamer.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"response.streamer.d.ts","sourceRoot":"/","sources":["shared/agent/response.streamer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAa1E;;;;;;;;;;;;;GAaG;AACH,qBAAa,gBAAgB;IAC3B;;;;;OAKG;IACH,kBAAkB,CAChB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE;QAAE,IAAI,CAAC,EAAE;YAAE,MAAM,CAAC,EAAE;gBAAE,YAAY,CAAC,EAAE,MAAM,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,CAAA;aAAE,CAAA;SAAE,CAAA;KAAE,GACvE;QAAE,MAAM,EAAE,eAAe,EAAE,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE;CA4B1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"response.streamer.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"response.streamer.js","sourceRoot":"/","sources":["shared/agent/response.streamer.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAErE,MAAM,MAAM,GAAG,cAAc,CAAC,kBAAkB,CAAC,CAAC;AAElD,iFAAiF;AACjF,oBAAoB;AACpB,iFAAiF;AAEjF;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,gBAAgB;IAC3B;;;;;OAKG;IACH,kBAAkB,CAChB,SAAiB,EACjB,KAAwE;QAExE,MAAM,MAAM,GAAG,KAAK,CAAC,IAAI,EAAE,MAAM,CAAC;QAClC,MAAM,YAAY,GAAG,OAAO,MAAM,EAAE,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;QACzF,MAAM,UAAU,GAAG,OAAO,MAAM,EAAE,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;QAEhF,MAAM,CAAC,KAAK,CAAC,mBAAmB,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC,CAAC;QAExE,MAAM,MAAM,GAAsB,EAAE,CAAC;QAErC,IAAI,UAAU,EAAE,CAAC;YACf,MAAM,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;YACzD,MAAM,CAAC,IAAI,CACT,gBAAgB,CACd,SAAS,EACT,UAAU,KAAK,qCAAqC;gBAClD,CAAC,CAAC,6DAA6D;gBAC/D,CAAC,CAAC,UAAU,EACd,aAAa,CACd,CACF,CAAC;QACJ,CAAC;QAED,IAAI,YAAY,EAAE,CAAC;YACjB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;QACzD,CAAC;QAED,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC,CAAC,UAAU,EAAE,CAAC;IAC1D,CAAC;CACF","sourcesContent":["import type { ChatStreamEvent } from \"../../chat/chat-streaming.types.js\";\nimport {\n createTokenEvent,\n createErrorEvent,\n} from \"../../chat/chat-streaming.types.js\";\nimport { protocolLogger } from \"../observability/protocol.logger.js\";\n\nconst logger = protocolLogger(\"ResponseStreamer\");\n\n// ══════════════════════════════════════════════════════════════════════════════\n// RESPONSE STREAMER\n// ══════════════════════════════════════════════════════════════════════════════\n\n/**\n * Streams the final response from the chat agent.\n *\n * Processes the `on_chain_end` event emitted by the `agent_loop` node and\n * yields either a token event (with the full response text) or an error event.\n *\n * Note on token streaming:\n * We do NOT emit from `on_chat_model_stream` because `streamEvents` yields\n * events from ALL model invocations, including nested ones\n * (ExplicitIntentInferrer, SemanticVerifier, IntentReconciler, IntentIndexer)\n * inside tools. Those emit structured JSON that must not reach the user. The\n * chat agent uses `model.invoke()` so we don't get token-by-token streaming\n * anyway. We only emit the clean final response from `on_chain_end`.\n */\nexport class ResponseStreamer {\n /**\n * Processes an `on_chain_end` event whose name is `agent_loop`.\n *\n * @returns An array of stream events to yield (token and/or error), plus\n * metadata for the caller to log.\n */\n handleAgentLoopEnd(\n sessionId: string,\n event: { data?: { output?: { responseText?: string; error?: string } } }\n ): { events: ChatStreamEvent[]; responseText: string; hadError: boolean } {\n const output = event.data?.output;\n const responseText = typeof output?.responseText === \"string\" ? output.responseText : \"\";\n const agentError = typeof output?.error === \"string\" ? output.error : undefined;\n\n logger.debug(\"Agent loop output\", { output, responseText, agentError });\n\n const events: ChatStreamEvent[] = [];\n\n if (agentError) {\n logger.warn(\"Agent loop returned error\", { agentError });\n events.push(\n createErrorEvent(\n sessionId,\n agentError === \"JSON error injected into SSE stream\"\n ? \"The response could not be sent correctly. Please try again.\"\n : agentError,\n \"AGENT_ERROR\"\n )\n );\n }\n\n if (responseText) {\n events.push(createTokenEvent(sessionId, responseText));\n }\n\n return { events, responseText, hadError: !!agentError };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-assert.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"llm-assert.d.ts","sourceRoot":"/","sources":["shared/agent/tests/llm-assert.ts"],"names":[],"mappings":"AAeA;;;;;;;;GAQG;AACH,wBAAsB,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBhF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm-assert.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"llm-assert.js","sourceRoot":"/","sources":["shared/agent/tests/llm-assert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B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chain/openai\";\nimport { HumanMessage, SystemMessage } from \"@langchain/core/messages\";\nimport { z } from \"zod\";\n\nconst JUDGE_SYSTEM_PROMPT = `You are a test oracle for an AI system. Given the output of a system under test and evaluation criteria, determine whether the output passes or fails.\n\nReturn JSON with two fields:\n- pass: true if the output satisfies the criteria, false otherwise\n- reasoning: concise explanation of your judgment (1-3 sentences)`;\n\nconst judgeOutputSchema = z.object({\n pass: z.boolean(),\n reasoning: z.string(),\n});\n\n/**\n * Assert that `output` satisfies the given `criteria` according to an LLM judge.\n * Throws an error (with reasoning embedded) if the assertion fails.\n * Uses the SMARTEST_VERIFIER_MODEL env var (default: google/gemini-2.5-flash).\n *\n * @param output - The value produced by the system under test.\n * @param criteria - Natural language description of what the output must satisfy.\n * @throws {Error} If the LLM judge determines the output does not meet the criteria.\n */\nexport async function assertLLM(output: unknown, criteria: string): Promise<void> {\n const modelId = process.env.SMARTEST_VERIFIER_MODEL ?? \"google/gemini-2.5-flash\";\n\n const model = new ChatOpenAI({\n model: modelId,\n apiKey: process.env.OPENROUTER_API_KEY!,\n configuration: {\n baseURL: process.env.OPENROUTER_BASE_URL ?? \"https://openrouter.ai/api/v1\",\n },\n temperature: 0,\n maxTokens: 512,\n });\n\n const structured = model.withStructuredOutput(judgeOutputSchema, { name: \"llm_judge\" });\n\n const userMessage = `Output:\\n${JSON.stringify(output, null, 2)}\\n\\nCriteria:\\n${criteria}`;\n\n const result = await structured.invoke([\n new SystemMessage(JUDGE_SYSTEM_PROMPT),\n new HumanMessage(userMessage),\n ]);\n\n if (!result.pass) {\n throw new Error(`LLM assertion failed: ${result.reasoning}`);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool.factory.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"tool.factory.d.ts","sourceRoot":"/","sources":["shared/agent/tool.factory.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,mBAAmB,EAGzB,MAAM,mBAAmB,CAAC;AAe3B,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACxF,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAQlD;;;;;;;GAOG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,WAAW,EACjB,kBAAkB,CAAC,EAAE,mBAAmB,kBAyMzC;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC"}
|