@skillrecordings/cli 0.7.0 → 0.9.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.js CHANGED
@@ -8937,14 +8937,14 @@ var require_diagnostics = __commonJS({
8937
8937
  "undici:client:beforeConnect",
8938
8938
  (evt) => {
8939
8939
  const {
8940
- connectParams: { version, protocol, port, host }
8940
+ connectParams: { version: version2, protocol, port, host }
8941
8941
  } = evt;
8942
8942
  debugLog(
8943
8943
  "connecting to %s%s using %s%s",
8944
8944
  host,
8945
8945
  port ? `:${port}` : "",
8946
8946
  protocol,
8947
- version
8947
+ version2
8948
8948
  );
8949
8949
  }
8950
8950
  );
@@ -8952,14 +8952,14 @@ var require_diagnostics = __commonJS({
8952
8952
  "undici:client:connected",
8953
8953
  (evt) => {
8954
8954
  const {
8955
- connectParams: { version, protocol, port, host }
8955
+ connectParams: { version: version2, protocol, port, host }
8956
8956
  } = evt;
8957
8957
  debugLog(
8958
8958
  "connected to %s%s using %s%s",
8959
8959
  host,
8960
8960
  port ? `:${port}` : "",
8961
8961
  protocol,
8962
- version
8962
+ version2
8963
8963
  );
8964
8964
  }
8965
8965
  );
@@ -8967,7 +8967,7 @@ var require_diagnostics = __commonJS({
8967
8967
  "undici:client:connectError",
8968
8968
  (evt) => {
8969
8969
  const {
8970
- connectParams: { version, protocol, port, host },
8970
+ connectParams: { version: version2, protocol, port, host },
8971
8971
  error
8972
8972
  } = evt;
8973
8973
  debugLog(
@@ -8975,7 +8975,7 @@ var require_diagnostics = __commonJS({
8975
8975
  host,
8976
8976
  port ? `:${port}` : "",
8977
8977
  protocol,
8978
- version,
8978
+ version2,
8979
8979
  error.message
8980
8980
  );
8981
8981
  }
@@ -46146,10 +46146,10 @@ var require_supports_color = __commonJS({
46146
46146
  return 3;
46147
46147
  }
46148
46148
  if ("TERM_PROGRAM" in env) {
46149
- const version = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
46149
+ const version2 = parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
46150
46150
  switch (env.TERM_PROGRAM) {
46151
46151
  case "iTerm.app":
46152
- return version >= 3 ? 3 : 2;
46152
+ return version2 >= 3 ? 3 : 2;
46153
46153
  case "Apple_Terminal":
46154
46154
  return 2;
46155
46155
  }
@@ -63356,8 +63356,8 @@ var require_trace_mapping_umd = __commonJS({
63356
63356
  const isString = typeof map2 === "string";
63357
63357
  if (!isString && map2._decodedMemo) return map2;
63358
63358
  const parsed = parse7(map2);
63359
- const { version, file, names, sourceRoot, sources, sourcesContent } = parsed;
63360
- this.version = version;
63359
+ const { version: version2, file, names, sourceRoot, sources, sourcesContent } = parsed;
63360
+ this.version = version2;
63361
63361
  this.file = file;
63362
63362
  this.names = names || [];
63363
63363
  this.sourceRoot = sourceRoot;
@@ -74519,6 +74519,7 @@ var require_lib10 = __commonJS({
74519
74519
 
74520
74520
  // src/index.ts
74521
74521
  init_esm_shims();
74522
+ import { createRequire } from "module";
74522
74523
  import { Command as Command4 } from "commander";
74523
74524
 
74524
74525
  // src/commands/auth/index.ts
@@ -80786,7 +80787,7 @@ function getPriorityTier(label) {
80786
80787
  return void 0;
80787
80788
  }
80788
80789
  async function generateProductionClustering(options) {
80789
- const { phase0Path, outputPath, version = "v1" } = options;
80790
+ const { phase0Path, outputPath, version: version2 = "v1" } = options;
80790
80791
  console.log("\u{1F4CA} Reading Phase 0 artifacts...");
80791
80792
  const assignments = readPhase0Assignments(phase0Path);
80792
80793
  const labels = readPhase0Labels(phase0Path);
@@ -80850,7 +80851,7 @@ async function generateProductionClustering(options) {
80850
80851
  }
80851
80852
  const totalConversations = Object.keys(assignments).length;
80852
80853
  const result = {
80853
- version,
80854
+ version: version2,
80854
80855
  generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
80855
80856
  config: {
80856
80857
  algorithm: metrics.algorithm,
@@ -80999,12 +81000,12 @@ Run Phase 0 clustering first or specify correct --phase0-path`
80999
81000
  async function faqCluster(options) {
81000
81001
  const phase0Path = options.phase0Path ?? DEFAULT_PHASE0_PATH;
81001
81002
  const outputPath = options.outputPath ?? DEFAULT_OUTPUT_PATH2;
81002
- const version = options.version ?? "v1";
81003
+ const version2 = options.version ?? "v1";
81003
81004
  console.log("\u{1F52C} Production Clustering Pipeline");
81004
81005
  console.log("=".repeat(60));
81005
81006
  console.log(` Phase 0 artifacts: ${phase0Path}`);
81006
81007
  console.log(` Output path: ${outputPath}`);
81007
- console.log(` Version: ${version}`);
81008
+ console.log(` Version: ${version2}`);
81008
81009
  console.log(` Dry run: ${options.dryRun ?? false}`);
81009
81010
  console.log("");
81010
81011
  try {
@@ -81014,14 +81015,14 @@ async function faqCluster(options) {
81014
81015
  const result = await generateProductionClustering({
81015
81016
  phase0Path,
81016
81017
  outputPath,
81017
- version
81018
+ version: version2
81018
81019
  });
81019
81020
  displayClusteringSummary(result);
81020
81021
  if (!options.dryRun) {
81021
81022
  console.log("\n\u{1F4DD} Writing artifacts...");
81022
81023
  writeProductionArtifacts(result, outputPath);
81023
81024
  console.log("\n\u2705 Production clustering complete!");
81024
- console.log(` Artifacts written to: ${join8(outputPath, version)}`);
81025
+ console.log(` Artifacts written to: ${join8(outputPath, version2)}`);
81025
81026
  } else {
81026
81027
  console.log("\n\u{1F9EA} Dry run - no artifacts written");
81027
81028
  }
@@ -82083,7 +82084,7 @@ async function extractFaqCandidates(options) {
82083
82084
  goldenPath,
82084
82085
  source,
82085
82086
  outputPath,
82086
- version = "v1",
82087
+ version: version2 = "v1",
82087
82088
  minClusterSize = 3,
82088
82089
  topN = 5,
82089
82090
  dedupThreshold = 0.85,
@@ -82180,7 +82181,7 @@ async function extractFaqCandidates(options) {
82180
82181
  const result = {
82181
82182
  candidates: deduplicated,
82182
82183
  stats: stats4,
82183
- version,
82184
+ version: version2,
82184
82185
  extractedAt: (/* @__PURE__ */ new Date()).toISOString()
82185
82186
  };
82186
82187
  if (!dryRun) {
@@ -82334,7 +82335,7 @@ async function faqExtract(options) {
82334
82335
  const goldenPath = options.goldenPath ?? DEFAULT_GOLDEN_PATH;
82335
82336
  const outputPath = options.outputPath ?? DEFAULT_OUTPUT_PATH3;
82336
82337
  const cachePath = options.cachePath ?? DEFAULT_CACHE_PATH;
82337
- const version = options.outputVersion ?? "v1";
82338
+ const version2 = options.outputVersion ?? "v1";
82338
82339
  const applyFilters = options.filters ?? true;
82339
82340
  console.log("\u{1F52C} FAQ Extraction Pipeline");
82340
82341
  console.log("=".repeat(60));
@@ -82342,7 +82343,7 @@ async function faqExtract(options) {
82342
82343
  console.log(` Golden: ${goldenPath}`);
82343
82344
  console.log(` Output: ${outputPath}`);
82344
82345
  console.log(` DuckDB cache: ${cachePath}`);
82345
- console.log(` Version: ${version}`);
82346
+ console.log(` Version: ${version2}`);
82346
82347
  console.log(` Apply filters: ${applyFilters}`);
82347
82348
  console.log(` Push to Redis: ${options.pushRedis ?? false}`);
82348
82349
  console.log(` Dry run: ${options.dryRun ?? false}`);
@@ -82369,7 +82370,7 @@ Run \`bun src/index.ts front-cache sync\` first to populate cache.`
82369
82370
  goldenPath: existsSync9(goldenPath) ? goldenPath : void 0,
82370
82371
  source,
82371
82372
  outputPath,
82372
- version,
82373
+ version: version2,
82373
82374
  minClusterSize: options.minClusterSize ?? 3,
82374
82375
  topN: options.topN ?? 5,
82375
82376
  dedupThreshold: options.dedupThreshold ?? 0.85,
@@ -82407,7 +82408,7 @@ Run \`bun src/index.ts front-cache sync\` first to populate cache.`
82407
82408
  if (!options.dryRun) {
82408
82409
  console.log(`
82409
82410
  \u2705 Extraction complete!`);
82410
- console.log(` Artifacts written to: ${join10(outputPath, version)}`);
82411
+ console.log(` Artifacts written to: ${join10(outputPath, version2)}`);
82411
82412
  if (options.pushRedis && options.app) {
82412
82413
  console.log(
82413
82414
  ` Candidates pushed to Redis queue: faq:pending:${options.app}`
@@ -93296,15 +93297,101 @@ async function searchConversations(query, options) {
93296
93297
  }
93297
93298
  }
93298
93299
  function registerSearchCommand(frontCommand) {
93299
- frontCommand.command("search").description(
93300
+ const searchCmd = frontCommand.command("search").description(
93300
93301
  "Search conversations (text, subject, filters). See https://dev.frontapp.com/docs/search-1"
93301
93302
  ).argument(
93302
- "<query>",
93303
+ "[query]",
93303
93304
  'Search query (text, "exact phrase", or filter syntax)'
93304
93305
  ).option("--inbox <id>", "Filter by inbox ID (inb_xxx)").option("--tag <id>", "Filter by tag ID (tag_xxx)").option("--assignee <id>", "Filter by assignee (tea_xxx)").option(
93305
93306
  "--status <status>",
93306
93307
  "Filter by status (open, archived, assigned, unassigned, unreplied, snoozed, resolved)"
93307
- ).option("--from <email>", "Filter by sender email").option("--after <timestamp>", "Filter after Unix timestamp").option("--before <timestamp>", "Filter before Unix timestamp").option("--limit <n>", "Max results (default 25)", "25").option("--json", "Output as JSON").action(searchConversations);
93308
+ ).option("--from <email>", "Filter by sender email").option("--after <timestamp>", "Filter after Unix timestamp").option("--before <timestamp>", "Filter before Unix timestamp").option("--limit <n>", "Max results (default 25)", "25").option("--json", "Output as JSON").addHelpText(
93309
+ "after",
93310
+ `
93311
+ \u2501\u2501\u2501 Front Search Query Syntax \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501
93312
+
93313
+ The <query> argument accepts free text and/or inline Front filters.
93314
+ CLI flags (--inbox, --status, etc.) are appended as filters automatically.
93315
+ You can mix both: skill front search "refund" --inbox inb_4bj7r --status open
93316
+
93317
+ TEXT SEARCH
93318
+ word1 word2 AND \u2014 both words must appear in subject or body
93319
+ "exact phrase" Phrase match (quote the phrase)
93320
+
93321
+ FILTERS (use inline in query OR via CLI flags)
93322
+ Filter CLI flag What it matches
93323
+ \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
93324
+ inbox:inb_xxx --inbox <id> Conversations in inbox
93325
+ tag:tag_xxx --tag <id> Conversations with tag
93326
+ from:email --from <email> Sender address
93327
+ to:email (inline only) Recipient address
93328
+ cc:email (inline only) CC'd address
93329
+ bcc:email (inline only) BCC'd address
93330
+ recipient:email (inline only) Any role (from/to/cc/bcc)
93331
+ contact:crd_xxx (inline only) Contact ID in any role
93332
+ assignee:tea_xxx --assignee <id> Assigned teammate
93333
+ author:tea_xxx (inline only) Message author (teammate)
93334
+ participant:tea_xxx (inline only) Any teammate involvement
93335
+ mention:tea_xxx (inline only) Mentioned teammate
93336
+ commenter:tea_xxx (inline only) Commenting teammate
93337
+ link:top_xxx (inline only) Linked topic
93338
+ is:<status> --status <status> Conversation status (see below)
93339
+ before:<unix_ts> --before <timestamp> Messages before timestamp
93340
+ after:<unix_ts> --after <timestamp> Messages after timestamp
93341
+ during:<unix_ts> (inline only) Messages on same day as timestamp
93342
+ custom_field:"K=V" (inline only) Custom field value
93343
+
93344
+ STATUS VALUES (is: filter / --status flag)
93345
+ open In the Open tab (not archived, not trashed, not snoozed)
93346
+ archived In the Archived tab
93347
+ assigned Has an assignee (can combine: is:open is:assigned)
93348
+ unassigned No assignee
93349
+ unreplied Last message was inbound (no teammate reply yet)
93350
+ snoozed Snoozed (will reopen later; API status shows "archived")
93351
+ trashed In Trash
93352
+ waiting Waiting for response
93353
+
93354
+ Status combos: is:open + is:unassigned = open & unassigned
93355
+ is:archived + is:assigned = archived & assigned
93356
+ Conflicts: open vs archived vs trashed vs snoozed are mutually exclusive
93357
+ assigned vs unassigned are mutually exclusive
93358
+
93359
+ FILTER LOGIC
93360
+ All filters combine with AND (results must match every filter).
93361
+ Exception: multiple from/to/cc/bcc use OR within the same filter type.
93362
+ from:a@x.com from:b@x.com \u2192 from A OR from B
93363
+ from:a@x.com to:b@x.com \u2192 from A AND to B
93364
+ Max 15 filters per query.
93365
+
93366
+ EXAMPLES
93367
+ # Find unresolved payment issues in AI Hero inbox
93368
+ skill front search "payment failed" --inbox inb_4bj7r --status unassigned
93369
+
93370
+ # Unreplied conversations from a specific sender
93371
+ skill front search "upgrade" --from user@example.com --status unreplied
93372
+
93373
+ # Complex inline query (filters in the query string itself)
93374
+ skill front search "from:dale@a.com from:laura@a.com tag:tag_14nmdp before:1650364200"
93375
+
93376
+ # All snoozed conversations assigned to a teammate
93377
+ skill front search "is:snoozed assignee:tea_2thf" --inbox inb_4bj7r
93378
+
93379
+ # Search by custom field
93380
+ skill front search 'custom_field:"External ID=12345"'
93381
+
93382
+ # Pipe JSON to jq for IDs only
93383
+ skill front search "is:unassigned" --inbox inb_4bj7r --json | jq '.data.conversations[].id'
93384
+
93385
+ Full docs: https://dev.frontapp.com/docs/search-1
93386
+ `
93387
+ ).action((query, options) => {
93388
+ const hasFilters = options.inbox || options.tag || options.assignee || options.status || options.from || options.after || options.before;
93389
+ if (!query && !hasFilters) {
93390
+ searchCmd.help();
93391
+ return;
93392
+ }
93393
+ return searchConversations(query || "", options);
93394
+ });
93308
93395
  }
93309
93396
 
93310
93397
  // src/commands/front/tags.ts
@@ -113491,8 +113578,10 @@ async function wizard(options = {}) {
113491
113578
  }
113492
113579
 
113493
113580
  // src/index.ts
113581
+ var require2 = createRequire(import.meta.url);
113582
+ var { version } = require2("../package.json");
113494
113583
  var program2 = new Command4();
113495
- program2.name("skill").description("CLI tool for managing app integrations").version("0.0.0");
113584
+ program2.name("skill").description("CLI tool for managing app integrations").version(version);
113496
113585
  program2.command("init").description("Initialize a new app integration (quick mode)").argument(
113497
113586
  "[name]",
113498
113587
  "Name of the integration (required in non-interactive mode)"