@bli-cockpit/telemetry-core 0.1.56 → 0.1.58
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/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/sync-revive-contract.d.ts +24 -0
- package/dist/sync-revive-contract.js +24 -0
- package/package.json +6 -1
package/dist/index.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from "./ingest-dto.js";
|
|
|
13
13
|
export * from "./local-config.js";
|
|
14
14
|
export * from "./memory-daemon-endpoint.js";
|
|
15
15
|
export * from "./memory-hook-stats.js";
|
|
16
|
+
export * from "./sync-revive-contract.js";
|
|
16
17
|
export * from "./memory-extract-context.js";
|
|
17
18
|
export * from "./memory-hook-performance.js";
|
|
18
19
|
export * from "./memory-install-receipt.js";
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,7 @@ export * from "./ingest-dto.js";
|
|
|
13
13
|
export * from "./local-config.js";
|
|
14
14
|
export * from "./memory-daemon-endpoint.js";
|
|
15
15
|
export * from "./memory-hook-stats.js";
|
|
16
|
+
export * from "./sync-revive-contract.js";
|
|
16
17
|
export * from "./memory-extract-context.js";
|
|
17
18
|
export * from "./memory-hook-performance.js";
|
|
18
19
|
export * from "./memory-install-receipt.js";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE PROMPT HOOK'S SECOND CHANCE AT A DEAD SCHEDULER (ticket 12831).
|
|
3
|
+
*
|
|
4
|
+
* The 15-minute tick heals what it can reach, but a Mac whose launchd job is
|
|
5
|
+
* unloaded, or a Windows box whose Scheduled Task is disabled, never ticks, so
|
|
6
|
+
* the tick cannot heal it. `@bli-cockpit/memory-mcp`'s prompt hook runs on every
|
|
7
|
+
* prompt of every person still using Claude Code or Codex there, so it asks one
|
|
8
|
+
* cheap question (when did a tick last run?) and, if the answer is "long ago",
|
|
9
|
+
* starts one detached `cockpit sync`, which carries the existing autostart heal.
|
|
10
|
+
*
|
|
11
|
+
* The collector WRITES the tick stamp and the opt-out marker; the hook READS
|
|
12
|
+
* them. The two packages never import each other, so the file names and the
|
|
13
|
+
* three numbers live here, the same rule `memory-daemon-endpoint.ts` follows.
|
|
14
|
+
*/
|
|
15
|
+
/** Touched at the start of every `cockpit sync`, scheduled or by hand. */
|
|
16
|
+
export declare const SYNC_TICK_STAMP_FILE_NAME = ".last-sync-tick";
|
|
17
|
+
/** Written by `cockpit autostart uninstall`: the operator wants no background job. */
|
|
18
|
+
export declare const AUTOSTART_OPT_OUT_MARKER_FILE_NAME = "autostart-uninstalled";
|
|
19
|
+
/** Written by the hook per attempt; at most one revive an hour. */
|
|
20
|
+
export declare const SYNC_REVIVE_THROTTLE_FILE_NAME = ".last-prompt-revive";
|
|
21
|
+
/** A healthy tick is 15 minutes; three missed ticks is the line. */
|
|
22
|
+
export declare const SYNC_REVIVE_STALE_AFTER_MS: number;
|
|
23
|
+
/** At most one attempt an hour per machine. */
|
|
24
|
+
export declare const SYNC_REVIVE_MIN_INTERVAL_MS: number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE PROMPT HOOK'S SECOND CHANCE AT A DEAD SCHEDULER (ticket 12831).
|
|
3
|
+
*
|
|
4
|
+
* The 15-minute tick heals what it can reach, but a Mac whose launchd job is
|
|
5
|
+
* unloaded, or a Windows box whose Scheduled Task is disabled, never ticks, so
|
|
6
|
+
* the tick cannot heal it. `@bli-cockpit/memory-mcp`'s prompt hook runs on every
|
|
7
|
+
* prompt of every person still using Claude Code or Codex there, so it asks one
|
|
8
|
+
* cheap question (when did a tick last run?) and, if the answer is "long ago",
|
|
9
|
+
* starts one detached `cockpit sync`, which carries the existing autostart heal.
|
|
10
|
+
*
|
|
11
|
+
* The collector WRITES the tick stamp and the opt-out marker; the hook READS
|
|
12
|
+
* them. The two packages never import each other, so the file names and the
|
|
13
|
+
* three numbers live here, the same rule `memory-daemon-endpoint.ts` follows.
|
|
14
|
+
*/
|
|
15
|
+
/** Touched at the start of every `cockpit sync`, scheduled or by hand. */
|
|
16
|
+
export const SYNC_TICK_STAMP_FILE_NAME = ".last-sync-tick";
|
|
17
|
+
/** Written by `cockpit autostart uninstall`: the operator wants no background job. */
|
|
18
|
+
export const AUTOSTART_OPT_OUT_MARKER_FILE_NAME = "autostart-uninstalled";
|
|
19
|
+
/** Written by the hook per attempt; at most one revive an hour. */
|
|
20
|
+
export const SYNC_REVIVE_THROTTLE_FILE_NAME = ".last-prompt-revive";
|
|
21
|
+
/** A healthy tick is 15 minutes; three missed ticks is the line. */
|
|
22
|
+
export const SYNC_REVIVE_STALE_AFTER_MS = 45 * 60 * 1000;
|
|
23
|
+
/** At most one attempt an hour per machine. */
|
|
24
|
+
export const SYNC_REVIVE_MIN_INTERVAL_MS = 60 * 60 * 1000;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bli-cockpit/telemetry-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.58",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -60,5 +60,10 @@
|
|
|
60
60
|
"@types/node": "20.19.39",
|
|
61
61
|
"typescript": "5.9.3",
|
|
62
62
|
"vitest": "3.2.4"
|
|
63
|
+
},
|
|
64
|
+
"repository": {
|
|
65
|
+
"type": "git",
|
|
66
|
+
"url": "git+https://github.com/BLI-INC/bli-cockpit.git",
|
|
67
|
+
"directory": "packages/cockpit-telemetry-core"
|
|
63
68
|
}
|
|
64
69
|
}
|