glooit 0.4.0 → 0.5.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.
@@ -0,0 +1,14 @@
1
+ import type { Config } from '../types';
2
+ export declare class BackupManager {
3
+ private config;
4
+ private backupDir;
5
+ constructor(config: Config);
6
+ createBackup(filePaths: string[]): Promise<string>;
7
+ restoreBackup(timestamp: string): Promise<boolean>;
8
+ listBackups(): {
9
+ timestamp: string;
10
+ fileCount: number;
11
+ }[];
12
+ private ensureBackupDir;
13
+ private cleanupOldBackups;
14
+ }
@@ -0,0 +1,12 @@
1
+ import type { Config } from '../types';
2
+ export declare class ConfigLoader {
3
+ private static readonly DEFAULT_CONFIG_PATHS;
4
+ static load(customPath?: string): Promise<Config>;
5
+ private static findConfigFile;
6
+ static validate(customPath?: string): Promise<boolean>;
7
+ private static validateAndApplyDefaults;
8
+ private static validateRule;
9
+ static createInitialConfig(): string;
10
+ static createTypedConfig(): string;
11
+ static createPlainConfig(): string;
12
+ }
@@ -0,0 +1,13 @@
1
+ import type { Config } from '../types';
2
+ export declare class GitIgnoreManager {
3
+ private config;
4
+ private gitignorePath;
5
+ private marker;
6
+ constructor(config: Config);
7
+ updateGitIgnore(): Promise<void>;
8
+ cleanupGitIgnore(): Promise<void>;
9
+ private collectGeneratedPaths;
10
+ private extractRuleName;
11
+ private createIgnoreSection;
12
+ private removeExistingSection;
13
+ }
@@ -0,0 +1,20 @@
1
+ import type { Config } from '../types';
2
+ export declare class AIRulesCore {
3
+ private config;
4
+ private distributor;
5
+ private backupManager;
6
+ private gitIgnoreManager;
7
+ constructor(config: Config);
8
+ sync(): Promise<void>;
9
+ createBackup(): Promise<string>;
10
+ restoreBackup(timestamp: string): Promise<void>;
11
+ listBackups(): {
12
+ timestamp: string;
13
+ fileCount: number;
14
+ }[];
15
+ clean(): Promise<void>;
16
+ validate(): Promise<boolean>;
17
+ private distributeMcps;
18
+ private validateMcpNames;
19
+ collectAllGeneratedPaths(): string[];
20
+ }
@@ -0,0 +1,4 @@
1
+ export { replaceStructure } from './project-structure';
2
+ export { replaceEnv } from './env-variables';
3
+ export { addTimestamp } from './timestamp';
4
+ export { compact } from './compact';
@@ -0,0 +1,9 @@
1
+ import type { SyncContext } from '../types';
2
+ export interface CompactOptions {
3
+ preserveFrontmatter?: boolean;
4
+ maxConsecutiveNewlines?: number;
5
+ removeFillerWords?: boolean;
6
+ trimTrailingSpaces?: boolean;
7
+ compactLists?: boolean;
8
+ }
9
+ export declare const compact: (options?: CompactOptions) => (context: SyncContext) => string;
@@ -0,0 +1,2 @@
1
+ import type { SyncContext } from '../types';
2
+ export declare const replaceEnv: (context: SyncContext) => string;
@@ -0,0 +1,8 @@
1
+ export type HookFunction = (context: unknown) => void | Promise<void> | string | Promise<string>;
2
+ export type HookRegistry = Record<string, HookFunction>;
3
+ export declare class HookManager {
4
+ private hooks;
5
+ register(name: string, hook: HookFunction): void;
6
+ execute(name: string, context: unknown): Promise<string | void>;
7
+ list(): string[];
8
+ }
@@ -0,0 +1,2 @@
1
+ import type { SyncContext } from '../types';
2
+ export declare const replaceStructure: (context: SyncContext) => Promise<string>;
@@ -0,0 +1,2 @@
1
+ import type { SyncContext } from '../types';
2
+ export declare const addTimestamp: (context: SyncContext) => string;
@@ -0,0 +1,9 @@
1
+ export { defineRules } from './types';
2
+ export type { Config, Rule, Command, Mcp, Agent, SyncContext } from './types';
3
+ export { AIRulesCore } from './core';
4
+ export { ConfigLoader } from './core/config-loader';
5
+ export { AgentDistributor } from './agents/distributor';
6
+ export { BackupManager } from './core/backup';
7
+ export { GitIgnoreManager } from './core/gitignore';
8
+ export { HookManager } from './hooks';
9
+ export * as hooks from './hooks/builtin';