@waron97/prbot 3.0.0 → 3.0.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.
package/README.md CHANGED
@@ -190,3 +190,82 @@ Reinstalls the latest published version from npm.
190
190
  prbot update
191
191
  ```
192
192
 
193
+ ---
194
+
195
+ ## agrippa
196
+
197
+ Syncs Odoo workflow phase Python code and MFA records between the local filesystem and the RIP API. Tracks changes via checksums and detects conflicts before overwriting.
198
+
199
+ Credentials are inherited from the global prbot config (`~/.config/prbot/config`). Override per-workspace in `agrippa.yaml`.
200
+
201
+ ### `agrippa init`
202
+
203
+ Creates `agrippa.yaml` in the current directory. Always writes `pyproject.toml` with the standard ruff builtins. Optionally writes `pyrightconfig.json` and copies type stubs into `typings/`.
204
+
205
+ ```bash
206
+ agrippa init
207
+ ```
208
+
209
+ ### `agrippa clone`
210
+
211
+ Clones all `from_code` phases for a selected workflow, or a single MFA, into the workspace. Writes files to disk and registers them in `agrippa.yaml`.
212
+
213
+ ```bash
214
+ agrippa clone
215
+ agrippa clone --phase
216
+ agrippa clone --mfa
217
+ agrippa clone --phase --id 123 --path my-workflow/
218
+ ```
219
+
220
+ Options:
221
+
222
+ | Flag | Description |
223
+ | --------------- | -------------------------------------------------------- |
224
+ | `--phase` | Clone a phase (select a workflow) |
225
+ | `--mfa` | Clone an MFA record |
226
+ | `--id <id>` | Skip selection, clone by ID |
227
+ | `--path <path>` | Destination path (base dir for phases, file path for MFA)|
228
+
229
+ ### `agrippa pull`
230
+
231
+ Fetches remote code for all tracked entries and shows what changed. Classifies each as `fast-forward` (safe overwrite) or `conflict` (local edits would be lost). Lets you select which to pull.
232
+
233
+ After pulling, also checks tracked workflows for newly added `from_code` phases and auto-clones any not yet present locally.
234
+
235
+ ```bash
236
+ agrippa pull
237
+ ```
238
+
239
+ ### `agrippa push`
240
+
241
+ Pushes local file changes back to RIP. Backs up current remote code to `.backup/<timestamp>/` before overwriting. Same conflict detection as pull, with the concern inverted.
242
+
243
+ ```bash
244
+ agrippa push
245
+ ```
246
+
247
+ ### `agrippa diff [path]`
248
+
249
+ Shows a diff between local files and remote code. Optionally filter to a specific file path.
250
+
251
+ ```bash
252
+ agrippa diff
253
+ agrippa diff my-workflow/some-phase.py
254
+ ```
255
+
256
+ ### `agrippa init-phase`
257
+
258
+ Selects a workflow and any phase, then pushes a default code scaffold to that phase on RIP. Sets `set_result_automatically` to `from_code`, generates result variable constants from the phase's allowed results, and creates the corresponding `result.code.configurator` records.
259
+
260
+ ```bash
261
+ agrippa init-phase
262
+ ```
263
+
264
+ ### `agrippa repair`
265
+
266
+ Removes entries from `agrippa.yaml` whose local files no longer exist on disk.
267
+
268
+ ```bash
269
+ agrippa repair
270
+ ```
271
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waron97/prbot",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -125,7 +125,7 @@ async function exportEmailTemplates(opts) {
125
125
  const dataDir = path.join(ADDONS_PATH, 'config', module, 'data');
126
126
  await fs.mkdir(dataDir, { recursive: true });
127
127
 
128
- const outPath = path.join(dataDir, 'mail_templates.xml');
128
+ const outPath = path.join(dataDir, 'mail_template.xml');
129
129
  await fs.writeFile(outPath, generateXml(templates), 'utf-8');
130
130
  console.log(`Written: ${outPath}`);
131
131