@apotech-os/support-kit 5.0.1 → 6.1.0

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
@@ -1285,6 +1285,23 @@ interface VerifyReplyResult {
1285
1285
  */
1286
1286
  declare function verifyReply(input: VerifyReplyInput): VerifyReplyResult;
1287
1287
 
1288
+ /**
1289
+ * A turn whose ENTIRE content is `@wopilo/gorgias-client`'s attachment
1290
+ * marker — the synthetic line its extraction renders for a message the
1291
+ * customer sent as photos alone, so the writer stops asking for files that
1292
+ * are already attached. It carries no words of the customer's, so every
1293
+ * prerequisite built on "what the customer SAID" (the blocklist scan, the
1294
+ * Judge.me match, the STOP opt-out, triage) must look past it, exactly as it
1295
+ * did when such a message produced no turn at all.
1296
+ *
1297
+ * Hand-synced with that package's `attachmentMarker` (this one may not
1298
+ * import `@wopilo/*` — `dependency-allowlist.spec.ts`), same precedent as
1299
+ * `raw-ticket.ts`'s copy of `isInternalNoteChannel`. The client side pins
1300
+ * the two together at runtime (`raw-ticket-compat.spec.ts`), and a drift
1301
+ * that slipped past it degrades to today's behaviour — the marker read as
1302
+ * the customer's message — never to a crash.
1303
+ */
1304
+ declare const ATTACHMENT_MARKER_ONLY: RegExp;
1288
1305
  /**
1289
1306
  * First customer turn in a conversation, or `null` when there is none. The
1290
1307
  * blocklist input, and the `subject`/first-message pair `isJudgemeConversation`
@@ -1502,6 +1519,16 @@ interface PromptCachePort {
1502
1519
  */
1503
1520
  interface PromptDegradedEvent {
1504
1521
  stage: 'platform-unavailable' | 'cache-unavailable' | 'composition-target-missing' | 'composition-target-forbidden' | 'composition-cycle' | 'composition-depth-exceeded'
1522
+ /**
1523
+ * A level answered, and answered with nothing — a Langfuse prompt whose
1524
+ * production version is blank (`platform-empty`), or a `prompt-cache`
1525
+ * mirror entry holding no text (`cache-empty`). Distinct from the
1526
+ * `-unavailable` stages above, which are the level failing to answer at
1527
+ * all: both descend, but only these two mean the level was reachable and
1528
+ * said nothing. The one an operator needs to see, because nothing else
1529
+ * reports that the prompt they just edited is now empty.
1530
+ */
1531
+ | 'platform-empty' | 'cache-empty'
1505
1532
  /**
1506
1533
  * Not a degradation but its terminus: the ladder resolved no text at any
1507
1534
  * level and the run is about to fail on `MissingPromptError`. Emitted
@@ -1957,11 +1984,11 @@ interface SupportKitSettings {
1957
1984
  declare function settingsToProfile(settings: SupportKitSettings, prompts: Record<PromptTableKey, PromptRef>): AgentProfile;
1958
1985
 
1959
1986
  /**
1960
- * `SupportKitFunctionConfig` — what each of the four T22 manifest fragments
1961
- * (`triage-tick`/`process-response`/`sweep`/`handle-approval`) needs to
1962
- * build its `FunctionDef` (spec §3.2's `SupportPipelineConfig`, the slice of
1963
- * it these fragments actually read — `buildSupportPipeline`, T25, owns the
1964
- * full shape and passes this down).
1987
+ * `SupportKitFunctionConfig` — what each manifest fragment
1988
+ * (`triage-tick`/`sweep`/`handle-approval`/…) needs to build its
1989
+ * `FunctionDef` (spec §3.2's `SupportPipelineConfig`, the slice of it these
1990
+ * fragments actually read — `buildSupportPipeline`, T25, owns the full
1991
+ * shape and passes this down).
1965
1992
  */
1966
1993
 
1967
1994
  interface SupportKitFunctionConfig extends PromptNameConfig {
@@ -2094,4 +2121,4 @@ interface SupportPipelineFragments {
2094
2121
  }
2095
2122
  declare function buildSupportPipeline(config: SupportPipelineConfig): SupportPipelineFragments;
2096
2123
 
2097
- export { AGENT_GUARDRAILS, AGENT_STATUSES, AGENT_TOOLS, 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, 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, isSendable, isSendableVerdict, isTerminalStatus, isTicketClosed, isWhatsappChevronNote, isWhatsappTicket, lastCustomerMessage, needsRevision, openTicketKeyFor, parseReferences, pipelineStateRecord, promptCacheRecord, reclaimStalledSend, requiresFollowup, resolvePromptName, runGuardrails, runTicket, settingsToProfile, stopOptOut, targetRefFor, validateSettings, verifyReply, whatsappModeFromLegacyBoolean };
2124
+ 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, 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, isSendable, isSendableVerdict, isTerminalStatus, isTicketClosed, isWhatsappChevronNote, isWhatsappTicket, lastCustomerMessage, needsRevision, openTicketKeyFor, parseReferences, pipelineStateRecord, promptCacheRecord, reclaimStalledSend, requiresFollowup, resolvePromptName, runGuardrails, runTicket, settingsToProfile, stopOptOut, targetRefFor, validateSettings, verifyReply, whatsappModeFromLegacyBoolean };
package/dist/index.d.ts CHANGED
@@ -1285,6 +1285,23 @@ interface VerifyReplyResult {
1285
1285
  */
1286
1286
  declare function verifyReply(input: VerifyReplyInput): VerifyReplyResult;
1287
1287
 
1288
+ /**
1289
+ * A turn whose ENTIRE content is `@wopilo/gorgias-client`'s attachment
1290
+ * marker — the synthetic line its extraction renders for a message the
1291
+ * customer sent as photos alone, so the writer stops asking for files that
1292
+ * are already attached. It carries no words of the customer's, so every
1293
+ * prerequisite built on "what the customer SAID" (the blocklist scan, the
1294
+ * Judge.me match, the STOP opt-out, triage) must look past it, exactly as it
1295
+ * did when such a message produced no turn at all.
1296
+ *
1297
+ * Hand-synced with that package's `attachmentMarker` (this one may not
1298
+ * import `@wopilo/*` — `dependency-allowlist.spec.ts`), same precedent as
1299
+ * `raw-ticket.ts`'s copy of `isInternalNoteChannel`. The client side pins
1300
+ * the two together at runtime (`raw-ticket-compat.spec.ts`), and a drift
1301
+ * that slipped past it degrades to today's behaviour — the marker read as
1302
+ * the customer's message — never to a crash.
1303
+ */
1304
+ declare const ATTACHMENT_MARKER_ONLY: RegExp;
1288
1305
  /**
1289
1306
  * First customer turn in a conversation, or `null` when there is none. The
1290
1307
  * blocklist input, and the `subject`/first-message pair `isJudgemeConversation`
@@ -1502,6 +1519,16 @@ interface PromptCachePort {
1502
1519
  */
1503
1520
  interface PromptDegradedEvent {
1504
1521
  stage: 'platform-unavailable' | 'cache-unavailable' | 'composition-target-missing' | 'composition-target-forbidden' | 'composition-cycle' | 'composition-depth-exceeded'
1522
+ /**
1523
+ * A level answered, and answered with nothing — a Langfuse prompt whose
1524
+ * production version is blank (`platform-empty`), or a `prompt-cache`
1525
+ * mirror entry holding no text (`cache-empty`). Distinct from the
1526
+ * `-unavailable` stages above, which are the level failing to answer at
1527
+ * all: both descend, but only these two mean the level was reachable and
1528
+ * said nothing. The one an operator needs to see, because nothing else
1529
+ * reports that the prompt they just edited is now empty.
1530
+ */
1531
+ | 'platform-empty' | 'cache-empty'
1505
1532
  /**
1506
1533
  * Not a degradation but its terminus: the ladder resolved no text at any
1507
1534
  * level and the run is about to fail on `MissingPromptError`. Emitted
@@ -1957,11 +1984,11 @@ interface SupportKitSettings {
1957
1984
  declare function settingsToProfile(settings: SupportKitSettings, prompts: Record<PromptTableKey, PromptRef>): AgentProfile;
1958
1985
 
1959
1986
  /**
1960
- * `SupportKitFunctionConfig` — what each of the four T22 manifest fragments
1961
- * (`triage-tick`/`process-response`/`sweep`/`handle-approval`) needs to
1962
- * build its `FunctionDef` (spec §3.2's `SupportPipelineConfig`, the slice of
1963
- * it these fragments actually read — `buildSupportPipeline`, T25, owns the
1964
- * full shape and passes this down).
1987
+ * `SupportKitFunctionConfig` — what each manifest fragment
1988
+ * (`triage-tick`/`sweep`/`handle-approval`/…) needs to build its
1989
+ * `FunctionDef` (spec §3.2's `SupportPipelineConfig`, the slice of it these
1990
+ * fragments actually read — `buildSupportPipeline`, T25, owns the full
1991
+ * shape and passes this down).
1965
1992
  */
1966
1993
 
1967
1994
  interface SupportKitFunctionConfig extends PromptNameConfig {
@@ -2094,4 +2121,4 @@ interface SupportPipelineFragments {
2094
2121
  }
2095
2122
  declare function buildSupportPipeline(config: SupportPipelineConfig): SupportPipelineFragments;
2096
2123
 
2097
- export { AGENT_GUARDRAILS, AGENT_STATUSES, AGENT_TOOLS, 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, 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, isSendable, isSendableVerdict, isTerminalStatus, isTicketClosed, isWhatsappChevronNote, isWhatsappTicket, lastCustomerMessage, needsRevision, openTicketKeyFor, parseReferences, pipelineStateRecord, promptCacheRecord, reclaimStalledSend, requiresFollowup, resolvePromptName, runGuardrails, runTicket, settingsToProfile, stopOptOut, targetRefFor, validateSettings, verifyReply, whatsappModeFromLegacyBoolean };
2124
+ 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, 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, isSendable, isSendableVerdict, isTerminalStatus, isTicketClosed, isWhatsappChevronNote, isWhatsappTicket, lastCustomerMessage, needsRevision, openTicketKeyFor, parseReferences, pipelineStateRecord, promptCacheRecord, reclaimStalledSend, requiresFollowup, resolvePromptName, runGuardrails, runTicket, settingsToProfile, stopOptOut, targetRefFor, validateSettings, verifyReply, whatsappModeFromLegacyBoolean };