@opentabs-dev/opentabs-plugin-reddit 0.0.82 → 0.0.84

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.
@@ -14551,6 +14551,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
14551
14551
  }
14552
14552
  });
14553
14553
 
14554
+ // src/tools/list-flairs.ts
14555
+ var listFlairs = defineTool({
14556
+ name: "list_flairs",
14557
+ displayName: "List Flairs",
14558
+ description: "List available post flairs for a subreddit. Use the returned flair ID with submit_post to satisfy subreddits that require flair.",
14559
+ summary: "List post flairs for a subreddit",
14560
+ icon: "tag",
14561
+ group: "Subreddits",
14562
+ input: external_exports.object({
14563
+ subreddit: external_exports.string().min(1).describe('Subreddit name without r/ prefix (e.g., "ClaudeAI")')
14564
+ }),
14565
+ output: external_exports.object({
14566
+ flairs: external_exports.array(
14567
+ external_exports.object({
14568
+ id: external_exports.string().describe("Flair ID \u2014 pass this as flair_id to submit_post"),
14569
+ text: external_exports.string().describe("Flair display text"),
14570
+ text_editable: external_exports.boolean().describe("Whether the flair text can be customized")
14571
+ })
14572
+ )
14573
+ }),
14574
+ handle: async (params) => {
14575
+ const data = await redditGet(`/r/${params.subreddit}/api/link_flair_v2.json`);
14576
+ const flairs = (Array.isArray(data) ? data : []).map((f) => ({
14577
+ id: f.id,
14578
+ text: f.text,
14579
+ text_editable: f.text_editable ?? false
14580
+ }));
14581
+ return { flairs };
14582
+ }
14583
+ });
14584
+
14554
14585
  // src/tools/get-user.ts
14555
14586
  var getUser = defineTool({
14556
14587
  name: "get_user",
@@ -15250,6 +15281,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15250
15281
  report,
15251
15282
  listUserContent,
15252
15283
  getSubreddit,
15284
+ listFlairs,
15253
15285
  searchSubreddits,
15254
15286
  listSubscriptions,
15255
15287
  listPopularSubreddits,
@@ -15271,7 +15303,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15271
15303
  };
15272
15304
  var src_default = new RedditPlugin();
15273
15305
 
15274
- // dist/_adapter_entry_7185451d-cdb4-4787-bafb-bcc5e29aba36.ts
15306
+ // dist/_adapter_entry_e02837bd-0809-44a5-8986-245ad9dc1582.ts
15275
15307
  if (!globalThis.__openTabs) {
15276
15308
  globalThis.__openTabs = {};
15277
15309
  } else {
@@ -15487,5 +15519,5 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15487
15519
  };
15488
15520
  delete src_default.onDeactivate;
15489
15521
  }
15490
- })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="d4df6c56c63a3e7566cde90ce6735b530c7735045c8490be5aa1c4ae79276ed2";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"reddit",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15522
+ })();(function(){var o=(globalThis).__openTabs;if(o&&o.adapters&&o.adapters["reddit"]){var a=o.adapters["reddit"];a.__adapterHash="f0edcdb912cc7c3e5d29f54ffe642e0dc5f39b251d8ce031cce6f138df9d1c93";if(a.tools&&Array.isArray(a.tools)){for(var i=0;i<a.tools.length;i++){Object.freeze(a.tools[i]);}Object.freeze(a.tools);}Object.freeze(a);Object.defineProperty(o.adapters,"reddit",{value:a,writable:false,configurable:false,enumerable:true});Object.defineProperty(o,"adapters",{value:o.adapters,writable:false,configurable:false});}})();
15491
15523
  //# sourceMappingURL=adapter.iife.js.map