@bli-cockpit/cli 0.2.168 → 0.2.173
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/adapters/raw-evidence-collection-state.js +52 -6
- package/dist/adapters/raw-evidence-completeness.js +6 -0
- package/dist/adapters/raw-evidence-git-diff-reader.js +2 -2
- package/dist/adapters/raw-evidence-image-reader.js +5 -2
- package/dist/adapters/raw-evidence-transcript-file.js +2 -2
- package/dist/autostart-opt-out.js +43 -0
- package/dist/autostart-self-heal.js +23 -10
- package/dist/commands/autostart-command.js +10 -0
- package/dist/commands/autostart-heal.js +6 -4
- package/dist/commands/backfill-upload.js +12 -0
- package/dist/commands/doctor-access.js +17 -21
- package/dist/commands/doctor-disk-words.js +20 -0
- package/dist/commands/doctor-mcp.js +27 -0
- package/dist/commands/doctor-pipeline.js +34 -7
- package/dist/commands/doctor-registration.js +9 -3
- package/dist/commands/doctor-report.js +28 -0
- package/dist/commands/doctor.js +20 -5
- package/dist/commands/heartbeat-token.js +14 -0
- package/dist/commands/heartbeat.js +2 -1
- package/dist/commands/local-args-tower-logs.js +53 -0
- package/dist/commands/local-args-tower.js +1 -0
- package/dist/commands/local-args.js +3 -1
- package/dist/commands/local-command-shapes-logs.js +6 -0
- package/dist/commands/local-help-commands-tower-ops.js +26 -0
- package/dist/commands/local-help.js +2 -0
- package/dist/commands/local.js +3 -0
- package/dist/commands/logs.js +68 -0
- package/dist/commands/public-root.js +1 -1
- package/dist/commands/sync-followups-staging.js +8 -1
- package/dist/commands/sync-heal.js +144 -0
- package/dist/commands/sync.js +9 -1
- package/dist/disk-prune.js +35 -3
- package/dist/disk-retention.js +31 -1
- package/dist/sign-in-action.js +7 -0
- package/dist/staging-gate-receipt.js +131 -0
- package/dist/staging-gate.js +214 -0
- package/dist/state-dir-audit.js +5 -4
- package/dist/state-dir-prune.js +84 -0
- package/dist/sync-tick-stamp.js +22 -0
- package/package.json +4 -4
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import fs from "node:fs/promises";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { SYNC_TICK_STAMP_FILE_NAME } from "@bli-cockpit/telemetry-core";
|
|
4
|
+
/**
|
|
5
|
+
* Ticket 12831. Touched first thing in every `cockpit sync`, so "when did this
|
|
6
|
+
* machine last tick" is one file stat. The memory prompt hook reads it
|
|
7
|
+
* (`@bli-cockpit/memory-mcp` `hooks/sync-revive.ts`) and revives a scheduler
|
|
8
|
+
* that stopped firing. Best-effort: a stamp that cannot be written says so and
|
|
9
|
+
* never fails the tick (the worst case is one extra hourly revive attempt).
|
|
10
|
+
*/
|
|
11
|
+
export async function stampSyncTick(paths, now = new Date()) {
|
|
12
|
+
try {
|
|
13
|
+
await fs.mkdir(paths.state_dir, { recursive: true, mode: 0o700 });
|
|
14
|
+
await fs.writeFile(path.join(paths.state_dir, SYNC_TICK_STAMP_FILE_NAME), now.toISOString());
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
console.error("[sync-tick-stamp] tick stamp not written; the prompt hook may attempt a revive", JSON.stringify({
|
|
18
|
+
reason: "tick_stamp_write_failed",
|
|
19
|
+
error_name: error instanceof Error ? error.name : typeof error,
|
|
20
|
+
}));
|
|
21
|
+
}
|
|
22
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bli-cockpit/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.173",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"test": "node dist/cli.js --help && node ../../scripts/assert-public-cli-routing.mjs && node ../../scripts/assert-public-cli-verb-help.mjs && node ../../scripts/assert-public-cli-surface-doors.mjs && node ../../scripts/assert-public-cli-runtime-files.mjs && node ../../scripts/assert-public-cli-exit-contract.mjs && node ../../scripts/assert-public-cli-no-fleet-posts.mjs && node ../../scripts/assert-public-cli-doctor-json.mjs && node ../../scripts/assert-public-package-pack.mjs --workspace=@bli-cockpit/cli"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@bli-cockpit/memory-mcp": "0.1.
|
|
31
|
-
"@bli-cockpit/mcp": "0.1.
|
|
32
|
-
"@bli-cockpit/telemetry-core": "0.1.
|
|
30
|
+
"@bli-cockpit/memory-mcp": "0.1.47",
|
|
31
|
+
"@bli-cockpit/mcp": "0.1.89",
|
|
32
|
+
"@bli-cockpit/telemetry-core": "0.1.59"
|
|
33
33
|
},
|
|
34
34
|
"repository": {
|
|
35
35
|
"type": "git",
|