agentic-api 2.0.684 → 2.0.885
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/dist/src/agents/prompts.d.ts +2 -3
- package/dist/src/agents/prompts.js +13 -109
- package/dist/src/agents/reducer.loaders.d.ts +46 -15
- package/dist/src/agents/reducer.loaders.js +76 -21
- package/dist/src/agents/reducer.types.d.ts +30 -3
- package/dist/src/agents/simulator.d.ts +3 -2
- package/dist/src/agents/simulator.executor.d.ts +8 -2
- package/dist/src/agents/simulator.executor.js +62 -26
- package/dist/src/agents/simulator.js +100 -11
- package/dist/src/agents/simulator.prompts.d.ts +48 -21
- package/dist/src/agents/simulator.prompts.js +289 -122
- package/dist/src/agents/simulator.types.d.ts +33 -1
- package/dist/src/agents/subagent.d.ts +128 -0
- package/dist/src/agents/subagent.js +231 -0
- package/dist/src/agents/worker.executor.d.ts +48 -0
- package/dist/src/agents/worker.executor.js +152 -0
- package/dist/src/execute/helpers.d.ts +3 -0
- package/dist/src/execute/helpers.js +221 -15
- package/dist/src/execute/responses.js +78 -51
- package/dist/src/execute/shared.d.ts +5 -0
- package/dist/src/execute/shared.js +27 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +3 -1
- package/dist/src/llm/openai.js +8 -1
- package/dist/src/llm/pricing.js +2 -0
- package/dist/src/llm/xai.js +11 -6
- package/dist/src/prompts.d.ts +14 -0
- package/dist/src/prompts.js +41 -1
- package/dist/src/rag/rag.manager.d.ts +18 -3
- package/dist/src/rag/rag.manager.js +91 -5
- package/dist/src/rules/git/git.e2e.helper.js +3 -0
- package/dist/src/rules/git/git.health.js +88 -57
- package/dist/src/rules/git/index.d.ts +1 -1
- package/dist/src/rules/git/index.js +13 -5
- package/dist/src/rules/git/repo.d.ts +25 -6
- package/dist/src/rules/git/repo.js +430 -146
- package/dist/src/rules/git/repo.pr.js +45 -13
- package/dist/src/rules/git/repo.tools.d.ts +5 -0
- package/dist/src/rules/git/repo.tools.js +6 -1
- package/dist/src/rules/types.d.ts +0 -2
- package/dist/src/rules/utils.matter.js +1 -5
- package/dist/src/scrapper.d.ts +138 -25
- package/dist/src/scrapper.js +538 -160
- package/dist/src/stategraph/stategraph.d.ts +4 -0
- package/dist/src/stategraph/stategraph.js +16 -0
- package/dist/src/stategraph/types.d.ts +13 -1
- package/dist/src/types.d.ts +21 -0
- package/dist/src/utils.d.ts +24 -0
- package/dist/src/utils.js +84 -86
- package/package.json +3 -2
- package/dist/src/agents/semantic.d.ts +0 -4
- package/dist/src/agents/semantic.js +0 -19
- package/dist/src/execute/legacy.d.ts +0 -46
- package/dist/src/execute/legacy.js +0 -460
- package/dist/src/pricing.llm.d.ts +0 -5
- package/dist/src/pricing.llm.js +0 -14
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.gitNewPR = exports.gitNewValidationRequest = void 0;
|
|
17
|
+
exports.gitLoadPR = exports.gitGetClosedPRs = exports.gitGetAllPR = exports.gitGetPRMetadata = exports.gitIsPRClosedRobust = exports.gitIsPRClosed = exports.gitSyncPR = exports.gitIDRegistryRename = exports.gitIDRegistryExists = exports.gitEnsureMatterID = exports.gitRegisterExistingID = exports.gitReloadIDRegistry = exports.gitSetMatterCache = exports.gitGetMatterCache = exports.gitFileStrictMatter = exports.gitAllocateNextPRNumber = exports.gitGenerateNextID = exports.gitEditFile = exports.gitDeleteFile = exports.gitRenameFile = exports.gitUpdateMatter = exports.gitCreateOrEditFile = exports.gitGetValidationBranchHealth = exports.gitGetBranchHealth = exports.gitCheckConfiguration = exports.gitShowConfiguration = exports.gitSetupRepository = exports.gitEnsureRemoteConfiguration = exports.gitEnsureRepositoryConfiguration = exports.gitInit = exports.gitDeleteNote = exports.gitWriteNote = exports.gitReadNote = exports.gitGetDiffFiles = exports.gitGetAllBranches = exports.gitGetUnmergedBranchesForFile = exports.gitReadFileOutsideRepo = exports.gitGetFileHistory = exports.gitGetFilePreview = exports.gitGetFileContent = exports.gitGetFilesSummary = exports.gitFileExistsInBranch = exports.gitListFilesOutsideRepo = exports.gitListFilesInBranch = exports.gitLastCommit = exports.gitIsFileMerged = exports.isValidInt = exports.gitLoad = exports.unlock = exports.lock = void 0;
|
|
18
|
+
exports.gitNewPR = exports.gitNewValidationRequest = exports.gitClosePRRobust = exports.gitClosePR = exports.gitPRUpdateComments = void 0;
|
|
19
19
|
// === OPÉRATIONS GIT BAS NIVEAU ===
|
|
20
20
|
// Fonctions atomiques pour manipuler Git directement
|
|
21
21
|
var repo_tools_1 = require("./repo.tools");
|
|
@@ -54,21 +54,29 @@ Object.defineProperty(exports, "gitShowConfiguration", { enumerable: true, get:
|
|
|
54
54
|
Object.defineProperty(exports, "gitCheckConfiguration", { enumerable: true, get: function () { return repo_1.gitCheckConfiguration; } });
|
|
55
55
|
Object.defineProperty(exports, "gitGetBranchHealth", { enumerable: true, get: function () { return repo_1.gitGetBranchHealth; } });
|
|
56
56
|
Object.defineProperty(exports, "gitGetValidationBranchHealth", { enumerable: true, get: function () { return repo_1.gitGetValidationBranchHealth; } });
|
|
57
|
+
// Document mutations
|
|
57
58
|
Object.defineProperty(exports, "gitCreateOrEditFile", { enumerable: true, get: function () { return repo_1.gitCreateOrEditFile; } });
|
|
58
|
-
|
|
59
|
-
Object.defineProperty(exports, "gitEditFile", { enumerable: true, get: function () { return repo_1.gitEditFile; } });
|
|
59
|
+
Object.defineProperty(exports, "gitUpdateMatter", { enumerable: true, get: function () { return repo_1.gitUpdateMatter; } });
|
|
60
60
|
Object.defineProperty(exports, "gitRenameFile", { enumerable: true, get: function () { return repo_1.gitRenameFile; } });
|
|
61
61
|
Object.defineProperty(exports, "gitDeleteFile", { enumerable: true, get: function () { return repo_1.gitDeleteFile; } });
|
|
62
|
+
// deprecated: use gitCreateOrEditFile
|
|
63
|
+
Object.defineProperty(exports, "gitEditFile", { enumerable: true, get: function () { return repo_1.gitEditFile; } });
|
|
62
64
|
// ID Management & Matter Cache
|
|
63
65
|
Object.defineProperty(exports, "gitGenerateNextID", { enumerable: true, get: function () { return repo_1.gitGenerateNextID; } });
|
|
64
66
|
Object.defineProperty(exports, "gitAllocateNextPRNumber", { enumerable: true, get: function () { return repo_1.gitAllocateNextPRNumber; } });
|
|
67
|
+
Object.defineProperty(exports, "gitFileStrictMatter", { enumerable: true, get: function () { return repo_1.gitFileStrictMatter; } });
|
|
68
|
+
Object.defineProperty(exports, "gitGetMatterCache", { enumerable: true, get: function () { return repo_1.gitGetMatterCache; } });
|
|
69
|
+
Object.defineProperty(exports, "gitSetMatterCache", { enumerable: true, get: function () { return repo_1.gitSetMatterCache; } });
|
|
70
|
+
// deprecated / legacy registry helpers
|
|
65
71
|
// deprecated: low-level test helper only
|
|
66
72
|
Object.defineProperty(exports, "gitReloadIDRegistry", { enumerable: true, get: function () { return repo_1.gitReloadIDRegistry; } });
|
|
73
|
+
// deprecated: prefer gitCreateOrEditFile / gitUpdateMatter / gitRenameFile
|
|
67
74
|
Object.defineProperty(exports, "gitRegisterExistingID", { enumerable: true, get: function () { return repo_1.gitRegisterExistingID; } });
|
|
75
|
+
// deprecated: prefer document mutation APIs instead of pre-mutating matter
|
|
68
76
|
Object.defineProperty(exports, "gitEnsureMatterID", { enumerable: true, get: function () { return repo_1.gitEnsureMatterID; } });
|
|
69
|
-
Object.defineProperty(exports, "gitFileStrictMatter", { enumerable: true, get: function () { return repo_1.gitFileStrictMatter; } });
|
|
70
77
|
// deprecated: avoid pre-checks, rely on gitEnsureMatterID / gitFileStrictMatter
|
|
71
78
|
Object.defineProperty(exports, "gitIDRegistryExists", { enumerable: true, get: function () { return repo_1.gitIDRegistryExists; } });
|
|
79
|
+
// deprecated: cache rename is handled by gitRenameFile
|
|
72
80
|
Object.defineProperty(exports, "gitIDRegistryRename", { enumerable: true, get: function () { return repo_1.gitIDRegistryRename; } });
|
|
73
81
|
// === GESTION DES PULL REQUESTS (repo.pr.ts) ===
|
|
74
82
|
var repo_pr_1 = require("./repo.pr");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SimpleGit } from 'simple-git';
|
|
2
|
-
import { RulesGitConfig, GitCommitHistory, RuleUser, GitHealthStatus } from '../types';
|
|
2
|
+
import { FrontMatter, RulesGitConfig, GitCommitHistory, RuleUser, GitHealthStatus } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* Structure du cache matter pour un fichier
|
|
5
5
|
*/
|
|
@@ -7,7 +7,10 @@ interface MatterStrict {
|
|
|
7
7
|
id?: number;
|
|
8
8
|
title?: string;
|
|
9
9
|
service?: string;
|
|
10
|
-
|
|
10
|
+
}
|
|
11
|
+
export interface GitDocumentMutationOptions {
|
|
12
|
+
config?: RulesGitConfig;
|
|
13
|
+
matter?: Partial<FrontMatter>;
|
|
11
14
|
}
|
|
12
15
|
/**
|
|
13
16
|
* Vérifie si le fichier de registre d'IDs existe dans le repository Git
|
|
@@ -93,6 +96,9 @@ export declare function gitReloadIDRegistry(config?: RulesGitConfig): void;
|
|
|
93
96
|
/**
|
|
94
97
|
* Enregistre un ID existant dans le registre
|
|
95
98
|
*
|
|
99
|
+
* @deprecated Préférer `gitCreateOrEditFile(...)`, `gitUpdateMatter(...)` ou
|
|
100
|
+
* `gitRenameFile(...)` qui synchronisent le registre dans le même flux documentaire.
|
|
101
|
+
*
|
|
96
102
|
* @param matter Le matter contenant l'ID à enregistrer
|
|
97
103
|
* @param branch Branche du fichier (optionnel, pour vérification de propriété)
|
|
98
104
|
* @param file Nom du fichier (optionnel, pour vérification de propriété)
|
|
@@ -109,6 +115,8 @@ export declare function gitRegisterExistingID(matter: MatterStrict, branch?: str
|
|
|
109
115
|
/**
|
|
110
116
|
* Renomme un fichier dans le cache du registre d'IDs
|
|
111
117
|
*
|
|
118
|
+
* @deprecated Le cache de matter/ID est maintenant mis à jour par `gitRenameFile(...)`.
|
|
119
|
+
*
|
|
112
120
|
* Cette fonction met à jour le cache lorsqu'un fichier est renommé:
|
|
113
121
|
* - Supprime l'entrée avec l'ancien nom
|
|
114
122
|
* - Crée une nouvelle entrée avec le nouveau nom
|
|
@@ -126,6 +134,13 @@ export declare function gitRegisterExistingID(matter: MatterStrict, branch?: str
|
|
|
126
134
|
* ```
|
|
127
135
|
*/
|
|
128
136
|
export declare function gitIDRegistryRename(oldFile: string, newFile: string, branch: string, config?: RulesGitConfig): void;
|
|
137
|
+
export declare function gitGetMatterCache(branch: string, id: number, config?: RulesGitConfig): {
|
|
138
|
+
id?: number;
|
|
139
|
+
file?: string;
|
|
140
|
+
title?: string;
|
|
141
|
+
service?: string;
|
|
142
|
+
} | undefined;
|
|
143
|
+
export declare function gitSetMatterCache(branch: string, file: string, matter: MatterStrict, config?: RulesGitConfig): void;
|
|
129
144
|
/**
|
|
130
145
|
* Valide et assure qu'un matter a un ID valide
|
|
131
146
|
*
|
|
@@ -166,7 +181,6 @@ export declare function gitEnsureMatterID(matter: MatterStrict, config?: RulesGi
|
|
|
166
181
|
export declare function gitFileStrictMatter(git: SimpleGit, filePath: string, branch: string, config?: RulesGitConfig): Promise<{
|
|
167
182
|
id?: number;
|
|
168
183
|
title?: string;
|
|
169
|
-
oldfile?: string;
|
|
170
184
|
}>;
|
|
171
185
|
/**
|
|
172
186
|
* Vérifie et configure un repository Git existant pour s'assurer qu'il a la configuration requise
|
|
@@ -258,8 +272,13 @@ export declare function gitCreateOrEditFile(git: SimpleGit, filePath: string, PR
|
|
|
258
272
|
* @throws GitOperationError si la modification échoue
|
|
259
273
|
*/
|
|
260
274
|
export declare function gitEditFile(git: SimpleGit, filePath: string, PR: string, content: string, user: RuleUser, config?: RulesGitConfig): Promise<GitCommitHistory>;
|
|
261
|
-
|
|
262
|
-
|
|
275
|
+
/**
|
|
276
|
+
* Met à jour le front-matter d'un document sans changer son nom de fichier.
|
|
277
|
+
*
|
|
278
|
+
* Cette API refuse explicitement toute mutation du `title` qui nécessiterait
|
|
279
|
+
* un changement de slug / filename. Dans ce cas, utiliser `gitRenameFile(...)`.
|
|
280
|
+
*/
|
|
281
|
+
export declare function gitUpdateMatter(git: SimpleGit, filePath: string, branch: string, user: RuleUser, options?: GitDocumentMutationOptions | RulesGitConfig): Promise<GitCommitHistory>;
|
|
263
282
|
/**
|
|
264
283
|
* Renomme un fichier de manière atomique (Git ou filesystem selon le contexte)
|
|
265
284
|
* @param git Instance SimpleGit
|
|
@@ -270,7 +289,7 @@ export declare function gitRenameFile_fs(git: SimpleGit, oldFileName: string, ne
|
|
|
270
289
|
* @param config Configuration Git optionnelle
|
|
271
290
|
* @returns Historique du commit de renommage
|
|
272
291
|
*/
|
|
273
|
-
export declare function gitRenameFile(git: SimpleGit, oldFileName: string, newFileName: string, branch: string, user: RuleUser,
|
|
292
|
+
export declare function gitRenameFile(git: SimpleGit, oldFileName: string, newFileName: string, branch: string, user: RuleUser, options?: GitDocumentMutationOptions | RulesGitConfig, nextContent?: string): Promise<GitCommitHistory>;
|
|
274
293
|
/**
|
|
275
294
|
* Supprime un fichier d'une branche Git (opération bas niveau)
|
|
276
295
|
* @param git Instance Git
|