@tekmidian/pai 0.51.1 → 0.53.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/dist/{aibroker-client-Bu72yPKj.mjs → aibroker-client-CNfIBrl5.mjs} +1 -1
- package/dist/{aibroker-client-CDIXmq-e.mjs → aibroker-client-DzkTpVjx.mjs} +13 -5
- package/dist/{aibroker-client-CDIXmq-e.mjs.map → aibroker-client-DzkTpVjx.mjs.map} +1 -1
- package/dist/{chain-BBbVbWVv.mjs → chain-BcBDJ1Id.mjs} +4 -4
- package/dist/{chain-BBbVbWVv.mjs.map → chain-BcBDJ1Id.mjs.map} +1 -1
- package/dist/cli/index.mjs +10 -10
- package/dist/cli/program.mjs +10 -10
- package/dist/{config-DYXARgk8.mjs → config-B3EPzRjf.mjs} +6 -1
- package/dist/config-B3EPzRjf.mjs.map +1 -0
- package/dist/{context-handover-cache-yOuK9RIk.mjs → context-handover-cache-CXyH6QsC.mjs} +3 -3
- package/dist/{context-handover-cache-yOuK9RIk.mjs.map → context-handover-cache-CXyH6QsC.mjs.map} +1 -1
- package/dist/daemon/index.mjs +8 -8
- package/dist/{daemon-Bhs7kk0a.mjs → daemon-BkJNFWr9.mjs} +10 -10
- package/dist/{daemon-Bhs7kk0a.mjs.map → daemon-BkJNFWr9.mjs.map} +1 -1
- package/dist/{daemon-pX0-MiAH.mjs → daemon-CiythMfR.mjs} +8 -8
- package/dist/daemon-mcp/index.mjs +6 -6
- package/dist/daemon-mcp/index.mjs.map +1 -1
- package/dist/{fallback-CIGspCSi.mjs → fallback-CPfyTSTx.mjs} +4 -4
- package/dist/{fallback-CIGspCSi.mjs.map → fallback-CPfyTSTx.mjs.map} +1 -1
- package/dist/hooks/route-agents-to-worker.mjs +6 -0
- package/dist/hooks/route-agents-to-worker.mjs.map +2 -2
- package/dist/hooks/whisper-rules.mjs +5 -2
- package/dist/hooks/whisper-rules.mjs.map +2 -2
- package/dist/hooks/worker-proxy.mjs +6 -0
- package/dist/hooks/worker-proxy.mjs.map +2 -2
- package/dist/hooks/worker-status-line.mjs +6 -0
- package/dist/hooks/worker-status-line.mjs.map +2 -2
- package/dist/hooks/worker-supervision.mjs +6 -0
- package/dist/hooks/worker-supervision.mjs.map +2 -2
- package/dist/main-resolver-B_auiSAg.mjs +7 -0
- package/dist/{main-resolver-BmZPCmgj.mjs → main-resolver-Dl__GxNI.mjs} +38 -19
- package/dist/{main-resolver-BmZPCmgj.mjs.map → main-resolver-Dl__GxNI.mjs.map} +1 -1
- package/dist/{planner-BiH9msqq.mjs → planner-BLbCtBUa.mjs} +5 -5
- package/dist/{planner-BiH9msqq.mjs.map → planner-BLbCtBUa.mjs.map} +1 -1
- package/dist/{program-BQaDYGNC.mjs → program-DdCumNTx.mjs} +15 -15
- package/dist/{program-BQaDYGNC.mjs.map → program-DdCumNTx.mjs.map} +1 -1
- package/dist/{run-TChOnMO_.mjs → run-C7EDdVAB.mjs} +13 -9
- package/dist/{run-TChOnMO_.mjs.map → run-C7EDdVAB.mjs.map} +1 -1
- package/dist/{server-R9UkCn3v.mjs → server-CGiHdaUp.mjs} +33 -4
- package/dist/server-CGiHdaUp.mjs.map +1 -0
- package/dist/{session-keepalive-BuG3wvik.mjs → session-keepalive-DC2JGggK.mjs} +12 -9
- package/dist/session-keepalive-DC2JGggK.mjs.map +1 -0
- package/dist/{work-queue-worker-D-DnQ7oh.mjs → work-queue-worker-DsdJx-jn.mjs} +4 -4
- package/dist/{work-queue-worker-B9zVWImP.mjs → work-queue-worker-utPp4hUv.mjs} +2 -2
- package/dist/{work-queue-worker-B9zVWImP.mjs.map → work-queue-worker-utPp4hUv.mjs.map} +1 -1
- package/docs/cache-keepalive.md +7 -0
- package/docs/config.md +4 -0
- package/docs/worker.md +10 -0
- package/docs/workers-config.md +1 -1
- package/package.json +1 -1
- package/src/hooks/ts/user-prompt/whisper-rules.test.ts +26 -1
- package/src/hooks/ts/user-prompt/whisper-rules.ts +13 -2
- package/dist/config-DYXARgk8.mjs.map +0 -1
- package/dist/main-resolver-BTastpp4.mjs +0 -7
- package/dist/server-R9UkCn3v.mjs.map +0 -1
- package/dist/session-keepalive-BuG3wvik.mjs.map +0 -1
|
@@ -7764,11 +7764,13 @@ function resetReinjectCounter(sessionId) {
|
|
|
7764
7764
|
function isCacheKeepaliveBeat(prompt) {
|
|
7765
7765
|
try {
|
|
7766
7766
|
const { enabled, prompt: word } = loadConfig().sessions.cacheKeepalive;
|
|
7767
|
-
|
|
7767
|
+
const bare = prompt.replace(/^\s*\[Session:[^\]]+\]\s*/, "").trim();
|
|
7768
|
+
return enabled && bare === word;
|
|
7768
7769
|
} catch {
|
|
7769
7770
|
return false;
|
|
7770
7771
|
}
|
|
7771
7772
|
}
|
|
7773
|
+
var KEEPALIVE_BEAT_INSTRUCTION = "<system-reminder>\nCache keepalive beat, a no-op. Reply with a single period and nothing else. Do not call tools. Do not reply to the sender.\n</system-reminder>";
|
|
7772
7774
|
function isRelayedPrompt(prompt) {
|
|
7773
7775
|
return /^\s*\[Session:[^\]]+\]/.test(prompt) || /^\s*(your|my) controls\b/i.test(prompt) || /^\s*\[SYSTEM NOTIFICATION/.test(prompt) || prompt.includes("<task-notification>");
|
|
7774
7776
|
}
|
|
@@ -7786,7 +7788,7 @@ function main() {
|
|
|
7786
7788
|
}
|
|
7787
7789
|
resetReinjectCounter(sessionId);
|
|
7788
7790
|
if (isCacheKeepaliveBeat(prompt)) {
|
|
7789
|
-
console.log(
|
|
7791
|
+
console.log(KEEPALIVE_BEAT_INSTRUCTION);
|
|
7790
7792
|
return;
|
|
7791
7793
|
}
|
|
7792
7794
|
if (isRelayedPrompt(prompt)) return;
|
|
@@ -7804,6 +7806,7 @@ ${parts.join("\n")}
|
|
|
7804
7806
|
}
|
|
7805
7807
|
main();
|
|
7806
7808
|
export {
|
|
7809
|
+
KEEPALIVE_BEAT_INSTRUCTION,
|
|
7807
7810
|
isCacheKeepaliveBeat,
|
|
7808
7811
|
isRelayedPrompt
|
|
7809
7812
|
};
|