podwatch 1.1.1 → 1.1.3
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/hooks/budget.d.ts.map +1 -1
- package/dist/hooks/budget.js +20 -12
- package/dist/hooks/budget.js.map +1 -1
- package/dist/hooks/cost.d.ts.map +1 -1
- package/dist/hooks/cost.js +83 -61
- package/dist/hooks/cost.js.map +1 -1
- package/dist/hooks/lifecycle.d.ts.map +1 -1
- package/dist/hooks/lifecycle.js +72 -45
- package/dist/hooks/lifecycle.js.map +1 -1
- package/dist/hooks/security.d.ts.map +1 -1
- package/dist/hooks/security.js +159 -124
- package/dist/hooks/security.js.map +1 -1
- package/dist/hooks/sessions.d.ts.map +1 -1
- package/dist/hooks/sessions.js +46 -23
- package/dist/hooks/sessions.js.map +1 -1
- package/dist/redact.d.ts +20 -1
- package/dist/redact.d.ts.map +1 -1
- package/dist/redact.js +119 -4
- package/dist/redact.js.map +1 -1
- package/dist/transmitter.js +1 -1
- package/dist/transmitter.js.map +1 -1
- package/dist/types.d.ts +4 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"budget.d.ts","sourceRoot":"","sources":["../../src/hooks/budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAO7C,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"budget.d.ts","sourceRoot":"","sources":["../../src/hooks/budget.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAO7C,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CA0BhF"}
|
package/dist/hooks/budget.js
CHANGED
|
@@ -20,18 +20,26 @@ function registerBudgetHooks(api, config) {
|
|
|
20
20
|
// -----------------------------------------------------------------------
|
|
21
21
|
// before_prompt_build — inject budget warning into prompt
|
|
22
22
|
// -----------------------------------------------------------------------
|
|
23
|
-
api.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
23
|
+
api.on("before_prompt_build", async () => {
|
|
24
|
+
try {
|
|
25
|
+
if (!config.enableBudgetEnforcement)
|
|
26
|
+
return;
|
|
27
|
+
const budget = transmitter_js_1.transmitter.getCachedBudget();
|
|
28
|
+
if (!budget?.hardStopActive)
|
|
29
|
+
return;
|
|
30
|
+
return {
|
|
31
|
+
prependContext: "BUDGET HARD STOP ACTIVE. Your spending limit has been reached. " +
|
|
32
|
+
"Reply ONLY with a brief message telling the user their budget is exceeded " +
|
|
33
|
+
"and to visit podwatch.app/costs to resume. Do not use any tools. Do not perform any analysis.",
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
try {
|
|
38
|
+
console.error("[podwatch/budget] before_prompt_build handler error:", err);
|
|
39
|
+
}
|
|
40
|
+
catch { }
|
|
41
|
+
}
|
|
42
|
+
});
|
|
35
43
|
api.logger.info("[podwatch/budget] Hard stop hooks registered");
|
|
36
44
|
}
|
|
37
45
|
//# sourceMappingURL=budget.js.map
|
package/dist/hooks/budget.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"budget.js","sourceRoot":"","sources":["../../src/hooks/budget.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAUH,
|
|
1
|
+
{"version":3,"file":"budget.js","sourceRoot":"","sources":["../../src/hooks/budget.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;AAUH,kDA0BC;AAhCD,sDAAgD;AAEhD,8EAA8E;AAC9E,oBAAoB;AACpB,8EAA8E;AAE9E,SAAgB,mBAAmB,CAAC,GAAc,EAAE,MAAsB;IACxE,0EAA0E;IAC1E,0DAA0D;IAC1D,0EAA0E;IAC1E,GAAG,CAAC,EAAE,CACJ,qBAAqB,EACrB,KAAK,IAAiD,EAAE;QACtD,IAAI,CAAC;YACH,IAAI,CAAC,MAAM,CAAC,uBAAuB;gBAAE,OAAO;YAE5C,MAAM,MAAM,GAAG,4BAAW,CAAC,eAAe,EAAE,CAAC;YAC7C,IAAI,CAAC,MAAM,EAAE,cAAc;gBAAE,OAAO;YAEpC,OAAO;gBACL,cAAc,EACZ,iEAAiE;oBACjE,4EAA4E;oBAC5E,+FAA+F;aAClG,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,CAAC;gBAAC,OAAO,CAAC,KAAK,CAAC,sDAAsD,EAAE,GAAG,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;QAC9F,CAAC;IACH,CAAC,CACF,CAAC;IAEF,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,8CAA8C,CAAC,CAAC;AAClE,CAAC"}
|
package/dist/hooks/cost.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/hooks/cost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAclD;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAE3D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,cAAc,EACtB,kBAAkB,EAAE,OAAO,GAC1B,IAAI,
|
|
1
|
+
{"version":3,"file":"cost.d.ts","sourceRoot":"","sources":["../../src/hooks/cost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAclD;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAEtC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAE3D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,cAAc,EACtB,kBAAkB,EAAE,OAAO,GAC1B,IAAI,CA6FN"}
|
package/dist/hooks/cost.js
CHANGED
|
@@ -45,74 +45,96 @@ function _clearSessionIndex(sessionKey) {
|
|
|
45
45
|
function registerCostHandler(api, config, diagnosticsEnabled) {
|
|
46
46
|
// before_agent_start carries the full message history with usage on each assistant turn
|
|
47
47
|
api.on("before_agent_start", async (event, ctx) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
48
|
+
try {
|
|
49
|
+
if (!event || typeof event !== "object")
|
|
50
|
+
return;
|
|
51
|
+
if (!event.messages || !Array.isArray(event.messages))
|
|
52
|
+
return;
|
|
53
|
+
const safeCtx = (ctx && typeof ctx === "object") ? ctx : {};
|
|
54
|
+
const sessionKey = safeCtx?.sessionKey ?? "__default__";
|
|
55
|
+
// Get per-session index (defaults to 0 for new sessions)
|
|
56
|
+
let lastSeenIndex = lastSeenIndexMap.get(sessionKey) ?? 0;
|
|
57
|
+
// Bounds check: if messages were compacted, reset to 0
|
|
58
|
+
if (lastSeenIndex > event.messages.length) {
|
|
59
|
+
lastSeenIndex = 0;
|
|
60
|
+
}
|
|
61
|
+
// Only process new messages since last invocation
|
|
62
|
+
const newMessages = event.messages.slice(lastSeenIndex);
|
|
63
|
+
lastSeenIndexMap.set(sessionKey, event.messages.length);
|
|
64
|
+
if (newMessages.length === 0)
|
|
65
|
+
return;
|
|
66
|
+
// Detect heartbeat-triggered turns by scanning the last user message
|
|
67
|
+
// OpenClaw heartbeat prompts always contain "HEARTBEAT" (e.g. "Read HEARTBEAT.md")
|
|
68
|
+
let isHeartbeat = false;
|
|
69
|
+
for (let i = event.messages.length - 1; i >= 0; i--) {
|
|
70
|
+
const m = event.messages[i];
|
|
71
|
+
if (m?.role === "user") {
|
|
72
|
+
const text = typeof m.content === "string" ? m.content : JSON.stringify(m.content ?? "");
|
|
73
|
+
if (/HEARTBEAT/i.test(text)) {
|
|
74
|
+
isHeartbeat = true;
|
|
75
|
+
}
|
|
76
|
+
break; // only check the last user message
|
|
71
77
|
}
|
|
72
|
-
|
|
78
|
+
}
|
|
79
|
+
// Generate a turn_id for this batch of cost events (per before_agent_start invocation)
|
|
80
|
+
// This links all cost events from the same LLM turn together
|
|
81
|
+
const turnId = generateTurnId();
|
|
82
|
+
for (const msg of newMessages) {
|
|
83
|
+
if (!msg || typeof msg !== "object")
|
|
84
|
+
continue;
|
|
85
|
+
// Only assistant messages have usage data
|
|
86
|
+
if (msg.role !== "assistant")
|
|
87
|
+
continue;
|
|
88
|
+
if (!msg.usage)
|
|
89
|
+
continue;
|
|
90
|
+
// Skip zero-cost internal messages (delivery-mirror, etc.)
|
|
91
|
+
if (msg.provider === "openclaw" || msg.model === "delivery-mirror")
|
|
92
|
+
continue;
|
|
93
|
+
if (msg.usage.totalTokens === 0 && !msg.usage.input && !msg.usage.output)
|
|
94
|
+
continue;
|
|
95
|
+
const costTotal = msg.usage.cost?.total ?? undefined;
|
|
96
|
+
transmitter_js_1.transmitter.enqueue({
|
|
97
|
+
type: "cost",
|
|
98
|
+
ts: msg.timestamp ?? Date.now(),
|
|
99
|
+
sessionKey: safeCtx?.sessionKey,
|
|
100
|
+
agentId: safeCtx?.agentId,
|
|
101
|
+
provider: msg.provider,
|
|
102
|
+
model: msg.model,
|
|
103
|
+
inputTokens: msg.usage.input ?? 0,
|
|
104
|
+
outputTokens: msg.usage.output ?? 0,
|
|
105
|
+
cacheReadTokens: msg.usage.cacheRead ?? 0,
|
|
106
|
+
cacheWriteTokens: msg.usage.cacheWrite ?? 0,
|
|
107
|
+
totalTokens: msg.usage.totalTokens ?? ((msg.usage.input ?? 0) + (msg.usage.output ?? 0)),
|
|
108
|
+
costUsd: costTotal,
|
|
109
|
+
costBreakdown: msg.usage.cost, // full {input, output, cacheRead, cacheWrite, total} object
|
|
110
|
+
durationMs: undefined,
|
|
111
|
+
correlationId: turnId, // Link cost events per turn
|
|
112
|
+
// Tag heartbeat-triggered cost events so the dashboard can distinguish them
|
|
113
|
+
...(isHeartbeat ? { sessionType: "heartbeat" } : {}),
|
|
114
|
+
});
|
|
73
115
|
}
|
|
74
116
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (msg.role !== "assistant")
|
|
81
|
-
continue;
|
|
82
|
-
if (!msg.usage)
|
|
83
|
-
continue;
|
|
84
|
-
// Skip zero-cost internal messages (delivery-mirror, etc.)
|
|
85
|
-
if (msg.provider === "openclaw" || msg.model === "delivery-mirror")
|
|
86
|
-
continue;
|
|
87
|
-
if (msg.usage.totalTokens === 0 && !msg.usage.input && !msg.usage.output)
|
|
88
|
-
continue;
|
|
89
|
-
const costTotal = msg.usage.cost?.total ?? undefined;
|
|
90
|
-
transmitter_js_1.transmitter.enqueue({
|
|
91
|
-
type: "cost",
|
|
92
|
-
ts: msg.timestamp ?? Date.now(),
|
|
93
|
-
sessionKey: ctx?.sessionKey,
|
|
94
|
-
agentId: ctx?.agentId,
|
|
95
|
-
provider: msg.provider,
|
|
96
|
-
model: msg.model,
|
|
97
|
-
inputTokens: msg.usage.input ?? 0,
|
|
98
|
-
outputTokens: msg.usage.output ?? 0,
|
|
99
|
-
cacheReadTokens: msg.usage.cacheRead ?? 0,
|
|
100
|
-
cacheWriteTokens: msg.usage.cacheWrite ?? 0,
|
|
101
|
-
totalTokens: msg.usage.totalTokens ?? ((msg.usage.input ?? 0) + (msg.usage.output ?? 0)),
|
|
102
|
-
costUsd: costTotal,
|
|
103
|
-
costBreakdown: msg.usage.cost, // full {input, output, cacheRead, cacheWrite, total} object
|
|
104
|
-
durationMs: undefined,
|
|
105
|
-
correlationId: turnId, // Link cost events per turn
|
|
106
|
-
// Tag heartbeat-triggered cost events so the dashboard can distinguish them
|
|
107
|
-
...(isHeartbeat ? { sessionType: "heartbeat" } : {}),
|
|
108
|
-
});
|
|
117
|
+
catch (err) {
|
|
118
|
+
try {
|
|
119
|
+
console.error("[podwatch/cost] before_agent_start handler error:", err);
|
|
120
|
+
}
|
|
121
|
+
catch { }
|
|
109
122
|
}
|
|
110
123
|
}, { name: "podwatch-cost" });
|
|
111
124
|
// Clean up session index on session end to prevent memory leaks
|
|
112
125
|
api.on("session_end", async (_event, ctx) => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
126
|
+
try {
|
|
127
|
+
const safeCtx = (ctx && typeof ctx === "object") ? ctx : {};
|
|
128
|
+
const sessionKey = safeCtx?.sessionKey;
|
|
129
|
+
if (sessionKey) {
|
|
130
|
+
lastSeenIndexMap.delete(sessionKey);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
catch (err) {
|
|
134
|
+
try {
|
|
135
|
+
console.error("[podwatch/cost] session_end handler error:", err);
|
|
136
|
+
}
|
|
137
|
+
catch { }
|
|
116
138
|
}
|
|
117
139
|
}, { name: "podwatch-cost-cleanup" });
|
|
118
140
|
api.logger.info("[podwatch/cost] Cost tracking via before_agent_start message history");
|
package/dist/hooks/cost.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cost.js","sourceRoot":"","sources":["../../src/hooks/cost.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAmBH,0CAEC;AAKD,gDAEC;AAKD,
|
|
1
|
+
{"version":3,"file":"cost.js","sourceRoot":"","sources":["../../src/hooks/cost.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;AAmBH,0CAEC;AAKD,gDAEC;AAKD,kDAiGC;AA/HD,sDAAgD;AAEhD,0EAA0E;AAC1E,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEnD;;;GAGG;AACH,SAAS,cAAc;IACrB,OAAO,QAAQ,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;AACzE,CAAC;AAED;;GAEG;AACH,SAAgB,eAAe;IAC7B,gBAAgB,CAAC,KAAK,EAAE,CAAC;AAC3B,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,UAAkB;IACnD,gBAAgB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,SAAgB,mBAAmB,CACjC,GAAQ,EACR,MAAsB,EACtB,kBAA2B;IAE3B,wFAAwF;IACxF,GAAG,CAAC,EAAE,CAAC,oBAAoB,EAAE,KAAK,EAAE,KAAU,EAAE,GAAQ,EAAE,EAAE;QAC1D,IAAI,CAAC;YACH,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ;gBAAE,OAAO;YAChD,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC;gBAAE,OAAO;YAE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AK,CAAC,4CAA4C,EAAE,GAAG,CAAC,CAAC;YAAC,CAAC;YAAC,MAAM,CAAC,CAAA,CAAC;QACpF,CAAC;IACH,CAAC,EAAE,EAAE,IAAI,EAAE,uBAAuB,EAAE,CAAC,CAAC;IAEtC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,sEAAsE,CAAC,CAAC;AAC1F,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/hooks/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA4BlD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"lifecycle.d.ts","sourceRoot":"","sources":["../../src/hooks/lifecycle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AA4BlD;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CA2IhF"}
|
package/dist/hooks/lifecycle.js
CHANGED
|
@@ -90,65 +90,92 @@ function registerLifecycleHandlers(api, config) {
|
|
|
90
90
|
// gateway_start — best-effort re-scan (in case it ever fires)
|
|
91
91
|
// -----------------------------------------------------------------------
|
|
92
92
|
api.on("gateway_start", async (event) => {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
93
|
+
try {
|
|
94
|
+
// Check config changes on gateway restart (config may have changed)
|
|
95
|
+
if (api.config) {
|
|
96
|
+
(0, config_monitor_js_1.checkConfigChanges)(api.config);
|
|
97
|
+
}
|
|
98
|
+
// Re-run scan as best-effort; pulse is already running
|
|
99
|
+
void runScan(api.config?.agents?.defaults?.workspace);
|
|
100
|
+
}
|
|
101
|
+
catch (err) {
|
|
102
|
+
try {
|
|
103
|
+
console.error("[podwatch/lifecycle] gateway_start handler error:", err);
|
|
104
|
+
}
|
|
105
|
+
catch { }
|
|
96
106
|
}
|
|
97
|
-
// Re-run scan as best-effort; pulse is already running
|
|
98
|
-
void runScan(api.config?.agents?.defaults?.workspace);
|
|
99
107
|
}, { name: "podwatch-gateway-start" });
|
|
100
108
|
// -----------------------------------------------------------------------
|
|
101
109
|
// gateway_stop — graceful shutdown
|
|
102
110
|
// -----------------------------------------------------------------------
|
|
103
111
|
api.on("gateway_stop", async () => {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
try {
|
|
113
|
+
// Stop intervals
|
|
114
|
+
if (pulseTimer) {
|
|
115
|
+
clearTimeout(pulseTimer);
|
|
116
|
+
pulseTimer = null;
|
|
117
|
+
}
|
|
118
|
+
if (scanTimer) {
|
|
119
|
+
clearInterval(scanTimer);
|
|
120
|
+
scanTimer = null;
|
|
121
|
+
}
|
|
122
|
+
// Unsubscribe from diagnostic events
|
|
123
|
+
const unsubscribe = api.__podwatch_unsubscribeDiagnostics;
|
|
124
|
+
if (typeof unsubscribe === "function") {
|
|
125
|
+
unsubscribe();
|
|
126
|
+
}
|
|
127
|
+
// Flush remaining events
|
|
128
|
+
await transmitter_js_1.transmitter.shutdown();
|
|
129
|
+
api.logger.info("[podwatch/lifecycle] Graceful shutdown complete");
|
|
112
130
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
131
|
+
catch (err) {
|
|
132
|
+
try {
|
|
133
|
+
console.error("[podwatch/lifecycle] gateway_stop handler error:", err);
|
|
134
|
+
}
|
|
135
|
+
catch { }
|
|
117
136
|
}
|
|
118
|
-
// Flush remaining events
|
|
119
|
-
await transmitter_js_1.transmitter.shutdown();
|
|
120
|
-
api.logger.info("[podwatch/lifecycle] Graceful shutdown complete");
|
|
121
137
|
}, { name: "podwatch-gateway-stop" });
|
|
122
138
|
// -----------------------------------------------------------------------
|
|
123
139
|
// before_compaction — context window pressure
|
|
124
140
|
// -----------------------------------------------------------------------
|
|
125
141
|
api.on("before_compaction", async (event, ctx) => {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
142
|
+
try {
|
|
143
|
+
if (!event || typeof event !== "object")
|
|
144
|
+
return;
|
|
145
|
+
const safeCtx = (ctx && typeof ctx === "object") ? ctx : {};
|
|
146
|
+
transmitter_js_1.transmitter.enqueue({
|
|
147
|
+
type: "compaction",
|
|
148
|
+
ts: Date.now(),
|
|
149
|
+
messageCount: typeof event.messageCount === "number" ? event.messageCount : 0,
|
|
150
|
+
tokenCount: event.tokenCount,
|
|
151
|
+
sessionKey: safeCtx.sessionKey,
|
|
152
|
+
agentId: safeCtx.agentId,
|
|
153
|
+
});
|
|
154
|
+
// Context pressure alert — only if both fields are available
|
|
155
|
+
if (typeof event.tokenCount === "number" &&
|
|
156
|
+
typeof event.contextLimit === "number") {
|
|
157
|
+
const contextLimit = event.contextLimit;
|
|
158
|
+
const ratio = event.tokenCount / contextLimit;
|
|
159
|
+
if (ratio > 0.8) {
|
|
160
|
+
transmitter_js_1.transmitter.enqueue({
|
|
161
|
+
type: "alert",
|
|
162
|
+
ts: Date.now(),
|
|
163
|
+
severity: "warning",
|
|
164
|
+
pattern: "context_pressure",
|
|
165
|
+
tokenCount: event.tokenCount,
|
|
166
|
+
contextLimit,
|
|
167
|
+
ratio,
|
|
168
|
+
sessionKey: safeCtx.sessionKey,
|
|
169
|
+
agentId: safeCtx.agentId,
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
catch (err) {
|
|
175
|
+
try {
|
|
176
|
+
console.error("[podwatch/lifecycle] before_compaction handler error:", err);
|
|
151
177
|
}
|
|
178
|
+
catch { }
|
|
152
179
|
}
|
|
153
180
|
}, { name: "podwatch-compaction" });
|
|
154
181
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/hooks/lifecycle.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCH,
|
|
1
|
+
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/hooks/lifecycle.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCH,8DA2IC;AApKD,sDAAgD;AAChD,8CAAqD;AACrD,4DAAuF;AACvF,4CAA8B;AAC9B,gDAAkC;AAElC,MAAM,cAAc,GAClB,IAAI,CAAC,KAAK,CACR,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAE7E,CAAC,OAAO,CAAC;AAEV,IAAI,UAAU,GAAyC,IAAI,CAAC;AAC5D,IAAI,SAAS,GAA0C,IAAI,CAAC;AAE5D,sBAAsB;AACtB,IAAI,iBAAiB,GAAG,CAAC,CAAC;AAC1B,MAAM,uBAAuB,GAAG,CAAC,CAAC,CAAC,6CAA6C;AAChF,MAAM,qBAAqB,GAAG,SAAS,CAAC,CAAC,aAAa;AAEtD,8DAA8D;AAE9D;;GAEG;AACH,SAAgB,yBAAyB,CAAC,GAAQ,EAAE,MAAsB;IACxE,MAAM,QAAQ,GAAG,MAAM,CAAC,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;QACzD,4BAAW,CAAC,OAAO,CAAC;YAClB,IAAI,EAAE,MAAM;YACZ,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE;YACd,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,GAAG,CAAC,CAAC;IAC1D,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/hooks/security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAmDlD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"security.d.ts","sourceRoot":"","sources":["../../src/hooks/security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAmDlD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,GAAG,IAAI,CA+L/E"}
|