@speclife/core 0.11.1 → 0.12.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.
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Antigravity editor configurator
|
|
3
|
-
* AI-powered
|
|
3
|
+
* Google's AI-powered IDE using .agent directory with flat workflow files
|
|
4
4
|
*/
|
|
5
5
|
import { EditorConfigurator, type ConfigureResult, type ConfigureOptions } from './base.js';
|
|
6
6
|
export declare class AntigravityConfigurator extends EditorConfigurator {
|
|
7
7
|
readonly name = "Antigravity";
|
|
8
8
|
readonly id = "antigravity";
|
|
9
|
-
readonly description = "AI-powered
|
|
9
|
+
readonly description = "Google's AI-powered IDE";
|
|
10
10
|
readonly configDir = ".agent";
|
|
11
11
|
readonly supportsDashPrefix = false;
|
|
12
12
|
isAvailable(_projectPath: string): Promise<boolean>;
|
|
@@ -15,8 +15,8 @@ export declare class AntigravityConfigurator extends EditorConfigurator {
|
|
|
15
15
|
unconfigure(projectPath: string): Promise<void>;
|
|
16
16
|
/**
|
|
17
17
|
* Override detection paths for Antigravity
|
|
18
|
-
* Uses "workflows" instead of "commands"
|
|
19
18
|
*/
|
|
20
19
|
getDetectionPaths(): string[];
|
|
20
|
+
private discoverCommands;
|
|
21
21
|
}
|
|
22
22
|
//# sourceMappingURL=antigravity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../src/configurators/antigravity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE5F,qBAAa,uBAAwB,SAAQ,kBAAkB;IAC7D,QAAQ,CAAC,IAAI,iBAAiB;IAC9B,QAAQ,CAAC,EAAE,iBAAiB;IAC5B,QAAQ,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"antigravity.d.ts","sourceRoot":"","sources":["../../src/configurators/antigravity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE5F,qBAAa,uBAAwB,SAAQ,kBAAkB;IAC7D,QAAQ,CAAC,IAAI,iBAAiB;IAC9B,QAAQ,CAAC,EAAE,iBAAiB;IAC5B,QAAQ,CAAC,WAAW,6BAA6B;IACjD,QAAQ,CAAC,SAAS,YAAY;IAC9B,QAAQ,CAAC,kBAAkB,SAAS;IAE9B,WAAW,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKnD,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAWnD,SAAS,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC;IAoD9D,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBrD;;OAEG;IACM,iBAAiB,IAAI,MAAM,EAAE;YAIxB,gBAAgB;CAU/B"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Antigravity editor configurator
|
|
3
|
-
* AI-powered
|
|
3
|
+
* Google's AI-powered IDE using .agent directory with flat workflow files
|
|
4
4
|
*/
|
|
5
|
-
import { access, mkdir, symlink, unlink, lstat,
|
|
5
|
+
import { access, mkdir, symlink, unlink, lstat, readdir } from 'fs/promises';
|
|
6
6
|
import { join } from 'path';
|
|
7
7
|
import { EditorConfigurator } from './base.js';
|
|
8
8
|
export class AntigravityConfigurator extends EditorConfigurator {
|
|
9
9
|
name = 'Antigravity';
|
|
10
10
|
id = 'antigravity';
|
|
11
|
-
description = 'AI-powered
|
|
11
|
+
description = "Google's AI-powered IDE";
|
|
12
12
|
configDir = '.agent';
|
|
13
|
-
supportsDashPrefix = false; //
|
|
13
|
+
supportsDashPrefix = false; // Dash-prefix IS the primary format, not secondary
|
|
14
14
|
async isAvailable(_projectPath) {
|
|
15
15
|
// Antigravity is always available as a supported editor
|
|
16
16
|
return true;
|
|
17
17
|
}
|
|
18
18
|
async isConfigured(projectPath) {
|
|
19
19
|
try {
|
|
20
|
-
//
|
|
21
|
-
const workflowsDir = join(projectPath, this.configDir, 'workflows'
|
|
22
|
-
await
|
|
23
|
-
return
|
|
20
|
+
// Check if any speclife-*.md files exist in .agent/workflows/
|
|
21
|
+
const workflowsDir = join(projectPath, this.configDir, 'workflows');
|
|
22
|
+
const files = await readdir(workflowsDir);
|
|
23
|
+
return files.some(f => f.startsWith('speclife-') && f.endsWith('.md'));
|
|
24
24
|
}
|
|
25
25
|
catch {
|
|
26
26
|
return false;
|
|
@@ -35,41 +35,39 @@ export class AntigravityConfigurator extends EditorConfigurator {
|
|
|
35
35
|
warnings: [],
|
|
36
36
|
};
|
|
37
37
|
const sourceDir = join(projectPath, specDir, 'commands', 'speclife');
|
|
38
|
-
//
|
|
39
|
-
const
|
|
40
|
-
const editorWorkflowsDir = join(editorWorkflowsBase, 'speclife');
|
|
38
|
+
// Antigravity uses flat files: .agent/workflows/speclife-<cmd>.md
|
|
39
|
+
const workflowsDir = join(projectPath, this.configDir, 'workflows');
|
|
41
40
|
try {
|
|
42
|
-
// Ensure
|
|
43
|
-
await mkdir(
|
|
44
|
-
//
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
// Ensure workflows directory exists
|
|
42
|
+
await mkdir(workflowsDir, { recursive: true });
|
|
43
|
+
// Discover available commands
|
|
44
|
+
const commands = await this.discoverCommands(sourceDir);
|
|
45
|
+
// Create individual symlinks for each command
|
|
46
|
+
for (const cmd of commands) {
|
|
47
|
+
const dashFile = join(workflowsDir, `speclife-${cmd}.md`);
|
|
48
|
+
const targetFile = join(sourceDir, `${cmd}.md`);
|
|
49
|
+
try {
|
|
50
|
+
await access(dashFile);
|
|
48
51
|
if (force) {
|
|
49
|
-
await unlink(
|
|
50
|
-
await symlink(
|
|
51
|
-
result.filesModified.push(
|
|
52
|
+
await unlink(dashFile);
|
|
53
|
+
await symlink(targetFile, dashFile);
|
|
54
|
+
result.filesModified.push(dashFile);
|
|
52
55
|
}
|
|
53
56
|
else {
|
|
54
|
-
|
|
55
|
-
const target = await readlink(editorWorkflowsDir);
|
|
56
|
-
if (target !== sourceDir) {
|
|
57
|
-
result.warnings.push(`Existing symlink points to ${target}, not ${sourceDir}`);
|
|
58
|
-
}
|
|
59
|
-
result.filesSkipped.push(editorWorkflowsDir);
|
|
57
|
+
result.filesSkipped.push(dashFile);
|
|
60
58
|
}
|
|
61
59
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
60
|
+
catch {
|
|
61
|
+
// File doesn't exist, create symlink
|
|
62
|
+
try {
|
|
63
|
+
await symlink(targetFile, dashFile);
|
|
64
|
+
result.filesModified.push(dashFile);
|
|
65
|
+
}
|
|
66
|
+
catch (err) {
|
|
67
|
+
result.warnings.push(`Failed to create ${dashFile}: ${err}`);
|
|
68
|
+
}
|
|
65
69
|
}
|
|
66
70
|
}
|
|
67
|
-
catch {
|
|
68
|
-
// Symlink doesn't exist, create it
|
|
69
|
-
await symlink(sourceDir, editorWorkflowsDir);
|
|
70
|
-
result.filesModified.push(editorWorkflowsDir);
|
|
71
|
-
}
|
|
72
|
-
// Antigravity doesn't use dash-prefixed symlinks
|
|
73
71
|
}
|
|
74
72
|
catch (err) {
|
|
75
73
|
result.success = false;
|
|
@@ -78,11 +76,18 @@ export class AntigravityConfigurator extends EditorConfigurator {
|
|
|
78
76
|
return result;
|
|
79
77
|
}
|
|
80
78
|
async unconfigure(projectPath) {
|
|
81
|
-
const
|
|
79
|
+
const workflowsDir = join(projectPath, this.configDir, 'workflows');
|
|
82
80
|
try {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
81
|
+
// Remove all speclife-*.md symlinks
|
|
82
|
+
const files = await readdir(workflowsDir);
|
|
83
|
+
for (const file of files) {
|
|
84
|
+
if (file.startsWith('speclife-') && file.endsWith('.md')) {
|
|
85
|
+
const filePath = join(workflowsDir, file);
|
|
86
|
+
const stats = await lstat(filePath);
|
|
87
|
+
if (stats.isSymbolicLink()) {
|
|
88
|
+
await unlink(filePath);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
86
91
|
}
|
|
87
92
|
}
|
|
88
93
|
catch {
|
|
@@ -91,10 +96,20 @@ export class AntigravityConfigurator extends EditorConfigurator {
|
|
|
91
96
|
}
|
|
92
97
|
/**
|
|
93
98
|
* Override detection paths for Antigravity
|
|
94
|
-
* Uses "workflows" instead of "commands"
|
|
95
99
|
*/
|
|
96
100
|
getDetectionPaths() {
|
|
97
101
|
return [this.configDir, join(this.configDir, 'workflows')];
|
|
98
102
|
}
|
|
103
|
+
async discoverCommands(sourceDir) {
|
|
104
|
+
try {
|
|
105
|
+
const files = await readdir(sourceDir);
|
|
106
|
+
return files
|
|
107
|
+
.filter(f => f.endsWith('.md'))
|
|
108
|
+
.map(f => f.replace('.md', ''));
|
|
109
|
+
}
|
|
110
|
+
catch {
|
|
111
|
+
return [];
|
|
112
|
+
}
|
|
113
|
+
}
|
|
99
114
|
}
|
|
100
115
|
//# sourceMappingURL=antigravity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/configurators/antigravity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"antigravity.js","sourceRoot":"","sources":["../../src/configurators/antigravity.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CA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