@integrity-labs/agt-cli 0.27.156 → 0.27.158
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/bin/agt.js +4 -4
- package/dist/{chunk-3X6V4SVW.js → chunk-5E5B4T7K.js} +28 -1
- package/dist/chunk-5E5B4T7K.js.map +1 -0
- package/dist/{chunk-25VLOVMK.js → chunk-ELEMDMTQ.js} +48 -11
- package/dist/chunk-ELEMDMTQ.js.map +1 -0
- package/dist/{chunk-FR2MNN2P.js → chunk-GJVY7WKU.js} +25 -5
- package/dist/{chunk-FR2MNN2P.js.map → chunk-GJVY7WKU.js.map} +1 -1
- package/dist/{claude-pair-runtime-UQFPB2BE.js → claude-pair-runtime-FTU6NTBF.js} +2 -2
- package/dist/lib/manager-worker.js +51 -13
- package/dist/lib/manager-worker.js.map +1 -1
- package/dist/{persistent-session-AIM4U3AL.js → persistent-session-EWHFMQRC.js} +3 -3
- package/dist/{responsiveness-probe-6L2XS27G.js → responsiveness-probe-SWHB27QI.js} +48 -10
- package/dist/responsiveness-probe-SWHB27QI.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-25VLOVMK.js.map +0 -1
- package/dist/chunk-3X6V4SVW.js.map +0 -1
- package/dist/responsiveness-probe-6L2XS27G.js.map +0 -1
- /package/dist/{claude-pair-runtime-UQFPB2BE.js.map → claude-pair-runtime-FTU6NTBF.js.map} +0 -0
- /package/dist/{persistent-session-AIM4U3AL.js.map → persistent-session-EWHFMQRC.js.map} +0 -0
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
registerFramework,
|
|
11
11
|
resolveAvatarEnvUrl,
|
|
12
12
|
wrapScheduledTaskPrompt
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-5E5B4T7K.js";
|
|
14
14
|
|
|
15
15
|
// ../../packages/core/dist/integrations/registry.js
|
|
16
16
|
var INTEGRATION_REGISTRY = [
|
|
@@ -4829,21 +4829,45 @@ function provisionOrientHook(codeName) {
|
|
|
4829
4829
|
"echo",
|
|
4830
4830
|
'echo "- Current time: ${NOW_LOCAL} (${NOW_ISO})"',
|
|
4831
4831
|
"",
|
|
4832
|
-
"# --- Pending-inbound counts
|
|
4832
|
+
"# --- Pending-inbound counts + details -----------------------------------",
|
|
4833
4833
|
"# Channel MCPs queue inbound messages here while the claude process is",
|
|
4834
|
-
"# starting / down
|
|
4835
|
-
|
|
4834
|
+
"# starting / down \u2014 and ENG-6289 wedge respawns PARK undrained markers",
|
|
4835
|
+
"# here for exactly this hook to surface. A non-empty queue is real user",
|
|
4836
|
+
"# traffic this fresh session must deal with. Markers already flagged",
|
|
4837
|
+
"# undeliverable were \u23F3-noticed at arrival and are excluded.",
|
|
4838
|
+
"# Per-marker details (sender, age, addressing ids, content snippet) give",
|
|
4839
|
+
"# the agent enough to reply via the channel tools when the channel-side",
|
|
4840
|
+
"# replay (AGT_CHANNEL_REPLAY_ENABLED) is off \u2014 without replay, nothing",
|
|
4841
|
+
"# else ever re-delivers a parked message. msteams is count-only: its",
|
|
4842
|
+
"# queue files are raw activities the channel server re-delivers itself",
|
|
4843
|
+
"# on boot. Detail lines cap at 5 per channel to bound context size.",
|
|
4836
4844
|
"echo",
|
|
4837
4845
|
'echo "## Pending inbound"',
|
|
4838
4846
|
"pending_total=0",
|
|
4847
|
+
"shopt -s nullglob",
|
|
4839
4848
|
"for channel in slack telegram direct-chat msteams; do",
|
|
4840
4849
|
' dir="${AGENT_DIR}/${channel}-pending-inbound"',
|
|
4841
|
-
' if [ -d "$dir" ]; then',
|
|
4842
|
-
|
|
4843
|
-
'
|
|
4844
|
-
'
|
|
4845
|
-
"
|
|
4850
|
+
' if [ ! -d "$dir" ]; then continue; fi',
|
|
4851
|
+
" count=0",
|
|
4852
|
+
' details=""',
|
|
4853
|
+
' for marker in "$dir"/*; do',
|
|
4854
|
+
' if [ ! -f "$marker" ]; then continue; fi',
|
|
4855
|
+
' case "$(basename "$marker")" in .*) continue ;; esac',
|
|
4856
|
+
" # One jq per marker: emits the sentinel for undeliverable markers, the",
|
|
4857
|
+
" # detail line otherwise. jq failure (malformed / drained mid-scan / no",
|
|
4858
|
+
" # jq on host) \u2192 empty line \u2192 counted live with no detail, matching the",
|
|
4859
|
+
" # live-scan philosophy (corrupt must never hide a message).",
|
|
4860
|
+
` line=$(jq -r 'def mins: (((now - ((.received_at // "" | sub("\\\\.[0-9]+Z$"; "Z")) | fromdateiso8601? // now)) / 60) | floor | tostring) + "m ago"; if (.undeliverable // false) == true then "__UNDELIVERABLE__" else (. as $m | ([("chat_id","message_id","channel","thread_ts","session_id") | select($m[.] != null) | "\\(.)=\\($m[.])"] | join(" ")) as $addr | (($m.payload.content // "") | gsub("[\\\\n\\\\r\\\\t]+"; " ") | .[0:140]) as $snippet | "from " + ($m.payload.meta.user_name // $m.meta.user_name // "unknown sender") + ", " + mins + (if ($addr | length) > 0 then " [" + $addr + "]" else "" end) + (if ($snippet | length) > 0 then " \u2014 " + $snippet else "" end)) end' "$marker" 2>/dev/null || true)`,
|
|
4861
|
+
' if [ "$line" = "__UNDELIVERABLE__" ]; then continue; fi',
|
|
4862
|
+
" count=$((count + 1))",
|
|
4863
|
+
' if [ "$channel" != "msteams" ] && [ "$count" -le 5 ] && [ -n "$line" ]; then',
|
|
4864
|
+
" details=\"${details} - ${line}\"$'\\n'",
|
|
4846
4865
|
" fi",
|
|
4866
|
+
" done",
|
|
4867
|
+
' if [ "$count" -gt 0 ]; then',
|
|
4868
|
+
' echo "- ${channel}: ${count} queued message(s)"',
|
|
4869
|
+
' if [ -n "$details" ]; then printf "%s" "$details"; fi',
|
|
4870
|
+
" pending_total=$((pending_total + count))",
|
|
4847
4871
|
" fi",
|
|
4848
4872
|
"done",
|
|
4849
4873
|
'if [ "$pending_total" -eq 0 ]; then',
|
|
@@ -4862,7 +4886,20 @@ function provisionOrientHook(codeName) {
|
|
|
4862
4886
|
"echo",
|
|
4863
4887
|
'echo "## Next step"',
|
|
4864
4888
|
"echo",
|
|
4865
|
-
'
|
|
4889
|
+
'# ENG-6289: with queued messages present the old "do not act until a',
|
|
4890
|
+
'# message arrives" instruction guaranteed a parked message was never',
|
|
4891
|
+
"# answered. Replay-enabled hosts get re-delivery (answering from the",
|
|
4892
|
+
"# details too would double-reply); replay-off hosts must act on the",
|
|
4893
|
+
"# details above \u2014 nothing else will ever re-deliver.",
|
|
4894
|
+
'if [ "$pending_total" -gt 0 ]; then',
|
|
4895
|
+
' if [ "${AGT_CHANNEL_REPLAY_ENABLED:-}" = "true" ] || [ "${AGT_CHANNEL_REPLAY_ENABLED:-}" = "1" ]; then',
|
|
4896
|
+
' echo "Respond \\"Ready.\\" once. The queued messages above will be re-delivered to you by the channel server within a few minutes \u2014 answer each as it arrives (acknowledge before tool use). Do not reply from the queue details directly; wait for the re-delivery."',
|
|
4897
|
+
" else",
|
|
4898
|
+
` echo "Respond \\"Ready.\\" once, then immediately work through the queued messages above, oldest first \u2014 they are real user messages from before this session started and will NOT be re-delivered. Use the addressing ids with the matching channel reply tool (slack.reply with channel + thread_ts, telegram.reply with chat_id, etc.). If a queue detail lacks the message content, first try the channel's thread/history tools to read the conversation (Slack threads can be re-read); only if the content is truly unrecoverable, say so honestly in your reply and ask the user to resend."`,
|
|
4899
|
+
" fi",
|
|
4900
|
+
"else",
|
|
4901
|
+
' echo "Respond \\"Ready.\\" once. Do not run any tools or load any data until a real user or channel message arrives. When you do receive a message, acknowledge it before tool use."',
|
|
4902
|
+
"fi",
|
|
4866
4903
|
"exit 0"
|
|
4867
4904
|
].join("\n") + "\n";
|
|
4868
4905
|
writeFileSync5(hookScriptPath, hookScript, { mode: 493 });
|
|
@@ -7980,4 +8017,4 @@ export {
|
|
|
7980
8017
|
managerInstallSystemUnitCommand,
|
|
7981
8018
|
managerUninstallSystemUnitCommand
|
|
7982
8019
|
};
|
|
7983
|
-
//# sourceMappingURL=chunk-
|
|
8020
|
+
//# sourceMappingURL=chunk-ELEMDMTQ.js.map
|