daedalion 0.0.2 → 0.3.1

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 (99) hide show
  1. package/README.md +39 -44
  2. package/bin/daedalion.js +12 -6
  3. package/dist/commands/build.d.ts +3 -0
  4. package/dist/commands/build.d.ts.map +1 -0
  5. package/dist/commands/build.js +193 -0
  6. package/dist/commands/build.js.map +1 -0
  7. package/dist/commands/clean.d.ts +2 -0
  8. package/dist/commands/clean.d.ts.map +1 -0
  9. package/dist/commands/clean.js +106 -0
  10. package/dist/commands/clean.js.map +1 -0
  11. package/dist/commands/init.d.ts +3 -0
  12. package/dist/commands/init.d.ts.map +1 -0
  13. package/dist/commands/init.js +88 -0
  14. package/dist/commands/init.js.map +1 -0
  15. package/dist/commands/validate.d.ts +2 -0
  16. package/dist/commands/validate.d.ts.map +1 -0
  17. package/dist/commands/validate.js +119 -0
  18. package/dist/commands/validate.js.map +1 -0
  19. package/dist/config.d.ts +5 -0
  20. package/dist/config.d.ts.map +1 -0
  21. package/dist/config.js +101 -0
  22. package/dist/config.js.map +1 -0
  23. package/dist/generators/agent.d.ts +3 -0
  24. package/dist/generators/agent.d.ts.map +1 -0
  25. package/dist/generators/agent.js +114 -0
  26. package/dist/generators/agent.js.map +1 -0
  27. package/dist/generators/agents-index.d.ts +3 -0
  28. package/dist/generators/agents-index.d.ts.map +1 -0
  29. package/dist/generators/agents-index.js +29 -0
  30. package/dist/generators/agents-index.js.map +1 -0
  31. package/dist/generators/instructions.d.ts +3 -0
  32. package/dist/generators/instructions.d.ts.map +1 -0
  33. package/dist/generators/instructions.js +72 -0
  34. package/dist/generators/instructions.js.map +1 -0
  35. package/dist/generators/pattern-instructions.d.ts +3 -0
  36. package/dist/generators/pattern-instructions.d.ts.map +1 -0
  37. package/dist/generators/pattern-instructions.js +28 -0
  38. package/dist/generators/pattern-instructions.js.map +1 -0
  39. package/dist/generators/prompt.d.ts +4 -0
  40. package/dist/generators/prompt.d.ts.map +1 -0
  41. package/{src → dist}/generators/prompt.js +96 -102
  42. package/dist/generators/prompt.js.map +1 -0
  43. package/dist/generators/skill.d.ts +3 -0
  44. package/dist/generators/skill.d.ts.map +1 -0
  45. package/dist/generators/skill.js +98 -0
  46. package/dist/generators/skill.js.map +1 -0
  47. package/dist/generators/tools.d.ts +3 -0
  48. package/dist/generators/tools.d.ts.map +1 -0
  49. package/dist/generators/tools.js +192 -0
  50. package/dist/generators/tools.js.map +1 -0
  51. package/dist/generators/workflow.d.ts +3 -0
  52. package/dist/generators/workflow.d.ts.map +1 -0
  53. package/{src → dist}/generators/workflow.js +47 -53
  54. package/dist/generators/workflow.js.map +1 -0
  55. package/dist/index.d.ts +16 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/{src → dist}/index.js +1 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/parsers/proposal.d.ts +3 -0
  60. package/dist/parsers/proposal.d.ts.map +1 -0
  61. package/dist/parsers/proposal.js +50 -0
  62. package/dist/parsers/proposal.js.map +1 -0
  63. package/dist/parsers/spec.d.ts +3 -0
  64. package/dist/parsers/spec.d.ts.map +1 -0
  65. package/dist/parsers/spec.js +87 -0
  66. package/dist/parsers/spec.js.map +1 -0
  67. package/dist/parsers/tasks.d.ts +4 -0
  68. package/dist/parsers/tasks.d.ts.map +1 -0
  69. package/dist/parsers/tasks.js +39 -0
  70. package/dist/parsers/tasks.js.map +1 -0
  71. package/dist/types.d.ts +108 -0
  72. package/dist/types.d.ts.map +1 -0
  73. package/dist/types.js +2 -0
  74. package/dist/types.js.map +1 -0
  75. package/dist/utils.d.ts +5 -0
  76. package/dist/utils.d.ts.map +1 -0
  77. package/dist/utils.js +46 -0
  78. package/dist/utils.js.map +1 -0
  79. package/dist/version.d.ts +3 -0
  80. package/dist/version.d.ts.map +1 -0
  81. package/dist/version.js +47 -0
  82. package/dist/version.js.map +1 -0
  83. package/package.json +20 -5
  84. package/templates/init/.github/prompts/daedalion-compile.prompt.md +36 -0
  85. package/templates/init/daedalion.yaml +1 -11
  86. package/src/commands/build.js +0 -198
  87. package/src/commands/clean.js +0 -85
  88. package/src/commands/init.js +0 -101
  89. package/src/commands/validate.js +0 -141
  90. package/src/config.js +0 -50
  91. package/src/generators/agent.js +0 -121
  92. package/src/generators/instructions.js +0 -65
  93. package/src/generators/skill.js +0 -108
  94. package/src/generators/tools.js +0 -183
  95. package/src/parsers/proposal.js +0 -52
  96. package/src/parsers/spec.js +0 -105
  97. package/src/parsers/tasks.js +0 -46
  98. package/src/utils.js +0 -51
  99. package/src/version.js +0 -60
package/src/utils.js DELETED
@@ -1,51 +0,0 @@
1
- import { mkdirSync, existsSync } from 'fs';
2
- import { dirname } from 'path';
3
-
4
- export function ensureDir(filePath) {
5
- const dir = dirname(filePath);
6
- if (!existsSync(dir)) {
7
- mkdirSync(dir, { recursive: true });
8
- }
9
- }
10
-
11
- export function extractFirstHeading(content) {
12
- const match = content.match(/^#\s+(.+)$/m);
13
- return match ? match[1].trim() : null;
14
- }
15
-
16
- export function extractDescription(content) {
17
- const lines = content.split('\n');
18
- let inFrontmatter = false;
19
- let description = [];
20
-
21
- for (const line of lines) {
22
- if (line.trim() === '---') {
23
- if (inFrontmatter) {
24
- inFrontmatter = false;
25
- continue;
26
- }
27
- inFrontmatter = true;
28
- continue;
29
- }
30
-
31
- if (inFrontmatter) continue;
32
-
33
- if (line.startsWith('#')) continue;
34
-
35
- if (line.trim() && !line.startsWith('##')) {
36
- description.push(line.trim());
37
- if (description.length >= 2) break;
38
- }
39
-
40
- if (line.startsWith('##')) break;
41
- }
42
-
43
- return description.join(' ').slice(0, 200) || null;
44
- }
45
-
46
- export function slugify(text) {
47
- return text
48
- .toLowerCase()
49
- .replace(/[^a-z0-9]+/g, '-')
50
- .replace(/^-|-$/g, '');
51
- }
package/src/version.js DELETED
@@ -1,60 +0,0 @@
1
- import { execSync } from 'child_process';
2
- import { readFileSync } from 'fs';
3
- import { fileURLToPath } from 'url';
4
- import { dirname, join } from 'path';
5
-
6
- const __filename = fileURLToPath(import.meta.url);
7
- const __dirname = dirname(__filename);
8
-
9
- // Read version from package.json
10
- const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
11
- export const VERSION = pkg.version;
12
-
13
- /**
14
- * Get version string with commit hash for dev builds
15
- * @returns {string} e.g., "0.0.1" or "0.0.1-dev+abc1234"
16
- */
17
- export function getVersionString() {
18
- const commitHash = getCommitHash();
19
- if (commitHash && !isReleaseBuild()) {
20
- return `${VERSION}-dev+${commitHash}`;
21
- }
22
- return VERSION;
23
- }
24
-
25
- /**
26
- * Get short commit hash
27
- * @returns {string|null}
28
- */
29
- function getCommitHash() {
30
- try {
31
- return execSync('git rev-parse --short HEAD', {
32
- encoding: 'utf-8',
33
- stdio: ['pipe', 'pipe', 'ignore']
34
- }).trim();
35
- } catch {
36
- return null;
37
- }
38
- }
39
-
40
- /**
41
- * Check if this is a release build (tagged or npm published)
42
- * @returns {boolean}
43
- */
44
- function isReleaseBuild() {
45
- // Check if running from node_modules (npm installed)
46
- if (__dirname.includes('node_modules')) {
47
- return true;
48
- }
49
-
50
- // Check if current commit is tagged
51
- try {
52
- execSync('git describe --exact-match --tags HEAD', {
53
- encoding: 'utf-8',
54
- stdio: ['pipe', 'pipe', 'ignore']
55
- });
56
- return true;
57
- } catch {
58
- return false;
59
- }
60
- }