@aiaiai-pt/martha-cli 0.7.0 → 0.8.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.
- package/CHANGELOG.md +5 -0
- package/dist/index.js +26 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,11 @@ All notable changes to `@aiaiai-pt/martha-cli`. Format: [Keep a Changelog](https
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.8.0] — 2026-06-09
|
|
8
|
+
|
|
9
|
+
### Added — #522 source-scoped retry (CLI parity)
|
|
10
|
+
- `document-sync sources retry <id> [--status error] [--yes]` — re-drive a sync source's failed documents directly, mirroring the source-scoped retry already in the API and admin UI (the collection path is `documents retry --collection`). Same herd-free semantics: flips matching docs back to `pending` for the reconciler to re-drive at its capped rate. Non-TTY requires `--yes`; JSON mode emits the result; `--status pending` re-drives stuck-pending docs.
|
|
11
|
+
|
|
7
12
|
## [0.7.0] — 2026-06-09
|
|
8
13
|
|
|
9
14
|
### Added — #522 bulk-ingest observability + management
|
package/dist/index.js
CHANGED
|
@@ -14350,6 +14350,32 @@ No google_drive sources found.`));
|
|
|
14350
14350
|
}
|
|
14351
14351
|
printIngestionStatus(sourceId, summary);
|
|
14352
14352
|
});
|
|
14353
|
+
sources.command("retry <source_id>").description("Re-drive a source's failed documents. Bounded + idempotent — flips " + "them back to pending; the ingestion reconciler re-drives them at " + "its capped rate (no herd).").option("--status <status>", "Which docs to retry: error | pending", "error").option("--yes", "Skip confirmation (required in non-interactive mode)").action(async (sourceId, opts) => {
|
|
14354
|
+
if (!["error", "pending"].includes(opts.status)) {
|
|
14355
|
+
throw new CLIError("--status must be one of: error, pending", 4 /* Validation */);
|
|
14356
|
+
}
|
|
14357
|
+
if (!opts.yes) {
|
|
14358
|
+
if (!process.stdin.isTTY) {
|
|
14359
|
+
throw new CLIError("Cannot confirm in non-interactive mode. Use --yes to retry.", 1 /* Error */);
|
|
14360
|
+
}
|
|
14361
|
+
const ok = await confirm(`Retry ${opts.status} documents for source ${sourceId}?`);
|
|
14362
|
+
if (!ok) {
|
|
14363
|
+
if (isJson()) {
|
|
14364
|
+
console.log(JSON.stringify({ reset_count: 0, cancelled: true }));
|
|
14365
|
+
} else {
|
|
14366
|
+
console.log("Cancelled.");
|
|
14367
|
+
}
|
|
14368
|
+
return;
|
|
14369
|
+
}
|
|
14370
|
+
}
|
|
14371
|
+
const ctx = getCtx();
|
|
14372
|
+
const result = await ctx.api.post(`/api/admin/document-sync/sources/${encodeURIComponent(sourceId)}/retry-ingestion`, undefined, { params: { status: opts.status } });
|
|
14373
|
+
if (isJson()) {
|
|
14374
|
+
console.log(JSON.stringify(result, null, 2));
|
|
14375
|
+
return;
|
|
14376
|
+
}
|
|
14377
|
+
console.log(source_default.green(`Re-drove ${result.reset_count} ${opts.status} document(s) for ` + `source ${sourceId}. The ingestion reconciler will pick them up ` + `within ~1 min (rate-limited by the per-tenant quota).`));
|
|
14378
|
+
});
|
|
14353
14379
|
}
|
|
14354
14380
|
|
|
14355
14381
|
// src/commands/approvals.ts
|