@apotech-os/support-kit 6.3.0 → 7.0.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/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { ObjectDef, SettingsField, FunctionDef, AppSettings, PromptDef, PageDef, NavItem, SettingsPage, AppHandler, AppRole } from '@apotech-os/app-kit';
1
+ import { ObjectDef, SettingsField, FunctionDef, AppSettings, PromptDef, PageDef, NavItem, SettingsPage, ServerVariable, AppHandler, AppRole } from '@apotech-os/app-kit';
2
2
 
3
3
  /**
4
4
  * The channels a `ConversationPort`/`ReplyPort` pair can adapt today or in
@@ -779,6 +779,31 @@ interface Verdict {
779
779
  observationId?: string | null;
780
780
  }
781
781
 
782
+ /**
783
+ * `origin` — which pass of the pipeline produced a `triage-decision` /
784
+ * `generated-response` row (spec-gorgias-followup-webhook-v1 §7.2).
785
+ *
786
+ * `'triage'` is the cron's first pass over a ticket; `'followup'` is a reply
787
+ * drafted for a SUBSEQUENT customer message, opened by the Gorgias webhook.
788
+ * The distinction is load-bearing, not decorative: §7.3 picks WHICH
789
+ * auto-reply flag of the category governs the send from it.
790
+ *
791
+ * Stored as TEXT with a `'triage'` default rather than a SELECT (§7.2), so
792
+ * the vocabulary lives here, in code, and every pre-existing row reads as a
793
+ * first pass with no data migration. `toDecisionOrigin` is the boundary that
794
+ * makes that safe: JSONB the platform hands back can carry anything, and a
795
+ * value outside the vocabulary must degrade to `'triage'` — the pass that
796
+ * grants the FEWER rights — never to `'followup'`.
797
+ */
798
+ declare const DECISION_ORIGINS: readonly ["triage", "followup"];
799
+ type DecisionOrigin = (typeof DECISION_ORIGINS)[number];
800
+ declare const DEFAULT_DECISION_ORIGIN: DecisionOrigin;
801
+ /** The `description` both record definitions carry — one sentence, one place. */
802
+ declare const ORIGIN_DESCRIPTION = "Which pass wrote this row: 'triage' (the cron's first pass) or 'followup' (a reply to a subsequent customer message, spec-gorgias-followup-webhook-v1 \u00A77.2).";
803
+ declare function isDecisionOrigin(value: unknown): value is DecisionOrigin;
804
+ /** Reads an untrusted stored value, falling back to the least-privileged origin. */
805
+ declare function toDecisionOrigin(value: unknown): DecisionOrigin;
806
+
782
807
  /**
783
808
  * Run budget: bounds a run in TOOL CALLS and TIME only, never in money —
784
809
  * cost is measured (`charge`, I15) and watched separately, not capped here.
@@ -1312,6 +1337,16 @@ declare function verifyReply(input: VerifyReplyInput): VerifyReplyResult;
1312
1337
  * the customer's message — never to a crash.
1313
1338
  */
1314
1339
  declare const ATTACHMENT_MARKER_ONLY: RegExp;
1340
+ /**
1341
+ * Exported (spec-gorgias-followup-webhook-v1 §6): the follow-up webhook's G8
1342
+ * asks the same question of the LAST extracted turn — "is this the customer,
1343
+ * and did they actually say something?" — and must ask it with this exact
1344
+ * rule, not a second copy that could drift on the attachment marker.
1345
+ */
1346
+ declare function isCustomerTurnWithWords(message: {
1347
+ role: string;
1348
+ content: string;
1349
+ }): boolean;
1315
1350
  /**
1316
1351
  * First customer turn in a conversation, or `null` when there is none. The
1317
1352
  * blocklist input, and the `subject`/first-message pair `isJudgemeConversation`
@@ -1889,12 +1924,15 @@ declare function validateSettings(settings: Record<string, unknown>): SettingsVa
1889
1924
  * - `responseTtlMinutes` → `schedule.fastResponseTtlMinutes`, `batchLimit`
1890
1925
  * → `schedule.triageBatchLimit`.
1891
1926
  *
1892
- * Two settings have no profile counterpart on purpose:
1927
+ * Three settings have no profile counterpart on purpose:
1893
1928
  * `dryRun` (read by the HANDLERS — `functions/triage-tick.ts` and
1894
1929
  * `functions/process-response.ts` swap the `reply`/`state` ports for the
1895
1930
  * recorders of `adapters/recording-ports.ts` and force `send: {mode:
1896
- * 'none'}` — not by the graph, which must run identically either way) and
1897
- * `statsTimezone` (a §3.8 rendering concern). `to-profile.spec.ts` pins that
1931
+ * 'none'}` — not by the graph, which must run identically either way),
1932
+ * `statsTimezone` (a §3.8 rendering concern) and `webhookScopeTag`
1933
+ * (spec-gorgias-followup-webhook-v1 D2 — which tickets of a shared Gorgias
1934
+ * account this app may answer a follow-up on is a routing decision, read by
1935
+ * the webhook's own gates, never by a node). `to-profile.spec.ts` pins that
1898
1936
  * list, so a new settings field cannot be forgotten here.
1899
1937
  *
1900
1938
  * `prompts` is a PARAMETER, not derived here: `prompts.draft` is the agent
@@ -1976,6 +2014,8 @@ interface SupportKitSettings {
1976
2014
  autoRepliedTag: string;
1977
2015
  needsReviewTag: string;
1978
2016
  followupTag: string;
2017
+ /** D2 — the tag scoping which tickets the follow-up webhook may answer. Empty = inert (see `settings/fields.ts`). */
2018
+ webhookScopeTag: string;
1979
2019
  autoSendEnabled: boolean;
1980
2020
  senderEmail: string;
1981
2021
  requireHighTriageConfidence: boolean;
@@ -2104,6 +2144,12 @@ interface SupportPipelineFragments {
2104
2144
  * `manifest.integrations`.
2105
2145
  */
2106
2146
  integrations: IntegrationRef[];
2147
+ /**
2148
+ * spec-gorgias-followup-webhook-v1 D7 — `manifest.serverVariables`. A
2149
+ * consuming app spreads it, or `ctx.variables` never carries the Gorgias
2150
+ * callback key and the webhook cannot be installed.
2151
+ */
2152
+ serverVariables: ServerVariable[];
2107
2153
  /**
2108
2154
  * `'NO_ACCESS'` (H2, T25 review): with no `defaultRole`, the platform
2109
2155
  * grants every platform member `VIEWER` on install
@@ -2131,4 +2177,4 @@ interface SupportPipelineFragments {
2131
2177
  }
2132
2178
  declare function buildSupportPipeline(config: SupportPipelineConfig): SupportPipelineFragments;
2133
2179
 
2134
- export { AGENT_GUARDRAILS, AGENT_STATUSES, AGENT_TOOLS, ATTACHMENT_MARKER_ONLY, type ActionDecision, type AgentProfile, type AgentStatus, type AuditTags, type AutoReplyGuardSettings, type Budget, CANDIDATE_MIN_LENGTH, type CatalogueTool, type CategoryPolicy, type CategoryReferentialEntry, type ChannelKind, type ChatMessage, type Classification, type ClockPort, type CompletionRequest, type CompletionResult, type Conversation, type ConversationPort, type ConversationRef, type CostLedger, type CustomerInfo, DEFAULT_CHANNEL_PROMPT_EMAIL, DEFAULT_CHANNEL_PROMPT_WHATSAPP, DEFAULT_LLM_PROVIDER, DEFAULT_PROFILE_KEY, DEFAULT_WHATSAPP_MODE, type Draft, type DraftAttribution, type DraftNodeConfig, EVALUATION_VERDICTS, type EscalateNodeConfig, type EvaluateNodeConfig, type EvaluationVerdict, GENERATED_RESPONSE_STATUSES, type GeneratedResponseStatus, type GuardrailId, InvalidStatusTransitionError, type JsonSchema, type JudgedReply, type KnowledgeHit, type LlmPort, type Message, MissingPromptError, NODE_NAMES, type Node, type NodeCost, type NodeDeps, type NodeKey, type NodeName, type NodeStep, OUTCOMES, type OrderSummary, type OutboundReply, type Outcome, PROMPT_SLOTS, type PlatformPromptReader, type PortName, type PromptCacheEntry, type PromptCachePort, type PromptDegradedEvent, type PromptNameConfig, type PromptPort, type PromptRef, type PromptReference, type PromptResolverDeps, type PromptSlot, type PromptTableKey, type ProposedAction, REASONING_MAX_LEN, type RawPrompt, type RawPromptConfig, type RawTicket, type ReasoningEffort, type RecordDef, type ReplyPort, type ResolvedPrompt, type ResumeFrom, type ReviseNodeConfig, type RunGuardrailsInput, type RunStamp, type RunTicketOptions, type RunUntil, STOP_PHRASES, SUPPORT_KIT_SETTINGS_FIELDS, type SettingsIssueKey, type SettingsValidationIssue, type SimilarTicket, type SourceDescriptor, type StatePort, type SupportKitNodeSettings, type SupportKitSettings, type SupportPipelineConfig, type SupportPipelineFragments, type TicketRunState, type ToolCallRecord, type ToolCallRequest, type ToolContext, type ToolPolicy, type ToolSpec, type TrackingSummary, type TriageNodeConfig, UNCERTAINTY_MARKERS, type Usage, type Verdict, type VerifyReplyInput, type VerifyReplyResult, WHATSAPP_MODES, WHATSAPP_NOTE_CHEVRON, type WhatsappMode, agentRecord, assertTransition, buildCategoryRecord, buildDiffAnalysisRecord, buildEvaluationRecord, buildGeneratedResponseRecord, buildResponseComparisonRecord, buildSupportKitRecords, buildSupportPipeline, buildTriageDecisionRecord, canTransition, categoryGroupRecord, channelPreGates, createBudget, createPromptResolver, diffAnalysisUniqueKey, firstCustomerMessage, guardrailBucket, hasCustomerAttachment, hasReferences, initialState, isAutoSendEligible, isAutomatedSenderEmail, isAutomatedSenderTicket, isEvaluationVerdict, isGeneratedResponseStatus, isJudgemeConversation, isJudgemeTicket, isOutcome, isSendable, isSendableVerdict, isTerminalStatus, isTicketClosed, isWhatsappChevronNote, isWhatsappTicket, lastCustomerMessage, needsRevision, openTicketKeyFor, parseReferences, pipelineStateRecord, promptCacheRecord, reclaimStalledSend, requiresFollowup, resolvePromptName, runGuardrails, runTicket, settingsToProfile, stopOptOut, targetRefFor, validateSettings, verifyReply, whatsappModeFromLegacyBoolean };
2180
+ export { AGENT_GUARDRAILS, AGENT_STATUSES, AGENT_TOOLS, ATTACHMENT_MARKER_ONLY, type ActionDecision, type AgentProfile, type AgentStatus, type AuditTags, type AutoReplyGuardSettings, type Budget, CANDIDATE_MIN_LENGTH, type CatalogueTool, type CategoryPolicy, type CategoryReferentialEntry, type ChannelKind, type ChatMessage, type Classification, type ClockPort, type CompletionRequest, type CompletionResult, type Conversation, type ConversationPort, type ConversationRef, type CostLedger, type CustomerInfo, DECISION_ORIGINS, DEFAULT_CHANNEL_PROMPT_EMAIL, DEFAULT_CHANNEL_PROMPT_WHATSAPP, DEFAULT_DECISION_ORIGIN, DEFAULT_LLM_PROVIDER, DEFAULT_PROFILE_KEY, DEFAULT_WHATSAPP_MODE, type DecisionOrigin, type Draft, type DraftAttribution, type DraftNodeConfig, EVALUATION_VERDICTS, type EscalateNodeConfig, type EvaluateNodeConfig, type EvaluationVerdict, GENERATED_RESPONSE_STATUSES, type GeneratedResponseStatus, type GuardrailId, InvalidStatusTransitionError, type JsonSchema, type JudgedReply, type KnowledgeHit, type LlmPort, type Message, MissingPromptError, NODE_NAMES, type Node, type NodeCost, type NodeDeps, type NodeKey, type NodeName, type NodeStep, ORIGIN_DESCRIPTION, OUTCOMES, type OrderSummary, type OutboundReply, type Outcome, PROMPT_SLOTS, type PlatformPromptReader, type PortName, type PromptCacheEntry, type PromptCachePort, type PromptDegradedEvent, type PromptNameConfig, type PromptPort, type PromptRef, type PromptReference, type PromptResolverDeps, type PromptSlot, type PromptTableKey, type ProposedAction, REASONING_MAX_LEN, type RawPrompt, type RawPromptConfig, type RawTicket, type ReasoningEffort, type RecordDef, type ReplyPort, type ResolvedPrompt, type ResumeFrom, type ReviseNodeConfig, type RunGuardrailsInput, type RunStamp, type RunTicketOptions, type RunUntil, STOP_PHRASES, SUPPORT_KIT_SETTINGS_FIELDS, type SettingsIssueKey, type SettingsValidationIssue, type SimilarTicket, type SourceDescriptor, type StatePort, type SupportKitNodeSettings, type SupportKitSettings, type SupportPipelineConfig, type SupportPipelineFragments, type TicketRunState, type ToolCallRecord, type ToolCallRequest, type ToolContext, type ToolPolicy, type ToolSpec, type TrackingSummary, type TriageNodeConfig, UNCERTAINTY_MARKERS, type Usage, type Verdict, type VerifyReplyInput, type VerifyReplyResult, WHATSAPP_MODES, WHATSAPP_NOTE_CHEVRON, type WhatsappMode, agentRecord, assertTransition, buildCategoryRecord, buildDiffAnalysisRecord, buildEvaluationRecord, buildGeneratedResponseRecord, buildResponseComparisonRecord, buildSupportKitRecords, buildSupportPipeline, buildTriageDecisionRecord, canTransition, categoryGroupRecord, channelPreGates, createBudget, createPromptResolver, diffAnalysisUniqueKey, firstCustomerMessage, guardrailBucket, hasCustomerAttachment, hasReferences, initialState, isAutoSendEligible, isAutomatedSenderEmail, isAutomatedSenderTicket, isCustomerTurnWithWords, isDecisionOrigin, isEvaluationVerdict, isGeneratedResponseStatus, isJudgemeConversation, isJudgemeTicket, isOutcome, isSendable, isSendableVerdict, isTerminalStatus, isTicketClosed, isWhatsappChevronNote, isWhatsappTicket, lastCustomerMessage, needsRevision, openTicketKeyFor, parseReferences, pipelineStateRecord, promptCacheRecord, reclaimStalledSend, requiresFollowup, resolvePromptName, runGuardrails, runTicket, settingsToProfile, stopOptOut, targetRefFor, toDecisionOrigin, validateSettings, verifyReply, whatsappModeFromLegacyBoolean };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ObjectDef, SettingsField, FunctionDef, AppSettings, PromptDef, PageDef, NavItem, SettingsPage, AppHandler, AppRole } from '@apotech-os/app-kit';
1
+ import { ObjectDef, SettingsField, FunctionDef, AppSettings, PromptDef, PageDef, NavItem, SettingsPage, ServerVariable, AppHandler, AppRole } from '@apotech-os/app-kit';
2
2
 
3
3
  /**
4
4
  * The channels a `ConversationPort`/`ReplyPort` pair can adapt today or in
@@ -779,6 +779,31 @@ interface Verdict {
779
779
  observationId?: string | null;
780
780
  }
781
781
 
782
+ /**
783
+ * `origin` — which pass of the pipeline produced a `triage-decision` /
784
+ * `generated-response` row (spec-gorgias-followup-webhook-v1 §7.2).
785
+ *
786
+ * `'triage'` is the cron's first pass over a ticket; `'followup'` is a reply
787
+ * drafted for a SUBSEQUENT customer message, opened by the Gorgias webhook.
788
+ * The distinction is load-bearing, not decorative: §7.3 picks WHICH
789
+ * auto-reply flag of the category governs the send from it.
790
+ *
791
+ * Stored as TEXT with a `'triage'` default rather than a SELECT (§7.2), so
792
+ * the vocabulary lives here, in code, and every pre-existing row reads as a
793
+ * first pass with no data migration. `toDecisionOrigin` is the boundary that
794
+ * makes that safe: JSONB the platform hands back can carry anything, and a
795
+ * value outside the vocabulary must degrade to `'triage'` — the pass that
796
+ * grants the FEWER rights — never to `'followup'`.
797
+ */
798
+ declare const DECISION_ORIGINS: readonly ["triage", "followup"];
799
+ type DecisionOrigin = (typeof DECISION_ORIGINS)[number];
800
+ declare const DEFAULT_DECISION_ORIGIN: DecisionOrigin;
801
+ /** The `description` both record definitions carry — one sentence, one place. */
802
+ declare const ORIGIN_DESCRIPTION = "Which pass wrote this row: 'triage' (the cron's first pass) or 'followup' (a reply to a subsequent customer message, spec-gorgias-followup-webhook-v1 \u00A77.2).";
803
+ declare function isDecisionOrigin(value: unknown): value is DecisionOrigin;
804
+ /** Reads an untrusted stored value, falling back to the least-privileged origin. */
805
+ declare function toDecisionOrigin(value: unknown): DecisionOrigin;
806
+
782
807
  /**
783
808
  * Run budget: bounds a run in TOOL CALLS and TIME only, never in money —
784
809
  * cost is measured (`charge`, I15) and watched separately, not capped here.
@@ -1312,6 +1337,16 @@ declare function verifyReply(input: VerifyReplyInput): VerifyReplyResult;
1312
1337
  * the customer's message — never to a crash.
1313
1338
  */
1314
1339
  declare const ATTACHMENT_MARKER_ONLY: RegExp;
1340
+ /**
1341
+ * Exported (spec-gorgias-followup-webhook-v1 §6): the follow-up webhook's G8
1342
+ * asks the same question of the LAST extracted turn — "is this the customer,
1343
+ * and did they actually say something?" — and must ask it with this exact
1344
+ * rule, not a second copy that could drift on the attachment marker.
1345
+ */
1346
+ declare function isCustomerTurnWithWords(message: {
1347
+ role: string;
1348
+ content: string;
1349
+ }): boolean;
1315
1350
  /**
1316
1351
  * First customer turn in a conversation, or `null` when there is none. The
1317
1352
  * blocklist input, and the `subject`/first-message pair `isJudgemeConversation`
@@ -1889,12 +1924,15 @@ declare function validateSettings(settings: Record<string, unknown>): SettingsVa
1889
1924
  * - `responseTtlMinutes` → `schedule.fastResponseTtlMinutes`, `batchLimit`
1890
1925
  * → `schedule.triageBatchLimit`.
1891
1926
  *
1892
- * Two settings have no profile counterpart on purpose:
1927
+ * Three settings have no profile counterpart on purpose:
1893
1928
  * `dryRun` (read by the HANDLERS — `functions/triage-tick.ts` and
1894
1929
  * `functions/process-response.ts` swap the `reply`/`state` ports for the
1895
1930
  * recorders of `adapters/recording-ports.ts` and force `send: {mode:
1896
- * 'none'}` — not by the graph, which must run identically either way) and
1897
- * `statsTimezone` (a §3.8 rendering concern). `to-profile.spec.ts` pins that
1931
+ * 'none'}` — not by the graph, which must run identically either way),
1932
+ * `statsTimezone` (a §3.8 rendering concern) and `webhookScopeTag`
1933
+ * (spec-gorgias-followup-webhook-v1 D2 — which tickets of a shared Gorgias
1934
+ * account this app may answer a follow-up on is a routing decision, read by
1935
+ * the webhook's own gates, never by a node). `to-profile.spec.ts` pins that
1898
1936
  * list, so a new settings field cannot be forgotten here.
1899
1937
  *
1900
1938
  * `prompts` is a PARAMETER, not derived here: `prompts.draft` is the agent
@@ -1976,6 +2014,8 @@ interface SupportKitSettings {
1976
2014
  autoRepliedTag: string;
1977
2015
  needsReviewTag: string;
1978
2016
  followupTag: string;
2017
+ /** D2 — the tag scoping which tickets the follow-up webhook may answer. Empty = inert (see `settings/fields.ts`). */
2018
+ webhookScopeTag: string;
1979
2019
  autoSendEnabled: boolean;
1980
2020
  senderEmail: string;
1981
2021
  requireHighTriageConfidence: boolean;
@@ -2104,6 +2144,12 @@ interface SupportPipelineFragments {
2104
2144
  * `manifest.integrations`.
2105
2145
  */
2106
2146
  integrations: IntegrationRef[];
2147
+ /**
2148
+ * spec-gorgias-followup-webhook-v1 D7 — `manifest.serverVariables`. A
2149
+ * consuming app spreads it, or `ctx.variables` never carries the Gorgias
2150
+ * callback key and the webhook cannot be installed.
2151
+ */
2152
+ serverVariables: ServerVariable[];
2107
2153
  /**
2108
2154
  * `'NO_ACCESS'` (H2, T25 review): with no `defaultRole`, the platform
2109
2155
  * grants every platform member `VIEWER` on install
@@ -2131,4 +2177,4 @@ interface SupportPipelineFragments {
2131
2177
  }
2132
2178
  declare function buildSupportPipeline(config: SupportPipelineConfig): SupportPipelineFragments;
2133
2179
 
2134
- export { AGENT_GUARDRAILS, AGENT_STATUSES, AGENT_TOOLS, ATTACHMENT_MARKER_ONLY, type ActionDecision, type AgentProfile, type AgentStatus, type AuditTags, type AutoReplyGuardSettings, type Budget, CANDIDATE_MIN_LENGTH, type CatalogueTool, type CategoryPolicy, type CategoryReferentialEntry, type ChannelKind, type ChatMessage, type Classification, type ClockPort, type CompletionRequest, type CompletionResult, type Conversation, type ConversationPort, type ConversationRef, type CostLedger, type CustomerInfo, DEFAULT_CHANNEL_PROMPT_EMAIL, DEFAULT_CHANNEL_PROMPT_WHATSAPP, DEFAULT_LLM_PROVIDER, DEFAULT_PROFILE_KEY, DEFAULT_WHATSAPP_MODE, type Draft, type DraftAttribution, type DraftNodeConfig, EVALUATION_VERDICTS, type EscalateNodeConfig, type EvaluateNodeConfig, type EvaluationVerdict, GENERATED_RESPONSE_STATUSES, type GeneratedResponseStatus, type GuardrailId, InvalidStatusTransitionError, type JsonSchema, type JudgedReply, type KnowledgeHit, type LlmPort, type Message, MissingPromptError, NODE_NAMES, type Node, type NodeCost, type NodeDeps, type NodeKey, type NodeName, type NodeStep, OUTCOMES, type OrderSummary, type OutboundReply, type Outcome, PROMPT_SLOTS, type PlatformPromptReader, type PortName, type PromptCacheEntry, type PromptCachePort, type PromptDegradedEvent, type PromptNameConfig, type PromptPort, type PromptRef, type PromptReference, type PromptResolverDeps, type PromptSlot, type PromptTableKey, type ProposedAction, REASONING_MAX_LEN, type RawPrompt, type RawPromptConfig, type RawTicket, type ReasoningEffort, type RecordDef, type ReplyPort, type ResolvedPrompt, type ResumeFrom, type ReviseNodeConfig, type RunGuardrailsInput, type RunStamp, type RunTicketOptions, type RunUntil, STOP_PHRASES, SUPPORT_KIT_SETTINGS_FIELDS, type SettingsIssueKey, type SettingsValidationIssue, type SimilarTicket, type SourceDescriptor, type StatePort, type SupportKitNodeSettings, type SupportKitSettings, type SupportPipelineConfig, type SupportPipelineFragments, type TicketRunState, type ToolCallRecord, type ToolCallRequest, type ToolContext, type ToolPolicy, type ToolSpec, type TrackingSummary, type TriageNodeConfig, UNCERTAINTY_MARKERS, type Usage, type Verdict, type VerifyReplyInput, type VerifyReplyResult, WHATSAPP_MODES, WHATSAPP_NOTE_CHEVRON, type WhatsappMode, agentRecord, assertTransition, buildCategoryRecord, buildDiffAnalysisRecord, buildEvaluationRecord, buildGeneratedResponseRecord, buildResponseComparisonRecord, buildSupportKitRecords, buildSupportPipeline, buildTriageDecisionRecord, canTransition, categoryGroupRecord, channelPreGates, createBudget, createPromptResolver, diffAnalysisUniqueKey, firstCustomerMessage, guardrailBucket, hasCustomerAttachment, hasReferences, initialState, isAutoSendEligible, isAutomatedSenderEmail, isAutomatedSenderTicket, isEvaluationVerdict, isGeneratedResponseStatus, isJudgemeConversation, isJudgemeTicket, isOutcome, isSendable, isSendableVerdict, isTerminalStatus, isTicketClosed, isWhatsappChevronNote, isWhatsappTicket, lastCustomerMessage, needsRevision, openTicketKeyFor, parseReferences, pipelineStateRecord, promptCacheRecord, reclaimStalledSend, requiresFollowup, resolvePromptName, runGuardrails, runTicket, settingsToProfile, stopOptOut, targetRefFor, validateSettings, verifyReply, whatsappModeFromLegacyBoolean };
2180
+ export { AGENT_GUARDRAILS, AGENT_STATUSES, AGENT_TOOLS, ATTACHMENT_MARKER_ONLY, type ActionDecision, type AgentProfile, type AgentStatus, type AuditTags, type AutoReplyGuardSettings, type Budget, CANDIDATE_MIN_LENGTH, type CatalogueTool, type CategoryPolicy, type CategoryReferentialEntry, type ChannelKind, type ChatMessage, type Classification, type ClockPort, type CompletionRequest, type CompletionResult, type Conversation, type ConversationPort, type ConversationRef, type CostLedger, type CustomerInfo, DECISION_ORIGINS, DEFAULT_CHANNEL_PROMPT_EMAIL, DEFAULT_CHANNEL_PROMPT_WHATSAPP, DEFAULT_DECISION_ORIGIN, DEFAULT_LLM_PROVIDER, DEFAULT_PROFILE_KEY, DEFAULT_WHATSAPP_MODE, type DecisionOrigin, type Draft, type DraftAttribution, type DraftNodeConfig, EVALUATION_VERDICTS, type EscalateNodeConfig, type EvaluateNodeConfig, type EvaluationVerdict, GENERATED_RESPONSE_STATUSES, type GeneratedResponseStatus, type GuardrailId, InvalidStatusTransitionError, type JsonSchema, type JudgedReply, type KnowledgeHit, type LlmPort, type Message, MissingPromptError, NODE_NAMES, type Node, type NodeCost, type NodeDeps, type NodeKey, type NodeName, type NodeStep, ORIGIN_DESCRIPTION, OUTCOMES, type OrderSummary, type OutboundReply, type Outcome, PROMPT_SLOTS, type PlatformPromptReader, type PortName, type PromptCacheEntry, type PromptCachePort, type PromptDegradedEvent, type PromptNameConfig, type PromptPort, type PromptRef, type PromptReference, type PromptResolverDeps, type PromptSlot, type PromptTableKey, type ProposedAction, REASONING_MAX_LEN, type RawPrompt, type RawPromptConfig, type RawTicket, type ReasoningEffort, type RecordDef, type ReplyPort, type ResolvedPrompt, type ResumeFrom, type ReviseNodeConfig, type RunGuardrailsInput, type RunStamp, type RunTicketOptions, type RunUntil, STOP_PHRASES, SUPPORT_KIT_SETTINGS_FIELDS, type SettingsIssueKey, type SettingsValidationIssue, type SimilarTicket, type SourceDescriptor, type StatePort, type SupportKitNodeSettings, type SupportKitSettings, type SupportPipelineConfig, type SupportPipelineFragments, type TicketRunState, type ToolCallRecord, type ToolCallRequest, type ToolContext, type ToolPolicy, type ToolSpec, type TrackingSummary, type TriageNodeConfig, UNCERTAINTY_MARKERS, type Usage, type Verdict, type VerifyReplyInput, type VerifyReplyResult, WHATSAPP_MODES, WHATSAPP_NOTE_CHEVRON, type WhatsappMode, agentRecord, assertTransition, buildCategoryRecord, buildDiffAnalysisRecord, buildEvaluationRecord, buildGeneratedResponseRecord, buildResponseComparisonRecord, buildSupportKitRecords, buildSupportPipeline, buildTriageDecisionRecord, canTransition, categoryGroupRecord, channelPreGates, createBudget, createPromptResolver, diffAnalysisUniqueKey, firstCustomerMessage, guardrailBucket, hasCustomerAttachment, hasReferences, initialState, isAutoSendEligible, isAutomatedSenderEmail, isAutomatedSenderTicket, isCustomerTurnWithWords, isDecisionOrigin, isEvaluationVerdict, isGeneratedResponseStatus, isJudgemeConversation, isJudgemeTicket, isOutcome, isSendable, isSendableVerdict, isTerminalStatus, isTicketClosed, isWhatsappChevronNote, isWhatsappTicket, lastCustomerMessage, needsRevision, openTicketKeyFor, parseReferences, pipelineStateRecord, promptCacheRecord, reclaimStalledSend, requiresFollowup, resolvePromptName, runGuardrails, runTicket, settingsToProfile, stopOptOut, targetRefFor, toDecisionOrigin, validateSettings, verifyReply, whatsappModeFromLegacyBoolean };