@ever-works/everworks-skills-plugin 1.0.0 → 1.0.3

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.
@@ -0,0 +1,45 @@
1
+ import { IPlugin, ISkillsProviderPlugin, PluginCategory, JsonSchema, PluginContext, PluginSettings, SkillCatalogListOptions, SkillCatalogListResult, SkillCatalogEntry, SkillCatalogUpdate } from '@ever-works/plugin';
2
+ import { GtmSkillDefinition } from '@ever-works/contracts';
3
+
4
+ declare class EverWorksSkillsPlugin implements IPlugin, ISkillsProviderPlugin {
5
+ readonly id = "everworks-skills";
6
+ readonly name = "Ever Works Skills";
7
+ readonly version = "1.0.0";
8
+ readonly category: PluginCategory;
9
+ readonly capabilities: readonly string[];
10
+ readonly providerName = "Ever Works Skills";
11
+ readonly settingsSchema: JsonSchema;
12
+ readonly configurationMode: 'admin-only' | 'user-required' | 'hybrid';
13
+ private context?;
14
+ private cache;
15
+ onLoad(context: PluginContext): Promise<void>;
16
+ onUnload(): Promise<void>;
17
+ isAvailable(_settings?: PluginSettings): boolean;
18
+ listEntries(options: SkillCatalogListOptions): Promise<SkillCatalogListResult>;
19
+ getEntry(slug: string, settings?: PluginSettings): Promise<SkillCatalogEntry | null>;
20
+ checkForUpdates(installedVersions: Record<string, string>, settings?: PluginSettings): Promise<{
21
+ updated: SkillCatalogUpdate[];
22
+ }>;
23
+ private loadAll;
24
+ private fetchCatalog;
25
+ private fetchEntry;
26
+ }
27
+
28
+ /**
29
+ * Build the canonical Markdown body for a Skill: the declared input/output
30
+ * contract first (it is what makes the Skill deterministic about itself),
31
+ * then the instruction text.
32
+ */
33
+ declare function buildGtmSkillBody(skill: GtmSkillDefinition): string;
34
+ /** Project one Skill definition into a catalog entry. */
35
+ declare function toSkillCatalogEntry(skill: GtmSkillDefinition): SkillCatalogEntry;
36
+ /** The whole first-party go-to-market pack as catalog entries. */
37
+ declare const GTM_CATALOG_ENTRIES: SkillCatalogEntry[];
38
+ /**
39
+ * Union `entries` with the first-party pack, keeping `entries` on a slug
40
+ * collision. Order is stable: served entries first, then the pack members
41
+ * that were missing.
42
+ */
43
+ declare function mergeGtmCatalog(entries: SkillCatalogEntry[]): SkillCatalogEntry[];
44
+
45
+ export { EverWorksSkillsPlugin, GTM_CATALOG_ENTRIES, buildGtmSkillBody, EverWorksSkillsPlugin as default, mergeGtmCatalog, toSkillCatalogEntry };
@@ -0,0 +1,45 @@
1
+ import { IPlugin, ISkillsProviderPlugin, PluginCategory, JsonSchema, PluginContext, PluginSettings, SkillCatalogListOptions, SkillCatalogListResult, SkillCatalogEntry, SkillCatalogUpdate } from '@ever-works/plugin';
2
+ import { GtmSkillDefinition } from '@ever-works/contracts';
3
+
4
+ declare class EverWorksSkillsPlugin implements IPlugin, ISkillsProviderPlugin {
5
+ readonly id = "everworks-skills";
6
+ readonly name = "Ever Works Skills";
7
+ readonly version = "1.0.0";
8
+ readonly category: PluginCategory;
9
+ readonly capabilities: readonly string[];
10
+ readonly providerName = "Ever Works Skills";
11
+ readonly settingsSchema: JsonSchema;
12
+ readonly configurationMode: 'admin-only' | 'user-required' | 'hybrid';
13
+ private context?;
14
+ private cache;
15
+ onLoad(context: PluginContext): Promise<void>;
16
+ onUnload(): Promise<void>;
17
+ isAvailable(_settings?: PluginSettings): boolean;
18
+ listEntries(options: SkillCatalogListOptions): Promise<SkillCatalogListResult>;
19
+ getEntry(slug: string, settings?: PluginSettings): Promise<SkillCatalogEntry | null>;
20
+ checkForUpdates(installedVersions: Record<string, string>, settings?: PluginSettings): Promise<{
21
+ updated: SkillCatalogUpdate[];
22
+ }>;
23
+ private loadAll;
24
+ private fetchCatalog;
25
+ private fetchEntry;
26
+ }
27
+
28
+ /**
29
+ * Build the canonical Markdown body for a Skill: the declared input/output
30
+ * contract first (it is what makes the Skill deterministic about itself),
31
+ * then the instruction text.
32
+ */
33
+ declare function buildGtmSkillBody(skill: GtmSkillDefinition): string;
34
+ /** Project one Skill definition into a catalog entry. */
35
+ declare function toSkillCatalogEntry(skill: GtmSkillDefinition): SkillCatalogEntry;
36
+ /** The whole first-party go-to-market pack as catalog entries. */
37
+ declare const GTM_CATALOG_ENTRIES: SkillCatalogEntry[];
38
+ /**
39
+ * Union `entries` with the first-party pack, keeping `entries` on a slug
40
+ * collision. Order is stable: served entries first, then the pack members
41
+ * that were missing.
42
+ */
43
+ declare function mergeGtmCatalog(entries: SkillCatalogEntry[]): SkillCatalogEntry[];
44
+
45
+ export { EverWorksSkillsPlugin, GTM_CATALOG_ENTRIES, buildGtmSkillBody, EverWorksSkillsPlugin as default, mergeGtmCatalog, toSkillCatalogEntry };