agentic-api 1.0.6 → 2.0.31
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 +336 -76
- package/dist/src/agents/agents.example.d.ts +3 -0
- package/dist/src/agents/agents.example.js +38 -0
- package/dist/src/agents/authentication.js +2 -0
- package/dist/src/agents/prompts.d.ts +2 -2
- package/dist/src/agents/prompts.js +112 -49
- package/dist/src/agents/reducer.core.d.ts +12 -0
- package/dist/src/agents/reducer.core.js +207 -0
- package/dist/src/agents/reducer.d.ts +3 -0
- package/dist/src/agents/reducer.example.d.ts +28 -0
- package/dist/src/agents/reducer.example.js +118 -0
- package/dist/src/agents/reducer.js +19 -0
- package/dist/src/agents/reducer.loaders.d.ts +34 -0
- package/dist/src/agents/reducer.loaders.js +122 -0
- package/dist/src/agents/reducer.process.d.ts +16 -0
- package/dist/src/agents/reducer.process.js +143 -0
- package/dist/src/agents/reducer.tools.d.ts +29 -0
- package/dist/src/agents/reducer.tools.js +157 -0
- package/dist/src/agents/reducer.types.d.ts +50 -0
- package/dist/src/agents/reducer.types.js +5 -0
- package/dist/src/agents/simulator.d.ts +47 -0
- package/dist/src/agents/simulator.executor.d.ts +26 -0
- package/dist/src/agents/simulator.executor.js +132 -0
- package/dist/src/agents/simulator.js +205 -0
- package/dist/src/agents/simulator.prompts.d.ts +16 -0
- package/dist/src/agents/simulator.prompts.js +108 -0
- package/dist/src/agents/simulator.types.d.ts +42 -0
- package/dist/src/agents/simulator.types.js +2 -0
- package/dist/src/agents/simulator.utils.d.ts +20 -0
- package/dist/src/agents/simulator.utils.js +87 -0
- package/dist/src/execute.d.ts +13 -6
- package/dist/src/execute.js +351 -85
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.js +14 -0
- package/dist/src/princing.openai.d.ts +9 -2
- package/dist/src/princing.openai.js +15 -11
- package/dist/src/prompts.d.ts +3 -2
- package/dist/src/prompts.js +159 -19
- package/dist/src/rag/embeddings.d.ts +103 -0
- package/dist/src/rag/embeddings.js +466 -0
- package/dist/src/rag/index.d.ts +12 -0
- package/dist/src/rag/index.js +40 -0
- package/dist/src/rag/lucene.d.ts +45 -0
- package/dist/src/rag/lucene.js +227 -0
- package/dist/src/rag/parser.d.ts +68 -0
- package/dist/src/rag/parser.js +192 -0
- package/dist/src/rag/tools.d.ts +76 -0
- package/dist/src/rag/tools.js +196 -0
- package/dist/src/rag/types.d.ts +178 -0
- package/dist/src/rag/types.js +21 -0
- package/dist/src/rag/usecase.d.ts +16 -0
- package/dist/src/rag/usecase.js +79 -0
- package/dist/src/rules/errors.d.ts +60 -0
- package/dist/src/rules/errors.js +97 -0
- package/dist/src/rules/git/git.e2e.helper.d.ts +104 -0
- package/dist/src/rules/git/git.e2e.helper.js +488 -0
- package/dist/src/rules/git/git.health.d.ts +66 -0
- package/dist/src/rules/git/git.health.js +354 -0
- package/dist/src/rules/git/git.helper.d.ts +129 -0
- package/dist/src/rules/git/git.helper.js +53 -0
- package/dist/src/rules/git/index.d.ts +6 -0
- package/dist/src/rules/git/index.js +76 -0
- package/dist/src/rules/git/repo.d.ts +128 -0
- package/dist/src/rules/git/repo.js +900 -0
- package/dist/src/rules/git/repo.pr.d.ts +137 -0
- package/dist/src/rules/git/repo.pr.js +589 -0
- package/dist/src/rules/git/repo.tools.d.ts +134 -0
- package/dist/src/rules/git/repo.tools.js +730 -0
- package/dist/src/rules/index.d.ts +8 -0
- package/dist/src/rules/index.js +25 -0
- package/dist/src/rules/messages.d.ts +17 -0
- package/dist/src/rules/messages.js +21 -0
- package/dist/src/rules/types.ctrl.d.ts +28 -0
- package/dist/src/rules/types.ctrl.js +2 -0
- package/dist/src/rules/types.d.ts +510 -0
- package/dist/src/rules/types.helpers.d.ts +132 -0
- package/dist/src/rules/types.helpers.js +2 -0
- package/dist/src/rules/types.js +33 -0
- package/dist/src/rules/user.mapper.d.ts +61 -0
- package/dist/src/rules/user.mapper.js +160 -0
- package/dist/src/rules/utils/slug.d.ts +22 -0
- package/dist/src/rules/utils/slug.js +35 -0
- package/dist/src/rules/utils.matter.d.ts +66 -0
- package/dist/src/rules/utils.matter.js +208 -0
- package/dist/src/rules/utils.slug.d.ts +22 -0
- package/dist/src/rules/utils.slug.js +35 -0
- package/dist/src/scrapper.d.ts +3 -2
- package/dist/src/scrapper.js +33 -37
- package/dist/src/stategraph/index.d.ts +8 -0
- package/dist/src/stategraph/index.js +21 -0
- package/dist/src/stategraph/stategraph.d.ts +91 -0
- package/dist/src/stategraph/stategraph.js +241 -0
- package/dist/src/stategraph/stategraph.storage.d.ts +41 -0
- package/dist/src/stategraph/stategraph.storage.js +166 -0
- package/dist/src/stategraph/types.d.ts +139 -0
- package/dist/src/stategraph/types.js +19 -0
- package/dist/src/types.d.ts +62 -39
- package/dist/src/types.js +53 -89
- package/dist/src/usecase.d.ts +4 -0
- package/dist/src/usecase.js +44 -0
- package/dist/src/utils.d.ts +12 -5
- package/dist/src/utils.js +30 -13
- package/package.json +9 -3
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { SimpleGit } from 'simple-git';
|
|
2
|
+
import { RulesGitConfig, GitCommitHistory, RuleUser, GitHealthStatus } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* Vérifie et configure un repository Git existant pour s'assurer qu'il a la configuration requise
|
|
5
|
+
* @param git Instance SimpleGit
|
|
6
|
+
* @param options Options de configuration
|
|
7
|
+
*/
|
|
8
|
+
export declare function gitEnsureRepositoryConfiguration(git: SimpleGit, options?: {
|
|
9
|
+
remoteUrl?: string;
|
|
10
|
+
remoteName?: string;
|
|
11
|
+
forceUpdate?: boolean;
|
|
12
|
+
}): Promise<{
|
|
13
|
+
configured: boolean;
|
|
14
|
+
changes: string[];
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Configure le remote origin et les paramètres Git Notes
|
|
18
|
+
* @param git Instance SimpleGit
|
|
19
|
+
* @param config Configuration du remote
|
|
20
|
+
*/
|
|
21
|
+
export declare function gitEnsureRemoteConfiguration(git: SimpleGit, config: {
|
|
22
|
+
remoteUrl?: string;
|
|
23
|
+
remoteName?: string;
|
|
24
|
+
quiet?: boolean;
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
export declare function gitInit(git: SimpleGit, options?: {
|
|
27
|
+
excludePatterns?: string[];
|
|
28
|
+
remoteUrl?: string;
|
|
29
|
+
remoteName?: string;
|
|
30
|
+
enableGitNotes?: boolean;
|
|
31
|
+
}): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* Fonction helper pour initialiser ou configurer un repository avec la configuration Git standard
|
|
34
|
+
* Cette fonction combine gitInit et gitEnsureRepositoryConfiguration pour une utilisation simple
|
|
35
|
+
* @param git Instance SimpleGit
|
|
36
|
+
* @param options Options de configuration
|
|
37
|
+
*/
|
|
38
|
+
export declare function gitSetupRepository(git: SimpleGit, options?: {
|
|
39
|
+
remoteUrl?: string;
|
|
40
|
+
remoteName?: string;
|
|
41
|
+
enableGitNotes?: boolean;
|
|
42
|
+
excludePatterns?: string[];
|
|
43
|
+
forceReconfig?: boolean;
|
|
44
|
+
}): Promise<{
|
|
45
|
+
initialized: boolean;
|
|
46
|
+
configured: boolean;
|
|
47
|
+
changes: string[];
|
|
48
|
+
}>;
|
|
49
|
+
/**
|
|
50
|
+
* Fonction helper pour vérifier et afficher la configuration Git d'un repository
|
|
51
|
+
* @param git Instance SimpleGit
|
|
52
|
+
* @returns Configuration détaillée
|
|
53
|
+
*/
|
|
54
|
+
export declare function gitShowConfiguration(git: SimpleGit): Promise<any>;
|
|
55
|
+
/**
|
|
56
|
+
* Vérifie la validité de la configuration Git (utilitaire)
|
|
57
|
+
* @param git Instance Git
|
|
58
|
+
* @returns Promise<boolean> True si la configuration est valide
|
|
59
|
+
*/
|
|
60
|
+
export declare function gitCheckConfiguration(git?: SimpleGit): Promise<any>;
|
|
61
|
+
/**
|
|
62
|
+
* Crée un fichier dans la branche draft (opération bas niveau)
|
|
63
|
+
* @param git Instance Git
|
|
64
|
+
* @param filePath Chemin du fichier
|
|
65
|
+
* @param PR Nom de la branche de Pull Request
|
|
66
|
+
* @param content Contenu du fichier
|
|
67
|
+
* @param user Utilisateur qui effectue l'opération
|
|
68
|
+
* @param config Configuration Git (optionnel, utilise la config globale)
|
|
69
|
+
* @throws GitOperationError si la création échoue
|
|
70
|
+
*/
|
|
71
|
+
export declare function gitCreateOrEditFile(git: SimpleGit, filePath: string, PR: string, content: string, user: RuleUser, config?: RulesGitConfig): Promise<GitCommitHistory>;
|
|
72
|
+
/**
|
|
73
|
+
* Modifie un fichier dans la branche draft (opération bas niveau)
|
|
74
|
+
* @param git Instance Git
|
|
75
|
+
* @param filePath Chemin du fichier
|
|
76
|
+
* @param PR Nom de la branche de Pull Request
|
|
77
|
+
* @param content Contenu du fichier
|
|
78
|
+
* @param user Utilisateur qui effectue l'opération
|
|
79
|
+
* @param config Configuration Git (optionnel, utilise la config globale)
|
|
80
|
+
* @throws GitOperationError si la modification échoue
|
|
81
|
+
*/
|
|
82
|
+
export declare function gitEditFile(git: SimpleGit, filePath: string, PR: string, content: string, user: RuleUser, config?: RulesGitConfig): Promise<GitCommitHistory>;
|
|
83
|
+
export declare function gitRenameFile_git(git: SimpleGit, oldFileName: string, newFileName: string, branch: string, user: RuleUser, config?: RulesGitConfig): Promise<GitCommitHistory>;
|
|
84
|
+
export declare function gitRenameFile_fs(git: SimpleGit, oldFileName: string, newFileName: string, branch: string, user: RuleUser, config?: RulesGitConfig): Promise<GitCommitHistory>;
|
|
85
|
+
/**
|
|
86
|
+
* Renomme un fichier de manière atomique (Git ou filesystem selon le contexte)
|
|
87
|
+
* @param git Instance SimpleGit
|
|
88
|
+
* @param oldFileName Ancien nom du fichier
|
|
89
|
+
* @param newFileName Nouveau nom du fichier
|
|
90
|
+
* @param branch Branche où effectuer le renommage
|
|
91
|
+
* @param user Utilisateur effectuant l'opération
|
|
92
|
+
* @param config Configuration Git optionnelle
|
|
93
|
+
* @returns Historique du commit de renommage
|
|
94
|
+
*/
|
|
95
|
+
export declare function gitRenameFile(git: SimpleGit, oldFileName: string, newFileName: string, branch: string, user: RuleUser, config?: RulesGitConfig): Promise<GitCommitHistory>;
|
|
96
|
+
/**
|
|
97
|
+
* Supprime un fichier d'une branche Git (opération bas niveau)
|
|
98
|
+
* @param git Instance Git
|
|
99
|
+
* @param filePath Chemin du fichier à supprimer
|
|
100
|
+
* @param branch Nom de la branche où supprimer le fichier
|
|
101
|
+
* @param user Utilisateur qui effectue l'opération
|
|
102
|
+
* @param config Configuration Git (optionnel, utilise la config globale)
|
|
103
|
+
* @throws GitOperationError si la suppression échoue
|
|
104
|
+
*/
|
|
105
|
+
export declare function gitDeleteFile(git: SimpleGit, filePath: string, branch: string, user: RuleUser, config?: RulesGitConfig): Promise<GitCommitHistory>;
|
|
106
|
+
/**
|
|
107
|
+
* Diagnostique l'état de santé d'une branche Git et détecte les problèmes bloquants.
|
|
108
|
+
*
|
|
109
|
+
* **Problèmes bloquants détectés :**
|
|
110
|
+
* - ❌ **Branche inexistante** : La branche spécifiée n'existe pas dans le dépôt
|
|
111
|
+
* - ❌ **Branche inaccessible** : Impossible de faire un checkout vers la branche
|
|
112
|
+
* - ❌ **Merge en cours** : Opération de merge interrompue (fichiers .git/MERGE_HEAD présents)
|
|
113
|
+
* - ❌ **Fichiers en conflit** : Conflits de merge non résolus (status.conflicted)
|
|
114
|
+
* - ❌ **Index Git corrompu** : Index illisible ou corrompu (git status échoue)
|
|
115
|
+
* - ⚠️ **Fichiers modifiés** : Changements non commités dans le working directory
|
|
116
|
+
* - ⚠️ **Fichiers stagés** : Changements en attente de commit dans l'index
|
|
117
|
+
*
|
|
118
|
+
* **Méthode de diagnostic :**
|
|
119
|
+
* 1. Vérification de l'existence de la branche (git branch --list)
|
|
120
|
+
* 2. Test d'accessibilité (git checkout)
|
|
121
|
+
* 3. Analyse de l'état (git status)
|
|
122
|
+
* 4. Détection des merges en cours (fichiers .git/MERGE_*)
|
|
123
|
+
*
|
|
124
|
+
* @param git Instance SimpleGit configurée
|
|
125
|
+
* @param branch Nom de la branche à diagnostiquer (optionnel, utilise la branche courante si non spécifié)
|
|
126
|
+
* @returns Promise<GitHealthStatus> Diagnostic complet avec liste des problèmes et recommandations de réparation
|
|
127
|
+
*/
|
|
128
|
+
export declare function gitGetBranchHealth(git: SimpleGit, branch?: string): Promise<GitHealthStatus>;
|