@omnidev-ai/core 0.10.0 → 0.11.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.d.ts +9 -46
- package/dist/index.js +134 -276
- package/package.json +1 -1
- package/src/capability/loader.ts +2 -14
- package/src/capability/registry.ts +1 -3
- package/src/config/capabilities.ts +3 -3
- package/src/config/config.ts +22 -67
- package/src/config/index.ts +0 -1
- package/src/config/profiles.ts +5 -16
- package/src/config/toml-patcher.ts +3 -5
- package/src/sync.ts +10 -31
- package/src/templates/capability.ts +4 -24
- package/src/templates/claude.ts +0 -4
- package/src/types/index.ts +4 -13
- package/src/capability/AGENTS.md +0 -58
- package/src/config/AGENTS.md +0 -46
- package/src/config/env.ts +0 -97
package/dist/index.d.ts
CHANGED
|
@@ -330,11 +330,6 @@ interface CapabilityExports {
|
|
|
330
330
|
module?: string;
|
|
331
331
|
gitignore?: string[];
|
|
332
332
|
}
|
|
333
|
-
interface EnvDeclaration {
|
|
334
|
-
required?: boolean;
|
|
335
|
-
secret?: boolean;
|
|
336
|
-
default?: string;
|
|
337
|
-
}
|
|
338
333
|
interface SyncConfig {
|
|
339
334
|
on_sync?: string;
|
|
340
335
|
}
|
|
@@ -344,7 +339,6 @@ interface CliConfig {
|
|
|
344
339
|
interface CapabilityConfig {
|
|
345
340
|
capability: CapabilityMetadata;
|
|
346
341
|
exports?: CapabilityExports;
|
|
347
|
-
env?: Record<string, EnvDeclaration | Record<string, never>>;
|
|
348
342
|
mcp?: McpConfig;
|
|
349
343
|
sync?: SyncConfig;
|
|
350
344
|
cli?: CliConfig;
|
|
@@ -360,7 +354,7 @@ interface McpToolSchema {
|
|
|
360
354
|
*
|
|
361
355
|
* - **stdio**: Local process using stdin/stdout (default)
|
|
362
356
|
* - Requires: command
|
|
363
|
-
* - Optional: args,
|
|
357
|
+
* - Optional: args, cwd
|
|
364
358
|
*
|
|
365
359
|
* - **http**: Remote HTTP server (recommended for remote servers)
|
|
366
360
|
* - Requires: url
|
|
@@ -500,20 +494,18 @@ interface CapabilitiesConfig {
|
|
|
500
494
|
sources?: Record<string, CapabilitySourceConfig>;
|
|
501
495
|
/** Capability groups: group name -> array of capability IDs */
|
|
502
496
|
groups?: Record<string, string[]>;
|
|
497
|
+
/** Capabilities that load in ALL profiles, regardless of profile config */
|
|
498
|
+
always_enabled?: string[];
|
|
503
499
|
}
|
|
504
500
|
interface ProfileConfig {
|
|
505
501
|
capabilities?: string[];
|
|
506
502
|
}
|
|
507
503
|
interface OmniConfig {
|
|
508
|
-
project?: string;
|
|
509
|
-
active_profile?: string;
|
|
510
|
-
always_enabled_capabilities?: string[];
|
|
511
|
-
env?: Record<string, string>;
|
|
512
504
|
profiles?: Record<string, ProfileConfig>;
|
|
513
505
|
providers?: {
|
|
514
506
|
enabled?: Provider[];
|
|
515
507
|
};
|
|
516
|
-
/** Capabilities configuration (enable/disable, sources) */
|
|
508
|
+
/** Capabilities configuration (enable/disable, sources, always_enabled) */
|
|
517
509
|
capabilities?: CapabilitiesConfig;
|
|
518
510
|
/** MCP server definitions that auto-generate capabilities */
|
|
519
511
|
mcps?: Record<string, McpConfig>;
|
|
@@ -621,14 +613,11 @@ declare function discoverCapabilities(): Promise<string[]>;
|
|
|
621
613
|
declare function loadCapabilityConfig(capabilityPath: string): Promise<CapabilityConfig>;
|
|
622
614
|
/**
|
|
623
615
|
* Loads a complete capability including config, skills, rules, docs, and exports.
|
|
624
|
-
* Validates environment requirements before loading.
|
|
625
|
-
*
|
|
626
616
|
* @param capabilityPath - Path to the capability directory
|
|
627
|
-
* @param env - Environment variables to validate against
|
|
628
617
|
* @returns Fully loaded capability
|
|
629
|
-
* @throws Error if
|
|
618
|
+
* @throws Error if loading errors occur
|
|
630
619
|
*/
|
|
631
|
-
declare function loadCapability(capabilityPath: string
|
|
620
|
+
declare function loadCapability(capabilityPath: string): Promise<LoadedCapability>;
|
|
632
621
|
/**
|
|
633
622
|
* Registry of loaded capabilities with helper functions.
|
|
634
623
|
*/
|
|
@@ -921,32 +910,6 @@ declare function enableCapability(capabilityId: string): Promise<void>;
|
|
|
921
910
|
*/
|
|
922
911
|
declare function disableCapability(capabilityId: string): Promise<void>;
|
|
923
912
|
/**
|
|
924
|
-
* Load environment variables from .omni/.env file and merge with process.env.
|
|
925
|
-
* Process environment variables take precedence over file values.
|
|
926
|
-
*
|
|
927
|
-
* @returns Merged environment variables
|
|
928
|
-
*/
|
|
929
|
-
declare function loadEnvironment(): Promise<Record<string, string>>;
|
|
930
|
-
/**
|
|
931
|
-
* Validate that all required environment variables are present.
|
|
932
|
-
* Checks declarations from capability config and throws descriptive errors for missing vars.
|
|
933
|
-
*
|
|
934
|
-
* @param declarations - Environment variable declarations from capability.toml
|
|
935
|
-
* @param env - Loaded environment variables
|
|
936
|
-
* @param capabilityId - ID of the capability being validated
|
|
937
|
-
* @throws Error if required environment variables are missing
|
|
938
|
-
*/
|
|
939
|
-
declare function validateEnv(declarations: Record<string, EnvDeclaration | Record<string, never>>, env: Record<string, string | undefined>, capabilityId: string): void;
|
|
940
|
-
/**
|
|
941
|
-
* Check if an environment variable should be treated as a secret.
|
|
942
|
-
* Secrets should be masked in logs and error messages.
|
|
943
|
-
*
|
|
944
|
-
* @param key - Environment variable name
|
|
945
|
-
* @param declarations - Environment variable declarations from capability.toml
|
|
946
|
-
* @returns true if the variable is marked as secret
|
|
947
|
-
*/
|
|
948
|
-
declare function isSecretEnvVar(key: string, declarations: Record<string, EnvDeclaration | Record<string, never>>): boolean;
|
|
949
|
-
/**
|
|
950
913
|
* Load only the base config file (omni.toml) without merging local overrides.
|
|
951
914
|
* Use this when you need to modify and write back to omni.toml.
|
|
952
915
|
* @returns OmniConfig from omni.toml only
|
|
@@ -980,8 +943,7 @@ declare function parseOmniConfig(tomlContent: string): OmniConfig;
|
|
|
980
943
|
*/
|
|
981
944
|
declare function parseCapabilityConfig(tomlContent: string): CapabilityConfig;
|
|
982
945
|
/**
|
|
983
|
-
* Gets the name of the currently active profile.
|
|
984
|
-
* Reads from state file first, falls back to config.toml for backwards compatibility.
|
|
946
|
+
* Gets the name of the currently active profile from the state file.
|
|
985
947
|
* Returns null if no profile is set.
|
|
986
948
|
*/
|
|
987
949
|
declare function getActiveProfile(): Promise<string | null>;
|
|
@@ -1224,6 +1186,7 @@ declare function generateCapabilityToml(options: CapabilityTemplateOptions): str
|
|
|
1224
1186
|
declare function generateSkillTemplate(skillName: string): string;
|
|
1225
1187
|
/**
|
|
1226
1188
|
* Generate a rule markdown template file.
|
|
1189
|
+
* Rules should start with a ### header and contain guidelines for AI agents.
|
|
1227
1190
|
*/
|
|
1228
1191
|
declare function generateRuleTemplate(ruleName: string): string;
|
|
1229
1192
|
/**
|
|
@@ -1251,4 +1214,4 @@ declare function generateOmniMdTemplate(): string;
|
|
|
1251
1214
|
declare function debug(message: string, data?: unknown): void;
|
|
1252
1215
|
declare const version = "0.1.0";
|
|
1253
1216
|
declare function getVersion(): string;
|
|
1254
|
-
export { writeProviderConfig, writeMcpJson, writeEnabledProviders, writeConfig, writeActiveProfileState, version, validateHooksConfig, validateHook,
|
|
1217
|
+
export { writeProviderConfig, writeMcpJson, writeEnabledProviders, writeConfig, writeActiveProfileState, version, validateHooksConfig, validateHook, transformToOmnidev, transformToClaude, transformHooksConfig, syncMcpJson, syncAgentConfiguration, sourceToGitUrl, setProfile, setActiveProfile, saveManifest, saveLockFile, resolveEnabledCapabilities, readMcpJson, readEnabledProviders, readCapabilityIdFromPath, readActiveProfileState, patchAddToProfile, patchAddMcp, patchAddCapabilitySource, parseSourceConfig, parseProviderFlag, parseOmniConfig, parseFileSourcePath, parseCapabilityConfig, mergeHooksConfigs, mergeAndDeduplicateHooks, loadSubagents, loadSkills, loadRules, loadProviderConfig, loadProfileConfig, loadManifest, loadLockFile, loadHooksFromCapability, loadDocs, loadConfig, loadCommands, loadCapabilityHooks, loadCapabilityConfig, loadCapability, loadBaseConfig, isValidMatcherPattern, isProviderEnabled, isPromptHookEvent, isMatcherEvent, isHookType, isHookPrompt, isHookEvent, isHookCommand, isGitSource, isFileSourceConfig, isFileSource, installCapabilityDependencies, hasHooks, hasAnyHooks, getVersion, getSourceCapabilityPath, getLockFilePath, getHooksDirectory, getHooksConfigPath, getEventsWithHooks, getEnabledCapabilities, getActiveProviders, getActiveProfile, generateSkillTemplate, generateRuleTemplate, generateOmniMdTemplate, generateHooksTemplate, generateHookScript, generateClaudeTemplate, generateCapabilityToml, generateAgentsTemplate, findDuplicateCommands, fetchCapabilitySource, fetchAllCapabilitySources, enableProvider, enableCapability, discoverCapabilities, disableProvider, disableCapability, debug, createEmptyValidationResult, createEmptyHooksConfig, countHooks, containsOmnidevVariables, containsClaudeVariables, clearActiveProfileState, cleanupStaleResources, checkForUpdates, buildSyncBundle, buildRouteMap, buildManifestFromCapabilities, buildCommand, buildCapabilityRegistry, ValidationSeverity, VARIABLE_MAPPINGS, SyncResult, SyncOptions, SyncConfig, SyncBundle, SubagentPermissionMode, SubagentModel, SubagentHooks, SubagentHookConfig, SubagentExport, Subagent, SourceUpdateInfo, SkillExport, Skill, SessionStartMatcher, SESSION_START_MATCHERS, Rule, ResourceManifest, ProvidersState, ProviderSyncResult, ProviderManifest, ProviderInitResult, ProviderId, ProviderContext, ProviderConfig, ProviderAdapter, Provider, PromptHookEvent, ProfileConfig, PreCompactMatcher, PROMPT_HOOK_EVENTS, PRE_COMPACT_MATCHERS, OmnidevVariable, OmniConfig, NotificationMatcher, NOTIFICATION_MATCHERS, McpTransport, McpToolSchema, McpServerStdioConfig, McpServerSseConfig, McpServerHttpConfig, McpServerConfig, McpJsonConfig, McpConfig, MatcherEvent, MATCHER_EVENTS, LoadedCapability, LoadHooksResult, LoadHooksOptions, HooksDoctorResult, HooksDoctorCheck, HooksConfig, HookValidationResult, HookValidationIssue, HookValidationCode, HookType, HookPrompt, HookMatcher, HookEvent, HookCommand, Hook, HOOK_TYPES, HOOK_EVENTS, HOOKS_DIRECTORY, HOOKS_CONFIG_FILENAME, GitCapabilitySourceConfig, FileContent, FileCapabilitySourceConfig, FetchResult, DoctorCheckStatus, DocExport, Doc, DiscoveredContent, DeduplicateOptions, DEFAULT_PROMPT_TIMEOUT, DEFAULT_COMMAND_TIMEOUT, CommandExport, Command, CliConfig, CleanupResult, ClaudeVariable, CapabilityTemplateOptions, CapabilitySourceType, CapabilitySourceConfig, CapabilitySource, CapabilityResources, CapabilityRegistry, CapabilityMetadata, CapabilityLockEntry, CapabilityHooks, CapabilityExports, CapabilityExport, CapabilityConfig, CapabilitiesLockFile, CapabilitiesConfig, COMMON_TOOL_MATCHERS };
|