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.
- package/README.md +39 -44
- package/bin/daedalion.js +12 -6
- package/dist/commands/build.d.ts +3 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +193 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/clean.d.ts +2 -0
- package/dist/commands/clean.d.ts.map +1 -0
- package/dist/commands/clean.js +106 -0
- package/dist/commands/clean.js.map +1 -0
- package/dist/commands/init.d.ts +3 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +88 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/validate.d.ts +2 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +119 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/config.d.ts +5 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +101 -0
- package/dist/config.js.map +1 -0
- package/dist/generators/agent.d.ts +3 -0
- package/dist/generators/agent.d.ts.map +1 -0
- package/dist/generators/agent.js +114 -0
- package/dist/generators/agent.js.map +1 -0
- package/dist/generators/agents-index.d.ts +3 -0
- package/dist/generators/agents-index.d.ts.map +1 -0
- package/dist/generators/agents-index.js +29 -0
- package/dist/generators/agents-index.js.map +1 -0
- package/dist/generators/instructions.d.ts +3 -0
- package/dist/generators/instructions.d.ts.map +1 -0
- package/dist/generators/instructions.js +72 -0
- package/dist/generators/instructions.js.map +1 -0
- package/dist/generators/pattern-instructions.d.ts +3 -0
- package/dist/generators/pattern-instructions.d.ts.map +1 -0
- package/dist/generators/pattern-instructions.js +28 -0
- package/dist/generators/pattern-instructions.js.map +1 -0
- package/dist/generators/prompt.d.ts +4 -0
- package/dist/generators/prompt.d.ts.map +1 -0
- package/{src → dist}/generators/prompt.js +96 -102
- package/dist/generators/prompt.js.map +1 -0
- package/dist/generators/skill.d.ts +3 -0
- package/dist/generators/skill.d.ts.map +1 -0
- package/dist/generators/skill.js +98 -0
- package/dist/generators/skill.js.map +1 -0
- package/dist/generators/tools.d.ts +3 -0
- package/dist/generators/tools.d.ts.map +1 -0
- package/dist/generators/tools.js +192 -0
- package/dist/generators/tools.js.map +1 -0
- package/dist/generators/workflow.d.ts +3 -0
- package/dist/generators/workflow.d.ts.map +1 -0
- package/{src → dist}/generators/workflow.js +47 -53
- package/dist/generators/workflow.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/{src → dist}/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/parsers/proposal.d.ts +3 -0
- package/dist/parsers/proposal.d.ts.map +1 -0
- package/dist/parsers/proposal.js +50 -0
- package/dist/parsers/proposal.js.map +1 -0
- package/dist/parsers/spec.d.ts +3 -0
- package/dist/parsers/spec.d.ts.map +1 -0
- package/dist/parsers/spec.js +87 -0
- package/dist/parsers/spec.js.map +1 -0
- package/dist/parsers/tasks.d.ts +4 -0
- package/dist/parsers/tasks.d.ts.map +1 -0
- package/dist/parsers/tasks.js +39 -0
- package/dist/parsers/tasks.js.map +1 -0
- package/dist/types.d.ts +108 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/utils.d.ts +5 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +46 -0
- package/dist/utils.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +47 -0
- package/dist/version.js.map +1 -0
- package/package.json +20 -5
- package/templates/init/.github/prompts/daedalion-compile.prompt.md +36 -0
- package/templates/init/daedalion.yaml +1 -11
- package/src/commands/build.js +0 -198
- package/src/commands/clean.js +0 -85
- package/src/commands/init.js +0 -101
- package/src/commands/validate.js +0 -141
- package/src/config.js +0 -50
- package/src/generators/agent.js +0 -121
- package/src/generators/instructions.js +0 -65
- package/src/generators/skill.js +0 -108
- package/src/generators/tools.js +0 -183
- package/src/parsers/proposal.js +0 -52
- package/src/parsers/spec.js +0 -105
- package/src/parsers/tasks.js +0 -46
- package/src/utils.js +0 -51
- 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
|
-
}
|