bilmem 0.1.0 → 0.2.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,5 +1,5 @@
1
- import { S as Storage } from '../canonical-CglQQ0xc.js';
2
- import '../types-Nxq5Gzay.js';
1
+ import { S as Storage } from '../canonical-JS6HUWGc.js';
2
+ import '../types-DNlvHsj9.js';
3
3
  import '../search/index.js';
4
4
 
5
5
  type InstallScope = 'project' | 'global';
@@ -29,6 +29,9 @@ interface InstallState {
29
29
  currentInstructionVersion: number;
30
30
  configPath: string;
31
31
  instructionPath: string;
32
+ skillPath?: string;
33
+ skillInstalled?: boolean;
34
+ skillVersion?: number;
32
35
  details?: Record<string, unknown>;
33
36
  }
34
37
  interface InstallOptions {
@@ -43,6 +46,8 @@ interface InstallResult {
43
46
  scope: InstallScope;
44
47
  mcpChanged: boolean;
45
48
  instructionChanged: boolean;
49
+ skillChanged?: boolean;
50
+ skillPath?: string;
46
51
  projectInitialized: boolean;
47
52
  dryRun?: boolean;
48
53
  message?: string;
@@ -60,6 +65,8 @@ interface UninstallResult {
60
65
  scope: InstallScope;
61
66
  mcpRemoved: boolean;
62
67
  instructionRemoved: boolean;
68
+ skillRemoved?: boolean;
69
+ skillPath?: string;
63
70
  dryRun?: boolean;
64
71
  message?: string;
65
72
  warnings?: string[];
@@ -69,6 +76,7 @@ interface VerifyResult {
69
76
  valid: boolean;
70
77
  mcpValid: boolean;
71
78
  instructionValid: boolean;
79
+ skillValid?: boolean;
72
80
  commandResolvable: boolean;
73
81
  issues: string[];
74
82
  recommendations: string[];
@@ -76,7 +84,9 @@ interface VerifyResult {
76
84
  interface AgentInstaller {
77
85
  readonly id: string;
78
86
  readonly name: string;
87
+ readonly aliases?: string[];
79
88
  readonly supportedScopes: InstallScope[];
89
+ resolveSkillPath?(context: InstallContext): string | undefined;
80
90
  detect(context: InstallContext): Promise<DetectionResult>;
81
91
  inspect(context: InstallContext): Promise<InstallState>;
82
92
  install(context: InstallContext, options: InstallOptions): Promise<InstallResult>;
@@ -89,6 +99,8 @@ interface IntegrationRecord {
89
99
  mcpConfigPath?: string;
90
100
  instructions: boolean;
91
101
  instructionPath?: string;
102
+ skill?: boolean;
103
+ skillPath?: string;
92
104
  version: number;
93
105
  installedAt: string;
94
106
  updatedAt?: string;
@@ -131,12 +143,17 @@ interface AgentDoctorReport {
131
143
  status: 'ok' | 'missing' | 'outdated' | 'none';
132
144
  details?: string;
133
145
  };
146
+ skill?: {
147
+ status: 'ok' | 'missing' | 'outdated' | 'none';
148
+ details?: string;
149
+ };
134
150
  command: {
135
151
  status: 'ok' | 'warning' | 'error';
136
152
  details?: string;
137
153
  };
138
154
  configPath: string;
139
155
  instructionPath: string;
156
+ skillPath?: string;
140
157
  }
141
158
  interface DoctorReport {
142
159
  core: CoreDoctorReport;
@@ -165,6 +182,18 @@ declare function extractInstructionVersion(content: string): number | null;
165
182
  * Checks whether content contains a managed Bilmem instruction block.
166
183
  */
167
184
  declare function hasBilmemInstruction(content: string): boolean;
185
+ /**
186
+ * Returns the complete, well-formed Antigravity SKILL.md content with YAML frontmatter.
187
+ */
188
+ declare function getBilmemSkillContent(version?: number): string;
189
+ /**
190
+ * Checks whether content contains a valid Bilmem skill definition.
191
+ */
192
+ declare function hasBilmemSkill(content: string): boolean;
193
+ /**
194
+ * Extracts the installed skill version from markdown content, or null if none.
195
+ */
196
+ declare function extractSkillVersion(content: string): number | null;
168
197
 
169
198
  interface JsonReadResult {
170
199
  exists: boolean;
@@ -220,6 +249,22 @@ declare function removeMarkdownInstructionFile(filePath: string, dryRun?: boolea
220
249
  * Checks if a file or directory exists.
221
250
  */
222
251
  declare function pathExists(p: string): Promise<boolean>;
252
+ /**
253
+ * Safely writes or updates an Antigravity SKILL.md file.
254
+ * Preserves the file if content has not changed.
255
+ */
256
+ declare function updateSkillFile(filePath: string, content: string, dryRun?: boolean): Promise<{
257
+ changed: boolean;
258
+ created: boolean;
259
+ originalExisted: boolean;
260
+ }>;
261
+ /**
262
+ * Safely removes a skill file and cleans up parent directory if empty.
263
+ */
264
+ declare function removeSkillFile(filePath: string, dryRun?: boolean): Promise<{
265
+ removed: boolean;
266
+ fileDeleted: boolean;
267
+ }>;
223
268
  /**
224
269
  * Fast cross-platform check whether a command executable is available in PATH.
225
270
  */
@@ -250,9 +295,11 @@ declare function getIntegrationRecord(rootDir: string, agentId: string): Promise
250
295
  declare abstract class BaseAgentAdapter implements AgentInstaller {
251
296
  abstract readonly id: string;
252
297
  abstract readonly name: string;
298
+ readonly aliases?: string[];
253
299
  readonly supportedScopes: InstallScope[];
254
300
  abstract resolveConfigPath(context: InstallContext): string;
255
301
  abstract resolveInstructionPath(context: InstallContext): string;
302
+ resolveSkillPath?(context: InstallContext): string | undefined;
256
303
  abstract detect(context: InstallContext): Promise<DetectionResult>;
257
304
  inspect(context: InstallContext): Promise<InstallState>;
258
305
  install(context: InstallContext, options: InstallOptions): Promise<InstallResult>;
@@ -292,6 +339,15 @@ declare class GeminiAdapter extends BaseAgentAdapter {
292
339
  detect(context: InstallContext): Promise<DetectionResult>;
293
340
  }
294
341
 
342
+ declare class AntigravityAdapter extends BaseAgentAdapter {
343
+ readonly id = "antigravity";
344
+ readonly name = "Antigravity";
345
+ resolveConfigPath(context: InstallContext): string;
346
+ resolveSkillPath(context: InstallContext): string;
347
+ resolveInstructionPath(context: InstallContext): string;
348
+ detect(context: InstallContext): Promise<DetectionResult>;
349
+ }
350
+
295
351
  declare function getAllAdapters(): AgentInstaller[];
296
352
  declare function getAdapter(id: string): AgentInstaller | undefined;
297
353
  interface DetectedAgent {
@@ -370,4 +426,4 @@ declare function handleDoctorCommand(options?: CliDoctorOptions): Promise<{
370
426
  fixed?: DoctorFixResult;
371
427
  }>;
372
428
 
373
- export { type AgentDoctorReport, type AgentInstaller, BILMEM_END_MARKER, BILMEM_START_MARKER, BaseAgentAdapter, CURRENT_INTEGRATION_VERSION, ClaudeAdapter, type CliDoctorOptions, type CliInstallOptions, type CliUninstallOptions, CodexAdapter, type CoreDoctorReport, CursorAdapter, type DetectedAgent, type DetectionResult, type DoctorFixResult, type DoctorReport, GeminiAdapter, type InstallContext, type InstallOptions, type InstallResult, type InstallScope, type InstallState, type IntegrationRecord, type IntegrationsMetadata, type JsonReadResult, type UninstallOptions, type UninstallResult, type VerifyResult, createInstallContext, detectAgents, extractInstructionVersion, formatDoctorFixResult, formatDoctorReport, formatInstallResult, formatUninstallResult, getAdapter, getAgentInstructionText, getAllAdapters, getIntegrationRecord, getIntegrationsFilePath, handleDoctorCommand, handleInstallCommand, handleUninstallCommand, hasBilmemInstruction, isExecutableInPath, loadIntegrationsMetadata, pathExists, recordIntegration, removeIntegration, removeMarkdownInstructionFile, removeMcpJsonConfig, runDoctor, runDoctorFix, safeReadJson, saveIntegrationsMetadata, updateMarkdownInstructionFile, updateMcpJsonConfig, writeAtomic };
429
+ export { type AgentDoctorReport, type AgentInstaller, AntigravityAdapter, BILMEM_END_MARKER, BILMEM_START_MARKER, BaseAgentAdapter, CURRENT_INTEGRATION_VERSION, ClaudeAdapter, type CliDoctorOptions, type CliInstallOptions, type CliUninstallOptions, CodexAdapter, type CoreDoctorReport, CursorAdapter, type DetectedAgent, type DetectionResult, type DoctorFixResult, type DoctorReport, GeminiAdapter, type InstallContext, type InstallOptions, type InstallResult, type InstallScope, type InstallState, type IntegrationRecord, type IntegrationsMetadata, type JsonReadResult, type UninstallOptions, type UninstallResult, type VerifyResult, createInstallContext, detectAgents, extractInstructionVersion, extractSkillVersion, formatDoctorFixResult, formatDoctorReport, formatInstallResult, formatUninstallResult, getAdapter, getAgentInstructionText, getAllAdapters, getBilmemSkillContent, getIntegrationRecord, getIntegrationsFilePath, handleDoctorCommand, handleInstallCommand, handleUninstallCommand, hasBilmemInstruction, hasBilmemSkill, isExecutableInPath, loadIntegrationsMetadata, pathExists, recordIntegration, removeIntegration, removeMarkdownInstructionFile, removeMcpJsonConfig, removeSkillFile, runDoctor, runDoctorFix, safeReadJson, saveIntegrationsMetadata, updateMarkdownInstructionFile, updateMcpJsonConfig, updateSkillFile, writeAtomic };