@omnidev-ai/core 0.7.0 → 0.9.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 +337 -1
- package/dist/index.js +1222 -140
- package/package.json +1 -1
- package/src/capability/loader.ts +9 -0
- package/src/capability/registry.ts +19 -1
- package/src/capability/sources.ts +36 -1
- package/src/config/capabilities.ts +1 -1
- package/src/config/{loader.ts → config.ts} +25 -6
- package/src/config/index.ts +2 -1
- package/src/config/profiles.ts +23 -3
- package/src/config/toml-patcher.ts +309 -0
- package/src/hooks/constants.ts +100 -0
- package/src/hooks/index.ts +99 -0
- package/src/hooks/loader.ts +189 -0
- package/src/hooks/merger.ts +157 -0
- package/src/hooks/types.ts +212 -0
- package/src/hooks/validation.ts +516 -0
- package/src/hooks/variables.ts +151 -0
- package/src/index.ts +4 -0
- package/src/sync.ts +10 -1
- package/src/templates/omni.ts +25 -0
- package/src/types/index.ts +23 -0
package/dist/index.d.ts
CHANGED
|
@@ -138,6 +138,171 @@ interface CapabilityExport {
|
|
|
138
138
|
/** Additional exports for extensibility */
|
|
139
139
|
[key: string]: unknown;
|
|
140
140
|
}
|
|
141
|
+
/**
|
|
142
|
+
* Hook system constants
|
|
143
|
+
*
|
|
144
|
+
* All constants are defined as readonly arrays/objects to enable
|
|
145
|
+
* TypeScript literal type inference.
|
|
146
|
+
*/
|
|
147
|
+
/** All supported hook events */
|
|
148
|
+
declare const HOOK_EVENTS: readonly ["PreToolUse", "PostToolUse", "PermissionRequest", "UserPromptSubmit", "Stop", "SubagentStop", "Notification", "SessionStart", "SessionEnd", "PreCompact"];
|
|
149
|
+
/** Events that support matchers (regex patterns to filter tool names) */
|
|
150
|
+
declare const MATCHER_EVENTS: readonly ["PreToolUse", "PostToolUse", "PermissionRequest", "Notification", "SessionStart", "PreCompact"];
|
|
151
|
+
/** Events that support prompt-type hooks (LLM evaluation) */
|
|
152
|
+
declare const PROMPT_HOOK_EVENTS: readonly ["Stop", "SubagentStop", "UserPromptSubmit", "PreToolUse", "PermissionRequest"];
|
|
153
|
+
/** Hook execution types */
|
|
154
|
+
declare const HOOK_TYPES: readonly ["command", "prompt"];
|
|
155
|
+
/**
|
|
156
|
+
* Common tool matchers (for validation hints, not exhaustive)
|
|
157
|
+
* These are the tools available in Claude Code that hooks commonly target.
|
|
158
|
+
*/
|
|
159
|
+
declare const COMMON_TOOL_MATCHERS: readonly ["Bash", "Read", "Write", "Edit", "Glob", "Grep", "Task", "WebFetch", "WebSearch", "NotebookEdit", "LSP", "TodoWrite", "AskUserQuestion"];
|
|
160
|
+
/** Notification type matchers */
|
|
161
|
+
declare const NOTIFICATION_MATCHERS: readonly ["permission_prompt", "idle_prompt", "auth_success", "elicitation_dialog"];
|
|
162
|
+
/** SessionStart source matchers */
|
|
163
|
+
declare const SESSION_START_MATCHERS: readonly ["startup", "resume", "clear", "compact"];
|
|
164
|
+
/** PreCompact trigger matchers */
|
|
165
|
+
declare const PRE_COMPACT_MATCHERS: readonly ["manual", "auto"];
|
|
166
|
+
/** Default timeout for command hooks (in seconds) */
|
|
167
|
+
declare const DEFAULT_COMMAND_TIMEOUT = 60;
|
|
168
|
+
/** Default timeout for prompt hooks (in seconds) */
|
|
169
|
+
declare const DEFAULT_PROMPT_TIMEOUT = 30;
|
|
170
|
+
/**
|
|
171
|
+
* Environment variable mappings between OmniDev and Claude Code
|
|
172
|
+
*
|
|
173
|
+
* When capabilities define hooks, they use OMNIDEV_ prefixed variables.
|
|
174
|
+
* When writing to .claude/settings.json, these are transformed to CLAUDE_ variables.
|
|
175
|
+
* When importing external capabilities, CLAUDE_ variables are transformed to OMNIDEV_.
|
|
176
|
+
*/
|
|
177
|
+
declare const VARIABLE_MAPPINGS: {
|
|
178
|
+
readonly OMNIDEV_CAPABILITY_ROOT: "CLAUDE_PLUGIN_ROOT";
|
|
179
|
+
readonly OMNIDEV_PROJECT_DIR: "CLAUDE_PROJECT_DIR";
|
|
180
|
+
};
|
|
181
|
+
/** The hooks configuration filename within a capability */
|
|
182
|
+
declare const HOOKS_CONFIG_FILENAME = "hooks.toml";
|
|
183
|
+
/** The hooks directory name within a capability */
|
|
184
|
+
declare const HOOKS_DIRECTORY = "hooks";
|
|
185
|
+
/** All supported hook event names */
|
|
186
|
+
type HookEvent = (typeof HOOK_EVENTS)[number];
|
|
187
|
+
/** Hook execution types: command or prompt */
|
|
188
|
+
type HookType = (typeof HOOK_TYPES)[number];
|
|
189
|
+
/** Events that support matcher patterns */
|
|
190
|
+
type MatcherEvent = (typeof MATCHER_EVENTS)[number];
|
|
191
|
+
/** Events that support prompt-type hooks */
|
|
192
|
+
type PromptHookEvent = (typeof PROMPT_HOOK_EVENTS)[number];
|
|
193
|
+
type NotificationMatcher = (typeof NOTIFICATION_MATCHERS)[number];
|
|
194
|
+
type SessionStartMatcher = (typeof SESSION_START_MATCHERS)[number];
|
|
195
|
+
type PreCompactMatcher = (typeof PRE_COMPACT_MATCHERS)[number];
|
|
196
|
+
type OmnidevVariable = keyof typeof VARIABLE_MAPPINGS;
|
|
197
|
+
type ClaudeVariable = (typeof VARIABLE_MAPPINGS)[OmnidevVariable];
|
|
198
|
+
/** Command-type hook that executes a shell command */
|
|
199
|
+
interface HookCommand {
|
|
200
|
+
type: "command";
|
|
201
|
+
/** Shell command to execute */
|
|
202
|
+
command: string;
|
|
203
|
+
/** Timeout in seconds (default: 60) */
|
|
204
|
+
timeout?: number;
|
|
205
|
+
}
|
|
206
|
+
/** Prompt-type hook that uses LLM evaluation */
|
|
207
|
+
interface HookPrompt {
|
|
208
|
+
type: "prompt";
|
|
209
|
+
/** Prompt text to send to LLM (use $ARGUMENTS for input) */
|
|
210
|
+
prompt: string;
|
|
211
|
+
/** Timeout in seconds (default: 30) */
|
|
212
|
+
timeout?: number;
|
|
213
|
+
}
|
|
214
|
+
/** Union of all hook types */
|
|
215
|
+
type Hook = HookCommand | HookPrompt;
|
|
216
|
+
/** Hook matcher entry - groups hooks by matcher pattern */
|
|
217
|
+
interface HookMatcher {
|
|
218
|
+
/**
|
|
219
|
+
* Regex pattern to match tool/event names
|
|
220
|
+
* - Use "*" or "" to match all
|
|
221
|
+
* - Supports regex: "Edit|Write", "Bash.*"
|
|
222
|
+
*/
|
|
223
|
+
matcher?: string;
|
|
224
|
+
/** Array of hooks to execute when pattern matches */
|
|
225
|
+
hooks: Hook[];
|
|
226
|
+
}
|
|
227
|
+
/** Full hooks configuration from hooks.toml */
|
|
228
|
+
interface HooksConfig {
|
|
229
|
+
/** Optional description of the hooks */
|
|
230
|
+
description?: string;
|
|
231
|
+
PreToolUse?: HookMatcher[];
|
|
232
|
+
PostToolUse?: HookMatcher[];
|
|
233
|
+
PermissionRequest?: HookMatcher[];
|
|
234
|
+
Notification?: HookMatcher[];
|
|
235
|
+
SessionStart?: HookMatcher[];
|
|
236
|
+
PreCompact?: HookMatcher[];
|
|
237
|
+
UserPromptSubmit?: HookMatcher[];
|
|
238
|
+
Stop?: HookMatcher[];
|
|
239
|
+
SubagentStop?: HookMatcher[];
|
|
240
|
+
SessionEnd?: HookMatcher[];
|
|
241
|
+
}
|
|
242
|
+
type ValidationSeverity = "error" | "warning";
|
|
243
|
+
/** Validation error codes for consistent reporting */
|
|
244
|
+
type HookValidationCode = "HOOKS_INVALID_TOML" | "HOOKS_UNKNOWN_EVENT" | "HOOKS_INVALID_TYPE" | "HOOKS_PROMPT_NOT_ALLOWED" | "HOOKS_MISSING_COMMAND" | "HOOKS_MISSING_PROMPT" | "HOOKS_INVALID_TIMEOUT" | "HOOKS_INVALID_MATCHER" | "HOOKS_SCRIPT_NOT_FOUND" | "HOOKS_SCRIPT_NOT_EXECUTABLE" | "HOOKS_CLAUDE_VARIABLE" | "HOOKS_EMPTY_ARRAY" | "HOOKS_DUPLICATE_COMMAND" | "HOOKS_INVALID_HOOKS_ARRAY";
|
|
245
|
+
interface HookValidationIssue {
|
|
246
|
+
severity: ValidationSeverity;
|
|
247
|
+
/** Validation error code */
|
|
248
|
+
code: HookValidationCode;
|
|
249
|
+
/** Which event the issue is in */
|
|
250
|
+
event?: HookEvent;
|
|
251
|
+
/** Which matcher index (0-based) */
|
|
252
|
+
matcherIndex?: number;
|
|
253
|
+
/** Which hook index within the matcher (0-based) */
|
|
254
|
+
hookIndex?: number;
|
|
255
|
+
/** Human-readable error message */
|
|
256
|
+
message: string;
|
|
257
|
+
/** File path if applicable (for script validation) */
|
|
258
|
+
path?: string;
|
|
259
|
+
/** Suggestion for fixing the issue */
|
|
260
|
+
suggestion?: string;
|
|
261
|
+
}
|
|
262
|
+
interface HookValidationResult {
|
|
263
|
+
valid: boolean;
|
|
264
|
+
errors: HookValidationIssue[];
|
|
265
|
+
warnings: HookValidationIssue[];
|
|
266
|
+
}
|
|
267
|
+
/** Hooks metadata attached to a capability */
|
|
268
|
+
interface CapabilityHooks {
|
|
269
|
+
/** Source capability name */
|
|
270
|
+
capabilityName: string;
|
|
271
|
+
/** Source capability path */
|
|
272
|
+
capabilityPath: string;
|
|
273
|
+
/** The hooks configuration */
|
|
274
|
+
config: HooksConfig;
|
|
275
|
+
/** Validation result */
|
|
276
|
+
validation: HookValidationResult;
|
|
277
|
+
}
|
|
278
|
+
type DoctorCheckStatus = "pass" | "fail" | "warn";
|
|
279
|
+
interface HooksDoctorCheck {
|
|
280
|
+
name: string;
|
|
281
|
+
status: DoctorCheckStatus;
|
|
282
|
+
message: string;
|
|
283
|
+
details?: string[];
|
|
284
|
+
}
|
|
285
|
+
interface HooksDoctorResult {
|
|
286
|
+
checks: HooksDoctorCheck[];
|
|
287
|
+
summary: {
|
|
288
|
+
total: number;
|
|
289
|
+
passed: number;
|
|
290
|
+
failed: number;
|
|
291
|
+
warnings: number;
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
/** Check if a hook is a command hook */
|
|
295
|
+
declare function isHookCommand(hook: Hook): hook is HookCommand;
|
|
296
|
+
/** Check if a hook is a prompt hook */
|
|
297
|
+
declare function isHookPrompt(hook: Hook): hook is HookPrompt;
|
|
298
|
+
/** Check if an event supports matchers */
|
|
299
|
+
declare function isMatcherEvent(event: string): event is MatcherEvent;
|
|
300
|
+
/** Check if an event supports prompt-type hooks */
|
|
301
|
+
declare function isPromptHookEvent(event: string): event is PromptHookEvent;
|
|
302
|
+
/** Check if a string is a valid hook event */
|
|
303
|
+
declare function isHookEvent(event: string): event is HookEvent;
|
|
304
|
+
/** Check if a string is a valid hook type */
|
|
305
|
+
declare function isHookType(type: string): type is HookType;
|
|
141
306
|
interface CapabilityMetadata {
|
|
142
307
|
id: string;
|
|
143
308
|
name: string;
|
|
@@ -324,6 +489,8 @@ interface CapabilitiesConfig {
|
|
|
324
489
|
disable?: string[];
|
|
325
490
|
/** Capability sources: id -> source string or full config (git or file) */
|
|
326
491
|
sources?: Record<string, CapabilitySourceConfig>;
|
|
492
|
+
/** Capability groups: group name -> array of capability IDs */
|
|
493
|
+
groups?: Record<string, string[]>;
|
|
327
494
|
}
|
|
328
495
|
interface ProfileConfig {
|
|
329
496
|
capabilities?: string[];
|
|
@@ -374,6 +541,8 @@ interface LoadedCapability {
|
|
|
374
541
|
exports: Record<string, unknown>;
|
|
375
542
|
/** Where this capability comes from */
|
|
376
543
|
source?: CapabilitySource;
|
|
544
|
+
/** Hooks configuration from hooks/hooks.toml */
|
|
545
|
+
hooks?: CapabilityHooks;
|
|
377
546
|
}
|
|
378
547
|
type ProviderId = Provider | (string & {});
|
|
379
548
|
interface SyncBundle {
|
|
@@ -383,6 +552,8 @@ interface SyncBundle {
|
|
|
383
552
|
docs: Doc[];
|
|
384
553
|
commands: Command[];
|
|
385
554
|
subagents: Subagent[];
|
|
555
|
+
/** Merged hooks from all capabilities */
|
|
556
|
+
hooks?: HooksConfig;
|
|
386
557
|
instructionsPath: string;
|
|
387
558
|
instructionsContent: string;
|
|
388
559
|
}
|
|
@@ -459,6 +630,10 @@ interface CapabilityRegistry {
|
|
|
459
630
|
getAllSkills(): Skill[];
|
|
460
631
|
getAllRules(): Rule[];
|
|
461
632
|
getAllDocs(): Doc[];
|
|
633
|
+
/** Get all capability hooks metadata */
|
|
634
|
+
getAllCapabilityHooks(): CapabilityHooks[];
|
|
635
|
+
/** Get merged hooks from all capabilities */
|
|
636
|
+
getMergedHooks(): HooksConfig;
|
|
462
637
|
}
|
|
463
638
|
/**
|
|
464
639
|
* Builds a capability registry by discovering, loading, and filtering capabilities.
|
|
@@ -567,6 +742,149 @@ declare function checkForUpdates(config: OmniConfig): Promise<SourceUpdateInfo[]
|
|
|
567
742
|
* Each subagent is a SUBAGENT.md file in its own subdirectory.
|
|
568
743
|
*/
|
|
569
744
|
declare function loadSubagents(capabilityPath: string, capabilityId: string): Promise<Subagent[]>;
|
|
745
|
+
interface ValidationOptions {
|
|
746
|
+
/** Base path for resolving script files */
|
|
747
|
+
basePath?: string;
|
|
748
|
+
/** Check if script files exist and are executable */
|
|
749
|
+
checkScripts?: boolean;
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* Validate a hooks configuration object
|
|
753
|
+
*/
|
|
754
|
+
declare function validateHooksConfig(config: unknown, options?: ValidationOptions): HookValidationResult;
|
|
755
|
+
/**
|
|
756
|
+
* Validate a single hook entry
|
|
757
|
+
*/
|
|
758
|
+
declare function validateHook(hook: unknown, event: HookEvent, context: {
|
|
759
|
+
matcherIndex: number;
|
|
760
|
+
hookIndex: number;
|
|
761
|
+
}, options?: ValidationOptions): HookValidationIssue[];
|
|
762
|
+
/**
|
|
763
|
+
* Check if a matcher regex pattern is valid
|
|
764
|
+
*/
|
|
765
|
+
declare function isValidMatcherPattern(pattern: string): boolean;
|
|
766
|
+
/**
|
|
767
|
+
* Check for duplicate commands across all hooks
|
|
768
|
+
*/
|
|
769
|
+
declare function findDuplicateCommands(config: HooksConfig): HookValidationIssue[];
|
|
770
|
+
/**
|
|
771
|
+
* Create an empty valid hooks config
|
|
772
|
+
*/
|
|
773
|
+
declare function createEmptyHooksConfig(): HooksConfig;
|
|
774
|
+
/**
|
|
775
|
+
* Create an empty validation result (valid with no issues)
|
|
776
|
+
*/
|
|
777
|
+
declare function createEmptyValidationResult(): HookValidationResult;
|
|
778
|
+
/**
|
|
779
|
+
* Transform Claude Code variables to OmniDev format
|
|
780
|
+
* Used when: importing/wrapping external capabilities
|
|
781
|
+
*
|
|
782
|
+
* CLAUDE_PLUGIN_ROOT -> OMNIDEV_CAPABILITY_ROOT
|
|
783
|
+
* CLAUDE_PROJECT_DIR -> OMNIDEV_PROJECT_DIR
|
|
784
|
+
*/
|
|
785
|
+
declare function transformToOmnidev(content: string): string;
|
|
786
|
+
/**
|
|
787
|
+
* Transform OmniDev variables to Claude Code format
|
|
788
|
+
* Used when: writing to .claude/settings.json
|
|
789
|
+
*
|
|
790
|
+
* OMNIDEV_CAPABILITY_ROOT -> CLAUDE_PLUGIN_ROOT
|
|
791
|
+
* OMNIDEV_PROJECT_DIR -> CLAUDE_PROJECT_DIR
|
|
792
|
+
*/
|
|
793
|
+
declare function transformToClaude(content: string): string;
|
|
794
|
+
/**
|
|
795
|
+
* Transform all variables in a HooksConfig
|
|
796
|
+
*/
|
|
797
|
+
declare function transformHooksConfig(config: HooksConfig, direction: "toOmnidev" | "toClaude"): HooksConfig;
|
|
798
|
+
/**
|
|
799
|
+
* Check if a string contains any Claude variables
|
|
800
|
+
*/
|
|
801
|
+
declare function containsClaudeVariables(content: string): boolean;
|
|
802
|
+
/**
|
|
803
|
+
* Check if a string contains any OmniDev variables
|
|
804
|
+
*/
|
|
805
|
+
declare function containsOmnidevVariables(content: string): boolean;
|
|
806
|
+
interface LoadHooksOptions {
|
|
807
|
+
/** Transform Claude variables to OmniDev format (default: true) */
|
|
808
|
+
transformVariables?: boolean;
|
|
809
|
+
/** Validate the hooks configuration (default: true) */
|
|
810
|
+
validate?: boolean;
|
|
811
|
+
/** Check script files exist and are executable (default: false) */
|
|
812
|
+
checkScripts?: boolean;
|
|
813
|
+
}
|
|
814
|
+
interface LoadHooksResult {
|
|
815
|
+
/** The loaded hooks configuration (empty if not found or invalid) */
|
|
816
|
+
config: HooksConfig;
|
|
817
|
+
/** Validation result */
|
|
818
|
+
validation: HookValidationResult;
|
|
819
|
+
/** Whether hooks were found */
|
|
820
|
+
found: boolean;
|
|
821
|
+
/** Path to the hooks config file (if found) */
|
|
822
|
+
configPath?: string;
|
|
823
|
+
/** Any errors during loading (e.g., TOML parse error) */
|
|
824
|
+
loadError?: string;
|
|
825
|
+
}
|
|
826
|
+
/**
|
|
827
|
+
* Load hooks configuration from a capability directory
|
|
828
|
+
*
|
|
829
|
+
* Looks for hooks/hooks.toml within the capability directory.
|
|
830
|
+
* Transforms variables and validates the configuration.
|
|
831
|
+
*/
|
|
832
|
+
declare function loadHooksFromCapability(capabilityPath: string, options?: LoadHooksOptions): LoadHooksResult;
|
|
833
|
+
/**
|
|
834
|
+
* Load hooks and create CapabilityHooks metadata
|
|
835
|
+
*/
|
|
836
|
+
declare function loadCapabilityHooks(capabilityName: string, capabilityPath: string, options?: LoadHooksOptions): CapabilityHooks | null;
|
|
837
|
+
/**
|
|
838
|
+
* Check if a capability has hooks defined
|
|
839
|
+
*/
|
|
840
|
+
declare function hasHooks(capabilityPath: string): boolean;
|
|
841
|
+
/**
|
|
842
|
+
* Get the hooks directory path for a capability
|
|
843
|
+
*/
|
|
844
|
+
declare function getHooksDirectory(capabilityPath: string): string;
|
|
845
|
+
/**
|
|
846
|
+
* Get the hooks config file path for a capability
|
|
847
|
+
*/
|
|
848
|
+
declare function getHooksConfigPath(capabilityPath: string): string;
|
|
849
|
+
/**
|
|
850
|
+
* Merge hooks from multiple capabilities into a single HooksConfig.
|
|
851
|
+
*
|
|
852
|
+
* Strategy:
|
|
853
|
+
* - All matchers from all capabilities are collected
|
|
854
|
+
* - Hooks are not deduplicated to preserve execution order and capability-specific behavior
|
|
855
|
+
* - Description field is omitted in merged config (it's per-capability metadata)
|
|
856
|
+
*/
|
|
857
|
+
declare function mergeHooksConfigs(capabilityHooks: CapabilityHooks[]): HooksConfig;
|
|
858
|
+
/**
|
|
859
|
+
* Options for deduplication
|
|
860
|
+
*/
|
|
861
|
+
interface DeduplicateOptions {
|
|
862
|
+
/** Deduplicate identical commands across matchers (default: false) */
|
|
863
|
+
deduplicateCommands?: boolean;
|
|
864
|
+
}
|
|
865
|
+
/**
|
|
866
|
+
* Merge and deduplicate hooks from multiple capability hooks.
|
|
867
|
+
*
|
|
868
|
+
* When deduplicateCommands is true:
|
|
869
|
+
* - Commands that are exactly identical are kept only once per event
|
|
870
|
+
* - The first occurrence is kept, subsequent duplicates removed
|
|
871
|
+
*
|
|
872
|
+
* This is useful when multiple capabilities might register the same hook
|
|
873
|
+
* (e.g., a common formatting hook).
|
|
874
|
+
*/
|
|
875
|
+
declare function mergeAndDeduplicateHooks(capabilityHooks: CapabilityHooks[], options?: DeduplicateOptions): HooksConfig;
|
|
876
|
+
/**
|
|
877
|
+
* Check if a merged config has any hooks defined
|
|
878
|
+
*/
|
|
879
|
+
declare function hasAnyHooks(config: HooksConfig): boolean;
|
|
880
|
+
/**
|
|
881
|
+
* Count total number of hook definitions across all events
|
|
882
|
+
*/
|
|
883
|
+
declare function countHooks(config: HooksConfig): number;
|
|
884
|
+
/**
|
|
885
|
+
* Get all events that have hooks defined
|
|
886
|
+
*/
|
|
887
|
+
declare function getEventsWithHooks(config: HooksConfig): HookEvent[];
|
|
570
888
|
/**
|
|
571
889
|
* Get enabled capabilities for the active profile
|
|
572
890
|
* Includes both profile-specific and always-enabled capabilities
|
|
@@ -677,6 +995,18 @@ declare function loadProviderConfig(): Promise<ProviderConfig>;
|
|
|
677
995
|
declare function writeProviderConfig(config: ProviderConfig): Promise<void>;
|
|
678
996
|
declare function parseProviderFlag(flag: string): Provider[];
|
|
679
997
|
/**
|
|
998
|
+
* Add a capability source to [capabilities.sources]
|
|
999
|
+
*/
|
|
1000
|
+
declare function patchAddCapabilitySource(name: string, source: CapabilitySourceConfig): Promise<void>;
|
|
1001
|
+
/**
|
|
1002
|
+
* Add an MCP server configuration
|
|
1003
|
+
*/
|
|
1004
|
+
declare function patchAddMcp(name: string, config: McpConfig): Promise<void>;
|
|
1005
|
+
/**
|
|
1006
|
+
* Add a capability to a profile's capabilities array
|
|
1007
|
+
*/
|
|
1008
|
+
declare function patchAddToProfile(profileName: string, capabilityName: string): Promise<void>;
|
|
1009
|
+
/**
|
|
680
1010
|
* Resources provided by a single capability
|
|
681
1011
|
*/
|
|
682
1012
|
interface CapabilityResources {
|
|
@@ -868,9 +1198,15 @@ declare function generateClaudeTemplate(): string;
|
|
|
868
1198
|
*/
|
|
869
1199
|
declare function generateInstructionsTemplate(): string;
|
|
870
1200
|
/**
|
|
1201
|
+
* Template for OMNI.md - the user's project instructions file.
|
|
1202
|
+
* This is the single source of truth that gets transformed into
|
|
1203
|
+
* provider-specific files (CLAUDE.md, AGENTS.md, etc.) during sync.
|
|
1204
|
+
*/
|
|
1205
|
+
declare function generateOmniMdTemplate(): string;
|
|
1206
|
+
/**
|
|
871
1207
|
* Debug logger that writes to stdout when OMNIDEV_DEBUG=1
|
|
872
1208
|
*/
|
|
873
1209
|
declare function debug(message: string, data?: unknown): void;
|
|
874
1210
|
declare const version = "0.1.0";
|
|
875
1211
|
declare function getVersion(): string;
|
|
876
|
-
export { writeRules, writeProviderConfig, writeMcpJson, writeEnabledProviders, writeConfig, writeActiveProfileState, version, validateEnv, syncMcpJson, syncAgentConfiguration, sourceToGitUrl, setProfile, setActiveProfile, saveManifest, saveLockFile, resolveEnabledCapabilities, readMcpJson, readEnabledProviders, readActiveProfileState, parseSourceConfig, parseProviderFlag, parseOmniConfig, parseCapabilityConfig, loadSubagents, loadSkills, loadRules, loadProviderConfig, loadProfileConfig, loadManifest, loadLockFile, loadEnvironment, loadDocs, loadConfig, loadCommands, loadCapabilityConfig, loadCapability, loadBaseConfig, isSecretEnvVar, isProviderEnabled, installCapabilityDependencies, getVersion, getSourceCapabilityPath, getLockFilePath, getEnabledCapabilities, getActiveProviders, getActiveProfile, generateInstructionsTemplate, generateClaudeTemplate, generateAgentsTemplate, fetchCapabilitySource, fetchAllCapabilitySources, enableProvider, enableCapability, discoverCapabilities, disableProvider, disableCapability, debug, clearActiveProfileState, cleanupStaleResources, checkForUpdates, buildSyncBundle, buildRouteMap, buildManifestFromCapabilities, buildCommand, buildCapabilityRegistry, SyncResult, SyncOptions, SyncConfig, SyncBundle, SubagentPermissionMode, SubagentModel, SubagentHooks, SubagentHookConfig, SubagentExport, Subagent, SourceUpdateInfo, SkillExport, Skill, Rule, ResourceManifest, ProvidersState, ProviderSyncResult, ProviderManifest, ProviderInitResult, ProviderId, ProviderContext, ProviderConfig, ProviderAdapter, Provider, ProfileConfig, OmniConfig, McpTransport, McpToolSchema, McpServerStdioConfig, McpServerSseConfig, McpServerHttpConfig, McpServerConfig, McpJsonConfig, McpConfig, LoadedCapability, GitCapabilitySourceConfig, FileContent, FetchResult, EnvDeclaration, DocExport, Doc, DiscoveredContent, CommandExport, Command, CliConfig, CleanupResult, CapabilitySourceType, CapabilitySourceConfig, CapabilitySource, CapabilityResources, CapabilityRegistry, CapabilityMetadata, CapabilityLockEntry, CapabilityExports, CapabilityExport, CapabilityConfig, CapabilitiesLockFile, CapabilitiesConfig };
|
|
1212
|
+
export { writeRules, writeProviderConfig, writeMcpJson, writeEnabledProviders, writeConfig, writeActiveProfileState, version, validateHooksConfig, validateHook, validateEnv, transformToOmnidev, transformToClaude, transformHooksConfig, syncMcpJson, syncAgentConfiguration, sourceToGitUrl, setProfile, setActiveProfile, saveManifest, saveLockFile, resolveEnabledCapabilities, readMcpJson, readEnabledProviders, readActiveProfileState, patchAddToProfile, patchAddMcp, patchAddCapabilitySource, parseSourceConfig, parseProviderFlag, parseOmniConfig, parseCapabilityConfig, mergeHooksConfigs, mergeAndDeduplicateHooks, loadSubagents, loadSkills, loadRules, loadProviderConfig, loadProfileConfig, loadManifest, loadLockFile, loadHooksFromCapability, loadEnvironment, loadDocs, loadConfig, loadCommands, loadCapabilityHooks, loadCapabilityConfig, loadCapability, loadBaseConfig, isValidMatcherPattern, isSecretEnvVar, isProviderEnabled, isPromptHookEvent, isMatcherEvent, isHookType, isHookPrompt, isHookEvent, isHookCommand, installCapabilityDependencies, hasHooks, hasAnyHooks, getVersion, getSourceCapabilityPath, getLockFilePath, getHooksDirectory, getHooksConfigPath, getEventsWithHooks, getEnabledCapabilities, getActiveProviders, getActiveProfile, generateOmniMdTemplate, generateInstructionsTemplate, generateClaudeTemplate, 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, FetchResult, EnvDeclaration, DoctorCheckStatus, DocExport, Doc, DiscoveredContent, DeduplicateOptions, DEFAULT_PROMPT_TIMEOUT, DEFAULT_COMMAND_TIMEOUT, CommandExport, Command, CliConfig, CleanupResult, ClaudeVariable, CapabilitySourceType, CapabilitySourceConfig, CapabilitySource, CapabilityResources, CapabilityRegistry, CapabilityMetadata, CapabilityLockEntry, CapabilityHooks, CapabilityExports, CapabilityExport, CapabilityConfig, CapabilitiesLockFile, CapabilitiesConfig, COMMON_TOOL_MATCHERS };
|