@omnidev-ai/core 0.4.0 → 0.5.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.
Files changed (41) hide show
  1. package/dist/index.d.ts +600 -664
  2. package/dist/index.js +1841 -1915
  3. package/dist/shared/chunk-1dqs11h6.js +20 -0
  4. package/dist/test-utils/index.d.ts +97 -101
  5. package/dist/test-utils/index.js +203 -234
  6. package/package.json +5 -3
  7. package/src/capability/AGENTS.md +58 -0
  8. package/src/capability/commands.ts +72 -0
  9. package/src/capability/docs.ts +48 -0
  10. package/src/capability/index.ts +20 -0
  11. package/src/capability/loader.ts +431 -0
  12. package/src/capability/registry.ts +55 -0
  13. package/src/capability/rules.ts +135 -0
  14. package/src/capability/skills.ts +58 -0
  15. package/src/capability/sources.ts +998 -0
  16. package/src/capability/subagents.ts +105 -0
  17. package/src/capability/yaml-parser.ts +81 -0
  18. package/src/config/AGENTS.md +46 -0
  19. package/src/config/capabilities.ts +54 -0
  20. package/src/config/env.ts +96 -0
  21. package/src/config/index.ts +6 -0
  22. package/src/config/loader.ts +207 -0
  23. package/src/config/parser.ts +55 -0
  24. package/src/config/profiles.ts +75 -0
  25. package/src/config/provider.ts +55 -0
  26. package/src/debug.ts +20 -0
  27. package/src/index.ts +37 -0
  28. package/src/mcp-json/index.ts +1 -0
  29. package/src/mcp-json/manager.ts +106 -0
  30. package/src/state/active-profile.ts +41 -0
  31. package/src/state/index.ts +3 -0
  32. package/src/state/manifest.ts +137 -0
  33. package/src/state/providers.ts +69 -0
  34. package/src/sync.ts +288 -0
  35. package/src/templates/agents.ts +14 -0
  36. package/src/templates/claude.ts +57 -0
  37. package/src/test-utils/helpers.ts +289 -0
  38. package/src/test-utils/index.ts +34 -0
  39. package/src/test-utils/mocks.ts +101 -0
  40. package/src/types/capability-export.ts +157 -0
  41. package/src/types/index.ts +314 -0
package/dist/index.d.ts CHANGED
@@ -1,889 +1,825 @@
1
1
  import { buildCommand, buildRouteMap } from "@stricli/core";
2
-
3
- //#region src/types/capability-export.d.ts
4
-
5
- /**
6
- * Capability Export Types
7
- *
8
- * These types define the structure that capabilities use to export their features.
9
- * Capabilities should import these types from @omnidev-ai/core and use them in their index.ts.
10
- */
11
- /**
12
- * File content structure for programmatic file creation
13
- */
2
+ /**
3
+ * Capability Export Types
4
+ *
5
+ * These types define the structure that capabilities use to their features.
6
+ * Capabilities should import these types from @omnidev-ai/core and use them in their index.ts.
7
+ */
8
+ /**
9
+ * File content structure for programmatic file creation
10
+ */
14
11
  interface FileContent {
15
- /** File name (relative path within capability) */
16
- name: string;
17
- /** File content */
18
- content: string;
12
+ /** File name (relative path within capability) */
13
+ name: string;
14
+ /** File content */
15
+ content: string;
19
16
  }
20
17
  /**
21
- * Documentation export structure
22
- */
18
+ * Documentation structure
19
+ */
23
20
  interface DocExport {
24
- /** Document title */
25
- title: string;
26
- /** Markdown content */
27
- content: string;
21
+ /** Document title */
22
+ title: string;
23
+ /** Markdown content */
24
+ content: string;
28
25
  }
29
26
  /**
30
- * Skill export structure
31
- */
27
+ * Skill structure
28
+ */
32
29
  interface SkillExport {
33
- /** SKILL.md content (markdown with YAML frontmatter) */
34
- skillMd: string;
35
- /** Optional: Reference files to create (files the skill needs access to) */
36
- references?: FileContent[];
37
- /** Optional: Additional files to create (templates, examples, etc.) */
38
- additionalFiles?: FileContent[];
39
- }
40
- /**
41
- * Subagent export structure
42
- *
43
- * Defines a subagent that Claude can delegate tasks to.
44
- * Uses YAML frontmatter in markdown format for configuration.
45
- *
46
- * @example
47
- * ```typescript
48
- * const codeReviewer: SubagentExport = {
49
- * subagentMd: `---
50
- * name: code-reviewer
51
- * description: Reviews code for quality and best practices
52
- * tools: Read, Glob, Grep
53
- * model: sonnet
54
- * ---
55
- *
56
- * You are a code reviewer. When invoked, analyze the code and provide
57
- * specific, actionable feedback on quality, security, and best practices.`
58
- * };
59
- * ```
60
- */
30
+ /** SKILL.md content (markdown with YAML frontmatter) */
31
+ skillMd: string;
32
+ /** Optional: Reference files to create (files the skill needs access to) */
33
+ references?: FileContent[];
34
+ /** Optional: Additional files to create (templates, examples, etc.) */
35
+ additionalFiles?: FileContent[];
36
+ }
37
+ /**
38
+ * Subagent structure
39
+ *
40
+ * Defines a subagent that Claude can delegate tasks to.
41
+ * Uses YAML frontmatter in markdown format for configuration.
42
+ *
43
+ * @example
44
+ * ```typescript
45
+ * const codeReviewer: SubagentExport = {
46
+ * subagentMd: `---
47
+ * name: code-reviewer
48
+ * description: Reviews code for quality and best practices
49
+ * tools: Read, Glob, Grep
50
+ * model: sonnet
51
+ * ---
52
+ *
53
+ * You are a code reviewer. When invoked, analyze the code and provide
54
+ * specific, actionable feedback on quality, security, and best practices.`
55
+ * };
56
+ * ```
57
+ */
61
58
  interface SubagentExport {
62
- /** SUBAGENT.md content (markdown with YAML frontmatter) */
63
- subagentMd: string;
64
- }
65
- /**
66
- * Slash command export structure
67
- *
68
- * Defines a slash command that can be invoked in Claude Code.
69
- * Uses YAML frontmatter in markdown format for configuration.
70
- *
71
- * @example
72
- * ```typescript
73
- * const fixIssue: CommandExport = {
74
- * commandMd: `---
75
- * name: fix-issue
76
- * description: Fix a GitHub issue following coding standards
77
- * allowed-tools: Bash(git add:*), Bash(git commit:*)
78
- * ---
79
- *
80
- * Fix issue #$ARGUMENTS following our coding standards.
81
- *
82
- * 1. Read the issue details
83
- * 2. Implement the fix
84
- * 3. Write tests
85
- * 4. Create a commit`
86
- * };
87
- * ```
88
- */
59
+ /** SUBAGENT.md content (markdown with YAML frontmatter) */
60
+ subagentMd: string;
61
+ }
62
+ /**
63
+ * Slash command structure
64
+ *
65
+ * Defines a slash command that can be invoked in Claude Code.
66
+ * Uses YAML frontmatter in markdown format for configuration.
67
+ *
68
+ * @example
69
+ * ```typescript
70
+ * const fixIssue: CommandExport = {
71
+ * commandMd: `---
72
+ * name: fix-issue
73
+ * description: Fix a GitHub issue following coding standards
74
+ * allowed-tools: Bash(git add:*), Bash(git commit:*)
75
+ * ---
76
+ *
77
+ * Fix issue #$ARGUMENTS following our coding standards.
78
+ *
79
+ * 1. Read the issue details
80
+ * 2. Implement the fix
81
+ * 3. Write tests
82
+ * 4. Create a commit`
83
+ * };
84
+ * ```
85
+ */
89
86
  interface CommandExport {
90
- /** COMMAND.md content (markdown with YAML frontmatter) */
91
- commandMd: string;
92
- }
93
- /**
94
- * Complete capability export structure
95
- *
96
- * Capabilities export this as their default export from index.ts.
97
- * All content fields are OPTIONAL and PROGRAMMATIC.
98
- * Capabilities can also provide content via static files in their directory.
99
- * Both approaches are supported and will be merged during sync.
100
- *
101
- * @example
102
- * ```typescript
103
- * // Static files approach - just export CLI commands
104
- * export default {
105
- * cliCommands: { mycap: myRoutes },
106
- * gitignore: ["mycap/"],
107
- * sync
108
- * } satisfies CapabilityExport;
109
- * ```
110
- *
111
- * @example
112
- * ```typescript
113
- * // Programmatic approach - generate content dynamically
114
- * export default {
115
- * cliCommands: { mycap: myRoutes },
116
- * docs: [{ title: "Guide", content: "# Guide\n..." }],
117
- * rules: ["# Rule content..."],
118
- * skills: [{ skillMd: "...", references: [...] }],
119
- * gitignore: ["mycap/"],
120
- * sync
121
- * } satisfies CapabilityExport;
122
- * ```
123
- */
87
+ /** COMMAND.md content (markdown with YAML frontmatter) */
88
+ commandMd: string;
89
+ }
90
+ /**
91
+ * Complete capability structure
92
+ *
93
+ * Capabilities this as their default from index.ts.
94
+ * All content fields are OPTIONAL and PROGRAMMATIC.
95
+ * Capabilities can also provide content via static files in their directory.
96
+ * Both approaches are supported and will be merged during sync.
97
+ *
98
+ * @example
99
+ * ```typescript
100
+ * // Static files approach - just CLI commands
101
+ * {
102
+ * cliCommands: { mycap: myRoutes },
103
+ * gitignore: ["mycap/"],
104
+ * sync
105
+ * } satisfies CapabilityExport;
106
+ * ```
107
+ *
108
+ * @example
109
+ * ```typescript
110
+ * // Programmatic approach - generate content dynamically
111
+ * {
112
+ * cliCommands: { mycap: myRoutes },
113
+ * docs: [{ title: "Guide", content: "# Guide\n..." }],
114
+ * rules: ["# Rule content..."],
115
+ * skills: [{ skillMd: "...", references: [...] }],
116
+ * gitignore: ["mycap/"],
117
+ * sync
118
+ * } satisfies CapabilityExport;
119
+ * ```
120
+ */
124
121
  interface CapabilityExport {
125
- /** CLI commands provided by this capability */
126
- cliCommands?: Record<string, unknown>;
127
- /** Documentation (programmatic - optional, can also use docs/ directory) */
128
- docs?: DocExport[];
129
- /** Rules (programmatic - optional, can also use rules/ directory) */
130
- rules?: string[];
131
- /** Skills (programmatic - optional, can also use skills/ directory) */
132
- skills?: SkillExport[];
133
- /** Subagents (programmatic - optional, can also use subagents/ directory) */
134
- subagents?: SubagentExport[];
135
- /** Commands (programmatic - optional, can also use commands/ directory) */
136
- commands?: CommandExport[];
137
- /** Gitignore patterns */
138
- gitignore?: string[];
139
- /** Custom sync hook function */
140
- sync?: () => Promise<void>;
141
- /** Additional exports for extensibility */
142
- [key: string]: unknown;
143
- }
144
- //#endregion
145
- //#region src/types/index.d.ts
122
+ /** CLI commands provided by this capability */
123
+ cliCommands?: Record<string, unknown>;
124
+ /** Documentation (programmatic - optional, can also use docs/ directory) */
125
+ docs?: DocExport[];
126
+ /** Rules (programmatic - optional, can also use rules/ directory) */
127
+ rules?: string[];
128
+ /** Skills (programmatic - optional, can also use skills/ directory) */
129
+ skills?: SkillExport[];
130
+ /** Subagents (programmatic - optional, can also use subagents/ directory) */
131
+ subagents?: SubagentExport[];
132
+ /** Commands (programmatic - optional, can also use commands/ directory) */
133
+ commands?: CommandExport[];
134
+ /** Gitignore patterns */
135
+ gitignore?: string[];
136
+ /** Custom sync hook function */
137
+ sync?: () => Promise<void>;
138
+ /** Additional exports for extensibility */
139
+ [key: string]: unknown;
140
+ }
146
141
  interface CapabilityMetadata {
147
- id: string;
148
- name: string;
149
- version: string;
150
- description: string;
151
- /** Optional author information */
152
- author?: {
153
- name?: string;
154
- email?: string;
155
- };
156
- /** Optional metadata about the capability author and source */
157
- metadata?: {
158
- author?: string;
159
- repository?: string;
160
- license?: string;
161
- /** True if this capability was auto-generated by wrapping a skills repo */
162
- wrapped?: boolean;
163
- /** For wrapped capabilities: the full commit hash */
164
- commit?: string;
165
- /** True if this capability was auto-generated from omni.toml [mcps] section */
166
- generated_from_omni_toml?: boolean;
167
- };
142
+ id: string;
143
+ name: string;
144
+ version: string;
145
+ description: string;
146
+ /** Optional author information */
147
+ author?: {
148
+ name?: string;
149
+ email?: string;
150
+ };
151
+ /** Optional metadata about the capability author and source */
152
+ metadata?: {
153
+ author?: string;
154
+ repository?: string;
155
+ license?: string;
156
+ /** True if this capability was auto-generated by wrapping a skills repo */
157
+ wrapped?: boolean;
158
+ /** For wrapped capabilities: the full commit hash */
159
+ commit?: string;
160
+ /** True if this capability was auto-generated from omni.toml [mcps] section */
161
+ generated_from_omni_toml?: boolean;
162
+ };
168
163
  }
169
164
  interface CapabilityExports {
170
- module?: string;
171
- gitignore?: string[];
165
+ module?: string;
166
+ gitignore?: string[];
172
167
  }
173
168
  interface EnvDeclaration {
174
- required?: boolean;
175
- secret?: boolean;
176
- default?: string;
169
+ required?: boolean;
170
+ secret?: boolean;
171
+ default?: string;
177
172
  }
178
173
  interface SyncConfig {
179
- on_sync?: string;
174
+ on_sync?: string;
180
175
  }
181
176
  interface CliConfig {
182
- commands?: string[];
177
+ commands?: string[];
183
178
  }
184
179
  interface CapabilityConfig {
185
- capability: CapabilityMetadata;
186
- exports?: CapabilityExports;
187
- env?: Record<string, EnvDeclaration | Record<string, never>>;
188
- mcp?: McpConfig;
189
- sync?: SyncConfig;
190
- cli?: CliConfig;
180
+ capability: CapabilityMetadata;
181
+ exports?: CapabilityExports;
182
+ env?: Record<string, EnvDeclaration | Record<string, never>>;
183
+ mcp?: McpConfig;
184
+ sync?: SyncConfig;
185
+ cli?: CliConfig;
191
186
  }
192
187
  type McpTransport = "stdio" | "sse" | "http";
193
188
  interface McpToolSchema {
194
- name: string;
195
- description: string;
196
- inputSchema: Record<string, unknown>;
189
+ name: string;
190
+ description: string;
191
+ inputSchema: Record<string, unknown>;
197
192
  }
198
193
  interface McpConfig {
199
- command: string;
200
- args?: string[];
201
- env?: Record<string, string>;
202
- cwd?: string;
203
- transport?: McpTransport;
204
- tools?: McpToolSchema[];
194
+ command: string;
195
+ args?: string[];
196
+ env?: Record<string, string>;
197
+ cwd?: string;
198
+ transport?: McpTransport;
199
+ tools?: McpToolSchema[];
205
200
  }
206
201
  interface Skill {
207
- name: string;
208
- description: string;
209
- instructions: string;
210
- capabilityId: string;
202
+ name: string;
203
+ description: string;
204
+ instructions: string;
205
+ capabilityId: string;
211
206
  }
212
207
  interface Rule {
213
- name: string;
214
- content: string;
215
- capabilityId: string;
208
+ name: string;
209
+ content: string;
210
+ capabilityId: string;
216
211
  }
217
212
  interface Doc {
218
- name: string;
219
- content: string;
220
- capabilityId: string;
213
+ name: string;
214
+ content: string;
215
+ capabilityId: string;
221
216
  }
222
217
  type SubagentModel = "sonnet" | "opus" | "haiku" | "inherit";
223
218
  type SubagentPermissionMode = "default" | "acceptEdits" | "dontAsk" | "bypassPermissions" | "plan";
224
219
  interface SubagentHookConfig {
225
- matcher?: string;
226
- hooks: {
227
- type: "command";
228
- command: string;
229
- }[];
220
+ matcher?: string;
221
+ hooks: {
222
+ type: "command";
223
+ command: string;
224
+ }[];
230
225
  }
231
226
  interface SubagentHooks {
232
- PreToolUse?: SubagentHookConfig[];
233
- PostToolUse?: SubagentHookConfig[];
234
- Stop?: SubagentHookConfig[];
227
+ PreToolUse?: SubagentHookConfig[];
228
+ PostToolUse?: SubagentHookConfig[];
229
+ Stop?: SubagentHookConfig[];
235
230
  }
236
231
  interface Subagent {
237
- /** Unique identifier using lowercase letters and hyphens */
238
- name: string;
239
- /** When Claude should delegate to this subagent */
240
- description: string;
241
- /** System prompt that guides the subagent's behavior */
242
- systemPrompt: string;
243
- /** Tools the subagent can use (inherits all if omitted) */
244
- tools?: string[];
245
- /** Tools to deny (removed from inherited or specified list) */
246
- disallowedTools?: string[];
247
- /** Model to use: sonnet, opus, haiku, or inherit */
248
- model?: SubagentModel;
249
- /** Permission mode for the subagent */
250
- permissionMode?: SubagentPermissionMode;
251
- /** Skills to load into the subagent's context at startup */
252
- skills?: string[];
253
- /** Lifecycle hooks scoped to this subagent */
254
- hooks?: SubagentHooks;
255
- /** Capability that provides this subagent */
256
- capabilityId: string;
232
+ /** Unique identifier using lowercase letters and hyphens */
233
+ name: string;
234
+ /** When Claude should delegate to this subagent */
235
+ description: string;
236
+ /** System prompt that guides the subagent's behavior */
237
+ systemPrompt: string;
238
+ /** Tools the subagent can use (inherits all if omitted) */
239
+ tools?: string[];
240
+ /** Tools to deny (removed from inherited or specified list) */
241
+ disallowedTools?: string[];
242
+ /** Model to use: sonnet, opus, haiku, or inherit */
243
+ model?: SubagentModel;
244
+ /** Permission mode for the subagent */
245
+ permissionMode?: SubagentPermissionMode;
246
+ /** Skills to load into the subagent's context at startup */
247
+ skills?: string[];
248
+ /** Lifecycle hooks scoped to this subagent */
249
+ hooks?: SubagentHooks;
250
+ /** Capability that provides this subagent */
251
+ capabilityId: string;
257
252
  }
258
253
  interface Command {
259
- /** Command name (used as /command-name) */
260
- name: string;
261
- /** Brief description of what this command does */
262
- description: string;
263
- /** Optional allowed tools specification (e.g., "Bash(git add:*), Bash(git status:*)") */
264
- allowedTools?: string;
265
- /** Command prompt (markdown content with support for $ARGUMENTS, $1, $2, !`commands`, @files) */
266
- prompt: string;
267
- /** Capability that provides this command */
268
- capabilityId: string;
254
+ /** Command name (used as /command-name) */
255
+ name: string;
256
+ /** Brief description of what this command does */
257
+ description: string;
258
+ /** Optional allowed tools specification (e.g., "Bash(git add:*), Bash(git status:*)") */
259
+ allowedTools?: string;
260
+ /** Command prompt (markdown content with support for $ARGUMENTS, $1, $2, !`commands`, @files) */
261
+ prompt: string;
262
+ /** Capability that provides this command */
263
+ capabilityId: string;
269
264
  }
270
265
  type CapabilitySourceType = "local" | "git";
271
266
  /** Configuration for a Git-sourced capability */
272
267
  interface GitCapabilitySourceConfig {
273
- /** Source URL or shorthand (e.g., "github:user/repo", "git@github.com:...") */
274
- source: string;
275
- /** Git ref to checkout: tag, branch, or commit hash */
276
- ref?: string;
277
- /** Subdirectory within the repo containing the capability */
278
- path?: string;
268
+ /** Source URL or shorthand (e.g., "github:user/repo", "git@github.com:...") */
269
+ source: string;
270
+ /** Git ref to checkout: tag, branch, or commit hash */
271
+ ref?: string;
272
+ /** Subdirectory within the repo containing the capability */
273
+ path?: string;
279
274
  }
280
275
  /** Combined type for all capability source configurations */
281
276
  type CapabilitySourceConfig = string | GitCapabilitySourceConfig;
282
277
  /** Lock file entry for a capability (version tracking) */
283
278
  interface CapabilityLockEntry {
284
- /** Original source reference */
285
- source: string;
286
- /** Version from capability.toml or package.json */
287
- version: string;
288
- /** For git sources: exact commit hash */
289
- commit?: string;
290
- /** Pinned ref if specified */
291
- ref?: string;
292
- /** Last update timestamp (ISO 8601) */
293
- updated_at: string;
279
+ /** Original source reference */
280
+ source: string;
281
+ /** Version from capability.toml or package.json */
282
+ version: string;
283
+ /** For git sources: exact commit hash */
284
+ commit?: string;
285
+ /** Pinned ref if specified */
286
+ ref?: string;
287
+ /** Last update timestamp (ISO 8601) */
288
+ updated_at: string;
294
289
  }
295
290
  /** Lock file structure (omni.lock.toml at project root) */
296
291
  interface CapabilitiesLockFile {
297
- capabilities: Record<string, CapabilityLockEntry>;
292
+ capabilities: Record<string, CapabilityLockEntry>;
298
293
  }
299
294
  /** Capabilities configuration section in omni.toml */
300
295
  interface CapabilitiesConfig {
301
- /** List of enabled capability IDs */
302
- enable?: string[];
303
- /** List of disabled capability IDs */
304
- disable?: string[];
305
- /** Capability sources: id -> source string or full config (git or file) */
306
- sources?: Record<string, CapabilitySourceConfig>;
296
+ /** List of enabled capability IDs */
297
+ enable?: string[];
298
+ /** List of disabled capability IDs */
299
+ disable?: string[];
300
+ /** Capability sources: id -> source string or full config (git or file) */
301
+ sources?: Record<string, CapabilitySourceConfig>;
307
302
  }
308
303
  interface ProfileConfig {
309
- capabilities?: string[];
304
+ capabilities?: string[];
310
305
  }
311
306
  interface OmniConfig {
312
- project?: string;
313
- active_profile?: string;
314
- always_enabled_capabilities?: string[];
315
- env?: Record<string, string>;
316
- profiles?: Record<string, ProfileConfig>;
317
- providers?: {
318
- enabled?: Provider[];
319
- };
320
- /** Capabilities configuration (enable/disable, sources) */
321
- capabilities?: CapabilitiesConfig;
322
- /** MCP server definitions that auto-generate capabilities */
323
- mcps?: Record<string, McpConfig>;
307
+ project?: string;
308
+ active_profile?: string;
309
+ always_enabled_capabilities?: string[];
310
+ env?: Record<string, string>;
311
+ profiles?: Record<string, ProfileConfig>;
312
+ providers?: {
313
+ enabled?: Provider[];
314
+ };
315
+ /** Capabilities configuration (enable/disable, sources) */
316
+ capabilities?: CapabilitiesConfig;
317
+ /** MCP server definitions that auto-generate capabilities */
318
+ mcps?: Record<string, McpConfig>;
324
319
  }
325
320
  type Provider = "claude" | "codex" | "claude-code" | "cursor" | "opencode";
326
321
  interface ProviderConfig {
327
- provider?: Provider;
328
- providers?: Provider[];
322
+ provider?: Provider;
323
+ providers?: Provider[];
329
324
  }
330
325
  declare function getActiveProviders(config: ProviderConfig): Provider[];
331
326
  /** Runtime info about where a capability came from */
332
327
  interface CapabilitySource {
333
- type: CapabilitySourceType;
334
- /** For git-sourced capabilities: the source URL/shorthand */
335
- gitSource?: string;
336
- /** For git-sourced capabilities: the pinned ref if any */
337
- ref?: string;
338
- /** For git-sourced capabilities: the current commit hash */
339
- commit?: string;
340
- /** Version from capability.toml or package.json */
341
- version?: string;
328
+ type: CapabilitySourceType;
329
+ /** For git-sourced capabilities: the source URL/shorthand */
330
+ gitSource?: string;
331
+ /** For git-sourced capabilities: the pinned ref if any */
332
+ ref?: string;
333
+ /** For git-sourced capabilities: the current commit hash */
334
+ commit?: string;
335
+ /** Version from capability.toml or package.json */
336
+ version?: string;
342
337
  }
343
338
  interface LoadedCapability {
344
- id: string;
345
- path: string;
346
- config: CapabilityConfig;
347
- skills: Skill[];
348
- rules: Rule[];
349
- docs: Doc[];
350
- subagents: Subagent[];
351
- commands: Command[];
352
- typeDefinitions?: string;
353
- gitignore?: string[];
354
- exports: Record<string, unknown>;
355
- /** Where this capability comes from */
356
- source?: CapabilitySource;
339
+ id: string;
340
+ path: string;
341
+ config: CapabilityConfig;
342
+ skills: Skill[];
343
+ rules: Rule[];
344
+ docs: Doc[];
345
+ subagents: Subagent[];
346
+ commands: Command[];
347
+ typeDefinitions?: string;
348
+ gitignore?: string[];
349
+ exports: Record<string, unknown>;
350
+ /** Where this capability comes from */
351
+ source?: CapabilitySource;
357
352
  }
358
353
  type ProviderId = Provider | (string & {});
359
354
  interface SyncBundle {
360
- capabilities: LoadedCapability[];
361
- skills: Skill[];
362
- rules: Rule[];
363
- docs: Doc[];
364
- commands: Command[];
365
- subagents: Subagent[];
366
- instructionsPath: string;
367
- instructionsContent: string;
355
+ capabilities: LoadedCapability[];
356
+ skills: Skill[];
357
+ rules: Rule[];
358
+ docs: Doc[];
359
+ commands: Command[];
360
+ subagents: Subagent[];
361
+ instructionsPath: string;
362
+ instructionsContent: string;
368
363
  }
369
364
  interface ProviderContext {
370
- projectRoot: string;
371
- config: OmniConfig;
372
- activeProfile?: string;
365
+ projectRoot: string;
366
+ config: OmniConfig;
367
+ activeProfile?: string;
373
368
  }
374
369
  interface ProviderInitResult {
375
- filesCreated?: string[];
376
- message?: string;
370
+ filesCreated?: string[];
371
+ message?: string;
377
372
  }
378
373
  interface ProviderSyncResult {
379
- filesWritten: string[];
380
- filesDeleted: string[];
374
+ filesWritten: string[];
375
+ filesDeleted: string[];
381
376
  }
382
377
  interface ProviderManifest {
383
- files: string[];
384
- lastSync: string;
378
+ files: string[];
379
+ lastSync: string;
385
380
  }
386
381
  interface ProviderAdapter {
387
- id: ProviderId;
388
- displayName: string;
389
- init?(ctx: ProviderContext): Promise<ProviderInitResult>;
390
- sync(bundle: SyncBundle, ctx: ProviderContext): Promise<ProviderSyncResult>;
391
- cleanup?(manifest: ProviderManifest, ctx: ProviderContext): Promise<void>;
392
- }
393
- //#endregion
394
- //#region src/capability/commands.d.ts
395
- /**
396
- * Load commands from a commands/ directory of a capability.
397
- * Each command is a COMMAND.md file in its own subdirectory.
398
- */
382
+ id: ProviderId;
383
+ displayName: string;
384
+ init?(ctx: ProviderContext): Promise<ProviderInitResult>;
385
+ sync(bundle: SyncBundle, ctx: ProviderContext): Promise<ProviderSyncResult>;
386
+ cleanup?(manifest: ProviderManifest, ctx: ProviderContext): Promise<void>;
387
+ }
388
+ /**
389
+ * Load commands from a commands/ directory of a capability.
390
+ * Each command is a COMMAND.md file in its own subdirectory.
391
+ */
399
392
  declare function loadCommands(capabilityPath: string, capabilityId: string): Promise<Command[]>;
400
- //#endregion
401
- //#region src/capability/docs.d.ts
402
- /**
403
- * Load documentation from a capability directory
404
- * Loads both definition.md and all files from docs/ directory
405
- * @param capabilityPath Path to the capability directory
406
- * @param capabilityId ID of the capability
407
- * @returns Array of Doc objects
408
- */
393
+ /**
394
+ * Load documentation from a capability directory
395
+ * Loads both definition.md and all files from docs/ directory
396
+ * @param capabilityPath Path to the capability directory
397
+ * @param capabilityId ID of the capability
398
+ * @returns Array of Doc objects
399
+ */
409
400
  declare function loadDocs(capabilityPath: string, capabilityId: string): Promise<Doc[]>;
410
- //#endregion
411
- //#region src/capability/loader.d.ts
412
- /**
413
- * Discovers capabilities by scanning the .omni/capabilities directory.
414
- * A directory is considered a capability if it contains a capability.toml file.
415
- *
416
- * @returns Array of capability directory paths
417
- */
401
+ /**
402
+ * Discovers capabilities by scanning the .omni/capabilities directory.
403
+ * A directory is considered a capability if it contains a capability.toml file.
404
+ *
405
+ * @returns Array of capability directory paths
406
+ */
418
407
  declare function discoverCapabilities(): Promise<string[]>;
419
408
  /**
420
- * Loads and parses a capability configuration file.
421
- * Validates required fields.
422
- *
423
- * @param capabilityPath - Path to the capability directory
424
- * @returns Parsed capability configuration
425
- * @throws Error if the config is invalid
426
- */
409
+ * Loads and parses a capability configuration file.
410
+ * Validates required fields.
411
+ *
412
+ * @param capabilityPath - Path to the capability directory
413
+ * @returns Parsed capability configuration
414
+ * @throws Error if the config is invalid
415
+ */
427
416
  declare function loadCapabilityConfig(capabilityPath: string): Promise<CapabilityConfig>;
428
417
  /**
429
- * Loads a complete capability including config, skills, rules, docs, and exports.
430
- * Validates environment requirements before loading.
431
- *
432
- * @param capabilityPath - Path to the capability directory
433
- * @param env - Environment variables to validate against
434
- * @returns Fully loaded capability
435
- * @throws Error if validation fails or loading errors occur
436
- */
418
+ * Loads a complete capability including config, skills, rules, docs, and exports.
419
+ * Validates environment requirements before loading.
420
+ *
421
+ * @param capabilityPath - Path to the capability directory
422
+ * @param env - Environment variables to validate against
423
+ * @returns Fully loaded capability
424
+ * @throws Error if validation fails or loading errors occur
425
+ */
437
426
  declare function loadCapability(capabilityPath: string, env: Record<string, string>): Promise<LoadedCapability>;
438
- //#endregion
439
- //#region src/capability/registry.d.ts
440
427
  /**
441
- * Registry of loaded capabilities with helper functions.
442
- */
428
+ * Registry of loaded capabilities with helper functions.
429
+ */
443
430
  interface CapabilityRegistry {
444
- capabilities: Map<string, LoadedCapability>;
445
- getCapability(id: string): LoadedCapability | undefined;
446
- getAllCapabilities(): LoadedCapability[];
447
- getAllSkills(): Skill[];
448
- getAllRules(): Rule[];
449
- getAllDocs(): Doc[];
450
- }
451
- /**
452
- * Builds a capability registry by discovering, loading, and filtering capabilities.
453
- * Only enabled capabilities (based on active profile) are included.
454
- *
455
- * @returns Capability registry with helper functions
456
- */
431
+ capabilities: Map<string, LoadedCapability>;
432
+ getCapability(id: string): LoadedCapability | undefined;
433
+ getAllCapabilities(): LoadedCapability[];
434
+ getAllSkills(): Skill[];
435
+ getAllRules(): Rule[];
436
+ getAllDocs(): Doc[];
437
+ }
438
+ /**
439
+ * Builds a capability registry by discovering, loading, and filtering capabilities.
440
+ * Only enabled capabilities (based on active profile) are included.
441
+ *
442
+ * @returns Capability registry with helper functions
443
+ */
457
444
  declare function buildCapabilityRegistry(): Promise<CapabilityRegistry>;
458
- //#endregion
459
- //#region src/capability/rules.d.ts
460
- /**
461
- * Load rules from a capability's rules/ directory
462
- * @param capabilityPath Path to the capability directory
463
- * @param capabilityId ID of the capability
464
- * @returns Array of Rule objects
465
- */
445
+ /**
446
+ * Load rules from a capability's rules/ directory
447
+ * @param capabilityPath Path to the capability directory
448
+ * @param capabilityId ID of the capability
449
+ * @returns Array of Rule objects
450
+ */
466
451
  declare function loadRules(capabilityPath: string, capabilityId: string): Promise<Rule[]>;
467
452
  /**
468
- * Write aggregated rules and docs to .omni/instructions.md
469
- * Updates the generated section between markers while preserving user content
470
- * @param rules Array of rules from all enabled capabilities
471
- * @param docs Array of docs from all enabled capabilities
472
- */
453
+ * Write aggregated rules and docs to .omni/instructions.md
454
+ * Updates the generated section between markers while preserving user content
455
+ * @param rules Array of rules from all enabled capabilities
456
+ * @param docs Array of docs from all enabled capabilities
457
+ */
473
458
  declare function writeRules(rules: Rule[], docs?: Doc[]): Promise<void>;
474
- //#endregion
475
- //#region src/capability/skills.d.ts
476
459
  declare function loadSkills(capabilityPath: string, capabilityId: string): Promise<Skill[]>;
477
- //#endregion
478
- //#region src/capability/sources.d.ts
479
460
  interface FetchResult {
480
- id: string;
481
- path: string;
482
- version: string;
483
- /** Git commit hash */
484
- commit?: string;
485
- updated: boolean;
486
- wrapped: boolean;
461
+ id: string;
462
+ path: string;
463
+ version: string;
464
+ /** Git commit hash */
465
+ commit?: string;
466
+ updated: boolean;
467
+ wrapped: boolean;
487
468
  }
488
469
  interface SourceUpdateInfo {
489
- id: string;
490
- source: string;
491
- currentVersion: string;
492
- latestVersion: string;
493
- hasUpdate: boolean;
470
+ id: string;
471
+ source: string;
472
+ currentVersion: string;
473
+ latestVersion: string;
474
+ hasUpdate: boolean;
494
475
  }
495
476
  /**
496
- * Check if a source string is a git source
497
- */
498
-
499
- /**
500
- * Parse a capability source string or config into normalized form
501
- * Returns a GitCapabilitySourceConfig
502
- */
477
+ * Parse a capability source string or config into normalized form
478
+ * Returns a GitCapabilitySourceConfig
479
+ */
503
480
  declare function parseSourceConfig(source: CapabilitySourceConfig): GitCapabilitySourceConfig;
504
481
  /**
505
- * Convert source to a git-cloneable URL
506
- */
482
+ * Convert source to a git-cloneable URL
483
+ */
507
484
  declare function sourceToGitUrl(source: string): string;
508
485
  /**
509
- * Get the path where a capability source will be stored
510
- */
486
+ * Get the path where a capability source will be stored
487
+ */
511
488
  declare function getSourceCapabilityPath(id: string): string;
512
489
  /**
513
- * Get the lock file path
514
- */
490
+ * Get the lock file path
491
+ */
515
492
  declare function getLockFilePath(): string;
516
493
  /**
517
- * Load the capabilities lock file
518
- */
494
+ * Load the capabilities lock file
495
+ */
519
496
  declare function loadLockFile(): Promise<CapabilitiesLockFile>;
520
497
  /**
521
- * Save the capabilities lock file
522
- */
498
+ * Save the capabilities lock file
499
+ */
523
500
  declare function saveLockFile(lockFile: CapabilitiesLockFile): Promise<void>;
524
501
  /**
525
- * Plugin metadata from .claude-plugin/plugin.json
526
- */
527
-
528
- /**
529
- * Discover content in a wrapped repository
530
- */
502
+ * Discover content in a wrapped repository
503
+ */
531
504
  interface DiscoveredContent {
532
- skills: Array<{
533
- name: string;
534
- path: string;
535
- isFolder: boolean;
536
- }>;
537
- agents: Array<{
538
- name: string;
539
- path: string;
540
- isFolder: boolean;
541
- }>;
542
- commands: Array<{
543
- name: string;
544
- path: string;
545
- isFolder: boolean;
546
- }>;
547
- rulesDir: string | null;
548
- docsDir: string | null;
549
- }
550
- /**
551
- * Fetch a single capability source from git
552
- */
505
+ skills: Array<{
506
+ name: string;
507
+ path: string;
508
+ isFolder: boolean;
509
+ }>;
510
+ agents: Array<{
511
+ name: string;
512
+ path: string;
513
+ isFolder: boolean;
514
+ }>;
515
+ commands: Array<{
516
+ name: string;
517
+ path: string;
518
+ isFolder: boolean;
519
+ }>;
520
+ rulesDir: string | null;
521
+ docsDir: string | null;
522
+ }
523
+ /**
524
+ * Fetch a single capability source from git
525
+ */
553
526
  declare function fetchCapabilitySource(id: string, sourceConfig: CapabilitySourceConfig, options?: {
554
- silent?: boolean;
527
+ silent?: boolean;
555
528
  }): Promise<FetchResult>;
556
529
  /**
557
- * Generate synthetic capabilities for MCP definitions in omni.toml
558
- */
559
-
560
- /**
561
- * Fetch all capability sources from config
562
- */
530
+ * Fetch all capability sources from config
531
+ */
563
532
  declare function fetchAllCapabilitySources(config: OmniConfig, options?: {
564
- silent?: boolean;
565
- force?: boolean;
533
+ silent?: boolean;
534
+ force?: boolean;
566
535
  }): Promise<FetchResult[]>;
567
536
  /**
568
- * Check for available updates without applying them
569
- */
537
+ * Check for available updates without applying them
538
+ */
570
539
  declare function checkForUpdates(config: OmniConfig): Promise<SourceUpdateInfo[]>;
571
- //#endregion
572
- //#region src/capability/subagents.d.ts
573
540
  /**
574
- * Load subagents from the subagents/ directory of a capability.
575
- * Each subagent is a SUBAGENT.md file in its own subdirectory.
576
- */
541
+ * Load subagents from the subagents/ directory of a capability.
542
+ * Each subagent is a SUBAGENT.md file in its own subdirectory.
543
+ */
577
544
  declare function loadSubagents(capabilityPath: string, capabilityId: string): Promise<Subagent[]>;
578
- //#endregion
579
- //#region src/config/capabilities.d.ts
580
545
  /**
581
- * Get enabled capabilities for the active profile
582
- * Includes both profile-specific and always-enabled capabilities
583
- * @returns Array of enabled capability IDs
584
- */
546
+ * Get enabled capabilities for the active profile
547
+ * Includes both profile-specific and always-enabled capabilities
548
+ * @returns Array of enabled capability IDs
549
+ */
585
550
  declare function getEnabledCapabilities(): Promise<string[]>;
586
551
  /**
587
- * Enable a capability by adding it to the active profile's capabilities list
588
- * @param capabilityId - The ID of the capability to enable
589
- */
552
+ * Enable a capability by adding it to the active profile's capabilities list
553
+ * @param capabilityId - The ID of the capability to enable
554
+ */
590
555
  declare function enableCapability(capabilityId: string): Promise<void>;
591
556
  /**
592
- * Disable a capability by removing it from the active profile's capabilities list
593
- * @param capabilityId - The ID of the capability to disable
594
- */
557
+ * Disable a capability by removing it from the active profile's capabilities list
558
+ * @param capabilityId - The ID of the capability to disable
559
+ */
595
560
  declare function disableCapability(capabilityId: string): Promise<void>;
596
- //#endregion
597
- //#region src/config/env.d.ts
598
- /**
599
- * Load environment variables from .omni/.env file and merge with process.env.
600
- * Process environment variables take precedence over file values.
601
- *
602
- * @returns Merged environment variables
603
- */
561
+ /**
562
+ * Load environment variables from .omni/.env file and merge with process.env.
563
+ * Process environment variables take precedence over file values.
564
+ *
565
+ * @returns Merged environment variables
566
+ */
604
567
  declare function loadEnvironment(): Promise<Record<string, string>>;
605
568
  /**
606
- * Validate that all required environment variables are present.
607
- * Checks declarations from capability config and throws descriptive errors for missing vars.
608
- *
609
- * @param declarations - Environment variable declarations from capability.toml
610
- * @param env - Loaded environment variables
611
- * @param capabilityId - ID of the capability being validated
612
- * @throws Error if required environment variables are missing
613
- */
569
+ * Validate that all required environment variables are present.
570
+ * Checks declarations from capability config and throws descriptive errors for missing vars.
571
+ *
572
+ * @param declarations - Environment variable declarations from capability.toml
573
+ * @param env - Loaded environment variables
574
+ * @param capabilityId - ID of the capability being validated
575
+ * @throws Error if required environment variables are missing
576
+ */
614
577
  declare function validateEnv(declarations: Record<string, EnvDeclaration | Record<string, never>>, env: Record<string, string | undefined>, capabilityId: string): void;
615
578
  /**
616
- * Check if an environment variable should be treated as a secret.
617
- * Secrets should be masked in logs and error messages.
618
- *
619
- * @param key - Environment variable name
620
- * @param declarations - Environment variable declarations from capability.toml
621
- * @returns true if the variable is marked as secret
622
- */
579
+ * Check if an environment variable should be treated as a secret.
580
+ * Secrets should be masked in logs and error messages.
581
+ *
582
+ * @param key - Environment variable name
583
+ * @param declarations - Environment variable declarations from capability.toml
584
+ * @returns true if the variable is marked as secret
585
+ */
623
586
  declare function isSecretEnvVar(key: string, declarations: Record<string, EnvDeclaration | Record<string, never>>): boolean;
624
- //#endregion
625
- //#region src/config/loader.d.ts
626
- /**
627
- * Load and merge config and local configuration files
628
- * @returns Merged OmniConfig object
629
- *
630
- * Reads omni.toml (main config) and omni.local.toml (local overrides).
631
- * Local config takes precedence over main config. Missing files are treated as empty configs.
632
- */
587
+ /**
588
+ * Load and merge config and local configuration files
589
+ * @returns Merged OmniConfig object
590
+ *
591
+ * Reads omni.toml (main config) and omni.local.toml (local overrides).
592
+ * Local config takes precedence over main config. Missing files are treated as empty configs.
593
+ */
633
594
  declare function loadConfig(): Promise<OmniConfig>;
634
595
  /**
635
- * Write config to omni.toml at project root
636
- * @param config - The config object to write
637
- */
596
+ * Write config to omni.toml at project root
597
+ * @param config - The config object to write
598
+ */
638
599
  declare function writeConfig(config: OmniConfig): Promise<void>;
639
- //#endregion
640
- //#region src/config/parser.d.ts
641
- /**
642
- * Parse a TOML string into an OmniConfig object
643
- * @param tomlContent - The TOML content to parse
644
- * @returns Parsed OmniConfig object
645
- * @throws Error if TOML is invalid
646
- */
600
+ /**
601
+ * Parse a TOML string into an OmniConfig object
602
+ * @param tomlContent - The TOML content to parse
603
+ * @returns Parsed OmniConfig object
604
+ * @throws Error if TOML is invalid
605
+ */
647
606
  declare function parseOmniConfig(tomlContent: string): OmniConfig;
648
607
  /**
649
- * Parse a TOML string into a CapabilityConfig object
650
- * @param tomlContent - The TOML content to parse
651
- * @returns Parsed CapabilityConfig object
652
- * @throws Error if TOML is invalid or required fields are missing
653
- */
608
+ * Parse a TOML string into a CapabilityConfig object
609
+ * @param tomlContent - The TOML content to parse
610
+ * @returns Parsed CapabilityConfig object
611
+ * @throws Error if TOML is invalid or required fields are missing
612
+ */
654
613
  declare function parseCapabilityConfig(tomlContent: string): CapabilityConfig;
655
- //#endregion
656
- //#region src/config/profiles.d.ts
657
614
  /**
658
- * Gets the name of the currently active profile.
659
- * Reads from state file first, falls back to config.toml for backwards compatibility.
660
- * Returns null if no profile is set.
661
- */
615
+ * Gets the name of the currently active profile.
616
+ * Reads from state file first, falls back to config.toml for backwards compatibility.
617
+ * Returns null if no profile is set.
618
+ */
662
619
  declare function getActiveProfile(): Promise<string | null>;
663
620
  /**
664
- * Sets the active profile by writing to state file.
665
- * @param name - The name of the profile to activate
666
- */
621
+ * Sets the active profile by writing to state file.
622
+ * @param name - The name of the profile to activate
623
+ */
667
624
  declare function setActiveProfile(name: string): Promise<void>;
668
625
  /**
669
- * Resolves the enabled capabilities for a given profile
670
- *
671
- * @param config - The merged OmniConfig
672
- * @param profileName - The name of the profile to apply, or null to use active
673
- * @returns Array of capability IDs that should be enabled
674
- */
626
+ * Resolves the enabled capabilities for a given profile
627
+ *
628
+ * @param config - The merged OmniConfig
629
+ * @param profileName - The name of the profile to apply, or null to use active
630
+ * @returns Array of capability IDs that should be enabled
631
+ */
675
632
  declare function resolveEnabledCapabilities(config: OmniConfig, profileName: string | null): string[];
676
633
  /**
677
- * Load a specific profile configuration from config.toml
678
- * @param profileName - Name of the profile to load
679
- * @returns ProfileConfig if found, undefined otherwise
680
- */
634
+ * Load a specific profile configuration from config.toml
635
+ * @param profileName - Name of the profile to load
636
+ * @returns ProfileConfig if found, undefined otherwise
637
+ */
681
638
  declare function loadProfileConfig(profileName: string): Promise<ProfileConfig | undefined>;
682
639
  /**
683
- * Set a profile configuration in config.toml
684
- * @param profileName - Name of the profile to set
685
- * @param profileConfig - Profile configuration
686
- */
640
+ * Set a profile configuration in config.toml
641
+ * @param profileName - Name of the profile to set
642
+ * @param profileConfig - Profile configuration
643
+ */
687
644
  declare function setProfile(profileName: string, profileConfig: ProfileConfig): Promise<void>;
688
- //#endregion
689
- //#region src/config/provider.d.ts
690
645
  declare function loadProviderConfig(): Promise<ProviderConfig>;
691
646
  declare function writeProviderConfig(config: ProviderConfig): Promise<void>;
692
647
  declare function parseProviderFlag(flag: string): Provider[];
693
- //#endregion
694
- //#region src/state/manifest.d.ts
695
648
  /**
696
- * Resources provided by a single capability
697
- */
649
+ * Resources provided by a single capability
650
+ */
698
651
  interface CapabilityResources {
699
- skills: string[];
700
- rules: string[];
701
- commands: string[];
702
- subagents: string[];
703
- mcps: string[];
652
+ skills: string[];
653
+ rules: string[];
654
+ commands: string[];
655
+ subagents: string[];
656
+ mcps: string[];
704
657
  }
705
658
  /**
706
- * Manifest tracking which resources each capability provides.
707
- * Used to clean up stale resources when capabilities are disabled.
708
- */
659
+ * Manifest tracking which resources each capability provides.
660
+ * Used to clean up stale resources when capabilities are disabled.
661
+ */
709
662
  interface ResourceManifest {
710
- /** Schema version for future migrations */
711
- version: 1;
712
- /** Last sync timestamp (ISO 8601) */
713
- syncedAt: string;
714
- /** Map of capability ID → resources it provides */
715
- capabilities: Record<string, CapabilityResources>;
663
+ /** Schema version for future migrations */
664
+ version: 1;
665
+ /** Last sync timestamp (ISO 8601) */
666
+ syncedAt: string;
667
+ /** Map of capability ID → resources it provides */
668
+ capabilities: Record<string, CapabilityResources>;
716
669
  }
717
670
  /**
718
- * Result of cleaning up stale resources
719
- */
671
+ * Result of cleaning up stale resources
672
+ */
720
673
  interface CleanupResult {
721
- deletedSkills: string[];
722
- deletedRules: string[];
723
- deletedCommands: string[];
724
- deletedSubagents: string[];
725
- deletedMcps: string[];
674
+ deletedSkills: string[];
675
+ deletedRules: string[];
676
+ deletedCommands: string[];
677
+ deletedSubagents: string[];
678
+ deletedMcps: string[];
726
679
  }
727
680
  /**
728
- * Load the previous manifest from disk.
729
- * Returns an empty manifest if the file doesn't exist.
730
- */
681
+ * Load the previous manifest from disk.
682
+ * Returns an empty manifest if the file doesn't exist.
683
+ */
731
684
  declare function loadManifest(): Promise<ResourceManifest>;
732
685
  /**
733
- * Save the manifest to disk.
734
- */
686
+ * Save the manifest to disk.
687
+ */
735
688
  declare function saveManifest(manifest: ResourceManifest): Promise<void>;
736
689
  /**
737
- * Build a manifest from the current registry capabilities.
738
- */
690
+ * Build a manifest from the current registry capabilities.
691
+ */
739
692
  declare function buildManifestFromCapabilities(capabilities: LoadedCapability[]): ResourceManifest;
740
693
  /**
741
- * Delete resources for capabilities that are no longer enabled.
742
- * Compares the previous manifest against current capability IDs
743
- * and removes files/directories for capabilities not in the current set.
744
- */
694
+ * Delete resources for capabilities that are no longer enabled.
695
+ * Compares the previous manifest against current capability IDs
696
+ * and removes files/directories for capabilities not in the current set.
697
+ */
745
698
  declare function cleanupStaleResources(previousManifest: ResourceManifest, currentCapabilityIds: Set<string>): Promise<CleanupResult>;
746
- //#endregion
747
- //#region src/mcp-json/manager.d.ts
748
699
  /**
749
- * MCP server configuration in .mcp.json
750
- */
700
+ * MCP server configuration in .mcp.json
701
+ */
751
702
  interface McpServerConfig {
752
- command: string;
753
- args?: string[];
754
- env?: Record<string, string>;
703
+ command: string;
704
+ args?: string[];
705
+ env?: Record<string, string>;
755
706
  }
756
707
  /**
757
- * Structure of .mcp.json file
758
- */
708
+ * Structure of .mcp.json file
709
+ */
759
710
  interface McpJsonConfig {
760
- mcpServers: Record<string, McpServerConfig>;
711
+ mcpServers: Record<string, McpServerConfig>;
761
712
  }
762
713
  /**
763
- * Read .mcp.json or return empty config if doesn't exist
764
- */
714
+ * Read .mcp.json or return empty config if doesn't exist
715
+ */
765
716
  declare function readMcpJson(): Promise<McpJsonConfig>;
766
717
  /**
767
- * Write .mcp.json, preserving non-OmniDev entries
768
- */
718
+ * Write .mcp.json, preserving non-OmniDev entries
719
+ */
769
720
  declare function writeMcpJson(config: McpJsonConfig): Promise<void>;
770
721
  /**
771
- * Sync .mcp.json with enabled capability MCP servers
772
- *
773
- * Each capability with an [mcp] section is registered using its capability ID.
774
- * Uses the previous manifest to track which MCPs were managed by OmniDev.
775
- */
722
+ * Sync .mcp.json with enabled capability MCP servers
723
+ *
724
+ * Each capability with an [mcp] section is registered using its capability ID.
725
+ * Uses the previous manifest to track which MCPs were managed by OmniDev.
726
+ */
776
727
  declare function syncMcpJson(capabilities: LoadedCapability[], previousManifest: ResourceManifest, options?: {
777
- silent?: boolean;
728
+ silent?: boolean;
778
729
  }): Promise<void>;
779
- //#endregion
780
- //#region src/state/active-profile.d.ts
781
730
  /**
782
- * Read the active profile from state file.
783
- * Returns null if no active profile is set in state.
784
- */
731
+ * Read the active profile from state file.
732
+ * Returns null if no active profile is set in state.
733
+ */
785
734
  declare function readActiveProfileState(): Promise<string | null>;
786
735
  /**
787
- * Write the active profile to state file.
788
- * @param profileName - The name of the profile to set as active
789
- */
736
+ * Write the active profile to state file.
737
+ * @param profileName - The name of the profile to set as active
738
+ */
790
739
  declare function writeActiveProfileState(profileName: string): Promise<void>;
791
740
  /**
792
- * Clear the active profile state (delete the state file).
793
- */
741
+ * Clear the active profile state (delete the state file).
742
+ */
794
743
  declare function clearActiveProfileState(): Promise<void>;
795
- //#endregion
796
- //#region src/state/providers.d.ts
797
744
  interface ProvidersState {
798
- enabled: ProviderId[];
745
+ enabled: ProviderId[];
799
746
  }
800
747
  /**
801
- * Read the enabled providers from local state.
802
- * Returns default providers if no state file exists.
803
- */
748
+ * Read the enabled providers from local state.
749
+ * Returns default providers if no state file exists.
750
+ */
804
751
  declare function readEnabledProviders(): Promise<ProviderId[]>;
805
752
  /**
806
- * Write enabled providers to local state.
807
- * @param providers - List of provider IDs to enable
808
- */
753
+ * Write enabled providers to local state.
754
+ * @param providers - List of provider IDs to enable
755
+ */
809
756
  declare function writeEnabledProviders(providers: ProviderId[]): Promise<void>;
810
757
  /**
811
- * Enable a specific provider.
812
- * @param providerId - The provider to enable
813
- */
758
+ * Enable a specific provider.
759
+ * @param providerId - The provider to enable
760
+ */
814
761
  declare function enableProvider(providerId: ProviderId): Promise<void>;
815
762
  /**
816
- * Disable a specific provider.
817
- * @param providerId - The provider to disable
818
- */
763
+ * Disable a specific provider.
764
+ * @param providerId - The provider to disable
765
+ */
819
766
  declare function disableProvider(providerId: ProviderId): Promise<void>;
820
767
  /**
821
- * Check if a provider is enabled.
822
- * @param providerId - The provider to check
823
- */
768
+ * Check if a provider is enabled.
769
+ * @param providerId - The provider to check
770
+ */
824
771
  declare function isProviderEnabled(providerId: ProviderId): Promise<boolean>;
825
- //#endregion
826
- //#region src/sync.d.ts
827
772
  interface SyncResult {
828
- capabilities: string[];
829
- skillCount: number;
830
- ruleCount: number;
831
- docCount: number;
773
+ capabilities: string[];
774
+ skillCount: number;
775
+ ruleCount: number;
776
+ docCount: number;
832
777
  }
833
778
  interface SyncOptions {
834
- silent?: boolean;
835
- /** Optional list of adapters to run. If not provided, adapters are not run. */
836
- adapters?: ProviderAdapter[];
779
+ silent?: boolean;
780
+ /** Optional list of adapters to run. If not provided, adapters are not run. */
781
+ adapters?: ProviderAdapter[];
837
782
  }
838
783
  /**
839
- * Install dependencies for capabilities in .omni/capabilities/
840
- * Only installs for capabilities that have a package.json
841
- */
784
+ * Install dependencies for capabilities in .omni/capabilities/
785
+ * Only installs for capabilities that have a package.json
786
+ */
842
787
  declare function installCapabilityDependencies(silent: boolean): Promise<void>;
843
788
  /**
844
- * Build a provider-agnostic SyncBundle from the capability registry.
845
- * This bundle can then be passed to adapters for provider-specific materialization.
846
- */
789
+ * Build a provider-agnostic SyncBundle from the capability registry.
790
+ * This bundle can then be passed to adapters for provider-specific materialization.
791
+ */
847
792
  declare function buildSyncBundle(options?: {
848
- silent?: boolean;
793
+ silent?: boolean;
849
794
  }): Promise<{
850
- bundle: SyncBundle;
795
+ bundle: SyncBundle;
851
796
  }>;
852
797
  /**
853
- * Central sync function that regenerates all agent configuration files.
854
- * Called automatically after any config change (init, capability enable/disable, profile change).
855
- *
856
- * If adapters are provided, they will be called after core sync to write provider-specific files.
857
- */
798
+ * Central sync function that regenerates all agent configuration files.
799
+ * Called automatically after any config change (init, capability enable/disable, profile change).
800
+ *
801
+ * If adapters are provided, they will be called after core sync to write provider-specific files.
802
+ */
858
803
  declare function syncAgentConfiguration(options?: SyncOptions): Promise<SyncResult>;
859
- //#endregion
860
- //#region src/templates/agents.d.ts
861
804
  /**
862
- * Template for AGENTS.md (Codex provider)
863
- * Creates a minimal file with reference to OmniDev instructions
864
- */
805
+ * Template for AGENTS.md (Codex provider)
806
+ * Creates a minimal file with reference to OmniDev instructions
807
+ */
865
808
  declare function generateAgentsTemplate(): string;
866
- //#endregion
867
- //#region src/templates/claude.d.ts
868
809
  /**
869
- * Template for CLAUDE.md (Claude provider)
870
- * Creates a minimal file with reference to OmniDev instructions
871
- */
810
+ * Template for CLAUDE.md (Claude provider)
811
+ * Creates a minimal file with reference to OmniDev instructions
812
+ */
872
813
  declare function generateClaudeTemplate(): string;
873
814
  /**
874
- * Template for .omni/instructions.md
875
- * Contains OmniDev-specific instructions and capability rules
876
- */
815
+ * Template for .omni/instructions.md
816
+ * Contains OmniDev-specific instructions and capability rules
817
+ */
877
818
  declare function generateInstructionsTemplate(): string;
878
- //#endregion
879
- //#region src/debug.d.ts
880
819
  /**
881
- * Debug logger that writes to stdout when OMNIDEV_DEBUG=1
882
- */
820
+ * Debug logger that writes to stdout when OMNIDEV_DEBUG=1
821
+ */
883
822
  declare function debug(message: string, data?: unknown): void;
884
- //#endregion
885
- //#region src/index.d.ts
886
823
  declare const version = "0.1.0";
887
824
  declare function getVersion(): string;
888
- //#endregion
889
- export { CapabilitiesConfig, CapabilitiesLockFile, CapabilityConfig, CapabilityExport, CapabilityExports, CapabilityLockEntry, CapabilityMetadata, CapabilityRegistry, CapabilityResources, CapabilitySource, CapabilitySourceConfig, CapabilitySourceType, CleanupResult, CliConfig, Command, CommandExport, DiscoveredContent, Doc, DocExport, EnvDeclaration, FetchResult, FileContent, GitCapabilitySourceConfig, LoadedCapability, McpConfig, McpJsonConfig, McpServerConfig, McpToolSchema, McpTransport, OmniConfig, ProfileConfig, Provider, ProviderAdapter, ProviderConfig, ProviderContext, ProviderId, ProviderInitResult, ProviderManifest, ProviderSyncResult, ProvidersState, ResourceManifest, Rule, Skill, SkillExport, SourceUpdateInfo, Subagent, SubagentExport, SubagentHookConfig, SubagentHooks, SubagentModel, SubagentPermissionMode, SyncBundle, SyncConfig, SyncOptions, SyncResult, buildCapabilityRegistry, buildCommand, buildManifestFromCapabilities, buildRouteMap, buildSyncBundle, checkForUpdates, cleanupStaleResources, clearActiveProfileState, debug, disableCapability, disableProvider, discoverCapabilities, enableCapability, enableProvider, fetchAllCapabilitySources, fetchCapabilitySource, generateAgentsTemplate, generateClaudeTemplate, generateInstructionsTemplate, getActiveProfile, getActiveProviders, getEnabledCapabilities, getLockFilePath, getSourceCapabilityPath, getVersion, installCapabilityDependencies, isProviderEnabled, isSecretEnvVar, loadCapability, loadCapabilityConfig, loadCommands, loadConfig, loadDocs, loadEnvironment, loadLockFile, loadManifest, loadProfileConfig, loadProviderConfig, loadRules, loadSkills, loadSubagents, parseCapabilityConfig, parseOmniConfig, parseProviderFlag, parseSourceConfig, readActiveProfileState, readEnabledProviders, readMcpJson, resolveEnabledCapabilities, saveLockFile, saveManifest, setActiveProfile, setProfile, sourceToGitUrl, syncAgentConfiguration, syncMcpJson, validateEnv, version, writeActiveProfileState, writeConfig, writeEnabledProviders, writeMcpJson, writeProviderConfig, writeRules };
825
+ 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, 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, 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 };