llmist 16.2.3 → 16.2.4

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.cjs CHANGED
@@ -5306,6 +5306,45 @@ var init_activation = __esm({
5306
5306
  }
5307
5307
  });
5308
5308
 
5309
+ // src/skills/load-skill-gadget.ts
5310
+ function createLoadSkillGadget(registry) {
5311
+ const summaries = registry.getMetadataSummaries();
5312
+ const skillNames = registry.getModelInvocable().map((s) => s.name);
5313
+ const description = [
5314
+ "Load a skill's specialized instructions into context for a task.",
5315
+ "Available skills:",
5316
+ summaries
5317
+ ].join("\n");
5318
+ return createGadget({
5319
+ name: LOAD_SKILL_GADGET_NAME,
5320
+ description,
5321
+ schema: import_zod2.z.object({
5322
+ skill: import_zod2.z.enum(skillNames).describe("Name of the skill to load"),
5323
+ arguments: import_zod2.z.string().optional().describe("Arguments for the skill (e.g., a filename, issue number, or search query)")
5324
+ }),
5325
+ execute: async ({ skill: skillName, arguments: args }) => {
5326
+ const skill = registry.get(skillName);
5327
+ if (!skill) {
5328
+ return `Unknown skill: "${skillName}". Available skills: ${skillNames.join(", ")}`;
5329
+ }
5330
+ const activation = await skill.activate({
5331
+ arguments: args,
5332
+ cwd: process.cwd()
5333
+ });
5334
+ return activation.resolvedInstructions;
5335
+ }
5336
+ });
5337
+ }
5338
+ var import_zod2, LOAD_SKILL_GADGET_NAME;
5339
+ var init_load_skill_gadget = __esm({
5340
+ "src/skills/load-skill-gadget.ts"() {
5341
+ "use strict";
5342
+ import_zod2 = require("zod");
5343
+ init_create_gadget();
5344
+ LOAD_SKILL_GADGET_NAME = "LoadSkill";
5345
+ }
5346
+ });
5347
+
5309
5348
  // src/skills/parser.ts
5310
5349
  function parseFrontmatter(content) {
5311
5350
  const trimmed = content.trimStart();
@@ -5799,45 +5838,6 @@ var init_loader = __esm({
5799
5838
  }
5800
5839
  });
5801
5840
 
5802
- // src/skills/use-skill-gadget.ts
5803
- function createUseSkillGadget(registry) {
5804
- const summaries = registry.getMetadataSummaries();
5805
- const skillNames = registry.getModelInvocable().map((s) => s.name);
5806
- const description = [
5807
- "Activate a skill to get specialized instructions for a task.",
5808
- "Available skills:",
5809
- summaries
5810
- ].join("\n");
5811
- return createGadget({
5812
- name: USE_SKILL_GADGET_NAME,
5813
- description,
5814
- schema: import_zod2.z.object({
5815
- skill: import_zod2.z.enum(skillNames).describe("Name of the skill to activate"),
5816
- arguments: import_zod2.z.string().optional().describe("Arguments for the skill (e.g., a filename, issue number, or search query)")
5817
- }),
5818
- execute: async ({ skill: skillName, arguments: args }) => {
5819
- const skill = registry.get(skillName);
5820
- if (!skill) {
5821
- return `Unknown skill: "${skillName}". Available skills: ${skillNames.join(", ")}`;
5822
- }
5823
- const activation = await skill.activate({
5824
- arguments: args,
5825
- cwd: process.cwd()
5826
- });
5827
- return activation.resolvedInstructions;
5828
- }
5829
- });
5830
- }
5831
- var import_zod2, USE_SKILL_GADGET_NAME;
5832
- var init_use_skill_gadget = __esm({
5833
- "src/skills/use-skill-gadget.ts"() {
5834
- "use strict";
5835
- import_zod2 = require("zod");
5836
- init_create_gadget();
5837
- USE_SKILL_GADGET_NAME = "UseSkill";
5838
- }
5839
- });
5840
-
5841
5841
  // src/agent/builder-utils.ts
5842
5842
  function formatGadgetCall(gadgetName, invocationId, parameters, prefixes) {
5843
5843
  const startPrefix = prefixes?.start ?? GADGET_START_PREFIX;
@@ -12854,9 +12854,9 @@ var init_builder = __esm({
12854
12854
  init_model_shortcuts();
12855
12855
  init_registry();
12856
12856
  init_activation();
12857
+ init_load_skill_gadget();
12857
12858
  init_loader();
12858
12859
  init_parser();
12859
- init_use_skill_gadget();
12860
12860
  init_agent();
12861
12861
  init_agent_internal_key();
12862
12862
  init_builder_utils();
@@ -13191,7 +13191,7 @@ ${resolved}`);
13191
13191
  const skillRegistry = this.resolveSkillRegistry();
13192
13192
  if (skillRegistry && skillRegistry.size > 0) {
13193
13193
  if (skillRegistry.getModelInvocable().length > 0) {
13194
- registry.registerByClass(createUseSkillGadget(skillRegistry));
13194
+ registry.registerByClass(createLoadSkillGadget(skillRegistry));
13195
13195
  }
13196
13196
  const preActivatedBlock = this.resolvePreActivatedInstructions(skillRegistry);
13197
13197
  if (preActivatedBlock) {
@@ -17046,6 +17046,7 @@ __export(index_exports, {
17046
17046
  HybridStrategy: () => HybridStrategy,
17047
17047
  LLMMessageBuilder: () => LLMMessageBuilder,
17048
17048
  LLMist: () => LLMist,
17049
+ LOAD_SKILL_GADGET_NAME: () => LOAD_SKILL_GADGET_NAME,
17049
17050
  MODEL_ALIASES: () => MODEL_ALIASES,
17050
17051
  MediaStore: () => MediaStore,
17051
17052
  ModelIdentifierParser: () => ModelIdentifierParser,
@@ -17062,7 +17063,6 @@ __export(index_exports, {
17062
17063
  SummarizationStrategy: () => SummarizationStrategy,
17063
17064
  TaskCompletionSignal: () => TaskCompletionSignal,
17064
17065
  TimeoutException: () => TimeoutException,
17065
- USE_SKILL_GADGET_NAME: () => USE_SKILL_GADGET_NAME,
17066
17066
  audioFromBase64: () => audioFromBase64,
17067
17067
  audioFromBuffer: () => audioFromBuffer,
17068
17068
  collectEvents: () => collectEvents,
@@ -17075,12 +17075,12 @@ __export(index_exports, {
17075
17075
  createGeminiProviderFromEnv: () => createGeminiProviderFromEnv,
17076
17076
  createHints: () => createHints,
17077
17077
  createHuggingFaceProviderFromEnv: () => createHuggingFaceProviderFromEnv,
17078
+ createLoadSkillGadget: () => createLoadSkillGadget,
17078
17079
  createLogger: () => createLogger,
17079
17080
  createMediaOutput: () => createMediaOutput,
17080
17081
  createOpenAIProviderFromEnv: () => createOpenAIProviderFromEnv,
17081
17082
  createOpenRouterProviderFromEnv: () => createOpenRouterProviderFromEnv,
17082
17083
  createSubagent: () => createSubagent,
17083
- createUseSkillGadget: () => createUseSkillGadget,
17084
17084
  defaultLogger: () => defaultLogger,
17085
17085
  detectAudioMimeType: () => detectAudioMimeType,
17086
17086
  detectImageMimeType: () => detectImageMimeType,
@@ -17761,11 +17761,11 @@ var SimpleSessionManager = class extends BaseSessionManager {
17761
17761
 
17762
17762
  // src/skills/index.ts
17763
17763
  init_activation();
17764
+ init_load_skill_gadget();
17764
17765
  init_loader();
17765
17766
  init_parser();
17766
17767
  init_registry2();
17767
17768
  init_skill();
17768
- init_use_skill_gadget();
17769
17769
 
17770
17770
  // src/utils/format.ts
17771
17771
  function truncate(text3, maxLength, suffix = "...") {
@@ -17954,6 +17954,7 @@ function getHostExports2(ctx) {
17954
17954
  HybridStrategy,
17955
17955
  LLMMessageBuilder,
17956
17956
  LLMist,
17957
+ LOAD_SKILL_GADGET_NAME,
17957
17958
  MODEL_ALIASES,
17958
17959
  MediaStore,
17959
17960
  ModelIdentifierParser,
@@ -17970,7 +17971,6 @@ function getHostExports2(ctx) {
17970
17971
  SummarizationStrategy,
17971
17972
  TaskCompletionSignal,
17972
17973
  TimeoutException,
17973
- USE_SKILL_GADGET_NAME,
17974
17974
  audioFromBase64,
17975
17975
  audioFromBuffer,
17976
17976
  collectEvents,
@@ -17983,12 +17983,12 @@ function getHostExports2(ctx) {
17983
17983
  createGeminiProviderFromEnv,
17984
17984
  createHints,
17985
17985
  createHuggingFaceProviderFromEnv,
17986
+ createLoadSkillGadget,
17986
17987
  createLogger,
17987
17988
  createMediaOutput,
17988
17989
  createOpenAIProviderFromEnv,
17989
17990
  createOpenRouterProviderFromEnv,
17990
17991
  createSubagent,
17991
- createUseSkillGadget,
17992
17992
  defaultLogger,
17993
17993
  detectAudioMimeType,
17994
17994
  detectImageMimeType,