@omnidev-ai/core 0.3.0 → 0.4.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 (64) hide show
  1. package/dist/index.d.ts +889 -0
  2. package/dist/index.js +2173 -0
  3. package/dist/test-utils/index.d.ts +142 -0
  4. package/dist/test-utils/index.js +261 -0
  5. package/package.json +16 -6
  6. package/src/capability/AGENTS.md +0 -58
  7. package/src/capability/commands.test.ts +0 -410
  8. package/src/capability/commands.ts +0 -72
  9. package/src/capability/docs.test.ts +0 -192
  10. package/src/capability/docs.ts +0 -48
  11. package/src/capability/index.ts +0 -20
  12. package/src/capability/loader.test.ts +0 -668
  13. package/src/capability/loader.ts +0 -431
  14. package/src/capability/registry.test.ts +0 -455
  15. package/src/capability/registry.ts +0 -55
  16. package/src/capability/rules.test.ts +0 -135
  17. package/src/capability/rules.ts +0 -135
  18. package/src/capability/skills.test.ts +0 -312
  19. package/src/capability/skills.ts +0 -58
  20. package/src/capability/sources.test.ts +0 -439
  21. package/src/capability/sources.ts +0 -998
  22. package/src/capability/subagents.test.ts +0 -474
  23. package/src/capability/subagents.ts +0 -105
  24. package/src/capability/wrapping-integration.test.ts +0 -412
  25. package/src/capability/yaml-parser.ts +0 -81
  26. package/src/config/AGENTS.md +0 -46
  27. package/src/config/capabilities.ts +0 -54
  28. package/src/config/env.test.ts +0 -270
  29. package/src/config/env.ts +0 -96
  30. package/src/config/index.ts +0 -6
  31. package/src/config/loader.test.ts +0 -198
  32. package/src/config/loader.ts +0 -207
  33. package/src/config/parser.test.ts +0 -256
  34. package/src/config/parser.ts +0 -55
  35. package/src/config/profiles.test.ts +0 -222
  36. package/src/config/profiles.ts +0 -75
  37. package/src/config/provider.test.ts +0 -66
  38. package/src/config/provider.ts +0 -55
  39. package/src/debug.ts +0 -20
  40. package/src/index.test.ts +0 -26
  41. package/src/index.ts +0 -37
  42. package/src/mcp-json/index.ts +0 -1
  43. package/src/mcp-json/manager.test.ts +0 -310
  44. package/src/mcp-json/manager.ts +0 -106
  45. package/src/state/active-profile.test.ts +0 -117
  46. package/src/state/active-profile.ts +0 -41
  47. package/src/state/index.ts +0 -3
  48. package/src/state/manifest.test.ts +0 -411
  49. package/src/state/manifest.ts +0 -137
  50. package/src/state/providers.test.ts +0 -125
  51. package/src/state/providers.ts +0 -69
  52. package/src/sync.ts +0 -288
  53. package/src/templates/agents.test.ts +0 -23
  54. package/src/templates/agents.ts +0 -14
  55. package/src/templates/claude.test.ts +0 -48
  56. package/src/templates/claude.ts +0 -57
  57. package/src/test-utils/helpers.test.ts +0 -214
  58. package/src/test-utils/helpers.ts +0 -284
  59. package/src/test-utils/index.ts +0 -34
  60. package/src/test-utils/mocks.test.ts +0 -83
  61. package/src/test-utils/mocks.ts +0 -101
  62. package/src/types/capability-export.ts +0 -157
  63. package/src/types/index.test.ts +0 -28
  64. package/src/types/index.ts +0 -314
@@ -1,48 +0,0 @@
1
- import { existsSync, readdirSync } from "node:fs";
2
- import { basename, join } from "node:path";
3
- import type { Doc } from "../types";
4
-
5
- /**
6
- * Load documentation from a capability directory
7
- * Loads both definition.md and all files from docs/ directory
8
- * @param capabilityPath Path to the capability directory
9
- * @param capabilityId ID of the capability
10
- * @returns Array of Doc objects
11
- */
12
- export async function loadDocs(capabilityPath: string, capabilityId: string): Promise<Doc[]> {
13
- const docs: Doc[] = [];
14
-
15
- // Load definition.md if exists
16
- const definitionPath = join(capabilityPath, "definition.md");
17
- if (existsSync(definitionPath)) {
18
- const content = await Bun.file(definitionPath).text();
19
- docs.push({
20
- name: "definition",
21
- content: content.trim(),
22
- capabilityId,
23
- });
24
- }
25
-
26
- // Load docs/*.md
27
- const docsDir = join(capabilityPath, "docs");
28
- if (existsSync(docsDir)) {
29
- const entries = readdirSync(docsDir, { withFileTypes: true }).sort((a, b) =>
30
- a.name.localeCompare(b.name),
31
- );
32
-
33
- for (const entry of entries) {
34
- if (entry.isFile() && entry.name.endsWith(".md")) {
35
- const docPath = join(docsDir, entry.name);
36
- const content = await Bun.file(docPath).text();
37
-
38
- docs.push({
39
- name: basename(entry.name, ".md"),
40
- content: content.trim(),
41
- capabilityId,
42
- });
43
- }
44
- }
45
- }
46
-
47
- return docs;
48
- }
@@ -1,20 +0,0 @@
1
- export { loadCommands } from "./commands";
2
- export { loadDocs } from "./docs";
3
- export { discoverCapabilities, loadCapability, loadCapabilityConfig } from "./loader";
4
- export type { CapabilityRegistry } from "./registry";
5
- export { buildCapabilityRegistry } from "./registry";
6
- export { loadRules, writeRules } from "./rules";
7
- export { loadSkills } from "./skills";
8
- export {
9
- fetchAllCapabilitySources,
10
- fetchCapabilitySource,
11
- checkForUpdates,
12
- loadLockFile,
13
- saveLockFile,
14
- parseSourceConfig,
15
- sourceToGitUrl,
16
- getSourceCapabilityPath,
17
- getLockFilePath,
18
- } from "./sources";
19
- export type { FetchResult, SourceUpdateInfo, DiscoveredContent } from "./sources";
20
- export { loadSubagents } from "./subagents";