@omnidev-ai/core 0.1.1 → 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 (63) 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 -414
  8. package/src/capability/commands.ts +0 -72
  9. package/src/capability/docs.test.ts +0 -199
  10. package/src/capability/docs.ts +0 -46
  11. package/src/capability/index.ts +0 -20
  12. package/src/capability/loader.test.ts +0 -815
  13. package/src/capability/loader.ts +0 -492
  14. package/src/capability/registry.test.ts +0 -473
  15. package/src/capability/registry.ts +0 -55
  16. package/src/capability/rules.test.ts +0 -145
  17. package/src/capability/rules.ts +0 -133
  18. package/src/capability/skills.test.ts +0 -316
  19. package/src/capability/skills.ts +0 -58
  20. package/src/capability/sources.test.ts +0 -338
  21. package/src/capability/sources.ts +0 -966
  22. package/src/capability/subagents.test.ts +0 -478
  23. package/src/capability/subagents.ts +0 -103
  24. package/src/capability/yaml-parser.ts +0 -81
  25. package/src/config/AGENTS.md +0 -46
  26. package/src/config/capabilities.ts +0 -82
  27. package/src/config/env.test.ts +0 -284
  28. package/src/config/env.ts +0 -96
  29. package/src/config/index.ts +0 -6
  30. package/src/config/loader.test.ts +0 -280
  31. package/src/config/loader.ts +0 -137
  32. package/src/config/parser.test.ts +0 -281
  33. package/src/config/parser.ts +0 -55
  34. package/src/config/profiles.test.ts +0 -256
  35. package/src/config/profiles.ts +0 -75
  36. package/src/config/provider.test.ts +0 -80
  37. package/src/config/provider.ts +0 -55
  38. package/src/debug.ts +0 -20
  39. package/src/gitignore/manager.test.ts +0 -216
  40. package/src/gitignore/manager.ts +0 -167
  41. package/src/index.test.ts +0 -26
  42. package/src/index.ts +0 -39
  43. package/src/mcp-json/index.ts +0 -1
  44. package/src/mcp-json/manager.test.ts +0 -415
  45. package/src/mcp-json/manager.ts +0 -118
  46. package/src/state/active-profile.test.ts +0 -131
  47. package/src/state/active-profile.ts +0 -41
  48. package/src/state/index.ts +0 -2
  49. package/src/state/manifest.test.ts +0 -548
  50. package/src/state/manifest.ts +0 -164
  51. package/src/sync.ts +0 -213
  52. package/src/templates/agents.test.ts +0 -23
  53. package/src/templates/agents.ts +0 -14
  54. package/src/templates/claude.test.ts +0 -48
  55. package/src/templates/claude.ts +0 -122
  56. package/src/test-utils/helpers.test.ts +0 -196
  57. package/src/test-utils/helpers.ts +0 -199
  58. package/src/test-utils/index.ts +0 -31
  59. package/src/test-utils/mocks.test.ts +0 -83
  60. package/src/test-utils/mocks.ts +0 -101
  61. package/src/types/capability-export.ts +0 -234
  62. package/src/types/index.test.ts +0 -28
  63. package/src/types/index.ts +0 -270
@@ -1,46 +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 });
30
-
31
- for (const entry of entries) {
32
- if (entry.isFile() && entry.name.endsWith(".md")) {
33
- const docPath = join(docsDir, entry.name);
34
- const content = await Bun.file(docPath).text();
35
-
36
- docs.push({
37
- name: basename(entry.name, ".md"),
38
- content: content.trim(),
39
- capabilityId,
40
- });
41
- }
42
- }
43
- }
44
-
45
- return docs;
46
- }
@@ -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";