@skillrecordings/cli 0.3.0 → 0.4.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.
@@ -2537,8 +2537,14 @@ function formatActionLabel(action) {
2537
2537
  }
2538
2538
  }
2539
2539
  async function addSupportComment(input, options) {
2540
- const { conversationId, context } = input;
2540
+ const { conversationId, context, action, category } = input;
2541
2541
  const { frontApiToken, authorId, minimal } = options;
2542
+ if (action === "silence" || category === "system") {
2543
+ return {
2544
+ added: false,
2545
+ error: "Skipped support comment for silence/system"
2546
+ };
2547
+ }
2542
2548
  try {
2543
2549
  const front = createInstrumentedFrontClient({ apiToken: frontApiToken });
2544
2550
  const body = minimal ? formatMinimalComment(context) : formatSupportComment(context);
@@ -2630,6 +2636,13 @@ function getActionLabel(action) {
2630
2636
  }
2631
2637
  async function addDecisionComment(conversationId, context, options) {
2632
2638
  const startTime = Date.now();
2639
+ if (context.action === "silence" || context.category === "system") {
2640
+ return {
2641
+ added: false,
2642
+ error: "Skipped decision comment for silence/system",
2643
+ durationMs: Date.now() - startTime
2644
+ };
2645
+ }
2633
2646
  try {
2634
2647
  const front = createInstrumentedFrontClient({
2635
2648
  apiToken: options.frontApiToken
@@ -3983,7 +3996,7 @@ var THREAD_ROUTING_RULES = [
3983
3996
  // Teammate already engaged - support them
3984
3997
  {
3985
3998
  name: "support_teammate",
3986
- condition: ({ classification }) => shouldSupportTeammate(classification.signals),
3999
+ condition: ({ classification }) => classification.category !== "system" && shouldSupportTeammate(classification.signals),
3987
4000
  action: "support_teammate",
3988
4001
  reason: "Human teammate is handling - adding context as comment"
3989
4002
  },
@@ -5062,6 +5075,7 @@ async function validate(input, options = {}) {
5062
5075
  const {
5063
5076
  appId,
5064
5077
  category,
5078
+ getCategoryStats: getCategoryStatsOverride,
5065
5079
  skipMemoryQuery = false,
5066
5080
  correctionThreshold = 0.7,
5067
5081
  skipRelevanceCheck = false,
@@ -5291,7 +5305,9 @@ async function validate(input, options = {}) {
5291
5305
  urgency: "high"
5292
5306
  };
5293
5307
  } else {
5294
- const categoryStats = await getCategoryStats(category);
5308
+ const categoryStats = await (getCategoryStatsOverride ?? getCategoryStats)(
5309
+ category
5310
+ );
5295
5311
  const meetsAutoSend = categoryStats.sentUnchangedRate >= threshold.autoSendMinConfidence && categoryStats.volume >= threshold.autoSendMinVolume && confidence >= 0.95;
5296
5312
  if (meetsAutoSend) {
5297
5313
  decision = {
@@ -6808,7 +6824,9 @@ async function runThreadPipeline(input, options = {}) {
6808
6824
  {
6809
6825
  conversationId: input.thread.conversationId,
6810
6826
  context,
6811
- appId: input.appConfig.appId
6827
+ appId: input.appConfig.appId,
6828
+ category: classification.category,
6829
+ action: routing.action
6812
6830
  },
6813
6831
  {
6814
6832
  frontApiToken: options.frontApiToken,
@@ -7067,4 +7085,4 @@ export {
7067
7085
  runPipeline,
7068
7086
  runThreadPipeline
7069
7087
  };
7070
- //# sourceMappingURL=chunk-MF3GI37W.js.map
7088
+ //# sourceMappingURL=chunk-TFLLCHUX.js.map