@majkapp/plugin-kit 3.7.0 → 3.7.2

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.
File without changes
package/dist/index.d.ts CHANGED
@@ -14,7 +14,7 @@
14
14
  * - Entity, tool, and function declarations
15
15
  * - Lifecycle hooks with cleanup management
16
16
  */
17
- export { definePlugin, FluentBuilder, ServiceBuilder } from './plugin-kit';
17
+ export { definePlugin, FluentBuilder, ServiceBuilder, SkillDefinitionConfig } from './plugin-kit';
18
18
  export { FunctionRegistryImpl, FunctionProviderImpl } from './registry';
19
19
  export { FilesystemResourceProvider } from './resource-provider';
20
20
  export { generateClient } from './generator/generator';
@@ -102,6 +102,6 @@ export declare const ServiceDiscovery: {
102
102
  */
103
103
  resolveOrThrow<T = any>(ctx: any, interfacePackage: string): Promise<T>;
104
104
  };
105
- export type { PluginContext, PluginLogger, PluginStorage, ScopedTimers, ScopedIpcRegistry, PluginCapabilities, PluginCapability, ToolImplementation, InProcessPlugin, PluginHealthStatus, ToolSpec, ToolHandler, ApiMethod, ApiRouteDef, JsonSchema, RouteHandler, RequestLike, ResponseLike, UiConfig, HistoryMode, ScreenBase, ReactScreen, HtmlScreen, ConfigWizardDef, SettingsDef, Scope, EntityType, CleanupFn, HealthCheckFn, MCPServerEntity, TeamMemberEntity, ServiceFunctionBinding, CallbackHandle, CreateCallbackOptions, CallbackStats, FunctionHandler, SubscriptionHandler, FunctionDefinition, SubscriptionDefinition, FunctionRegistry, ClientGenerationConfig, Plugin, FunctionProvider, ResourceProvider, FunctionInfo, AsyncPluginHealthStatus, ServiceCapability, ServiceMetadata, ServiceFunctionMetadata, ServiceParameterMetadata, ServiceReturnMetadata, FunctionEnrichment, IdentityDefinitionCapability, IdentityProviderInfo, IdentitySetupInstructions, IdentityTestConfig, IdentityRequirement } from './types';
106
- export type { MajkInterface, EntityId, Unsubscribe, BaseEntity, StandardEventType, PluginEventType, RepositoryEventType, EntityType as MajkEntityType, RepositoryEvent, EventFilter, EventListener, Subscription, QueryBuilder, QueryableEventChannel, EventBusAPI, PluginInfo, PluginHealth, PluginCapabilityInfo, PluginLog, InstallPluginOptions, InstallPluginResult, GetLogsOptions, GetPluginExternalUrlOptions, GetPluginScreenUrlOptions, PluginManagementAPI, SecretScope, SecretInfo, ScopedSecretsAPI, SecretsAPI, StartTaskRequest, TaskFilter, TaskMessage, TaskProgress, TaskResult, TaskError, TaskHandle, TaskEventHandler, TaskEvent, TaskAPI, AccountType, AccountMetadata, TimeWindow, CredentialOptions, RefreshOptions, RefreshResult, ValidationResult, TokenInfo, AutoRefreshConfig, AutoRefreshHandle, AwsSdkCredentials, CognitoTokenSet, AzureSdkCredentials, AccountJSON, AwsCognitoCredentials, AzureEntraCredentials, ApiKeyCredentials, SystemDefaultCredentials, Credentials, SystemAccount, OAuthAccount, AwsAccount, AzureAccount, AuthEvent, AuthStateChangeEvent, AuthTokenRefreshedEvent, AuthErrorEvent, AccountChangedEvent, AuthAPI, Message, Conversation, Agent, TeamMember, TeamMemberSkills, TeamMemberPersonality, TeamMemberCodeStats, TeamMemberMetadata, ServiceFunctionBinding as MajkServiceFunctionBinding, Todo, WorkStrategy, Project, MCPServer, ConversationFilter, MessageQueryOptions, ConversationHandle, ConversationAPI, CreateTeammateRequest, TeammateUpdate, TeammateFilter, TeammateHandle, TeammateAPI, CreateTodoRequest, TodoUpdate, TodoFilter, SpawnOptions, TodoHandle, TodoAPI, CreateProjectRequest, ProjectUpdate, ProjectFilter, ProjectHandle, ProjectAPI, CreateMCPServerRequest, MCPServerUpdate, MCPServerFilter, ConnectionTestResult, MCPServerHandle, MCPServerScopedHandle, DiscoveredTool, MCPServerAPI, EverywhereScope, EverywhereScopedHandle, CreateAgentRequest, AgentUpdate, AgentFilter, TestResult, AgentHandle, AgentAPI, AddKnowledgeInput, KnowledgeNode, KnowledgeTree, KnowledgeSearchOptions, KnowledgeAPI, AIAPI, AIProvider, AIProviderCapabilities, AIProviderError, LLMInterface, ModelInfo, AIMessage, ContentBlock, PromptParams, PromptResult, PromptChunk, AIFunctionDefinition, AIJsonSchema, FunctionCallParams, FunctionCallResult, ImageGenerationParams, ImageResult, TranscriptionParams, TranscriptionResult, ProviderStatus } from './majk-interface-types';
105
+ export type { PluginContext, PluginLogger, PluginStorage, ScopedTimers, ScopedIpcRegistry, PluginCapabilities, PluginCapability, ToolImplementation, InProcessPlugin, PluginHealthStatus, ToolSpec, ToolHandler, ApiMethod, ApiRouteDef, JsonSchema, RouteHandler, RequestLike, ResponseLike, UiConfig, HistoryMode, ScreenBase, ReactScreen, HtmlScreen, ConfigWizardDef, SettingsDef, Scope, EntityType, CleanupFn, HealthCheckFn, MCPServerEntity, TeamMemberEntity, ServiceFunctionBinding, CallbackHandle, CreateCallbackOptions, CallbackStats, FunctionHandler, SubscriptionHandler, FunctionDefinition, SubscriptionDefinition, FunctionRegistry, ClientGenerationConfig, Plugin, FunctionProvider, ResourceProvider, FunctionInfo, AsyncPluginHealthStatus, ServiceCapability, ServiceMetadata, ServiceFunctionMetadata, ServiceParameterMetadata, ServiceReturnMetadata, FunctionEnrichment, IdentityDefinitionCapability, IdentityProviderInfo, IdentitySetupInstructions, IdentityTestConfig, IdentityRequirement, SkillContext, SkillSetupFn, SkillTeardownFn, SkillServiceFunctionRef, SkillCapability } from './types';
106
+ export type { MajkInterface, EntityId, Unsubscribe, BaseEntity, StandardEventType, PluginEventType, RepositoryEventType, EntityType as MajkEntityType, RepositoryEvent, EventFilter, EventListener, Subscription, QueryBuilder, QueryableEventChannel, EventBusAPI, PluginInfo, PluginHealth, PluginCapabilityInfo, PluginLog, InstallPluginOptions, InstallPluginResult, GetLogsOptions, GetPluginExternalUrlOptions, GetPluginScreenUrlOptions, PluginManagementAPI, SecretScope, SecretInfo, ScopedSecretsAPI, SecretsAPI, StartTaskRequest, TaskFilter, TaskMessage, TaskProgress, TaskResult, TaskError, TaskHandle, TaskEventHandler, TaskEvent, TaskAPI, AccountType, AccountMetadata, TimeWindow, CredentialOptions, RefreshOptions, RefreshResult, ValidationResult, TokenInfo, AutoRefreshConfig, AutoRefreshHandle, AwsSdkCredentials, CognitoTokenSet, AzureSdkCredentials, AccountJSON, AwsCognitoCredentials, AzureEntraCredentials, ApiKeyCredentials, SystemDefaultCredentials, Credentials, SystemAccount, OAuthAccount, AwsAccount, AzureAccount, AuthEvent, AuthStateChangeEvent, AuthTokenRefreshedEvent, AuthErrorEvent, AccountChangedEvent, AuthAPI, Message, Conversation, Agent, TeamMember, TeamMemberSkills, TeamMemberPersonality, TeamMemberCodeStats, TeamMemberMetadata, ServiceFunctionBinding as MajkServiceFunctionBinding, Todo, WorkStrategy, Project, MCPServer, ConversationFilter, MessageQueryOptions, ConversationHandle, ConversationAPI, CreateTeammateRequest, TeammateUpdate, TeammateFilter, TeammateHandle, TeammateAPI, CreateTodoRequest, TodoUpdate, TodoFilter, SpawnOptions, TodoHandle, TodoAPI, CreateProjectRequest, ProjectUpdate, ProjectFilter, ProjectHandle, ProjectAPI, CreateMCPServerRequest, MCPServerUpdate, MCPServerFilter, ConnectionTestResult, MCPServerHandle, MCPServerScopedHandle, DiscoveredTool, MCPServerAPI, EverywhereScope, EverywhereScopedHandle, CreateAgentRequest, AgentUpdate, AgentFilter, TestResult, AgentHandle, AgentAPI, AddKnowledgeInput, KnowledgeNode, KnowledgeTree, KnowledgeSearchOptions, KnowledgeAPI, AIAPI, AIProvider, AIProviderCapabilities, AIProviderError, LLMInterface, ModelInfo, AIMessage, ContentBlock, PromptParams, PromptResult, PromptChunk, AIFunctionDefinition, AIJsonSchema, FunctionCallParams, FunctionCallResult, ImageGenerationParams, ImageResult, TranscriptionParams, TranscriptionResult, ProviderStatus, SkillsAPI, SkillContext as MajkSkillContext, SkillSetupFn as MajkSkillSetupFn, SkillTeardownFn as MajkSkillTeardownFn, SkillDefinition, RuntimeSkill, Skill, SkillSummary, AddSkillInput, UpdateSkillInput, SearchSkillsInput, EnableSkillInput, DisableSkillInput, DeleteSkillInput, ListSkillsResult, SearchSkillsResult, EnableSkillResult, AddSkillResult, UpdateSkillResult, SkillEventType, SkillEvent } from './majk-interface-types';
107
107
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;;;;;;;;;;;;;;;;OAiBG;6BAC4B,GAAG,oBAAoB,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAO7E;;;;;;;;;;;;;;;;;OAiBG;mBACkB,GAAG,oBAAoB,MAAM,GAAG,OAAO,CAAC,GAAG,GAAG,SAAS,CAAC;IAK7E;;;;;;;;;;;;;;;;;;OAkBG;YACW,CAAC,aAAa,GAAG,oBAAoB,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAQlF;;;;;;;;;;;;;;;;OAgBG;mBACkB,CAAC,aAAa,GAAG,oBAAoB,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;CAU9E,CAAC;AAEF,YAAY,EACV,aAAa,EACb,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EACf,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,SAAS,EACT,WAAW,EACX,UAAU,EACV,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,WAAW,EACX,UAAU,EACV,WAAW,EACX,UAAU,EACV,eAAe,EACf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AU,EACV,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,uBAAuB,EACvB,cAAc,EACd,mBAAmB,EACnB,OAAO,EACP,OAAO,EACP,YAAY,EACZ,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,sBAAsB,IAAI,0BAA0B,EACpD,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,OAAO,EACP,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,YAAY,EAEZ,KAAK,EACL,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,YAAY,EACZ,SAAS,EACT,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACf,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAClG,OAAO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J,YAAY,EACZ,OAAO,EACP,SAAS,EACT,kBAAkB,EAClB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,cAAc,EACd,cAAc,EACd,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,UAAU,EACV,YAAY,EACZ,UAAU,EACV,OAAO,EACP,oBAAoB,EACpB,aAAa,EACb,aAAa,EACb,aAAa,EACb,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,UAAU,EACV,WAAW,EACX,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,sBAAsB,EACtB,YAAY,EAEZ,KAAK,EACL,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,YAAY,EACZ,SAAS,EACT,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,oBAAoB,EACpB,YAAY,EACZ,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EAEd,SAAS,EACT,YAAY,IAAI,gBAAgB,EAChC,YAAY,IAAI,gBAAgB,EAChC,eAAe,IAAI,mBAAmB,EACtC,eAAe,EACf,YAAY,EACZ,KAAK,EACL,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,UAAU,EACX,MAAM,wBAAwB,CAAC"}
@@ -1421,8 +1421,470 @@ export declare class AIProviderError extends Error {
1421
1421
  readonly cause?: Error | undefined;
1422
1422
  constructor(message: string, providerId?: string | undefined, code?: string | undefined, statusCode?: number | undefined, cause?: Error | undefined);
1423
1423
  }
1424
+ /**
1425
+ * ConfigAPI - Unified configuration access for Majk plugins
1426
+ *
1427
+ * Provides path-based access to all Majk configuration including:
1428
+ * - AWS resources (plugin market, telemetry, token usage)
1429
+ * - Authentication settings (Cognito, etc.)
1430
+ * - Bedrock AI models
1431
+ * - Plugin system settings
1432
+ * - Any future configuration additions
1433
+ *
1434
+ * Configuration is organized into namespaces:
1435
+ * - aws.* - AWS resources and services
1436
+ * - auth.* - Authentication configuration
1437
+ * - bedrock.* - Bedrock AI model settings
1438
+ * - litellm.* - LiteLLM proxy configuration
1439
+ * - plugins.* - Plugin system configuration
1440
+ *
1441
+ * @example
1442
+ * // Get plugin market endpoint
1443
+ * const endpoint = ctx.majk.config.get("aws.pluginMarket.apiEndpoint");
1444
+ *
1445
+ * @example
1446
+ * // With default value
1447
+ * const endpoint = ctx.majk.config.get(
1448
+ * "aws.pluginMarket.apiEndpoint",
1449
+ * "https://fallback.com"
1450
+ * );
1451
+ *
1452
+ * @example
1453
+ * // Get entire section
1454
+ * const marketConfig = ctx.majk.config.get("aws.pluginMarket");
1455
+ * // Returns: { apiEndpoint: "...", region: "us-east-1", enabled: true }
1456
+ *
1457
+ * @example
1458
+ * // Check if config exists
1459
+ * if (ctx.majk.config.has("aws.pluginMarket.apiEndpoint")) {
1460
+ * // Plugin market is configured
1461
+ * }
1462
+ *
1463
+ * @example
1464
+ * // Discover available config keys
1465
+ * const awsKeys = ctx.majk.config.keys("aws");
1466
+ * // Returns: ["pluginMarket", "telemetry", "tokenUsage"]
1467
+ */
1468
+ export interface ConfigAPI {
1469
+ /**
1470
+ * Get a configuration value by path using dot notation
1471
+ *
1472
+ * Supports nested access with dots (e.g., "aws.pluginMarket.apiEndpoint")
1473
+ * Returns undefined if path doesn't exist, or defaultValue if provided
1474
+ *
1475
+ * Type-safe: You can specify the expected return type with generics
1476
+ *
1477
+ * @param path - Dot-notation path to config value (e.g., "aws.telemetry.region")
1478
+ * @param defaultValue - Optional default value if path doesn't exist
1479
+ * @returns The configuration value or defaultValue or undefined
1480
+ *
1481
+ * @example
1482
+ * // Simple get
1483
+ * const region = ctx.majk.config.get("aws.pluginMarket.region");
1484
+ *
1485
+ * @example
1486
+ * // With default
1487
+ * const enabled = ctx.majk.config.get("aws.pluginMarket.enabled", true);
1488
+ *
1489
+ * @example
1490
+ * // Get object
1491
+ * const telemetry = ctx.majk.config.get("aws.telemetry");
1492
+ *
1493
+ * @example
1494
+ * // Type-safe
1495
+ * interface MarketConfig { apiEndpoint: string; region: string; }
1496
+ * const config = ctx.majk.config.get<MarketConfig>("aws.pluginMarket");
1497
+ */
1498
+ get<T = any>(path: string, defaultValue?: T): T | undefined;
1499
+ /**
1500
+ * Check if a configuration path exists
1501
+ *
1502
+ * Returns true if the path exists in the configuration, false otherwise
1503
+ * Useful for feature detection or conditional logic
1504
+ *
1505
+ * @param path - Dot-notation path to check (e.g., "aws.pluginMarket")
1506
+ * @returns True if path exists, false otherwise
1507
+ *
1508
+ * @example
1509
+ * if (ctx.majk.config.has("aws.pluginMarket.apiEndpoint")) {
1510
+ * // Plugin market is configured, use it
1511
+ * const endpoint = ctx.majk.config.get("aws.pluginMarket.apiEndpoint");
1512
+ * } else {
1513
+ * // Fallback to alternative approach
1514
+ * }
1515
+ *
1516
+ * @example
1517
+ * // Check for experimental features
1518
+ * if (ctx.majk.config.has("experimental.newFeature")) {
1519
+ * // Enable new feature
1520
+ * }
1521
+ */
1522
+ has(path: string): boolean;
1523
+ /**
1524
+ * Get all configuration keys under a path
1525
+ *
1526
+ * Returns an array of key names at the specified path level
1527
+ * Useful for discovery, iteration, or building dynamic UIs
1528
+ *
1529
+ * @param path - Optional dot-notation path (omit for top-level keys)
1530
+ * @returns Array of key names, or empty array if path doesn't exist
1531
+ *
1532
+ * @example
1533
+ * // Top-level namespaces
1534
+ * ctx.majk.config.keys()
1535
+ * // Returns: ["aws", "auth", "bedrock", "plugins"]
1536
+ *
1537
+ * @example
1538
+ * // Discover AWS resources
1539
+ * ctx.majk.config.keys("aws")
1540
+ * // Returns: ["pluginMarket", "telemetry", "tokenUsage"]
1541
+ *
1542
+ * @example
1543
+ * // Plugin market properties
1544
+ * ctx.majk.config.keys("aws.pluginMarket")
1545
+ * // Returns: ["apiEndpoint", "region", "enabled"]
1546
+ *
1547
+ * @example
1548
+ * // Build dynamic UI
1549
+ * const awsServices = ctx.majk.config.keys("aws");
1550
+ * awsServices.forEach(service => {
1551
+ * const config = ctx.majk.config.get(`aws.${service}`);
1552
+ * // Display service configuration
1553
+ * });
1554
+ */
1555
+ keys(path?: string): string[];
1556
+ /**
1557
+ * Get the entire configuration object
1558
+ *
1559
+ * Returns a deep copy of the complete unified configuration
1560
+ * Should be used sparingly - prefer specific get() calls
1561
+ * Primarily for debugging, inspection, or advanced scenarios
1562
+ *
1563
+ * @returns Complete configuration object (deep copy)
1564
+ *
1565
+ * @example
1566
+ * // Debugging
1567
+ * console.log('Full config:', ctx.majk.config.getAll());
1568
+ *
1569
+ * @example
1570
+ * // Config inspection UI
1571
+ * const allConfig = ctx.majk.config.getAll();
1572
+ * displayConfigTree(allConfig);
1573
+ */
1574
+ getAll(): Record<string, any>;
1575
+ }
1576
+ /**
1577
+ * Context passed to skill setup/teardown functions
1578
+ */
1579
+ export interface SkillContext {
1580
+ /** ID of the teammate enabling the skill */
1581
+ teammateId: string;
1582
+ /** ID of the current conversation */
1583
+ conversationId: string;
1584
+ /** Root directory of the project */
1585
+ projectRootDir: string;
1586
+ /** Workspace directory for the project */
1587
+ projectWorkspaceDir: string;
1588
+ }
1589
+ /**
1590
+ * Setup function signature - called when skill is enabled
1591
+ * Returns additional context/instructions to prepend to skill instructions
1592
+ */
1593
+ export type SkillSetupFn = (context: SkillContext) => Promise<string | void>;
1594
+ /**
1595
+ * Teardown function signature - called when skill is disabled
1596
+ */
1597
+ export type SkillTeardownFn = (context: SkillContext) => Promise<void>;
1598
+ /**
1599
+ * Base skill definition - shared between DB and runtime skills
1600
+ */
1601
+ export interface SkillDefinition {
1602
+ /** Unique identifier for the skill */
1603
+ id: string;
1604
+ /** Display name for the skill */
1605
+ name: string;
1606
+ /** One-sentence description of what the skill does */
1607
+ description: string;
1608
+ /** Full instructions on how to accomplish tasks using this skill's tools */
1609
+ instructions: string;
1610
+ /** Optional tags for categorization and search */
1611
+ tags?: string[];
1612
+ /** Optional list of tool names this skill uses */
1613
+ tools?: string[];
1614
+ /** Whether the skill is currently enabled */
1615
+ enabled: boolean;
1616
+ }
1617
+ /**
1618
+ * Runtime-registered skill (can have functions)
1619
+ * Functions are not serialized - they exist only in memory
1620
+ */
1621
+ export interface RuntimeSkill extends SkillDefinition {
1622
+ /**
1623
+ * Optional setup function - called when skill is enabled.
1624
+ * Can return additional instructions to prepend to the skill.
1625
+ */
1626
+ setup?: SkillSetupFn;
1627
+ /**
1628
+ * Optional teardown function - called when skill is disabled.
1629
+ * Not currently used but reserved for future use.
1630
+ */
1631
+ teardown?: SkillTeardownFn;
1632
+ /** Source of the runtime skill (for debugging) */
1633
+ source?: string;
1634
+ }
1635
+ /**
1636
+ * Unified skill type returned from list/search operations
1637
+ * Omits functions since they don't serialize
1638
+ */
1639
+ export interface Skill extends SkillDefinition {
1640
+ /** Whether this skill is from the database (true) or runtime (false) */
1641
+ persisted: boolean;
1642
+ /** Whether this skill has a setup function */
1643
+ hasSetup: boolean;
1644
+ /** Whether this skill has a teardown function */
1645
+ hasTeardown: boolean;
1646
+ /** Source of the skill */
1647
+ source: 'database' | 'runtime';
1648
+ }
1649
+ /**
1650
+ * Summary of a skill for listing
1651
+ */
1652
+ export interface SkillSummary {
1653
+ /** Skill ID */
1654
+ id: string;
1655
+ /** Display name */
1656
+ name: string;
1657
+ /** One-sentence description */
1658
+ description: string;
1659
+ /** Whether enabled */
1660
+ enabled: boolean;
1661
+ /** Source */
1662
+ source: 'database' | 'runtime';
1663
+ /** Tags */
1664
+ tags?: string[];
1665
+ }
1666
+ export interface AddSkillInput {
1667
+ /** Unique identifier (auto-generated if not provided) */
1668
+ id?: string;
1669
+ /** Display name */
1670
+ name: string;
1671
+ /** One-sentence description */
1672
+ description: string;
1673
+ /** Full instructions */
1674
+ instructions: string;
1675
+ /** Optional tags */
1676
+ tags?: string[];
1677
+ /** Optional tool names */
1678
+ tools?: string[];
1679
+ /** Initial enabled state (default: true) */
1680
+ enabled?: boolean;
1681
+ }
1682
+ export interface UpdateSkillInput {
1683
+ /** Skill ID to update */
1684
+ id: string;
1685
+ /** Updated name */
1686
+ name?: string;
1687
+ /** Updated description */
1688
+ description?: string;
1689
+ /** Updated instructions */
1690
+ instructions?: string;
1691
+ /** Updated tags */
1692
+ tags?: string[];
1693
+ /** Updated tools */
1694
+ tools?: string[];
1695
+ /** Updated enabled state */
1696
+ enabled?: boolean;
1697
+ }
1698
+ export interface SearchSkillsInput {
1699
+ /** Free text query to search across name, description, instructions, tags */
1700
+ query: string;
1701
+ /** Limit results */
1702
+ limit?: number;
1703
+ /** Include disabled skills */
1704
+ includeDisabled?: boolean;
1705
+ }
1706
+ export interface EnableSkillInput {
1707
+ /** Skill ID or name to enable */
1708
+ skill: string;
1709
+ }
1710
+ export interface DisableSkillInput {
1711
+ /** Skill ID or name to disable */
1712
+ skill: string;
1713
+ }
1714
+ export interface DeleteSkillInput {
1715
+ /** Skill ID to delete */
1716
+ id: string;
1717
+ }
1718
+ export interface ListSkillsResult {
1719
+ skills: SkillSummary[];
1720
+ total: number;
1721
+ }
1722
+ export interface SearchSkillsResult {
1723
+ /** Skills that match the query well */
1724
+ matching: SkillSummary[];
1725
+ /** Skills that might be relevant */
1726
+ related: SkillSummary[];
1727
+ total: number;
1728
+ }
1729
+ export interface EnableSkillResult {
1730
+ /** Skill ID */
1731
+ id: string;
1732
+ /** Skill name */
1733
+ name: string;
1734
+ /** The full instructions to use */
1735
+ instructions: string;
1736
+ /** Additional setup instructions (if setup was called) */
1737
+ setupInstructions?: string;
1738
+ /** Tools used by this skill */
1739
+ tools?: string[];
1740
+ /** Whether setup was executed */
1741
+ setupExecuted: boolean;
1742
+ }
1743
+ export interface AddSkillResult {
1744
+ id: string;
1745
+ name: string;
1746
+ description: string;
1747
+ }
1748
+ export interface UpdateSkillResult {
1749
+ id: string;
1750
+ name: string;
1751
+ updated: boolean;
1752
+ }
1753
+ export type SkillEventType = 'skill_added' | 'skill_updated' | 'skill_deleted' | 'skill_enabled' | 'skill_disabled' | 'runtime_skill_registered' | 'runtime_skill_unregistered';
1754
+ export interface SkillEvent {
1755
+ type: SkillEventType;
1756
+ skillId: string;
1757
+ timestamp: Date;
1758
+ data?: any;
1759
+ }
1760
+ /**
1761
+ * Skills API - Provides access to skill discovery, management, and enablement.
1762
+ *
1763
+ * Skills are instructions on how to accomplish tasks using tools.
1764
+ * They can be:
1765
+ * - Database-persisted: Created via add(), no setup/teardown
1766
+ * - Runtime-registered: Created via registerRuntime(), can have setup/teardown
1767
+ *
1768
+ * @example
1769
+ * ```typescript
1770
+ * // List all available skills
1771
+ * const { skills } = await ctx.majk.skills.list();
1772
+ *
1773
+ * // Search for skills
1774
+ * const results = await ctx.majk.skills.search(conversationId, { query: 'code review' });
1775
+ *
1776
+ * // Enable a skill (calls setup if available)
1777
+ * const result = await ctx.majk.skills.enable(context, { skill: 'code-review-mode' });
1778
+ * console.log(result.instructions);
1779
+ *
1780
+ * // Register a runtime skill with setup/teardown
1781
+ * await ctx.majk.skills.registerRuntime({
1782
+ * id: 'my-skill',
1783
+ * name: 'My Custom Skill',
1784
+ * description: 'Does something useful',
1785
+ * instructions: 'Follow these steps...',
1786
+ * enabled: true,
1787
+ * setup: async (ctx) => 'Additional context from setup',
1788
+ * teardown: async (ctx) => { cleanup(); }
1789
+ * });
1790
+ * ```
1791
+ */
1792
+ export interface SkillsAPI {
1793
+ /**
1794
+ * List all available skills.
1795
+ *
1796
+ * @param conversationId - Optional conversation ID for scoped skills
1797
+ * @param includeDisabled - Include disabled skills in results
1798
+ * @returns List of skill summaries
1799
+ */
1800
+ list(conversationId?: string, includeDisabled?: boolean): Promise<ListSkillsResult>;
1801
+ /**
1802
+ * Search skills by query.
1803
+ *
1804
+ * @param conversationId - Optional conversation ID for scoped skills
1805
+ * @param input - Search parameters
1806
+ * @returns Matching and related skills
1807
+ */
1808
+ search(conversationId: string | undefined, input: SearchSkillsInput): Promise<SearchSkillsResult>;
1809
+ /**
1810
+ * Get a skill by ID.
1811
+ *
1812
+ * @param skillId - The skill ID
1813
+ * @returns Full skill data or null if not found
1814
+ */
1815
+ getById(skillId: string): Promise<Skill | null>;
1816
+ /**
1817
+ * Add a new skill to the database.
1818
+ *
1819
+ * @param conversationId - Optional conversation ID for scoped skills
1820
+ * @param input - Skill data
1821
+ * @returns Created skill summary
1822
+ */
1823
+ add(conversationId: string | undefined, input: AddSkillInput): Promise<AddSkillResult>;
1824
+ /**
1825
+ * Update an existing skill in the database.
1826
+ *
1827
+ * @param input - Update data including skill ID
1828
+ * @returns Updated skill summary
1829
+ */
1830
+ update(input: UpdateSkillInput): Promise<UpdateSkillResult>;
1831
+ /**
1832
+ * Delete a skill from the database.
1833
+ *
1834
+ * @param input - Delete parameters
1835
+ * @returns True if deleted
1836
+ */
1837
+ delete(input: DeleteSkillInput): Promise<boolean>;
1838
+ /**
1839
+ * Enable a skill and get its instructions.
1840
+ * Calls the skill's setup() function if available.
1841
+ *
1842
+ * @param context - Skill context with conversation and project info
1843
+ * @param input - Enable parameters
1844
+ * @returns Skill instructions and setup result
1845
+ */
1846
+ enable(context: SkillContext, input: EnableSkillInput): Promise<EnableSkillResult>;
1847
+ /**
1848
+ * Disable a skill.
1849
+ *
1850
+ * @param conversationId - Conversation ID
1851
+ * @param input - Disable parameters
1852
+ * @returns True if disabled
1853
+ */
1854
+ disable(conversationId: string, input: DisableSkillInput): Promise<boolean>;
1855
+ /**
1856
+ * Register a runtime skill (with optional setup/teardown).
1857
+ * Runtime skills are not persisted and exist only in memory.
1858
+ *
1859
+ * @param skill - Runtime skill definition
1860
+ */
1861
+ registerRuntime(skill: RuntimeSkill): Promise<void>;
1862
+ /**
1863
+ * Unregister a runtime skill.
1864
+ *
1865
+ * @param skillId - The skill ID to unregister
1866
+ * @returns True if the skill was found and removed
1867
+ */
1868
+ unregisterRuntime(skillId: string): Promise<boolean>;
1869
+ /**
1870
+ * Get a runtime skill by ID (if it exists).
1871
+ *
1872
+ * @param skillId - The skill ID
1873
+ * @returns Runtime skill or undefined
1874
+ */
1875
+ getRuntime(skillId: string): Promise<RuntimeSkill | undefined>;
1876
+ /**
1877
+ * Subscribe to skill events.
1878
+ *
1879
+ * @param eventType - The event type to listen for
1880
+ * @param handler - Event handler function
1881
+ * @returns Unsubscribe function
1882
+ */
1883
+ on(eventType: SkillEventType, handler: (event: SkillEvent) => void): Promise<Unsubscribe>;
1884
+ }
1424
1885
  export interface MajkInterface {
1425
1886
  readonly version: string;
1887
+ readonly config: ConfigAPI;
1426
1888
  readonly plugins: PluginManagementAPI;
1427
1889
  readonly secrets: SecretsAPI;
1428
1890
  readonly tasks: TaskAPI;
@@ -1436,6 +1898,7 @@ export interface MajkInterface {
1436
1898
  readonly mcpServers: MCPServerAPI;
1437
1899
  readonly knowledge: KnowledgeAPI;
1438
1900
  readonly agents: AgentAPI;
1901
+ readonly skills: SkillsAPI;
1439
1902
  }
1440
1903
  export {};
1441
1904
  //# sourceMappingURL=majk-interface-types.d.ts.map